Skip to content

API rail: share the window height between request and response code - #4696

Merged
reakaleek merged 10 commits into
mainfrom
fix-docs-base-url-scroll-dd23b666
Nov 11, 2026
Merged

reakaleek merged 10 commits into
mainfrom
fix-docs-base-url-scroll-dd23b666

Conversation

@reakaleek

@reakaleek reakaleek commented Nov 4, 2026 •

Copy link
Copy Markdown
Member

Why

  • On operation pages, the Base URL in the right column showed its own scrollbar.
  • The examples panel scrolled too, and the response code could shrink to one line or be cut off.
  • The response height came from a fixed 100dvh - 26rem guess. It ignored the Base URL block, long captions and extra rows of example chips.

What

  • The right column is at most as tall as the window and does not scroll. On short pages it ends at its content. The Base URL, chips, headers and captions keep their full height.
  • The space that is left goes to the request and response code. A short sample shows in full and the other one gets the rest. Two long samples split the space evenly, and each keeps at least five lines.
  • The examples column is 40px wider (480px) and the reference column is 40px narrower (728px), so the total width does not change. Between 1024px and 1279px the examples column is 44% of the width instead of 40%.

Notes

  • CSS alone cannot balance the two samples, because the free space depends on captions and chip rows. api-examples-balance.ts measures that space and sets two heights. It re-balances on window resize and when the language, chip, response tab or "Show more" changes. It also counts a horizontal scrollbar in each sample's height. Without the script, the old 16-line and 12-line caps apply.
  • In a window about 650px high, the chips and captions alone do not fit. The examples panel then scrolls, so nothing is hidden. Below 1024px nothing changes.
  • Checked locally with Playwright on Search (slicing and point in time), Create a dashboard and Create or update a role, at 900, 1100 and 1200px high. npm run visual:check did not complete: the baseline seed timed out on an unrelated page.

🤖 Generated with Claude Code

Only the examples panel shrinks now, and the response fills the height left in the rail instead of a fixed guess.

Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
@reakaleek
reakaleek requested a review from a team as a code owner November 4, 2026 19:12
@reakaleek reakaleek added the bug label Nov 4, 2026
@reakaleek
reakaleek requested a review from Mpdreamz November 4, 2026 19:12
Replace the shrinking examples chain with a single scrolling rail, and open the Copy page menu inward so the rail does not clip it.

Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
@reakaleek reakaleek changed the title API rail: stop the Base URL and examples from scrolling API rail: scroll as one column like the navigation Nov 4, 2026
@github-actions

github-actions Bot commented Nov 4, 2026

Copy link
Copy Markdown
Contributor

The rail no longer scrolls. The shorter sample shows in full and the longer one gets the rest, with at least five lines each. The examples column is 40px wider and the reference 40px narrower.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@reakaleek reakaleek changed the title API rail: scroll as one column like the navigation API rail: share the window height between request and response code Nov 4, 2026
reakaleek and others added 2 commits November 5, 2026 09:13
The rail had a fixed window height, so on short pages the first grid row grew to the window and pushed the page feedback down. The balance script now reads the rail's max-height instead.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
…io changes

A capped sample keeps its size when another one becomes active, so the resize observers never saw the change and a longer sample stayed clipped to the previous one's height.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
scrollHeight leaves out a horizontal scrollbar while max-height counts it, so with classic scrollbars a short sample with a wide line lost its last line to a vertical scrollbar.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
reakaleek and others added 3 commits November 5, 2026 09:22
…by @infra-vault-gh-plugin-prod)

Every HTMX navigation added a window listener that kept the previous page's panel alive. One listener now balances the connected panels and stops the observers of the detached ones.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
…e (per review by @infra-vault-gh-plugin-prod)

Co-Authored-By: Claude Opus 5.5 <[email protected]>
…by @infra-vault-gh-plugin-prod)

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@reakaleek
reakaleek merged commit 9c96fd8 into main Nov 11, 2026
36 checks passed
@reakaleek
reakaleek deleted the fix-docs-base-url-scroll-dd23b666 branch November 11, 2026 15:23
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