Commit Graph
1 Commits
Author SHA1 Message Date
yetone 47689f9fd9 gui: the usage heatmap scrolls under the app's thin thumb, not the system's bar (cybercaius on Discord)
cybercaius said the usage heatmap's scrollbar looked out of place beside
the rest of the window. .heat-scroll was the only scroller with
scrollbar-width: thin. In Chromium (so WebView2) a non-auto
scrollbar-width drops every ::-webkit-scrollbar rule and draws the
system's bar, gray track and all; on a Mac the WebView draws only the
overlay bar, which a mouse never shows. The line is gone, and the Mac
rules pages, dialogs and framed editors use take .heat-scroll too, so
the weeks scroll under the same 8px (Mac) or 10px thumb as the page.
No layout change.

heatmap-scrollbar.test.cjs: chromium and webkit, on and off a Mac, a
420px card of 53 weeks: the weeks overflow, scrollbar-width is auto,
and the heatmap's bar gutter equals a .view's.

What was run, at this commit's tree (base d2e0ea393):
- heatmap-scrollbar.test.cjs: red on the old app.css in all 4 cases
  ("expected 'auto', actual 'thin'"); dropping only scrollbar-width
  still fails the 2 Mac cases; 4/4 pass with the change.
- usage-heatmap.test.cjs (every language, 420 and 1100px, both
  engines): 26 pass, 0 fail.
- view-scrollbar, view-scrollbar-drag, sidebar-overlay-scrollbar,
  strip-scrollbar, ledger-hscroll, ledger-hscroll-foot, click-scroll and
  every usage-*.test.cjs: 3 reds, none from this change:
  usage-agents-hide (chromium and webkit, 10 subtests each) fails the
  same 22 of 22 on d2e0ea393's app.css (#3414, #2276);
  sidebar-overlay-scrollbar chromium fails one language per run
  ("dragged to the end: 193 of 222") on the old and new app.css alike,
  4 runs each way (#1863).
- Screenshots off and on a Mac, old and new: the system bar before, the
  page's thumb after.
- At the pushed head (this and the provider commit, rebased on
  origin/main 758be6d14): go test -tags nogui -count=1 ./internal/gui
  ./internal/provider in a sandbox HOME: ok (67.5s, 133.5s); gofmt -l
  clean; go vet ./internal/gui ./internal/provider ok; go build ./...
  (mac) ok; heatmap-scrollbar, usage-heatmap, view-scrollbar and
  view-wheel-unheard .test.cjs at 7ad6df865: 38 pass, 0 fail. Before the rebase, at
  30bd722ef on d2e0ea393: the same two packages ok (84.9s, 157.1s), and
  go vet ./... for mac, GOOS=linux -tags nogui and GOOS=windows ok, with
  linux nogui and windows go build ok.
  Not run: the full suite (the disk was full).
2026-10-25 19:40:37 +08:00