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

Ability to distinguish source of url change in onUrlChange #119

Open
jessta opened this issue Oct 6, 2020 · 0 comments
Open

Ability to distinguish source of url change in onUrlChange #119

jessta opened this issue Oct 6, 2020 · 0 comments

Comments

@jessta
Copy link

jessta commented Oct 6, 2020

The ability to distinguish whether a call to onUrlChange resulted from a link (and which link) or the back/foward button

An example of a usecase from a conversation in the Elm Slack:

What do you do differently for a Back/Foward navigation?

"We have some tabs and one tab/page loads a list of things which the user can click on to open a modal detail.

  • if the user has a modal open and then clicks back to another page and then forward again, we restore the modal that was open, restore their scroll position, and use the cached data
  • if the user navigates away and then clicks the tab for the page instead of back/forward we scroll them to the top and still use the cached data
  • if the user clicks the tab link for the same page they're on, we refresh the data for the list

All three are navigating to the same path with subtly different behavior."

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

No branches or pull requests

1 participant