-
Notifications
You must be signed in to change notification settings - Fork 10
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
Adding option to keep the api categories closed by default - #289
base: main
Are you sure you want to change the base?
Conversation
This commit adds the collapsed property to the sidebar categories in order to allow collapsing and expanding of category sections. The collapsed property is used to control the initial state of the category, and it is set to true for the "Get started" category and the API category. This change enables a more compact and organized sidebar navigation experience for users. Refs zuplo#279
The latest updates on your projects. Learn more about Vercel for Git ↗︎ 1 Skipped Deployment
|
@arian0zen is attempting to deploy a commit to the Zuplo WWW Team on Vercel. A member of the Team first needs to authorize it. |
packages/zudoku/src/lib/components/navigation/SidebarCategory.tsx
Outdated
Show resolved
Hide resolved
@@ -32,6 +32,7 @@ export type SidebarItemCategory = Omit< | |||
items: SidebarItem[]; | |||
link?: SidebarItemCategoryLinkDoc; | |||
icon?: LucideIcon | string; | |||
apiReference?: boolean; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Im not sure about the naming of this toggle. I think we should better describe the behaviour that we are toggleing here, like openOnScroll
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
-
the key apiReference is not actually user-facing, this one is just to identify if the collapsable categories are apiRef or not, if they are not apis and just documentation I figured we should not add the open on scroll ability.
-
the open-on-scroll actually defined by the key defaultCollapsed, that one is user-facing. ( I think here this should be defined as
openOnScroll
) -
Although, I am very much open to this suggestion.. what do you say?
Great feature! I'm thinking if this may be something that should be enabled / disabled on the first level of Zudoku. |
Thanks for the feedback, really appreciate it! Just to clarify, are you suggesting that this feature should be configurable at the 'Zudoku' level, so users can enable or disable it while initiating? If so, I have implemented that in this PR. |
Here is how it looks - Loom video
defaultCollapsed
to the API config to determine if it should be collapsed by default.Closes #280