Skip to content

Conversation

@benlubas
Copy link

@benlubas benlubas commented Jan 23, 2026

Collapse (hide) sections (delimited by headings) by clicking a chevron next to the heading. Expand/collapse all with an option in the codetools menu

Description

New front-matter config for the HTML format section-collapse. Inspired by the old jupyter-contrib-nbextension: Collapsible headings

  • when true: creates chevrons on the right of all headers, when clicked they "collapse" and hide all of their content
  • when false: does nothing
  • when closed start closed

Additionally:

  • make the "code tools" menu multi-purpose. The name is displayed as "Tools" instead of "Code" when it's showing any non-code-related menu item
  • Add section code-tools key which controls the addition of "expand/collapse all sections" buttons

Now that I'm opening the PR section-fold might make more sense, and we can change the behavior to mimic code-fold (true: closed, "show": open with option to fold). lmk if you prefer that.

screen shots image image image

Checklist

I have (if applicable):

  • filed a contributor agreement.
  • referenced the GitHub issue this PR closes (you guys don't like feature request issues, so I didn't make one)
  • updated the appropriate changelog in the PR
  • ensured the present test suite passes
  • added new tests
  • created a separate documentation PR in Quarto's website repo and linked it to this PR (metadata documentation is autogenerated from yaml, right? I added descriptions in the yaml)

Collapse (hide) sections (delimited by headings) by clicking a chevron
next to the heading. Expand/collapse all with an option in the codetools
menu
@posit-snyk-bot
Copy link
Collaborator

posit-snyk-bot commented Jan 23, 2026

Snyk checks have passed. No issues have been found so far.

Status Scanner Critical High Medium Low Total (0)
Open Source Security 0 0 0 0 0 issues
Licenses 0 0 0 0 0 issues

💻 Catch issues earlier using the plugins for VS Code, JetBrains IDEs, Visual Studio, and Eclipse.

@benlubas
Copy link
Author

benlubas commented Jan 23, 2026

These test failures don't appear to be related to my PR? The error for them doesn't even make sense: "2.0 is not 2.0"

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants