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

GN-4599: prevent confirmation dialog from popping up twice. #607

Merged
merged 2 commits into from
Nov 23, 2023

Conversation

elpoelma
Copy link
Contributor

@elpoelma elpoelma commented Nov 23, 2023

Overview

This PR solves an issue with the confirmation dialog popping up twice upon leaving an edit route.
Specifically, it updates the isLoadingRoute to more correctly check if a RouteInfo object represents a loading route.
The isLoadingRoute function now checks for the following possible syntaxes:

  • loading
  • ${routename}-loading
  • ${routename}_loading (new)
connected issues and PRs:

GN-4599

How to test/reproduce

  • Open an agendapoint/regulatory statement
  • Type some text without saving
  • Leave the route
  • Ensure that the confirmation dialog only pops up once.

Challenges/uncertainties

The isLoadingRoute function is quite volatile. If something changes to the internal naming of ember loading routes, the function would need to be updated.
Another possibility is to remove the routeWillChange listener after the user has pressed ok in the confirmation dialog.

Checks PR readiness

  • UI: works on smaller screen sizes
  • UI: feedback for any loading/error states
  • Check cancel/go-back flows
  • Check database state correct when deleting/updating (especially regarding relationships)
  • changelog
  • npm lint
  • no new deprecations

@elpoelma elpoelma added the bug Something isn't working label Nov 23, 2023
@elpoelma elpoelma requested a review from abeforgit November 23, 2023 11:47
@elpoelma elpoelma changed the title Prevent confirmation dialog from popping up twice. GN-4599: prevent confirmation dialog from popping up twice. Nov 23, 2023
@abeforgit abeforgit enabled auto-merge November 23, 2023 20:33
@abeforgit abeforgit merged commit 40a7658 into master Nov 23, 2023
@abeforgit abeforgit deleted the GN-4599-document-not-saved-even-though-it-is-saved branch November 23, 2023 20:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants