Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork5.8k
feat: collapse root sidsebar items#1979
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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
base:develop
Are you sure you want to change the base?
Uh oh!
There was an error while loading.Please reload this page.
Conversation
vercelbot commentedJan 29, 2023 • edited
Loading Uh oh!
There was an error while loading.Please reload this page.
edited
Uh oh!
There was an error while loading.Please reload this page.
The latest updates on your projects. Learn more aboutVercel for Git ↗︎
|
codesandbox-cibot commentedJan 29, 2023 • edited
Loading Uh oh!
There was an error while loading.Please reload this page.
edited
Uh oh!
There was an error while loading.Please reload this page.
This pull request is automatically built and testable inCodeSandbox. To see build info of the built libraries, clickhere or the icon next to each commit SHA. Latest deployment of this branch, based on commit2daba85:
|
| html=this.compile(text) | ||
| .replaceAll('<ul >','<ul class="app-sub-sidebar" >') | ||
| .replace('<ul class="app-sub-sidebar" >','<ul >'); | ||
| }else{ |
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.
what is this change for ?
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.
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.
text is the entire compiled html of the sidebar. The first "ul" is an element that contains the entire sidebar menu. So I tried to give a class to the rest of the "ul" except the first "ul".
I see, you gonna treat the parent sidebar node as the sub-sidebar of the rootul.
But the class.app-sub-sidebar you marked get the style change as well.
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.
Maybe you could marked those parent sidebar nodes with new styleapp-sidebar and refactor theclick event function.
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.
In my opinion, implementing it with onClick seems to be a dual implementation method for one feature.
So I implemented it by className, which is the way used before.
…/proke03/docsify into feat/collapse-root-sidebar-items
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.
LGTM.
trusktr left a comment• edited
Loading Uh oh!
There was an error while loading.Please reload this page.
edited
Uh oh!
There was an error while loading.Please reload this page.
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.
This is great! Can you please:
- ensure the top-level items seem like they are clickable (instead of seeming like selectable text), using for example
cursor: pointer. - write a test for the functionality
- We need to ensuredocsify-themeable doesn't break with this. Add a new
docsify-themeable.htmlfile that uses docsify-themeable so we can verify. Perhaps we should do this first in a separate PR.
@trusktr |
@proke03 basically the docsify-themeable CSS depends on the DOM of Docsify. I think what we should do is in a totally separate pull request lets get a docsify-themeable deployment for n Vercel going, and then it will be available to all PR similar to our current Vercel deployment with vanilla Docsify. |
PowerPlop commentedNov 5, 2025
It seems this PR is abandoned,@trusktr is it still relevant to continue with the last tasks you listed? |



Uh oh!
There was an error while loading.Please reload this page.
Summary
What kind of change does this PR introduce?
For any code change,
Does this PR introduce a breaking change? (check one)
If yes, please describe the impact and migration path for existing applications:
Related issue, if any:
#900
Tested in the following browsers: