Skip to content

Centre the API sidebar's resize grip on its divider - #4958

Merged
reakaleek merged 2 commits into
mainfrom
center-left-column-drag-h-cbf3680c
Nov 19, 2026
Merged

reakaleek merged 2 commits into
mainfrom
center-left-column-drag-h-cbf3680c

Conversation

@reakaleek

@reakaleek reakaleek commented Nov 19, 2026 •

Copy link
Copy Markdown
Member

The resize grip between the API sidebar and the reference column now sits centred on its divider. On both API column grips, the white strip under the dots now covers the line exactly.

Affects: Site UI, API reference

Prompt summary: Jan sees on docs-edge that the drag handle of the API page's left column is not centred. The grip keeps its transparent background and a white strip as wide as the border line.

Why

The sidebar's resize target starts 3px right of the border, so it stays clear of the sidebar scrollbar. The stylesheet moves the divider line back onto the border, but leaves the dots and the white strip in the target, so both dot columns sit right of the line. On both grips, a 1px line centred in the 12px handle lands on a half pixel. The line and the strip's background round it in opposite directions, so a grey sliver of the line shows beside the strip.

What

Line and strip on one whole pixel

The divider line and the white strip in the grip now start at the same 5px offset instead of 50%. The strip covers the line at every width: 1px at rest, 2px on hover or drag, and blue on keyboard focus.

Sidebar grip follows its line

On the sidebar handle, the grip moves by the same 3px as the line, so its dots sit centred on the border. The resize target does not move. The grip takes no pointer events, so the dot column over the sidebar scrollbar leaves the scrollbar usable. Under forced colors, the focused grip keeps its old position, so its inset focus ring stays off the scrollbar.

Verify

mise run site:build
mise run serve

Open /api/doc/elasticsearch/v9 in a window at least 1280px wide. Zoom in on both grips at rest, on hover, and with keyboard focus on the sidebar grip.

Check on the preview

🤖 Generated with Claude Code

The sidebar grip's dots sat right of the divider, and on both grips the
white strip under the dots missed the line by half a pixel, leaving a grey
sliver. The line and the strip now start on the same whole pixel, and the
sidebar grip moves with its line onto the border.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@reakaleek
reakaleek requested a review from a team as a code owner November 19, 2026 12:37
@reakaleek
reakaleek requested a review from akira28 November 19, 2026 12:37
@reakaleek reakaleek added the bug label Nov 19, 2026
background-position:
0 0,
50% 50%;
5px 50%;

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Severity: P3 (Low)

Add a browser regression check for the two grips on an API reference page. The existing resize tests mock column geometry and cannot detect an off-center grip or a divider sliver; a focused screenshot at rest and with the divider widened would catch both regressions.

Generated by Libra. React with 👍 or 👎 to give feedback on this comment.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not adding one in this PR. The repo has no committed pixel baselines that CI could check this against. visual:check is a local seed-versus-branch tool: it takes full-page screenshots at 1x and allows a maxDiffPixelRatio of 0.002, which absorbs a half-pixel sliver. None of its pages show the grips (/api renders no handles). Journey transcripts record text, not pixels. A test on computed style would only restate the CSS, and it would miss the actual failure, which is the line and the background rounding a half pixel differently. I checked the fix with 10x Playwright clips of both grips, at rest, on hover and with keyboard focus (and under forced colors for the follow-up fix), on /api/doc/elasticsearch/v9 served locally.

@github-actions

Copy link
Copy Markdown
Contributor

… review by @infra-vault-gh-plugin-prod)

Co-Authored-By: Claude Opus 5.5 <[email protected]>
.api-column-handle[data-api-column-handle='nav']:focus-visible::before {
outline: 2px solid Highlight;
outline-offset: -2px;
transform: none;

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Severity: P3 (Low)

Add a browser regression test that tabs to the sidebar separator with forced colors enabled and verifies that its focus ring is visible and stays inside the resize target. The current tests don't exercise this state, so a regression that shifts the ring back toward the scrollbar would pass unnoticed.

Generated by Libra. React with 👍 or 👎 to give feedback on this comment.

@reakaleek
reakaleek merged commit 57e9e01 into main Nov 19, 2026
44 checks passed
@reakaleek
reakaleek deleted the center-left-column-drag-h-cbf3680c branch November 19, 2026 13:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant