-
-
Notifications
You must be signed in to change notification settings - Fork 8.7k
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
fix(theme): refactor Tabs, make groupId + queryString work fine together #8486
Conversation
✅ [V2]
To edit notification comments on pull requests, go to your Netlify site settings. |
⚡️ Lighthouse report for the deploy preview of this PR
|
If anyone want to review this asap please let me know otherwise I'd like to merge it and do a release tomorrow |
Size Change: +95 B (0%) Total Size: 888 kB
ℹ️ View Unchanged
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Using useSyncExternalStore
hook makes much more sense than using React context 👍
…th cross-window/current-window localstorage changes
LocalStorage sync now also works across windows 🥳 CleanShot.2022-12-29.at.12.00.20.mp4 |
Motivation
Fix #8473 (groupId/localStorage sync regression)
Much needed component refactor, make it easier to reason about and move most of the technical code to theme-common
Test Plan
Unit tests + preview
Test links
A good case to test: select "ios" on the 2nd/last tabs with a groupId (this will be persisted in localstorage)
(querystring wins over localstorage on purpose)
Related issues/PRs
Supersed #8483