Repository navigation
Extend the API section links rule to the sidebar on wide screens - #4993
Merged
Merged
Conversation
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]>
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]>
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]>
Contributor
Docs preview (local build)Handbook preview: https://docs-v3-preview.elastic.dev/elastic/docs-builder/pull/4993/ |
…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]>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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 referencePrompt 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, so100vwwould 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
To look at it:
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.