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.
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
ENH: Left navigation menu to collapse at the "part" level #594
ENH: Left navigation menu to collapse at the "part" level #594
Changes from 6 commits
47985bb
cbcc5c3
c33f15e
c267479
fc53df7
c54dfb4
dcf9c2c
6698203
f9a127b
3761169
ef87163
67c4c2f
3785a47
cce1bf9
63acd91
cd7ecb3
d67480e
270fe93
4650f39
99b2340
dca2f5d
c5ef7d1
8e94faf
a60b2a7
819caed
2b43a8c
df2ca97
7da634d
a3d4caf
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
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.
@AakashGfude I believe that the logic for automatically opening checkboxes for an active page is actually here:
pydata-sphinx-theme/src/pydata_sphinx_theme/__init__.py
Lines 295 to 298 in c987276
So you'd want to add a similar piece of logic to that block that also detects a caption that corresponds to that section of the toctree, and opens it.
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.
Thanks @choldgraf , I had to add the logic to expand the part explicitly here 6698203#diff-d9f80958bbaaf03124bb877a07f31183c094105bbe78ea167de87e02b18d66b7R284, as it does not seem to have the
current
class whenshow_nav_level
: 0. Which makes it work now.Not sure where is the logic to add
current
class to an element, but will try to find it.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.
I believe that
current
is added by Sphinx, so perhaps after you've nested everything you can do something likeThere 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.
@choldgraf, have implemented similar logic. if the child
li
elements havecurrent
class then "checking" the parent part