fix(theme): refactor Tabs, make groupId + queryString work fine together#8486
Merged
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
|
Collaborator
Author
|
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
|
0916dhkim
reviewed
Dec 29, 2022
Contributor
0916dhkim
left a comment
There was a problem hiding this comment.
Using useSyncExternalStore hook makes much more sense than using React context 👍
…th cross-window/current-window localstorage changes
Collaborator
Author
|
LocalStorage sync now also works across windows 🥳 CleanShot.2022-12-29.at.12.00.20.mp4 |
slorber
added a commit
that referenced
this pull request
Jan 26, 2023
7 tasks
1 task
7 tasks
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.
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