Repository navigation
Show one underline under optional API path segments - #5009
Merged
Merged
Conversation
An optional segment in the request line was a `.api-url-optional` span with a dashed border around an `a.api-url-param` with a dotted underline, so two lines stacked under the same text. Each segment is now one element, and optional segments use the same dotted underline as required ones. Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
Contributor
Docs preview (local build)Handbook preview: https://docs-v3-preview.elastic.dev/elastic/docs-builder/pull/5009/ |
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.
Optional path segments in an API operation's request line now show one dotted underline, the same as required segments, instead of a dashed and a dotted line stacked together.
Affects: API reference, Site UI
Prompt summary: Find out why the request lines on the
operation-cluster-statepage still show a double underline. Fix it at the source, and use the second request line's dotted underline as the single style for every placeholder.Why
The first request line,
GET /_cluster/state/{metric}/{index}, wraps each optional segment in a.api-url-optionalspan. That span draws a dashedborder-bottom. Thea.api-url-paramlink inside it draws a dottedtext-decoration. Both paint under the same text, so the reader sees two lines. Required segments have no wrapper and show only the dotted line.What
One element per segment
_EndpointPath.cshtmlrenders each placeholder as a single element:<a class="api-url-param api-url-optional">when the parameter is documented on the page, a<span class="api-url-optional">when it is not. The/stays outside that element, so no segment underlines its slash.One underline style
api-docs.cssgives.api-url-optionalanda.api-url-paramthe same dotted underline in one rule. The dashed border and the muted optional colour are gone. The "Optional. Leave it out to call …" tooltip and thehelpcursor stay on optional segments, and they are now the only cue that a segment is optional.api-reference.cssgets the same dotted cue.Test
Render_OptionalSegments_AreOneElementEachsnapshots a linked and an unlinked optional segment. It fails on the old markup. The existing placeholder-link regex now accepts the optional class.Verify
Check on the preview