-
Notifications
You must be signed in to change notification settings - Fork 178
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
Editor: don't alter browser history with page persistence #5321
Conversation
Size Change: +34 B (0%) Total Size: 1.44 MB ℹ️ View Unchanged
|
Thank you! |
Codecov Report
@@ Coverage Diff @@
## main #5321 +/- ##
==========================================
+ Coverage 76.37% 76.50% +0.13%
==========================================
Files 962 962
Lines 16886 16886
==========================================
+ Hits 12896 12919 +23
+ Misses 3990 3967 -23
Flags with carried forward coverage won't be shown. Click here to find out more.
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This looks good and keeps the correct page on navigation, I can't think of an offhand reason this would break anything, but would be great for @swissspidy and @barklund to give it a spot check.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM!
Summary
Makes hash updates not effect browser history.
Relevant Technical Choices
Moved to using
history.replaceState(...)
vs editing the hash directly. This keeps the app from altering history when editing persistent hash state.To-do
NA
User-facing changes
Now when you change pages in the editor, then press the back button in the browser, you should be taken back to the last page you were on before the editor
Testing Instructions
Go to my stories -> open a story in the editor -> click to view several different pages in your story or add a page -> press the browser's back button once -> should go directly back to the stories view.
Fixes #4858