-
Notifications
You must be signed in to change notification settings - Fork 3
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
[Bug] state
gets confused when user (1) loads demo (2) back button (3) uploads data
#157
Comments
Hi, sure Steps to reproduce bug:
If I click browser back button and click browser refresh button and reupload, it brings me to the starting page as expected. |
Thank you!! |
state
gets confused when user (1) loads demo (2) back button (3) uploads data
Need to fire the |
So I see two different ways to approach this:
Let's discuss pros and cons: (1) is definitely the easier option to implement. We just need a (2) allows the back/forward "saving your place" behavior. If we do (2), it goes back but doesn't wipe out to defaults until you commit to the fact that you want a new tree, at which point it makes sense to wipe out to defaults as a preparatory step before loading in new tree info. The downside is that it's a bit more cumbersome in code: the places where we load up a tree for the first time ( So really it comes down to how much we want the ability to hit back button, then forward button, but not have lost the tree we were just on. If we don't care much about that, (1) is definitely the way to go. If we care strongly about that, then (2) is what we should do. If we're on the fence, it depends on how happy we are about coupling tree load to a state reset. |
Thanks for the clear explanation of your thought process and pros/cons, @vincent-czi . I always super appreciate this about working with / learning from you! My initial thought is that the forward / backward buttons are very fragile as a way to interact with and control state of the application. I'd like to both discourage the user from coming to think this is something they can rely on and prevent them from accidentally shooting themselves in the foot and losing their data and progress if they refresh/leave. What do you think about implementing (1) as a first step, and filing a separate issue to fire off a little dialog pop-up that says "are you sure you want to leave this page? state will be lost" when the user tries to hit the fwd/back/refresh/other url? |
@happyimadesignr -- can you please provide the steps to reproduce?
The text was updated successfully, but these errors were encountered: