Skip to content

fix: promoted single-item sidebar menu still showed its group header - #46

Merged
ESCRI11 merged 1 commit into
masterfrom
fix/menu-promoted-header
Sep 1, 2026
Merged

ESCRI11 merged 1 commit into
masterfrom
fix/menu-promoted-header

Conversation

@ESCRI11

@ESCRI11 ESCRI11 commented Sep 1, 2026

Copy link
Copy Markdown
Contributor

sidebarMenu(promote_single = TRUE) hid the group header with a plain display: none. The show-tabs handler undoes that: 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, and the dead group header sat there with a chevron that did nothing.

Fix: display: none !important, same as the sibling .menu-empty rule — 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 inline display: block takes over.

Also line-height: 1.5 on the promoted .sidebar-menu-item. It inherited .sidebar-menu-item's tight 1.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.

Before After

testthat::test_local(): FAIL 0 | WARN 2 | PASS 103 (both warnings pre-existing DT noise).

🤖 Generated with Claude Code

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
@ESCRI11
ESCRI11 requested a review from ivokwee September 1, 2026 14:35
@ESCRI11

ESCRI11 commented Sep 1, 2026

Copy link
Copy Markdown
Contributor Author

Rebased onto master (conflict was in the generated inst/assets/style.min.css; resolved by re-running Rscript dev/sass.R on the merged scss rather than hand-merging the minified line).

Heads-up on one extra hunk in the compiled CSS that is not from this branch: #45's last commit removed padding-top: 10px from .bigdash-sidebar-shell / .bigdash-settings-shell in _sidebar.scss and _settings.scss but didn't recompile, so master currently ships a style.min.css that still has it. Regenerating here picks that removal up. The scss diff on this branch is exactly the two rules described above — git diff master -- scss/ confirms it.

@ESCRI11
ESCRI11 force-pushed the fix/menu-promoted-header branch from ebbb203 to d70218b Compare September 1, 2026 14:36

@ivokwee ivokwee left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

checked. works.

@ESCRI11
ESCRI11 merged commit 896587d into master Sep 1, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants