Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

@dannon
Copy link
Member

@dannon dannon commented Sep 9, 2025

Fixes #20878

Adds navigation guards to prevent users from accidentally losing unsaved work in visualizations like JupyterLite. Implements both Vue Router guards (for in-app navigation) and beforeunload handlers (for browser back/forward/refresh)

How to test the changes?

(Select all options that apply)

  • I've included appropriate automated tests.
  • This is a refactoring of components with existing test coverage.
  • Instructions for manual testing are as follows:
    1. [add testing steps and prerequisites here if you didn't write automated tests covering all your changes]

License

  • I agree to license these and all my past contributions to the core galaxy codebase under the MIT license.

Detects unsaved changes in visualization iframes using DOM observers and event listeners. Shows confirmation when navigating away with unsaved work.
@dannon dannon marked this pull request as ready for review September 9, 2025 16:52
handle this appropriately.  Simplify emits and rely on local change
handling.
@github-actions github-actions bot added this to the 25.1 milestone Sep 9, 2025

// Monitor DOM changes (skip initial load)
setTimeout(() => {
const observer = new MutationObserver(() => markAsChanged());
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nice!

@mvdbeek mvdbeek merged commit a32fd30 into galaxyproject:dev Sep 10, 2025
29 of 30 checks passed
@galaxyproject galaxyproject deleted a comment from github-actions bot Sep 10, 2025
@guerler guerler changed the title Viz nav guard Add visualization navigation guard Oct 2, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Navigation guard for visualizations

3 participants