-
Notifications
You must be signed in to change notification settings - Fork 1.8k
Decouple menu expand and collapse from active item #692
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
base: master
Are you sure you want to change the base?
Conversation
Overall I really like this change. I haven't had much chance to go over code yet. |
Looking forward to this for #455! :) |
Is there any chance that this MR gets accepted anytime soon? Thanks |
@jessetan any chance that you can update this to master? And revert the changes to the background/hover colors. I am not against that change but rather it be in a separate PR. |
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.
@@ -114,7 +115,7 @@ function ThemeNav () { | |||
var link = $(this); | |||
expand = $('<span class="toctree-expand"></span>'); | |||
expand.on('click', function (ev) { | |||
self.toggleCurrent(link); | |||
self.toggleExpanded(link); | |||
ev.stopPropagation(); | |||
return false; |
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.
false
This PR introduces the ability to expand and collapse menu items independent of the current active item.
Before this, collapsing and expanding a menu item was coupled to the styling and logic that colored and highlighted the active item.
Makes hover colors and expand/collapse icon colors consistent over all menu items:
Expanding a non-active menu item no longer collapses the active menu item. Collapsing the active menu item no longer makes it look inactive.
Clicking the active item no longer makes it look inactive (Sidebar anchors double-click loose selection #306)
Adds some comments and slight cleanup of the menu CSS.
Fixes #306 amongst others. Prerequisite for #455.