Skip to content

feat(sidebar): add collapsible root sidebar groups - #2784

Open
sy-records wants to merge 2 commits into
docsifyjs:developfrom
sy-records:feat/900
Open

feat(sidebar): add collapsible root sidebar groups#2784
sy-records wants to merge 2 commits into
docsifyjs:developfrom
sy-records:feat/900

Conversation

@sy-records

Copy link
Copy Markdown
Member

Summary

Related issue, if any:

Fixes #900

What kind of change does this PR introduce?

  • Bugfix
  • Feature
  • Code style update (formatting, renaming)
  • Refactoring (no functional changes, no api changes)
  • Build related changes
  • Documentation content changes
  • Other (please describe):

For any code change,

  • Related documentation has been updated, if needed
  • Related tests have been added or updated, if needed

Does this PR introduce a breaking change?

  • Yes
  • No

Tested in the following browsers:

  • Chrome
  • Firefox
  • Safari
  • Edge

@sy-records
sy-records requested a review from a team August 12, 2026 02:26
@vercel

vercel Bot commented Aug 12, 2026

Copy link
Copy Markdown

@sy-records is attempting to deploy a commit to the Docsify Team on Vercel.

A member of the Team first needs to authorize it.

@vercel

vercel Bot commented Aug 12, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
docsify-preview Ready Ready Preview Aug 13, 2026 4:50am

@paulhibbitts paulhibbitts left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for taking this long-requested feature on @sy-records !

Here is my test sandbox:
https://codesandbox.io/p/devbox/vibrant-brattain-hj7935

I am concerned that the introduction of using bold to mark new expandable/collapsible sections might be confusing for users and add visual complexity to the sidebar.

2026-08-12_06-56-49

One alternative would be to use the existing Chevron indicators to show expandable/collapsible sections (with existing rotation behavior), and do so without little additional visual complexity. Here is a quick mockup:

Image

What do you think?

@paulhibbitts

paulhibbitts commented Aug 13, 2026

Copy link
Copy Markdown
Member

You might also find this closed issue a helpful reference @sy-records : #1564

I am not suggesting additional functionality at this point, but the comment by jhildenbiddle was also quite insightful for future consideration re: initial expaned/collapsed state.

@sy-records

Copy link
Copy Markdown
Member Author

The bold text represents the original logic; now it simply supports clicking to expand or collapse it and marks its status so you don鈥檛 have to click repeatedly when viewing it.

Using a V-shaped indicator will change the current style.

@paulhibbitts

Copy link
Copy Markdown
Member

I am not sure I follow, if bold text is used, and is also in multiple locations, this will likely be confusing for users re: cue of feedback. If I understand correctly possible, I suggest we use the established chevon feedback which is also used by other similar sidebar navs like Docusaurus https://docusaurus.io/docs/category/guides.

If bold is only possible I suggest setting aside this feature as the downsides would outweigh the possible upsides to me.

@sy-records

Copy link
Copy Markdown
Member Author

I added logic to the sidebar-chevron.

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.

collapsible sidebar root sidebar items

2 participants