-
Notifications
You must be signed in to change notification settings - Fork 913
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
tabpane: support header as persistence key #1602
Conversation
943b49c
to
0dcc6dc
Compare
In general I like the idea and consider this an improvement. I will approve this once all related topics are settled.
Yes, I would prefer to start from scratch here and allow values Reading the documentation in the user guide I realize that more and more features were added to the shortcode by time, but we still have a textual description off all the available parameters only. I would prefer if we presented the available parameters inside a table (as we do for other shortcodes already). @chalin: are you willing to take that and come up with a initial draft here? |
Thanks for the feedback @deining.
Good, that was my initial inclination and preference, but had a doubt as to whether you might want this feature added with minimal disruption or not. I'll pull out the second commit so that we can start from scratch, and make some adjustments. |
0dcc6dc
to
80a9be0
Compare
I've updated the PR so that it:
Regarding doc updates: yes the docs should be updated, but I'd like to land this PR first, in particular because I have some followup enhancements to suggest, and would like to approach this incrementally. As you might have noticed, I added a warning to the README stating that Similar remark applies to renaming the PTAL |
Great!
Yes, I agree that
I see.
Looking forward seeing more improvements coming in!
LGTM now. |
Great. Merging based on your LGTM. |
This PR is a minimally intrusive/disruptive change to the
tabpane
shortcode, it:Headers are used as persistence key when
tabpane.persistLang
is absent andtabpane.lang
is set. (The latter implies a base sharedlang
for all of the tabpane's tab -- which individual tabs can override.)Persisting header keys is useful when a page contains multiple tabpanes sharing the same headers, regardless of the tab language used: e.g., see Collector > Getting Started for a page that could benefit from this. As an example of the impact of this change: it allows us to drop all 24 occurrences of
persistLang=false
from the OTel website.Note: this PR has two commits. The two commits combined, provide minimal changes to
tabpane
. The first commit actually generalizes the values supported bytabpane.persistLang
to be "lang", "header", or "false". If you prefer such a generalization from the start @deining, then I can drop the second commit (which is a partial revert).Eventually, we might want to replace
tabpane.persist
supporting the values "lang", "header", or "false".Depending on your feedback @deining, I'll add appropriate comments to the changelog in this or a followup PR.
This PR has no impact (other than whitespace cleanup) on the generated user guide:
(The same was true of the OTel website before I removed the
persistLang=false
attributes.)