Skip to content
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

tabs: URL referencing #123

Open
4 of 6 tasks
casperdcl opened this issue Oct 11, 2021 · 6 comments
Open
4 of 6 tasks

tabs: URL referencing #123

casperdcl opened this issue Oct 11, 2021 · 6 comments
Labels
A: website Area: website epic Collection of sub-issues p2-nice-to-have Low priority

Comments

@casperdcl
Copy link
Contributor

casperdcl commented Oct 11, 2021

Given:

<!-- /some/page.md -->
<toggle>
<tab title="Foo">
</tab>
<tab title="Bar">

some text

### sub section

</tab>
</toggle>

Should be able to use:

  • /some/page?tab=Bar (or /some/page#Bar?) to auto-open the appropriate tab (p1-important, Update markdown tabs #130)
    • /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:


@julieg18
Copy link
Contributor

/some/page?tab=Bar (or /some/page#Bar?) to auto-open the appropriate tab (p1-important)

Do we want the tab query to be automatically added to the url when the user clicks on a tab?

@casperdcl
Copy link
Contributor Author

@julieg18 yes

@julieg18
Copy link
Contributor

@julieg18 yes

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
Copy link
Contributor Author

For now I think we should only support 1 ?tab= (i.e. replace not add upon subsequent clicks)

@julieg18 julieg18 added p2-nice-to-have Low priority and removed p1-important High priority labels Oct 28, 2021
@julieg18
Copy link
Contributor

julieg18 commented Dec 1, 2021

remember the ?tab= when navigating to a different page (p2-nice-to-have)

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 casperdcl added the epic Collection of sub-issues label Dec 1, 2021
@casperdcl
Copy link
Contributor Author

Are we sure we want this

yes, the GH/GL/BB tabs are important and frequent enough to make this desirable on https://cml.dev/doc. Potentially could clear ?tab=X only when navigating to a page that doesn't contain an X tab.

@julieg18 julieg18 removed their assignment Jul 11, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A: website Area: website epic Collection of sub-issues p2-nice-to-have Low priority
Projects
None yet
Development

No branches or pull requests

2 participants