Skip to content

Add horizontal scroll for diffs with long lines - #1586

Merged
backnotprop merged 4 commits into
mainfrom
merge/pr-1224
Sep 21, 2026
Merged

backnotprop merged 4 commits into
mainfrom
merge/pr-1224

Conversation

@backnotprop

@backnotprop backnotprop commented Sep 21, 2026 •

Copy link
Copy Markdown
Owner

Merge-ready continuation of #1224 by @Karrq.

Opened as a replacement branch because #1224's head branch reports
maintainerCanModify: false, so the prepared merge could not be pushed to the
contributor's own branch. All code in this PR is @Karrq's work — please
attribute the change to them; #1224 should be closed in favour of this PR.

Each file's diff gets its own horizontal scrollbar, pinned to the file header
instead of sitting at the bottom of the file's content where it is off-screen
on any diff taller than the panel.

What this branch adds on top of #1224

  • Merged current main and resolved the one conflict in
    packages/review-editor/hooks/usePierreTheme.ts (the two new [data-code]
    scrollbar-suppression rules now sit next to main's .pn-token-hover rule).
  • Dropped the PR's bun.lock changes, which reverted main's dependency
    updates. bun install against main's lockfile produces no diff.
  • Regenerated packages/core/guide-viewer-manifest.ts for the viewer build.

Verification

  • bun test packages/review-editor — 321 pass, 0 fail
  • DOM_TESTS=1 bun test --isolate packages/review-editor — 550 pass, 0 fail
  • The four isolated real-@pierre/diffs renderer suites — 11 pass, 0 fail
  • bun run typecheck — clean
  • bun run --cwd apps/review build — succeeds
  • check:manifest — in sync
  • check:budgets — viewer js 397.9 KB gz (budget 400 KB), css 51.9 KB gz
    (budget 64 KB)

Closes #1566
Closes #1048

@backnotprop
backnotprop merged commit fc68e2b into main Sep 21, 2026
28 checks passed
yermakoffivan pushed a commit to yermakoffivan/plannotator that referenced this pull request Nov 6, 2026
The owner's decision: a normal scrollbar at the bottom of each diff, the diff
library's own, and the custom bar under the file name taken out.

- Remove DiffHScrollbar (backnotprop#1586) from the review app and the Inbox, with the
  Inbox's hover and finger rules for it (backnotprop#2698) and its e2e tests.
- Stop hiding Pierre's horizontal scrollbar. theme.css's scrollbar-color
  reached into Pierre's shadow root by inheritance, and Chrome then drops
  Pierre's ::-webkit-scrollbar sizing: a 15px classic bar its layout did not
  count, cut off at the file's edge. diffs-container resets it, so Pierre
  keeps its 6px bar and the room it counts for it.
- Give the thumb a quiet visible colour in light and dark (Pierre leaves it
  transparent until hover).
- The Inbox (a file as tall as its layout) counts Pierre's 8px under the last
  row, so the bar sits inside the file's box.
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.

Horizontal scroll of file diff pane Horizontal scrollbar unreachable on long diffs

2 participants