fix: promoted single-item sidebar menu still showed its group header - #46
Merged
Merged
Conversation
sidebarMenu(promote_single = TRUE) hid the group header with a plain `display: none`, which the 'show-tabs' handler undoes: it walks every .sidebar-content child and jQuery-.show()s it, and jQuery only writes an inline style when the element is currently hidden -- so it pins `style="display: block"` on exactly the header and hr the promotion rule had hidden. refreshMenuPromotion() only toggles classes, so it can never undo that: the dead group header, chevron and all, stayed on screen above the promoted item for the rest of the session. Use `display: none !important`, same as the sibling .menu-empty rule (which is why an emptied group did disappear correctly while a promoted one did not). Un-promoting still works in both directions: once the class is gone the rule no longer matches and the pinned inline display:block takes over. Also give the promoted .sidebar-menu-item a `line-height: 1.5`. It inherited .sidebar-menu-item's tight 1.1rem, leaving the row 32px tall against 41.4px for a real top-level .sidebar-item -- visibly cramped next to its neighbours. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01EKaWm7TyMpr9VaccAv5fPD
Contributor
Author
|
Rebased onto Heads-up on one extra hunk in the compiled CSS that is not from this branch: #45's last commit removed |
ESCRI11
force-pushed
the
fix/menu-promoted-header
branch
from
September 1, 2026 14:36
ebbb203 to
d70218b
Compare
This file contains hidden or 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
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.
sidebarMenu(promote_single = TRUE)hid the group header with a plaindisplay: none. Theshow-tabshandler undoes that: it walks every.sidebar-contentchild and jQuery-.show()s it, and jQuery only writes an inline style when the element is currently hidden — so it pinsstyle="display: block"on exactly the header andhrthe promotion rule had hidden.refreshMenuPromotion()only toggles classes, so it can never undo that, and the dead group header sat there with a chevron that did nothing.Fix:
display: none !important, same as the sibling.menu-emptyrule — which is why an emptied group disappeared correctly while a promoted one did not. Un-promoting still works in both directions: once the class is gone the rule stops matching and the pinned inlinedisplay: blocktakes over.Also
line-height: 1.5on the promoted.sidebar-menu-item. It inherited.sidebar-menu-item's tight1.1rem, leaving the row 32px against 41.4px for a real top-level.sidebar-item.Seen in omicsplayground, whose WGCNA group filters down to a single visible board on a non-multiomics dataset.
testthat::test_local(): FAIL 0 | WARN 2 | PASS 103 (both warnings pre-existing DT noise).🤖 Generated with Claude Code