Repository navigation
Show a property's reference link above its show properties toggle - #4377
Merged
Merged
Conversation
A property's "Read the reference documentation" link came after its description, so a reader went through the text before finding it. It now sits right under the property's name and type. External documentation links rendered their attributes HTML-encoded, as `target="_blank" rel="noopener"`. Browsers read that as a window named `"_blank"` and an unknown `rel`, so `noopener` did not apply. The six links on property rows, operation, schema and tag pages now use conditional attributes and render `target="_blank" rel="noopener"`. 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/4377/ |
The reference link sat on a line of its own under the property's name. It now follows the name, type and badges on the same line. The default "Read the reference documentation" was too long to fit there and wrapped onto its own line again, so a property link without text from the spec reads "Reference", or "External docs" for another site. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
On the name line the link crowded the name, type and badges. It now gets a row of its own after the description and the row's other details, right above "show properties". It uses the toggle's indent and font, rendered as a link, so the two read as one block under the description. The short "Reference" wording stays. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The reference link row sat at the "show properties" indent without the toggle's tree line, so it floated between the description and the branch. It now draws the same L-shaped connector. With the toggle below, the line runs on into the toggle's branch, so the link and the toggle hang off one line; on its own, the row ends in an L. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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.
On API Explorer property rows, the reference documentation link now sits right above "show properties", indented and sized like that toggle but rendered as a link. A link without text from the spec reads "Reference". External documentation links also get working
target="_blank"andrel="noopener"attributes again.Affects:
API referencePrompt summary: The author asked to move a property's reference link so it is easier to find. After trying it under the name and on the name line, which crowded that line, the author settled on a row just above "show properties", in the same font and indent but as a link. While moving it, the link's attributes turned out to render HTML-encoded on every page type, so this PR fixes them too.
Why
A property's "Read the reference documentation" link sat as a full-width line between its description and the row's other details, such as enum values or union options, so it read like part of the description rather than a separate action. External documentation links also wrote their attributes as a quoted string inside a Razor expression, so they rendered as
target="_blank" rel="noopener". Browsers read that as a window named"_blank"and an unknownrelvalue, sonoopenernever applied. This affected 80 links on the Elasticsearch and Kibana pages.What
The link sits above "show properties"
On property rows, the reference link gets a row of its own after the description and the row's other details, right above the "show properties" toggle. It uses the toggle's indent,
text-smfont and L-shaped tree branch, rendered as a link. When the toggle follows, it drops its top margin and the branch line runs on into the toggle's, so the link and the toggle hang off one line. A link without text from the spec reads "Reference", or "External docs" for another site; spec text, such as "Query DSL", is kept. A row without a toggle shows the link alone at the same indent. The Markdown export has no property reference links, so it is unchanged.Attributes that work
The six external documentation links, on property rows and on operation, schema and tag pages, now use Razor conditional attributes. An external link renders
target="_blank" rel="noopener", ornoopener noreferreron tag pages. An elastic.co link renders neither.Where to look
chunking_settings: "Reference"; expand it to see the line run into the child rowssource.query: "Query DSL"pipeline: "Reference"service_settings.model: "External docs", withtarget="_blank" rel="noopener"A request body may start collapsed; open it to see the row.
Verify
Out of scope:
_TocTreeNav.cshtmland_TocTreeNavLegacy.cshtmlin the site navigation writehx-boost="false"the same way, so it renders HTML-encoded too. That is site navigation rather than the API Explorer, and is left for its own change.🤖 Generated with Claude Code