Skip to content

Extend the API section links rule to the sidebar on wide screens - #4993

Merged
reakaleek merged 6 commits into
mainfrom
fix-api-sections-link-bor-f6ddad2c
Nov 20, 2026
Merged

reakaleek merged 6 commits into
mainfrom
fix-api-sections-link-bor-f6ddad2c

Conversation

@reakaleek

@reakaleek reakaleek commented Nov 20, 2026 •

Copy link
Copy Markdown
Member

The bottom rule under the API section links (Overview · Path · Query · Body · Responses) now runs to the sidebar at every window width. Before, it stopped short of the sidebar on windows wider than 1920px.

Affects: Site UI, API reference

Prompt summary: On wide screens the bottom border of the API section links does not reach the sidebar. The ask is to make it reach the sidebar.

Why

Past a 1920px window the reference column stops growing and centers itself beside the sidebar. The section links row reaches a fixed 40px past the text, so its rule leaves a gap that grows with the window. On a 2560px window the rule starts 320px right of the sidebar. A smaller gap of 2px also exists from 1024px to 1279px, where the gap to the sidebar is 42px.

What

The rule follows the centred column

From 1280px the row now also spans the space that the centring adds, (window - 1920px) / 2. The sidebar width cancels out of that formula, so a sidebar the reader drags wider still lines up.

The width comes from the page shell

From 1280px the API page shell is a size container. The formula reads its width as 100cqi, which excludes the scrollbar. The container starts at 1280px because older browsers make a container the containing block of fixed boxes, such as the mobile nav drawer. API pages always show a scrollbar, so 100vw would push the row over the sidebar by half the scrollbar width on systems with classic scrollbars. The NavigationPreview layout (.layout) has other geometry and stays unchanged.

The 42px gap from 1024px to 1279px

The row now reaches 42px left in this range, which matches the gap to the sidebar.

Verify

mise run journeys:test -- --treenode-filter "/*/*/ApiSectionToolbarTests/*"
# AnyWindowWidth_TheRowsRuleMeetsTheSidebar: the gap from the sidebar at 1100, 1600 and 2560px, also with a wider sidebar

To look at it:

mise run site:build
mise run serve

Open an API operation page in a window wider than 1920px. The rule under the section links meets the sidebar's border, at the top of the page and after the row sticks under the header. Widen the sidebar with its drag handle and check again.

Check on the preview

Use a browser window wider than 1920px.

Past a 1920px window the reference column stops growing and sits centred
beside the sidebar. The section links row reached a fixed 40px past the
text, so its bottom rule stopped short of the sidebar. The row now also
spans the space the centring adds, and the 42px nav gap at 1024-1279px.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@reakaleek
reakaleek requested a review from a team as a code owner November 20, 2026 15:31
@reakaleek
reakaleek requested a review from akira28 November 20, 2026 15:31
@reakaleek reakaleek added the bug label Nov 20, 2026
Older browsers make a size container the containing block of fixed
boxes. On a phone that anchored the legacy nav drawer and its backdrop
to the page shell. The section links read the shell's width only from
1280px, so the container now starts there.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
The toolbar tests checked that the row sticks but not where its rule
starts, so the 320px gap on a 2560px window passed them. The new test
measures the gap at 1100, 1600 and 2560px and with a widened sidebar,
before and after the row sticks.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
reakaleek and others added 2 commits November 20, 2026 16:49
The resize script drops a sidebar override it did not save when it
reconciles the layout. The test now reports the sidebar's measured
width, so a widened case that fell back to the default would show.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
The toolbar test read only horizontal edges after scrolling, so a row
that scrolled out of view would still report a matching gap. It now
reports whether the row is on screen and stuck under the header.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@github-actions

Copy link
Copy Markdown
Contributor

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

The scope of the container to 1280px keeps the mobile nav drawer fixed
to the window in older browsers. Nothing failed if the rule moved out
of its media query. The new test reads the shell's computed
`container-type` at 800, 1279, 1280 and 1600px.

Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
@reakaleek
reakaleek merged commit 719f2f8 into main Nov 20, 2026
44 checks passed
@reakaleek
reakaleek deleted the fix-api-sections-link-bor-f6ddad2c branch November 20, 2026 16:56
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