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

Text editor state issues #912

Closed
jw3 opened this issue Sep 19, 2023 · 2 comments · Fixed by #921
Closed

Text editor state issues #912

jw3 opened this issue Sep 19, 2023 · 2 comments · Fixed by #921
Labels
bug Something isn't working

Comments

@jw3
Copy link
Member

jw3 commented Sep 19, 2023

The text editor views (rules, config) allow the user to navigate away from the editor while unsaved changes are present. When the user navigates back the unsaved changes are gone.

The system does however appear to track some notion of the missing state, this is evident from the rules editor

  1. Edit rule text
  2. Navigate away without saving
  3. Attempt to deploy from another view
  4. Observe the unsaved rules dialog

image

@jw3 jw3 added the bug Something isn't working label Sep 19, 2023
@egbicker
Copy link
Contributor

Is the intent to discard changes upon navigation? Perhaps the unsaved dialog should show up when attempting to navigate away with unsaved changes present and then discard them to avoid this dialog in other pages?

@jw3
Copy link
Member Author

jw3 commented Sep 19, 2023

Yes adding an additional check and prompt when navigating away would be good. If they leave, the changes get discarded.

@egbicker egbicker linked a pull request Oct 6, 2023 that will close this issue
@jw3 jw3 closed this as completed in #921 Oct 19, 2023
jw3 pushed a commit that referenced this issue Oct 19, 2023
Notify user of unsaved text when navigating away from editor.

The user can decide whether to remain on the page, or discard unsaved
changes to navigate away.

Closes #912
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 a pull request may close this issue.

2 participants