feat(sidebar): normalize page links and control root chevrons - #2790
feat(sidebar): normalize page links and control root chevrons#2790sy-records wants to merge 4 commits into
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
Hi @sy-records , your new The PR preview build (with collapsibleSidebarGroups disabled by default) vs. released v5 now look identical: And now, the PR preview build with NOTE: For an unknown reason the chevrons seem to shift a bit once collapsibleSidebarGroups is enabled - there seems to be a bit of extra padding added to the right side of the sidebar that causes the shift. Can you replicate that in your end? I will more fully test things later today but just wanted to share initial results - great work 🙌🏼 |
|
Ok @sy-records I've updated the earlier CodeSandbox with this PR Preview Build: I tested the new I confirmed the earlier issue of slight shifting to the right on chevrons when
I was also able to test So everything is looking good except for the shifted chevrons issue. |
|
The link you provided seems to have a problem, but I compared all three and didn't find any issues. https://preview.docsifyjs.org/#/?id=docsify |
|
Oh that's good to hear @sy-records ! After seeing your other examples I went back and found that the reason for the shift in my example was I had this element on the sidebar: I will try to dig into why this caused the shift but once I removed that element I was able to remove the shift so that is good news! |
There was a problem hiding this comment.
After removing the added form element in my own example the shifting noticed earlier was thought to be removed but it is still present in my own example:
I will try to nail down the reason tomorrow and get back to you @sy-records .
|
I see. To prevent the sidebar indentation from jumping, I added this, which caused the issue. docsify/src/themes/shared/_sidebar.css Line 188 in 5099294 You can reproduce this by expanding or collapsing I recommend accepting this change in position. |
|
Thanks for the additional information @sy-records , I now better understand the need of this minor shift. During my testing, I noticed that Firefox the shift is more pronounced, could you please confirm that you can replicate that too? Based on this, I found this CSS reduces the shift only in Firefox - maybe it might be a useful reference for you: |

Summary
<li><p><a>to<li><a>sidebar-chevron-root-hiddento hide chevrons on root-level page links and group titlescollapsibleSidebarGroupsUsage
Related issue, if any:
#2784 (comment)
What kind of change does this PR introduce?
For any code change,
Does this PR introduce a breaking change?
Tested in the following browsers: