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

   ### SUMMARY
   When a mixed chart's active results tab (Results/Samples/View query) 
disappeared — e.g. after a chart type or metric change that removes a tab — 
`ResultsPaneOnDashboard` rendered blank instead of falling back to a tab that 
still exists. `DataTablesPane` already handled this reconciliation; 
`ResultsPaneOnDashboard` did not.
   
   Fix reuses `DataTablesPane`'s stale-tab fallback logic in 
`ResultsPaneOnDashboard`, then extracts the duplicated 
`getStaleResultsTabFallback` + `useEffect` pair from both components into a 
shared `useStaleResultsTabFallback` hook so there's a single implementation.
   
   Split out of #43454, which now only carries the `fullHeight` grid-sizing fix.
   
   ### BEFORE/AFTER SCREENSHOTS OR ANIMATED GIF
   <!-- TODO: attach a before/after clip showing the Chart Data modal no longer 
going blank when the active results tab disappears -->
   
   ### TESTING INSTRUCTIONS
   1. Build a chart whose "View as table" modal shows multiple result tabs 
(e.g. a chart with samples), and add it to a dashboard.
   2. Open the chart's "View as table" (Chart Data) modal.
   3. Trigger a change that removes the currently active tab (e.g. switch to a 
chart type/metric combination that drops the Samples tab).
   4. Confirm the modal still renders a valid tab's contents instead of going 
blank.
   
   ### ADDITIONAL INFORMATION
   - [ ] Has associated issue:
   - [ ] Required feature flags:
   - [x] Changes UI
   - [ ] 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