You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@superset.apache.org by "rebenitez1802 (via GitHub)" <gi...@apache.org> on 2025/09/26 12:59:57 UTC

[PR] fix(explore): close unsaved changes modal when discarding changes [superset]

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

   <!---
   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 the unsaved changes modal not closing when user clicks "Discard" during chart editing navigation. 
   
     Root cause: The handleConfirmNavigation function was missing setShowModal(false) call, causing the modal to remain open after navigation.
   
   ### BEFORE/AFTER SCREENSHOTS OR ANIMATED GIF
   <!--- Skip this if not applicable -->
   
   ### TESTING INSTRUCTIONS
   <!--- Required! What steps can be taken to manually verify the changes? -->
   
   1. Open any chart
   2. change something like time grain or metric
   3. click the back button in the browser
   4. click on discard button
   
   ### 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:
   - [ ] 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: notifications-unsubscribe@superset.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org


Re: [PR] fix(explore): close unsaved changes modal when discarding changes [superset]

Posted by "geido (via GitHub)" <gi...@apache.org>.
geido merged PR #35307:
URL: https://github.com/apache/superset/pull/35307


-- 
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: notifications-unsubscribe@superset.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org


Re: [PR] fix(explore): close unsaved changes modal when discarding changes [superset]

Posted by "SBIN2010 (via GitHub)" <gi...@apache.org>.
SBIN2010 commented on PR #35307:
URL: https://github.com/apache/superset/pull/35307#issuecomment-3358273833

   <img width="695" height="218" alt="Снимок экрана от 2025-10-02 00-44-13" src="https://github.com/user-attachments/assets/0ea4b962-ee99-40ad-af8e-cc21c35a3120" />
   The checks fail because of the test.([testing guidelines](https://github.com/apache/superset/wiki/Testing-Guidelines-and-Best-Practices#avoid-nesting-when-youre-testing)?)


-- 
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: notifications-unsubscribe@superset.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org


Re: [PR] fix(explore): close unsaved changes modal when discarding changes [superset]

Posted by "rusackas (via GitHub)" <gi...@apache.org>.
rusackas commented on PR #35307:
URL: https://github.com/apache/superset/pull/35307#issuecomment-3348148351

   @betodealmeida care to re-review, now that tests are in?


-- 
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: notifications-unsubscribe@superset.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org


Re: [PR] fix(explore): close unsaved changes modal when discarding changes [superset]

Posted by "rusackas (via GitHub)" <gi...@apache.org>.
rusackas commented on PR #35307:
URL: https://github.com/apache/superset/pull/35307#issuecomment-3348149701

   @geido care to re-review, now that tests are in?
   
   


-- 
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: notifications-unsubscribe@superset.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org


Re: [PR] fix(explore): close unsaved changes modal when discarding changes [superset]

Posted by "korbit-ai[bot] (via GitHub)" <gi...@apache.org>.
korbit-ai[bot] commented on PR #35307:
URL: https://github.com/apache/superset/pull/35307#issuecomment-3338621430

   Based on your review schedule, I'll hold off on reviewing this PR until it's marked as ready for review. If you'd like me to take a look now, comment `/korbit-review`.
   
   > Your admin can change your review schedule in the [Korbit Console](https://app.korbit.ai/settings)
   
   
   
   [](4187f667-9b9b-4449-b2e1-ea5e4b9f16d3)


-- 
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: notifications-unsubscribe@superset.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org


Re: [PR] fix(explore): close unsaved changes modal when discarding changes [superset]

Posted by "geido (via GitHub)" <gi...@apache.org>.
geido commented on code in PR #35307:
URL: https://github.com/apache/superset/pull/35307#discussion_r2382706344


##########
superset-frontend/src/hooks/useUnsavedChangesPrompt/index.ts:
##########
@@ -41,6 +41,7 @@ export const useUnsavedChangesPrompt = ({
   const manualSaveRef = useRef(false); // Track if save was user-initiated (not via navigation)
 
   const handleConfirmNavigation = useCallback(() => {
+    setShowModal(false);

Review Comment:
   Can we please add a test that ensures this behavior cannot be reintroduced? 



-- 
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: notifications-unsubscribe@superset.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org