fix(ui): theme the ScrollArea scrollbar to match the app - #190
Merged
Merged
Conversation
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.
What does this PR do?
Makes the Radix
ScrollAreascrollbar use the same themed look as the nativethemed-scrollbarutil, so the library (knowledge base) — and every otherScrollArea— stops reading as an OS-default grey bar.Why?
The library panel's document list is a Radix
ScrollArea. Its thumb wasbg-border, and--border(#e5e3dflight,#2f2f2fdark) sits almost on topof the panel surface, so the bar read as the default OS scrollbar rather than as
the app's scroll control. Meanwhile every plain overflow container uses
.themed-scrollbar, which draws a--muted-foregroundpill — two differentscrollbars in one app.
DESIGN.mdalready prescribes.themed-scrollbarfor panel content(
overflow-y-auto themed-scrollbar). This change makes the Radix variant thesame control instead of a second look.
Related issue
Standalone UI fix; no issue.
What changed?
src/renderer/src/components/ui/scroll-area.tsx: the scrollbar is an 8pxtrack and the thumb is a 4px
--muted-foregroundpill (border-2 border-transparent bg-clip-content) that darkens to--foregroundon hover —the same geometry and colours
.themed-scrollbardraws for the native path.The old 10px
bg-borderthumb is gone.DESIGN.md: documents that the two scroll controls are one control and mustbe changed together.
Native overflow containers are untouched; no behaviour change, only the paint.
How was this tested?
npm test— 478 pass.npx electron-vite build— bundles; verified.bg-clip-content(
background-clip: content-box) and.bg-muted-foregroundare emitted intothe built CSS.
npm run check:design— no violations.npx eslint src/renderer/src/components/ui/scroll-area.tsx— no errors.Screenshots / recordings
Not attached: this environment has no display to capture the Electron window.
The visible change is the library scrollbar going from a faint
--bordergrey tothe darker
--muted-foregroundpill used everywhere else, darkening on hover.Checklist
npm run typecheckpasses (see note).npm run build(bundling) passes.Desktop / build changes