Tabpane: support persistence of all active tabs#1611
Merged
chalin merged 8 commits intogoogle:mainfrom Jul 13, 2023
Merged
Conversation
7 tasks
deining
approved these changes
Jul 7, 2023
28c9dee to
71fcf43
Compare
71fcf43 to
efffaf0
Compare
Collaborator
|
This looks really good! |
LisaFC
approved these changes
Jul 13, 2023
Collaborator
Author
|
Thanks for the reviews. As I mention in the associated issue, I'll update the tab-activation algorithm soonish, but this first version should be good enough for most sites. (I'll be fielding it soon too.) |
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.
persist=disabled(instead ofoff)persist=disabled), rather than just the last activated tabbutton.onclickin favor ofclickevent handlers.Handling of non-uniform shared tabs
Assume that a page contains three tabpanes with the following distribution of tabs A, B, C, D -- where these letters represent the tab-persistence keys:
If you activate tab B from any tabpane, it will become active in all three tabs and the selection will be persisted. If you then select C, then tab C will become active in tabpane 3, but tab panes 1 and 2 will remain active at B -- and these settings are persisted. If you then select A, then: tabpanes 1 and 3 become active at A, but tabpane 2 remains unchanged.
IMHO, this applies the principle of least surprise.
Preview and tests
yamland refresh the page. You'll see that the choice of language persists in this page and is active in other pages with the same tab-persistence keyyamlpersistence is still active.Other