Skip to content

fix(client): dimming keeps the scrollbar's space, so the dock stays put - #352

Merged
mrramam merged 1 commit into
jherforth:mainfrom
mrramam:fix/dim-keeps-scrollbar-space
Oct 28, 2026
Merged

mrramam merged 1 commit into
jherforth:mainfrom
mrramam:fix/dim-keeps-scrollbar-space

Conversation

@mrramam

@mrramam mrramam commented Oct 28, 2026

Copy link
Copy Markdown
Collaborator

Why

While a display is dimmed, displayDim.js hides scrollbars, because Chrome draws them outside the brightness filter at full brightness. Hiding the page's scrollbar gives its width back to the page, so on a browser with always-visible scrollbars the dock and anything else centered moved by half a scrollbar (4px here) on every dim, and back on every wake.

What changes

While dimmed, the page keeps the scrollbar's space (scrollbar-gutter: stable on html) and the scrollbar stays hidden. The gutter shows the dimmed page's black. Scrollbars inside widgets are hidden as before.

Testing

  • Client vitest 832/832, check:i18n clean.
  • Chrome with classic scrollbars, real dashboard, dimming switched on in the browser only:
    • before: the dock moves on dim;
    • after: nothing moves on dim or wake, the scroll position holds, and the gutter is black while dimmed.
  • Not tested: a widget with its own scrolling area while dimmed. None overflowed on the test board.

Dimming hid the page's scrollbar, which gave its width back to the page:
the dock and anything else centered moved by half a scrollbar on every dim
and wake. The page now keeps the space (scrollbar-gutter: stable) while the
scrollbar is hidden, and the gutter is the dimmed page's black.
@mrramam
mrramam merged commit 1f4bf4f into jherforth:main Oct 28, 2026
3 checks passed
@mrramam
mrramam deleted the fix/dim-keeps-scrollbar-space branch October 28, 2026 22:25
@github-project-automation github-project-automation Bot moved this from Backlog to Done in HomeGlow Kanban Oct 28, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

1 participant