-
Notifications
You must be signed in to change notification settings - Fork 162
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
[Feature request] Allow browser back button to reverse state changes #1393
Comments
This is indeed possible, and actually implemented for some parts of auspice (e.g. change datasets). The code is here so it would be a matter of updating the relevant (redux) actions to set |
I'd like to reiterate my interest in this feature, been browsing a lot of trees lately and something in between 5 times zooming out of a branch and reset zoom and clicking into a branch is sorely missing! |
I've implemented something along these lines in PR #1403. I'll revisit this again this week and see if it's OK for release. From your comment above it seems like the previous phylogenetic zoom level is what you want to "go back" to, in which case a back button on the tree (or similar) is the best solution. My thoughts on the browser back button, or why we shouldn't use it. We can use this to revert the most recent user action, but we shouldn't. The general best practice seems to be that navigating to a materially different page should add an entry to the history stack (allowing the back button to go back to the previous page). Auspice does this when you change datasets, for instance. If we change this so that every action -- zooming the tree, zooming the map, animating, filtering -- adds an entry to the browser history, then you quickly loose the ability to go back to a page pre-auspice, and you also may not be able to go back to your previous tree zoom quickly either. (Not to mention that we'd have to change how we store state in the URL.) There are sites around the internet that do this, and I find them generally frustrating to use. |
Ah yes, I mixed up the browser back button and PR #1403. Looking forward to that being testable! |
@trvb wrote in #1348:
I think this is a great idea that would make navigating around Auspice even more fun and less frustrating when you're zooming around. @joverlee521 suggested I open a new issue to keep track of this feature request.
The text was updated successfully, but these errors were encountered: