msyavuz opened a new pull request, #36402:
URL: https://github.com/apache/superset/pull/36402

   ### SUMMARY
   When saving a chart from the explore view and choosing "Save & go to 
dashboard", the chart's state from the explore view was persisting in Redux 
store and affecting the dashboard's chart rendering. This fix ensures that the 
chart state is properly cleaned up before navigating to the dashboard.
   
   The issue occurs because the explore view's chart state remains in Redux 
when navigating directly to a dashboard. By dispatching `removeChartState` 
before navigation, we ensure a clean state transition.
   
   ### BEFORE/AFTER SCREENSHOTS OR ANIMATED GIF
   N/A - This is a state management fix that prevents incorrect chart rendering
   
   ### TESTING INSTRUCTIONS
   1. Go to explore view and create/edit a chart
   2. Click "Save" 
   3. Select a dashboard from the dropdown
   4. Click "Save & go to dashboard"
   5. Verify that the chart renders correctly in the dashboard without any 
state issues from the explore view
   
   **Unit Test:**
   A new unit test has been added to verify that `removeChartState` is 
dispatched when saving and navigating to a dashboard. Run:
   ```bash
   npm run test -- src/explore/components/SaveModal.test.jsx -t "dispatches 
removeChartState"
   ```
   
   ### ADDITIONAL INFORMATION
   - [ ] Has associated issue:
   - [ ] Required feature flags:
   - [x] Changes UI (prevents chart rendering issues)
   - [ ] Includes DB Migration (follow approval process in 
[SIP-59](https://github.com/apache/superset/issues/13351))
     - [ ] Migration is atomic, supports rollback & is backwards-compatible
     - [ ] Confirm DB migration upgrade and downgrade tested
     - [ ] Runtime estimates and downtime expectations provided
   - [ ] Introduces new feature or API
   - [ ] Removes existing feature or API


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to