-
Notifications
You must be signed in to change notification settings - Fork 13
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
Allow four levels of sidebar entries #486
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
ptgott
force-pushed
the
paul.gottschling/2024-07-gen-sidebar-lvls
branch
from
July 17, 2024 20:58
dee6967
to
59c8ffb
Compare
ptgott
force-pushed
the
paul.gottschling/2024-07-gen-sidebar-lvls
branch
from
July 18, 2024 13:45
59c8ffb
to
c952563
Compare
ptgott
force-pushed
the
paul.gottschling/2024-07-gen-sidebar-lvls
branch
from
July 18, 2024 13:52
c952563
to
144547d
Compare
ptgott
force-pushed
the
paul.gottschling/2024-07-gen-sidebar-lvls
branch
from
July 18, 2024 14:27
144547d
to
735b30c
Compare
ptgott
force-pushed
the
paul.gottschling/2024-07-gen-sidebar-lvls
branch
from
July 18, 2024 14:45
735b30c
to
be80e60
Compare
ptgott
changed the title
Generate sidebar entries at an arbitrary depth
Allow four levels of sidebar entries
Jul 18, 2024
ptgott
force-pushed
the
paul.gottschling/2024-07-gen-sidebar-lvls
branch
from
July 18, 2024 15:28
be80e60
to
714532b
Compare
Currently, the code that generates the navigation sidebar from a directory tree stops at the second level of a given top-level section. However, some sections include three levels of content. This change edits the sidebar generator so it works recursively. Also fix an issue with the `DocsNavigationItems` component that prevents the docs site from highlighting sidebar entries past two levels of depth. The component treats a sidebar subsection as "active" if one of its entries is equivalent to the current page path. But if the current page path is a grandchild of a sidebar subsection, this means that the component hides the grandchild, since none of the children of the subsection is equivalent to the current page. This change determines that a sidebar subsection is "active" if the selected path _starts with_ the subsection path. Also edit the CSS padding of navigation links to depend on the current level of the navigation menu. This allows for indentation of submenu links beyond the second level.
ptgott
force-pushed
the
paul.gottschling/2024-07-gen-sidebar-lvls
branch
from
July 18, 2024 15:32
714532b
to
1c0d244
Compare
avatus
approved these changes
Jul 19, 2024
travelton
pushed a commit
that referenced
this pull request
Aug 26, 2024
Currently, the code that generates the navigation sidebar from a directory tree stops at the second level of a given top-level section. However, some sections include three levels of content. This change edits the sidebar generator so it works recursively. Also fix an issue with the `DocsNavigationItems` component that prevents the docs site from highlighting sidebar entries past two levels of depth. The component treats a sidebar subsection as "active" if one of its entries is equivalent to the current page path. But if the current page path is a grandchild of a sidebar subsection, this means that the component hides the grandchild, since none of the children of the subsection is equivalent to the current page. This change determines that a sidebar subsection is "active" if the selected path _starts with_ the subsection path. Also edit the CSS padding of navigation links to depend on the current level of the navigation menu. This allows for indentation of submenu links beyond the second level.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Currently, the code that generates the navigation sidebar from a
directory tree stops at the second level of a given top-level section.
However, some sections include three levels of content. This change
edits the sidebar generator so it works recursively.
Also fix an issue with the
DocsNavigationItems
component that preventsthe docs site from highlighting sidebar entries past two levels of
depth. The component treats a sidebar subsection as "active" if one of
its entries is equivalent to the current page path.
But if the current page path is a grandchild of a sidebar subsection,
this means that the component hides the grandchild, since none of the
children of the subsection is equivalent to the current page. This
change determines that a sidebar subsection is "active" if the selected
path starts with the subsection path.
Also edit the CSS padding of navigation links to depend on the current
level of the navigation menu. This allows for indentation of submenu
links beyond the second level.