Single-tab management: switch to localStorage-based#802
Open
mnm-matin wants to merge 1 commit intoenricoros:mainfrom
Open
Single-tab management: switch to localStorage-based#802mnm-matin wants to merge 1 commit intoenricoros:mainfrom
mnm-matin wants to merge 1 commit intoenricoros:mainfrom
Conversation
…ingleTabEnforcer hook for improved tab ownership handling. Update ProviderSingleTab to utilize new hook structure, enhancing clarity and functionality.
|
@mnm-matin is attempting to deploy a commit to the Token Fabrics Pro Team on Vercel. A member of the Team first needs to authorize it. |
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
Owner
|
Thanks for the pr @mnm-matin very smart solution! I'd merge it right away, but need to take some time to merge this because it's on the critical path for the new boot sequence that will be present in the upcoming version (and needs careful initialization and dependency between components, including this). So I'll have to revisit this once I release the very large change I'm working on. Thanks for submitting! |
Author
|
np, happy to contribute to a great project with super responsive devs 🚀🚀 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Switch to LocalStorage-based single tab management
Problem:
Current multi-tab detection forces users to close the original tab when opening the app in a new tab, leading to poor UX as users must manually hunt down and close tabs.
Solution:
Replace the BroadcastChannel implementation with a simpler LocalStorage-based approach, inspired by WhatsApp Web's tab management:
Changes:
useSingleTabEnforcerto use localStorage and the storage eventProviderSingleTabto show a WhatsApp-style "Use here" buttonTesting: