Skip to content

Contain API operation pages within the viewport - #4268

Draft
reakaleek wants to merge 2 commits into
mainfrom
api-catalog-mobile-overflow
Draft

reakaleek wants to merge 2 commits into
mainfrom
api-catalog-mobile-overflow

Conversation

@reakaleek

@reakaleek reakaleek commented Oct 1, 2026 •

Copy link
Copy Markdown
Member

Assembler preview:

An API operation page stays inside the viewport. A long sample scrolls inside its card, the example column stops before "Was this page helpful?", and that widget sits above the footer.

Affects: API reference, Site UI

Prompt summary: Contain the API operation page so a narrow viewport does not scroll sideways, the sticky example column does not cover the feedback widget or the footer, and the widget has space above the footer on small and large screens.

Why

From 768px to 1023px the example column is still a single stack, but sample overflow is only contained below 768px. A long line widens the page. At 1024px and above the sticky rail is clamped to the grid, and that grid continues through the feedback row, so a tall rail paints down to the footer. display: contents on the content container also drops the bottom padding that separated the widget from the footer.

Closes elastic/docs-eng-team#887
Closes elastic/docs-eng-team#888
Closes elastic/docs-eng-team#932

What

Narrow samples

Code samples scroll inside the card through 1023px, so the page itself does not scroll sideways.

Example column

The examples panel fills the reference row. The inner nav sticks inside that row and stops before the feedback widget, on large screens as well as small ones.

Footer space

The content grid keeps 3rem under the page body, so the feedback widget clears the footer on small and large screens.

Verify

Serve a docset that includes an operation with a long code sample, then open that operation page.

dotnet run --project src/tooling/docs-builder -- serve --path docs --port 3000 --no-hud

At 390px the page does not scroll sideways, and the sample scrolls inside its card. On a desktop height, scroll to the footer. The example column stops above "Was this page helpful?", and the widget has space above the footer.

Out of scope: Nav verb chip width and group-page row hover stay as they are. The hamburger in #4044 is a separate change.

Made with Cursor

Wide samples between 768px and 1023px widen the page. The sticky example rail runs through the feedback widget and meets the footer.

Co-Authored-By: Grok 4.7 <noreply@anthropic.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
@github-actions

github-actions Bot commented Oct 1, 2026

Copy link
Copy Markdown
Contributor

Docs preview (local build)

Handbook preview: https://docs-v3-preview.elastic.dev/elastic/docs-builder/pull/4268/

@github-actions github-actions Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Approved — no actionable issues found.


What is this? | From workflow: PR Review

Give us feedback! React with 🚀 if perfect, 👍 if helpful, 👎 if not.

@reakaleek
reakaleek marked this pull request as draft October 1, 2026 11:53
api-docs.css conflicted because main rebuilt the API page grid
(#api-content-grid and .api-page-grid, with a sticky .api-page-rail and
a full-width page-feedback). The branch's rail and feedback rules
targeted the removed .api-content-grid, so they are dropped. The
768-1023px sample containment rule still applies, because main still
stops containment at 767px, and is kept on top of main's file.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

This branch was successfully deployed

2 active deployments
docs-preview — 53499faa Deployed Nov 4, 2026 by github-actions[bot]
assembler-preview — 53499faa Deployed Nov 4, 2026 by github-actions[bot]
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.

2 participants