Repository navigation
[Hub pages] Add labeled commands to get-started options and wrap long commands - #4622
Draft
leemthompo wants to merge 1 commit into
Draft
leemthompo wants to merge 1 commit into
leemthompo wants to merge 1 commit into
Conversation
A get-started option can now offer several labeled commands, each in its own code block with its own copy button. Long commands in the legacy hub layout wrap instead of being clipped, so readers see the whole command. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Merged
1 of 2 tasks
leemthompo
added a commit
to elastic/docs-content
that referenced
this pull request
Oct 28, 2026
…asticsearch hub Uses the labeled `commands:` option from elastic/docs-builder#4622, so each command gets its own copy button. Builds once a docs-builder release includes that change. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Contributor
Docs preview (local build)Handbook preview: https://docs-v3-preview.elastic.dev/elastic/docs-builder/pull/4622/ Sample changed pages: |
This branch was successfully deployed
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.
A
{get-started}option can now list several labeled commands, each with its own code block and copy button. Long commands in the legacy hub layout now wrap instead of being clipped.Affects: Authoring, Site UI
Prompt summary: The Elasticsearch hub needs to offer two
start-localcommands side by side: one for Elasticsearch only, and one for Elasticsearch and Kibana. The ask is a clean way to show both, in both the legacy and the design-system hub layouts, at every page width.Why
An option takes one
codestring, so two commands have to share one block. The copy button then copies both commands, plus any comment lines between them. Separately, the legacy command chip has a fixed height and does not wrap. On the live hubs (e.g. Elasticsearch hub), the chip cuts off| sh, so readers see an incomplete command.What
Labeled commands
An option accepts
commands:as an alternative tocode:. Each entry has alabel:and acode:, and all entries use the option'slanguage:. Both hub views render every command in its own block with its own copy button. An option that sets bothcode:andcommands:fails the build with an error. The LLM export lists each command under its label.Wrapping commands in the legacy layout
The legacy chip now grows with its content instead of scrolling sideways, so a long command wraps onto more lines. A one-line command keeps its 37px height, which matches the option button next to it. The design-system view already wrapped commands.
Layout beside a command stack
A stack of commands is taller than a button. When one option has a stack, the button in the other option stays under its own text instead of dropping to the bottom of the row. Chips in a stack share one width, so their edges line up when the options stack on narrow screens.
Verify
Serve a hub that uses
commands:with the flag off and on:Check on the preview
start-localcommand in Run locally wraps and shows the final| sh.No page on the preview uses
commands:yet. The screenshots below show it.Out of scope: Two layout bugs already exist on hubs that do not use
commands:. WithNAVIGATION_PREVIEWon at 768px, the design-system layout keeps three columns and squeezes each command into a narrow strip. With the flag off at 375px, the step box runs past the right edge of the page. Both show on the Kibana hub today.Related: #4623 carries the wrapping fix on its own, so it can ship first. This PR includes the same change.
Companion PR: elastic/docs-content#9073 changes the Elasticsearch hub. It can switch to
commands:once this ships.Screenshots
The Run Elasticsearch step on the Elasticsearch hub, using
commands:, at five widths. Click a title to expand it.With
NAVIGATION_PREVIEWoff375px, mobile (existing step box overflow bug, also on the Kibana hub)
768px, tablet
1024px, small laptop
1280px, laptop
1440px, desktop
With
NAVIGATION_PREVIEWon375px, mobile
768px, tablet (existing narrow-column squeeze bug, also on the Kibana hub)
1024px, small laptop
1280px, laptop
1440px, desktop
🤖 Generated with Claude Code