Skip to content

Leave a primitive variant's panel empty behind a union chip - #4494

Merged
akira28 merged 1 commit into
mainfrom
api-explorer-hide-primitive-panel
Oct 16, 2026
Merged

akira28 merged 1 commit into
mainfrom
api-explorer-hide-primitive-panel

Conversation

@akira28

@akira28 akira28 commented Oct 16, 2026 •

Copy link
Copy Markdown
Contributor

Picking the chip of a primitive variant, such as string, no longer repeats the type name in the panel below.

Affects: API reference

Prompt summary: Hide the primitive's content when its pill is clicked in a oneOf/anyOf that mixes a primitive and an object.

Why

A union with two or more variants shows its variants behind chips. The chip of a primitive variant already reads string, and the panel under it printed string again. The panel added nothing.

What

Primitive panel without the type name

A primitive variant behind chips renders no type heading. Its description still shows when the schema has one. Array variants (X[]) and variants that link to a type's own page keep their heading, as their chip does not carry that information.

Verify

dotnet test tests/Elastic.ApiExplorer.Tests/
# Render_PrimitiveVariantBehindChips_LeavesItsPanelWithoutTheTypeName

Check on the preview

A primitive's chip already names its type, so its panel repeated `string` or `number` under the picked chip. The panel now shows only the description, if any.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
@akira28
akira28 requested a review from a team as a code owner October 16, 2026 14:23
@akira28
akira28 requested a review from Mpdreamz October 16, 2026 14:23
@akira28
akira28 enabled auto-merge (squash) October 16, 2026 14:23
@github-actions

Copy link
Copy Markdown
Contributor

Docs preview (local build)

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

@akira28
akira28 disabled auto-merge October 16, 2026 15:22
@akira28
akira28 merged commit 879aace into main Oct 16, 2026
37 checks passed
@akira28
akira28 deleted the api-explorer-hide-primitive-panel branch October 16, 2026 15:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant