You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Sidebar group headings can be linked. If a sidebar group is linked, visiting the page it's linked to will uncollapse the group. The effect is unexpected and can result in undesired uncollapsings.
Reproduction
With the released version, replace docs/.vitepress/config/en.ts's sidebarGuide with the following.
functionsidebarGuide(): DefaultTheme.SidebarItem[]{return[{text: 'Introduction',collapsed: true,items: [{text: 'Group heading linked to "What is VitePress?"',link: 'what-is-vitepress',collapsed: true,items: [{text: 'Another group heading linked to "What is VitePress?"',link: 'what-is-vitepress',collapsed: true,items: [{text: 'What is VitePress?',link: 'what-is-vitepress',},],},],},{text: 'Getting Started',link: 'getting-started'},{text: 'Routing',link: 'routing'},{text: 'Deploy',link: 'deploy'}]},{text: 'What is VitePress?',link: 'what-is-vitepress',},{text: 'Writing',collapsed: false,items: [{text: 'Markdown Extensions',link: 'markdown'},{text: 'Asset Handling',link: 'asset-handling'},{text: 'Frontmatter',link: 'frontmatter'},{text: 'Using Vue in Markdown',link: 'using-vue'},{text: 'Internationalization',link: 'i18n'}]},{text: 'Customization',collapsed: false,items: [{text: 'Using a Custom Theme',link: 'custom-theme'},{text: 'Extending the Default Theme',link: 'extending-default-theme'},{text: 'Build-Time Data Loading',link: 'data-loading'},{text: 'SSR Compatibility',link: 'ssr-compat'},{text: 'Connecting to a CMS',link: 'cms'}]},{text: 'Experimental',collapsed: false,items: [{text: 'MPA Mode',link: 'mpa-mode'},{text: 'Sitemap Generation',link: 'sitemap-generation'}]},{text: 'Config & API Reference',base: '/reference/',link: 'site-config'}]}
Run pnpm run docs
Open http://localhost:<your port>/guide/routing in a browser
Click on the text of the second sidebar item, "Group heading linked to "What is VitePress?"
Confirm that it and its child group opens.
Expected behavior
Clicking a sidebar group's linked heading opens the link without toggling the group.
### Additional context
_No response_
### Validations
- [X] Check if you're on the [latest VitePress version](https://github.com/vuejs/vitepress/releases/latest).
- [X] Follow our [Code of Conduct](https://vuejs.org/about/coc.html)
- [X] Read the [docs](https://vitepress.dev).
- [X] Check that there isn't already an issue that reports the same bug to avoid creating a duplicate.
The text was updated successfully, but these errors were encountered:
Describe the bug
Sidebar group headings can be linked. If a sidebar group is linked, visiting the page it's linked to will uncollapse the group. The effect is unexpected and can result in undesired uncollapsings.
Reproduction
docs/.vitepress/config/en.ts
'ssidebarGuide
with the following.pnpm run docs
http://localhost:<your port>/guide/routing
in a browserExpected behavior
Clicking a sidebar group's linked heading opens the link without toggling the group.
System Info
The text was updated successfully, but these errors were encountered: