You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
applies-switch: tab label shows only one badge when an applies-item combines multiple deployment types #4627
When an {applies-item} argument combines several deployment-type keys — the pattern the applies-switch syntax docs recommend — the rendered tab label shows only one badge. The last key in source order wins, and the other deployment types are invisible in the tab bar:
::::{applies-item} { serverless:, ech: } renders a tab labeled only ECH. There is no Serverless badge anywhere in the tab bar.
::::{applies-item} { self:, ece:, eck: } renders a tab labeled only ECK.
Live example: on High JVM memory pressure, { ess:, ece: } renders only ECE, and { self:, eck: } renders only ECK.
Combining different badge families is not affected: { stack: ga 9.4+, serverless: ga } renders both badges (related: #1976, which fixed ordering and separators for that case).
In the generated HTML, the applies-switch-label contains a single <applies-to-popover badge-key="ECH" …> element, so the other keys are dropped before badge rendering rather than hidden by styling. Reproduced with docs-builder 1.68.0 locally and confirmed on the published site (see the live example above).
Why it matters
Readers find their tab by their deployment type. On a page whose tabs render as "ECH | ECK", a serverless or self-managed user concludes their deployment isn't covered, even though the markup covers it — a reviewer of elastic/docs-content#8151 flagged exactly that. The only workaround today is splitting the grouped item into one applies-item per deployment type and duplicating the content.
Expected behavior
The tab label shows one badge per deployment type in the definition — for example Serverless ECH and Self-managed ECE ECK — matching how the same definitions render as {applies_to} badges elsewhere.
Steps to reproduce
Build a page containing:
::::{applies-switch}
:::{applies-item} { serverless:, ech: }
Content for Serverless and ECH
:::
:::{applies-item} { self:, ece:, eck: }
Content for self-managed, ECE, and ECK
:::
::::
Activity