fix(ui): avoid layout shifts in overflow-menu and repo filter (#37818)

Eliminate two layout shifts in the menu, one related to non-existant
label on page load and one to `0` value rendering.

Signed-off-by: silverwind <me@silverwind.io>
Co-authored-by: Claude (Opus 4.7) <noreply@anthropic.com>
Co-authored-by: bircni <bircni@icloud.com>
This commit is contained in:
silverwind
2026-07-26 12:26:52 +02:00
committed by GitHub
parent b4eb8c03c4
commit 14ca2e7526
3 changed files with 17 additions and 5 deletions

View File

@@ -522,6 +522,11 @@ overflow-menu {
position: relative;
}
/* hide until JS has arranged the items, so the un-collapsed menu is never painted */
overflow-menu:not([data-ready]) {
visibility: hidden;
}
overflow-menu .overflow-menu-popup {
position: absolute;
top: calc(100% + 8px);
@@ -609,6 +614,12 @@ overflow-menu .overflow-menu-button:hover {
overflow-menu .ui.label {
margin-left: 7px !important; /* save some space */
font-variant-numeric: tabular-nums; /* equal-width digits so counts don't reflow the row */
}
/* count not loaded yet, keep the reserved space so filling it in does not shift the row */
overflow-menu .ui.label:empty {
visibility: hidden;
}
.activity-bar-graph {