-
Notifications
You must be signed in to change notification settings - Fork 182
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
(fix) O3-2742: History API should properly handle the back button #925
Conversation
@@ -910,6 +910,20 @@ ___ | |||
|
|||
___ | |||
|
|||
### ResponsiveWrapper |
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.
Dunno what happened here
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 should've been part of #924. Dunno why the docs task didn't run, despite rerunning it multiple times.
Size Change: -334 kB (-10%) 👏 Total Size: 2.86 MB
ℹ️ View Unchanged
|
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. Thanks, @brandones!
Requirements
feat
,fix
, orchore
, among others). See existing PR titles for inspiration.For changes to apps
If applicable
Summary
Gets the history system to more or less correctly handle SPA redirects / replaceState and back button presses. "More or less" because there's actually not really a way to detect browser back button presses; so this just makes an educated guess by looking at whether the navigation was triggered by a SPA navigation event and whether the page is in the history. If it's a non-SPA navigation to a page in history, we assume it was the back button and roll back history to there.
This resolves a problematic flow described in the ticket description.
Screenshots
Screencast.from.2024-02-10.15-54-56.mp4
Related Issue
https://openmrs.atlassian.net/browse/O3-2742