Repository navigation
Conversation
Dropdowns ellipsize the route, and a short sample body lets the top padding cover the first line. Co-Authored-By: Grok 4.7 <noreply@anthropic.com> Co-authored-by: Cursor <cursoragent@cursor.com>
Docs preview (local build)Handbook preview: https://docs-v3-preview.elastic.dev/elastic/docs-builder/pull/4272/ |
| } | ||
|
|
||
| [Test] | ||
| public async Task Render_RequestHeader_KeepsTheFullRouteAndFirstSampleLine() |
There was a problem hiding this comment.
[LOW] Test name overstates what is being verified
Render_RequestHeader_KeepsTheFullRouteAndFirstSampleLine reads like a visual/CSS regression test, but the assertions only validate string presence/order in rendered HTML. A regression in the CSS from this PR (for example, reintroducing truncation on .api-url or removing the new .api-code-sample-body min-height) would still pass this test because the markup does not change.
Please either add a style-level assertion path for the behavior being protected, or narrow the test name/assertions so it doesn't imply coverage of clipping/visibility behavior.
The sample body minimum covered the top padding and one line, so a single-line sample still lost its 1.5rem bottom padding and looked cut off. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
|
Partially solved by #4295 |
Assembler preview:
A long path in a code sample header scrolls inside the header, and the first line of an x-codeSamples block stays fully visible.
Affects: API reference, Site UI
Prompt summary: Fix the code sample header so a long path is fully visible or scrolls without clipping glyphs, and so the first line of an x-codeSamples block is not cut off. Switching examples must not bring the clip back. Keep the current header dropdowns. Do not rebuild the examples list.
Why
The sample header ellipsizes the route. The example and language dropdowns keep their width, and the path uses overflow hidden. On a short examples rail the sample body can shrink below its padding plus one line, so a one-line x-codeSamples block is cut off at the top or bottom. The next example uses the same body rule, so switching examples shows the clip again.
Closes elastic/docs-eng-team#890
Closes elastic/docs-eng-team#928
What
Sample header path
The route scrolls inside the 48px header. The text stays on one line, and the scrollbar sits under the glyphs so it does not slice them. The example and language dropdowns stay in the header.
First sample line
The sample body keeps enough height for its top padding, one line and its bottom padding. A short rail can no longer cover or crowd a one-line sample. Every example uses the same minimum, so switching examples does not bring the clip back.
Verify
Out of scope: The examples list in #4269, method colors, response tabs, mobile overflow, group rows, and nav verb chips stay on their own branches.
Made with Cursor