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

Enable SidebarItem only menu in sidebar #1225

Closed
4 tasks done
benmccann opened this issue Aug 22, 2022 · 4 comments
Closed
4 tasks done

Enable SidebarItem only menu in sidebar #1225

benmccann opened this issue Aug 22, 2022 · 4 comments
Labels
enhancement New feature or request stale theme Related to the theme

Comments

@benmccann
Copy link
Contributor

Is your feature request related to a problem? Please describe.

Chart.js has a mix of expandable groups and individual items within its sidebar. I can't migrate the docs from Vuepress to Vitepress because Vitepress will not allow individual items within the sidebar

Describe the solution you'd like

The types are currently:

  export type Sidebar = SidebarGroup[] | SidebarMulti

  export interface SidebarMulti {
    [path: string]: SidebarGroup[]
  }

It would be nice to change them to:

  export type Sidebar = Array<SidebarGroup|SidebarItem> | SidebarMulti

  export interface SidebarMulti {
    [path: string]: Array<SidebarGroup|SidebarItem>
  }

Describe alternatives you've considered

Make a group with just an individual item in it. It's kind of an annoying user experience though

Additional context

The work-in-progress branch is here: https://github.com/benmccann/Chart.js/tree/vitepress

Validations

@kiaking
Copy link
Member

kiaking commented Aug 23, 2022

This config is tied to Default Theme. If Default Theme does not support this type of structure, it shouldn't have it. If you need custom type, that means you should create your own config types 👍

If VitePress default theme gets support for this type of sidebar structure, then it will be modified as you mentioned. And actually this feature is planned.

@kiaking kiaking closed this as not planned Won't fix, can't repro, duplicate, stale Aug 23, 2022
@benmccann
Copy link
Contributor Author

Given that the feature is planned, maybe it'd make sense to leave this open to track it? It'd be easier for folks who are interested to subscribe to this thread and be notified when it's closed than having to come back on a frequent basis to check the release notes to see whether it's been implemented

@kiaking
Copy link
Member

kiaking commented Aug 23, 2022

Make sense. I'll adjust the title then 👍

@kiaking kiaking reopened this Aug 23, 2022
@kiaking kiaking added enhancement New feature or request theme Related to the theme labels Aug 23, 2022
@kiaking kiaking changed the title Replace SidebarGroup[] with Array<SidebarGroup|SidebarItem> Enable SidebarItem only menu in sidebar Aug 23, 2022
@github-actions github-actions bot added the stale label Aug 3, 2023
@brc-dd
Copy link
Member

brc-dd commented Aug 5, 2023

It's supported now. Support for this was added some time in the last year IG.

@brc-dd brc-dd closed this as completed Aug 5, 2023
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Aug 13, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
enhancement New feature or request stale theme Related to the theme
Projects
None yet
Development

No branches or pull requests

3 participants