Given: ```markdown <!-- /some/page.md --> <toggle> <tab title="Foo"> </tab> <tab title="Bar"> some text ### sub section </tab> </toggle> ``` Should be able to use: - [x] `/some/page?tab=Bar` (or `/some/page#Bar`?) to auto-open the appropriate tab (`p1-important`, #130) - [x] `/some/page/?tab=Bar#sub-section` (or `/some/page#Bar-sub-section`?) to auto-open the tab and scroll to containing section (`p2-nice-to-have`) - [ ] remember the `?tab=<arg>` when navigating to a different page (`p2-nice-to-have`) Other tasks: - [x] initial tabs implementation (#113) - [ ] update styling a little (#136, TODO: [follow-up](https://github.com/iterative/cml.dev/pull/136#issuecomment-953910206)) --- - [x] ~blocking #122~ - related #70
Activity
julieg18 commentedon Oct 18, 2021
Do we want the tab query to be automatically added to the url when the user clicks on a tab?
casperdcl commentedon Oct 18, 2021
@julieg18 yes
julieg18 commentedon Oct 18, 2021
Do you think this could make urls look lengthy if we had multiple different sets of tabs on one page? For example: https://cml.dev/doc/cml-with-dvc?tab=google-cloud-storage&tab=windows.
casperdcl commentedon Oct 18, 2021
For now I think we should only support 1
?tab=(i.e. replace not add upon subsequent clicks)julieg18 commentedon Dec 1, 2021
Are we sure we want this behavior? Currently it seems like we don't have many similiar tab names minus github, gitlab, and bitbucket 🤔
casperdcl commentedon Dec 1, 2021
yes, the GH/GL/BB tabs are important and frequent enough to make this desirable on https://cml.dev/doc. Potentially could clear
?tab=Xonly when navigating to a page that doesn't contain anXtab.