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

fix: Go Back link navigation #2658

Merged
merged 2 commits into from Nov 17, 2021

Conversation

victorgcramos
Copy link
Member

Closes #2655.

This diff fixes the Go Back link navigation by adding the breakpoint prop,
where users can inform the route match path that should be considered a
navigation rollback point.

Fortunately, due to privacy matters, the browsers don't allow the previous
history states access. Therefore, the method used consists in storing the
previous navigated pages on our platform in a stack, and then getting the
index of the first route that does not match the current breakpoint. This way
we can restore the window navigation state, instead of pushing a new one.

Copy link
Member

@lukebp lukebp left a comment

Choose a reason for hiding this comment

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

tACK

Needs approval from @tiagoalvesdulce.

Copy link
Member

@tiagoalvesdulce tiagoalvesdulce left a comment

Choose a reason for hiding this comment

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

LGTM. More complicated than I thought. Good job!

@tiagoalvesdulce tiagoalvesdulce merged commit ebec3a3 into decred:master Nov 17, 2021
@lukebp lukebp added the bug A bug that made it into a production environment. label Nov 22, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug A bug that made it into a production environment.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Incorrect 'Go Back' button behavior.
3 participants