Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

EVG-16959: Reintroduce navigation warning modal #1851

Merged
merged 3 commits into from Jun 1, 2023

Conversation

sophstad
Copy link
Contributor

EVG-16959

Description

Screenshots

image

Testing

  • Re-add integration test

@sophstad sophstad requested a review from a team May 30, 2023 14:59
@cypress
Copy link

cypress bot commented May 30, 2023

Passing run #10208 ↗︎

0 545 7 0 Flakiness 0

Details:

Add handling for project select dropdown
Project: Spruce Commit: 4c51ed13b7
Status: Passed Duration: 14:00 💡
Started: Jun 1, 2023 3:16 PM Ended: Jun 1, 2023 3:30 PM

This comment has been generated by cypress-bot as a result of this project's GitHub integration settings.

Copy link
Contributor

@SupaJoon SupaJoon left a comment

Choose a reason for hiding this comment

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

This is sweet to have back. Is it possible to render the modal when the user selects a project from the project dropdown (since the selections are cleared) or click on "Switch to Legacy UI" or "Documentation." The modal appears and looks good for the other cases!

unsavedTabs: ProjectSettingsTabRoutes[];
} => {
const { tabs } = useProjectSettingsContext();
const unsavedTabs = Object.entries(tabs)
Copy link
Contributor

Choose a reason for hiding this comment

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

nit: memoizing unsavedTabs will prevent always returning a new reference

@sophstad
Copy link
Contributor Author

sophstad commented Jun 1, 2023

Is it possible to render the modal when the user selects a project from the project dropdown (since the selections are cleared) or click on "Switch to Legacy UI" or "Documentation."

The two navbar links function outside of react-router so it's impossible to catch them here sadly. But Documentation opens in a separate window, and soon we are deprecating the legacy project settings page and the "Switch" button will be removed when users are looking at project settings, so I think the impact is minimal here. Good catch on warning when a user navigates to a new project, added handling for that!

@sophstad sophstad requested a review from SupaJoon June 1, 2023 15:02
@sophstad sophstad merged commit e225d86 into evergreen-ci:main Jun 1, 2023
5 checks passed
@sophstad sophstad deleted the EVG-16959 branch June 1, 2023 15:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants