-
-
Notifications
You must be signed in to change notification settings - Fork 562
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 synced tabs persistence #2087
Conversation
🦋 Changeset detectedLatest commit: ed1b3bf The changes in this PR will be included in the next version bump. This PR includes changesets to release 1 package
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
This comment was marked as outdated.
This comment was marked as outdated.
Lunaria Status Overview🌕 This pull request will trigger status changes. Learn moreBy default, every PR changing files present in the Lunaria configuration's You can change this by adding one of the keywords present in the Tracked Files
Warnings reference
|
Undrafting this PR as I would like to get more eyes on it and have some people play with the changes, maybe during a T&D session or something similar. The flash of invalid tabs that I mentioned is randomly present but only during dev like I mentioned and I'm not sure there is a reliable way to remove it. In production tho, I've never seen it but that's why I would like to have more people test it. There is also probably room for improvements in the inline script but that could be done later on when we confirm that the current approach is working as expected. |
✅ Deploy Preview for astro-starlight ready!
To edit notification comments on pull requests, go to your Netlify site configuration. |
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.
Getting an early review in before we go through this on T&D on Thursday. Working great in the deploy preview for me @HiDeoo!
Co-authored-by: Chris Swithinbank <[email protected]>
Co-authored-by: Chris Swithinbank <[email protected]>
Co-authored-by: Chris Swithinbank <[email protected]>
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.
LGTM from an initial review! Look forward to seeing how testing goes tomorrow.
Based on the feedback during the T&D exploration, I've updated the PR:
|
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.
LGTM! Left two nits, but don’t have any “real” comments left!
tabs?.[0]?.setAttribute('aria-selected', 'false'); | ||
tabs?.[0]?.setAttribute('tabindex', '-1'); |
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.
Nit, but I think tabs
will always be set here given it is declared as [...query]
:
tabs?.[0]?.setAttribute('aria-selected', 'false'); | |
tabs?.[0]?.setAttribute('tabindex', '-1'); | |
tabs[0]?.setAttribute('aria-selected', 'false'); | |
tabs[0]?.setAttribute('tabindex', '-1'); |
Co-authored-by: Chris Swithinbank <[email protected]>
Co-authored-by: Chris Swithinbank <[email protected]>
Closes #1851 and follow-up to #953.
This PR adds persistence to the synced tabs feature by relying on
localStorage
to store the synced tabs state.This pull request is still a draft for 2 reasons: