-
Notifications
You must be signed in to change notification settings - Fork 26
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
Add hash values to maintain tab between page loads #54
Conversation
Thanks for your interest in the project. I'd going to make some changes before pulling. In the meantime, I do have a question. Are you saving the whole url when you are coming back to this page? I guess I'm confused on how you'd come back to it with the tab already in the URL. Maybe we should be storing the current tab in local storage so anytime you comeback to the page you can resume where you left off even if you don't have the url hash included. |
Another question, do we need to keep a history of what tabs you have been on? Currently this code will continue to update your browser history every time you click a new tab. I don't know what the benefit of that would be. I'm going to change it so the history doesn't update every time. |
@Gobluebro So the use case is that I use the checklist on my phone, and switch between the checklist and the Elden Ring wiki a lot. When navigating back to the checklist browser tab in Chrome, sometimes the page reloads which drops you back off at the "Quest" checklist tab (iOS + Chrome, though I'm sure most mobile browsers do this, I think its a memory saving thing). Yeah, that is a good point, I don't think its neccessary to store browser history entries at all, and makes much more sense to just store in local storage for anytime you come back to the checklist. I just added a commit that uses local storage, instead of hash values. |
So when you switch back and forth from mobile to desktop, does your checklist state sync? It saves all of your progress through local storage, but I assumed that was localized per device. If it is the case that chrome is syncing both phone and desktop local storage then this solution should work well |
@Gobluebro Sorry, when I said iOS + Chrome, I meant I use it mobile only using Chrome on iOS. Local storage is per device, as far as I know. |
Ah okay thanks you for clarifying |
Removed "default" tab and made quests the default value
I have a hook that does this local storage work for me. I replaced the default enum value and made quests the default value in the hook. |
@Gobluebro woohoo! Thanks for the awesome checklist! |
Thank you for the kind words and for helping make this website better |
Hey @Gobluebro, I thought it would be neat to set hash values in the url to land you on the correct tab each time you hit the site, rather than always defaulting to "Quests." The default remains "Quests" if no hash value is present, or the hash value is a bad value. Seems useful so you don't have to constantly switch tabs anytime you come back to the page (an issue I have frequently with an otherwise great web app!) Thanks!