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

   <!---
   Please write the PR title following the conventions at 
https://www.conventionalcommits.org/en/v1.0.0/
   Example:
   fix(dashboard): load charts correctly
   -->
   
   ### SUMMARY
   <!--- Describe the change below, including rationale and design decisions -->
   Fixes dark theme issues where imperative Modal APIs (`Modal.confirm`, 
`Modal.error`, `Modal.warning`) render to `document.body` without theme 
context, causing white backgrounds in `dark mode`.
   
   **Changes:**
   - Created reusable `ConfirmModal` component and `useConfirmModal` hook in 
`@superset-ui/core`
   - Replaced `Modal.confirm` with `useConfirmModal` in:
     - `ControlPanelsContainer` (X-axis filter suggestion)
     - `ResultSet` (CSV download limit warning)
     - Refactored `CopyStyledButton` in `ResultSet` to use themed hover color 
(`theme.colorPrimary`)
     - `ThemeList` (system default confirmations - refactored for consistency)
   - Replaced `Modal.error` with `addDangerToast` in:
     - Dashboard `PropertiesModal` (error handling)
     - Explore `PropertiesModal` (error handling)
   - Implemented `Alert` footer pattern in `EmbeddedModal` (deactivation 
confirmation)
   
   ### BEFORE/AFTER SCREENSHOTS OR ANIMATED GIF
   <!--- Skip this if not applicable -->
   #### Before:
   
![bad-href-button-color-on-hover](https://github.com/user-attachments/assets/5f714ab6-f3ef-4f80-b08c-4804f31af24f)
   <img width="458" height="220" alt="Screenshot 2025-10-03 at 13 36 36" 
src="https://github.com/user-attachments/assets/dd0e8fb3-17ea-4259-9fc8-6bd826da4cf7";
 />
   <img width="534" height="661" alt="Screenshot 2025-10-03 at 13 17 16" 
src="https://github.com/user-attachments/assets/89f01dc0-e91e-4457-9c97-7a8bd5ca499f";
 />
   <img width="527" height="381" alt="Screenshot 2025-10-03 at 13 12 53" 
src="https://github.com/user-attachments/assets/72e01190-0421-464c-b43c-bbc36c2b6028";
 />
   <img width="535" height="289" alt="Screenshot 2025-10-03 at 13 05 09" 
src="https://github.com/user-attachments/assets/2b1ec45b-5dd9-4766-af3f-6c61920aa542";
 />
   <img width="675" height="472" alt="Screenshot 2025-10-03 at 13 02 13" 
src="https://github.com/user-attachments/assets/1d9a288f-983c-465b-89ad-7f98f956e90c";
 />
   
   
-------------------------------------------------------------------------------------------
   
   #### After:
   
![correct-hover](https://github.com/user-attachments/assets/a1120c36-620a-4550-ad89-614baac98068)
   <img width="613" height="238" alt="image" 
src="https://github.com/user-attachments/assets/f8cdaadb-9f1a-4750-8478-e0f98d021fa5";
 />
   <img width="1512" height="826" alt="Screenshot 2025-10-06 at 11 21 37" 
src="https://github.com/user-attachments/assets/cadb194e-4043-48b6-ad8d-ba2c40fd0437";
 />
   <img width="648" height="316" alt="image" 
src="https://github.com/user-attachments/assets/05772273-3d53-47db-843c-7d5917f1d8fd";
 />
   <img width="639" height="479" alt="Screenshot 2025-10-06 at 13 56 40" 
src="https://github.com/user-attachments/assets/3675ae9d-536d-431f-96b7-08587de46f35";
 />
   
   ### TESTING INSTRUCTIONS
   <!--- Required! What steps can be taken to manually verify the changes? -->
   1. Enable dark theme in Superset
   2. **Test ControlPanelsContainer (X-axis filter):**
     - Go to Explore view
     - Choose a dataset (e.g.: channels)
     - Select a chart type with X-axis (e.g.: Line Chart)
     - Choose an X-axis column not in filters (e.g.: topic__last_set)
     - Verify confirmation modal appears with dark theme
   3. **Test ResultSet (CSV download warning):**
     - Go to `SQL Lab`
     - Run a query with LIMIT applied
     - Click `Download CSV`
     - Verify warning modal appears with dark theme
     - Verify button hover state uses theme color
   5. **Test EmbeddedModal (deactivation):**
     - Enable embedded dashboards in `superset/config.py`
     - Go to a dashboard
     - Open embed settings
     - Activate the embedding
     - Open embed settings again
     - Click "Deactivate"
     - Verify Alert component appears inline (not a new modal)
   7. **Test PropertiesModal errors:**
     - Trigger validation errors in dashboard/chart properties
     - Verify error toasts appear instead of modal dialogs
   
   ### ADDITIONAL INFORMATION
   <!--- Check any relevant boxes with "x" -->
   <!--- HINT: Include "Fixes #nnn" if you are fixing an existing issue -->
   - [ ] 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