Skip to content

Conversation

gribnoysup
Copy link
Collaborator

@gribnoysup gribnoysup commented Oct 1, 2025

Part of the change that should allow us to warn users when navigating away from the data explorer route when some tabs are in "dirty" state. We can't encapsulate all this logic inside Compass because we will have to interface with react-router on the mms side for this to work, so instead of this, we'll allow mms to get a reference to the callback that the code there will be able to run to do the check. Property name is a bit weird, but I couldn't come up with something better, suggestions are welcome

@gribnoysup gribnoysup requested a review from a team as a code owner October 1, 2025 10:59
@gribnoysup gribnoysup requested a review from Anemy October 1, 2025 10:59
Copy link
Collaborator

@nbbeeken nbbeeken left a comment

Choose a reason for hiding this comment

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

What is an example of something that makes a tab dirty?

@Anemy
Copy link
Member

Anemy commented Oct 1, 2025

@nbbeeken An example of a tab in the "dirty" state would be if a user has an written a query/aggregation in the tab and hasn't saved.
You can look up onTabClose and onTabReplace in the code base to see them currently.

Copy link
Member

@Anemy Anemy left a comment

Choose a reason for hiding this comment

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

Should we add something to the sandbox env that uses this? We can add the window.onbeforeunload to


Fine as is, it may be a nice test to add or something for the npm run start-web environment to use.

Otherwise it will make it a requirement to implement something on other side
during the version bump and we don't want that
@gribnoysup
Copy link
Collaborator Author

@Anemy good point, I'll keep it to a separate PR to make sure it's not affecting / accounted for in the e2e tests

@gribnoysup gribnoysup merged commit 8feea32 into main Oct 6, 2025
83 of 84 checks passed
@gribnoysup gribnoysup deleted the COMPASS-8033 branch October 6, 2025 15:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants