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

Catch PopState Event (goback) and Redirect to popNavStack #736

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

mreyesh
Copy link

@mreyesh mreyesh commented Jan 20, 2025

Minor UX enhancement:

Catch PopState Event (goback) and Redirect to popNavStack so that if you are exploring in the explorer and traverse a path of links, you can go back by using the go back browser button or any shortcuts from the keyboard or trackpad/mouse.

@nezaj
Copy link
Contributor

nezaj commented Jan 31, 2025

Thanks for the PR @mreyesh !

I noticed there's a slight bug with this. I can make things work like so:

  • Start at home-page, click dashboard, go to explorer, find a namespace with a link, traverse the link
  • Going backwards and forwards should work!

However navigation will break like so:

  • After traversing a link go backwards enough to end up on the home page
  • Now click forward button, you'll be back in explorer, and if you traverse a link, hitting the back button takes you to the home page

I think the problem lies with how we use router.replace -- I think we may want to switch to just using push throughout instead.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants