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

Allow to set the active tab in .panel-tabset #7260

Closed
mcanouil opened this issue Oct 17, 2023 Discussed in #6668 · 5 comments · Fixed by #11821
Closed

Allow to set the active tab in .panel-tabset #7260

mcanouil opened this issue Oct 17, 2023 Discussed in #6668 · 5 comments · Fixed by #11821
Labels
enhancement New feature or request html Issues with HTML and related web technology (html/css/scss) tabsets
Milestone

Comments

@mcanouil
Copy link
Collaborator

Discussed in #6668

Originally posted by kmkramer23 August 30, 2023

Description

I was trying to set another tab besides the first tab as the default tab in a panel-tabset when the html document launches. In Rmarkdown this can be done by adding the {.active} attribute to a tab section but that did not appear to work when rendering in Quarto. I got around the problem by writing some javascript code and putting it in the include-after-body to switch tabs on load.

Is there a better way of doing this inside a quarto document?

@mcanouil mcanouil added triaged-to Issues that were not self-assigned, signals that an issue was assigned to someone. tabsets html Issues with HTML and related web technology (html/css/scss) labels Oct 17, 2023
@mcanouil mcanouil added the enhancement New feature or request label Oct 17, 2023
@dragonstyle dragonstyle added this to the v1.5 milestone Nov 27, 2023
@dragonstyle dragonstyle modified the milestones: v1.5, Future Feb 19, 2024
@mcanouil mcanouil removed the triaged-to Issues that were not self-assigned, signals that an issue was assigned to someone. label Nov 14, 2024
@mcanouil
Copy link
Collaborator Author

mcanouil commented Jan 8, 2025

@coatless implemented this in his extension (https://github.com/coatless-quarto/tabby/).
it should be possible to use the same logic natively in Quarto.

@coatless
Copy link
Contributor

coatless commented Jan 9, 2025

Traveling at the moment; but if tab sets are being visited, another useful feature would be adding to the uri a segment to specify tabs that should be open on the page / directly take you to the tab set.

@mcanouil
Copy link
Collaborator Author

mcanouil commented Jan 9, 2025

I think tab anchor is in another issue or it was only discussed in various media (at least Slack recently).

@coatless
Copy link
Contributor

coatless commented Jan 9, 2025

@mcanouil okidokies; do you have an epic on tabsets or an overview I can quickly look at? (No slack access 😢).

tabby got around the "active" tab hiccup by just placing the preferred tab first compared to maintaining block order.

@mcanouil
Copy link
Collaborator Author

mcanouil commented Jan 9, 2025

We use labels: tabsets

I don't find any issue about the ability to have anchor on tabsets, thus to link to specific tab.
I will open one to make sure it is tracked.

Edit:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request html Issues with HTML and related web technology (html/css/scss) tabsets
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants