Repository navigation
Centre the API sidebar's resize grip on its divider - #4958
Conversation
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]>
| background-position: | ||
| 0 0, | ||
| 50% 50%; | ||
| 5px 50%; |
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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.
Docs preview (local build)Handbook preview: https://docs-v3-preview.elastic.dev/elastic/docs-builder/pull/4958/ |
… 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; |
There was a problem hiding this comment.
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.
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-edgethat 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
5pxoffset instead of50%. 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
Open
/api/doc/elasticsearch/v9in 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