Preserve synced tab selection across pages/sessions #1851
Closed
bhollis
started this conversation in
Feature Requests
Replies: 2 comments 2 replies
-
Thanks for creating a feature request to track this @bhollis! We’re currently exploring how |
Beta Was this translation helpful? Give feedback.
2 replies
-
Starting with Starlight |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
What version of
starlight
are you using?0.22.1
What is your idea?
I'm extracting this comment so it doesn't get lost now that the original feature request (synced Tabs) is done: #953 (comment)
It would be great if we could allow synced tabs to remember their state between sessions (reloads, page navigation). This would mean that tabs with a
syncKey
set would immediately swap to the tab corresponding to the last chosen sync key at page load / component load. The state could be stored inlocalStorage
.Why is this feature necessary?
When building code documentation, we have sample code available in many different languages. It's likely that a reader only cares about one of those at a time. Once they select their preferred language in one place, we'd like for that to be applied to every code sample. As it is now, they have to make their selection again every time they load the page.
Do you have examples of this feature in other projects?
Participation
Beta Was this translation helpful? Give feedback.
All reactions