From 00c8186803ba20d305414f674364d8eea6107c9b Mon Sep 17 00:00:00 2001 From: Jan Calanog Date: Thu, 19 Nov 2026 21:57:23 +0100 Subject: [PATCH 01/23] Delete the unused _NavSelect partial and its menu styles Nothing renders `_NavSelect.cshtml` or builds `NavigationSelectModel`. The `.nav-select-dropdown`, `.nav-select-menu` and `.nav-select-option` rules only styled that partial. The React `VersionDropdown` keeps the `.nav-select` trigger rules it uses. Co-Authored-By: Claude Opus 5.5 --- .../Assets/secondary-nav.css | 87 ------------------- .../Assets/secondary-nav.test.ts | 18 ---- .../Assets/secondary-nav.ts | 2 +- .../Navigation/NavigationRenderModel.cs | 8 +- .../Navigation/_NavSelect.cshtml | 37 -------- 5 files changed, 2 insertions(+), 150 deletions(-) delete mode 100644 src/Elastic.Documentation.Site/Navigation/_NavSelect.cshtml diff --git a/src/Elastic.Documentation.Site/Assets/secondary-nav.css b/src/Elastic.Documentation.Site/Assets/secondary-nav.css index 3758dbd026..ca2da2af2a 100644 --- a/src/Elastic.Documentation.Site/Assets/secondary-nav.css +++ b/src/Elastic.Documentation.Site/Assets/secondary-nav.css @@ -369,93 +369,6 @@ transform: rotate(180deg); } - .nav-select-dropdown { - position: relative; - display: block; - width: 100%; - } - - .nav-select-dropdown > summary.nav-select { - display: flex; - width: 100%; - list-style: none; - } - - .nav-select-dropdown > summary.nav-select::-webkit-details-marker { - display: none; - } - - .nav-select-dropdown > summary.nav-select .nav-select__body { - flex: 1 1 auto; - min-width: 0; - justify-content: space-between; - } - - .nav-select-dropdown .nav-select__value { - overflow: hidden; - text-overflow: ellipsis; - min-width: 0; - } - - .nav-select-dropdown[open] .nav-select__chevron, - .nav-select-dropdown.is-open .nav-select__chevron { - transform: rotate(180deg); - } - - .nav-select-menu { - box-sizing: border-box; - position: absolute; - top: calc(100% + 4px); - left: 0; - z-index: 30; - width: 100%; - margin-top: 0; - padding: 8px; - background: #fff; - border: 0; - border-radius: 4px; - box-shadow: none; - filter: drop-shadow(0 0 2px rgb(43 57 79 / 0.16)) - drop-shadow(0 3px 10px rgb(43 57 79 / 0.1)) - drop-shadow(0 6px 14px rgb(43 57 79 / 0.06)); - font-family: var(--font-body); - font-size: 14px; - font-weight: 400; - line-height: 20px; - color: #1d2a3e; - } - - .nav-select-option { - display: flex; - align-items: center; - width: 100%; - margin: 0; - padding: 6px 8px; - border: 0; - border-radius: 4px; - background: transparent; - font: inherit; - color: #1d2a3e; - text-align: left; - text-decoration: none; - cursor: pointer; - } - - .nav-select-option:hover, - .nav-select-option:focus-visible { - background: #f6f9fc; - color: #1d2a3e; - } - - .nav-select-option:focus-visible { - outline: 2px solid #0b64dd; - outline-offset: -2px; - } - - .nav-select-option--selected { - font-weight: 600; - } - version-dropdown { display: inline-flex; } diff --git a/src/Elastic.Documentation.Site/Assets/secondary-nav.test.ts b/src/Elastic.Documentation.Site/Assets/secondary-nav.test.ts index 17c2247f26..0dfaee2c3f 100644 --- a/src/Elastic.Documentation.Site/Assets/secondary-nav.test.ts +++ b/src/Elastic.Documentation.Site/Assets/secondary-nav.test.ts @@ -89,24 +89,6 @@ describe('initSecondaryNav', () => { raf.mockRestore() }) - it('closes a nav-select dropdown when clicking outside of it', () => { - document.body.innerHTML = ` - -

page

- ` - const versions = - document.querySelector('#versions')! - const outside = document.querySelector('#outside')! - versions.open = true - - outside.dispatchEvent(new MouseEvent('click', { bubbles: true })) - - expect(versions.open).toBe(false) - }) - it('keeps is-closing on the panel until the EUI exit motion finishes', () => { vi.useFakeTimers() const { products, outside } = renderNav() diff --git a/src/Elastic.Documentation.Site/Assets/secondary-nav.ts b/src/Elastic.Documentation.Site/Assets/secondary-nav.ts index c9e0598451..6a0d09b519 100644 --- a/src/Elastic.Documentation.Site/Assets/secondary-nav.ts +++ b/src/Elastic.Documentation.Site/Assets/secondary-nav.ts @@ -14,7 +14,7 @@ import { prefersReducedMotion } from './motion' * navigations swap body innerHTML and would leave a body data-* attribute stale. */ -const DROPDOWN = 'details.secondary-nav-dropdown, details.nav-select-dropdown' +const DROPDOWN = 'details.secondary-nav-dropdown' const ACTIVE = 'secondary-nav-item--active' const OPEN = 'is-open' const CLOSING = 'is-closing' diff --git a/src/Elastic.Documentation.Site/Navigation/NavigationRenderModel.cs b/src/Elastic.Documentation.Site/Navigation/NavigationRenderModel.cs index 4ddb31fd40..0c302ba0cc 100644 --- a/src/Elastic.Documentation.Site/Navigation/NavigationRenderModel.cs +++ b/src/Elastic.Documentation.Site/Navigation/NavigationRenderModel.cs @@ -49,16 +49,10 @@ public sealed record NavigationDropdownItem(string NavigationTitle, string Url, /// A single back-link in the island sidebar's breadcrumb trail. public sealed record IslandBackLink(string Title, string Url); -/// One choice in a sidebar/rail nav-select (version switcher, examples, …). +/// One choice in a version switcher. /// is the label where the option stands alone, such as a trigger, when carries a hint for the list. public sealed record NavigationSelectOption(string Label, string Value, bool Selected, string? ShortLabel = null); -/// Resolved data for _NavSelect.cshtml. -public sealed record NavigationSelectModel(string Id, string AriaLabel, IReadOnlyList Options, bool UseLinks = true) -{ - public NavigationSelectOption Current => Options.FirstOrDefault(static o => o.Selected) ?? Options[0]; -} - /// /// Everything _TocTree.cshtml renders, resolved from the domain navigation up front. /// identifies the tree content so same-island pages share markup. diff --git a/src/Elastic.Documentation.Site/Navigation/_NavSelect.cshtml b/src/Elastic.Documentation.Site/Navigation/_NavSelect.cshtml deleted file mode 100644 index 0bbec178b8..0000000000 --- a/src/Elastic.Documentation.Site/Navigation/_NavSelect.cshtml +++ /dev/null @@ -1,37 +0,0 @@ -@using Elastic.Documentation.Site.Navigation -@inherits RazorSlice -@{ - var current = Model.Current; -} - From e84629b7d93341f772fefae8aeb22ef2ad60a541 Mon Sep 17 00:00:00 2001 From: Jan Calanog Date: Thu, 19 Nov 2026 22:03:37 +0100 Subject: [PATCH 02/23] Delete the unreachable top-bar section dropdown `_SecondaryNav.cshtml` renders its section dropdown only when `NAVIGATION_PREVIEW` is on. With the flag on, every layout renders the design-system header instead of `_AssemblerHeader`, and the page loads `ds.js`, not `main.js`. So no page shows the dropdown, and its close-on- outside-click, Escape and motion code in `secondary-nav.ts` never runs. This removes the dropdown branch, its motion and overflow CSS, and that code. `secondary-nav.ts` keeps the active-tab sync, and `secondary-nav-dropdown.css` keeps the link rows the API hub menu uses. Co-Authored-By: Claude Opus 5.5 --- .../Assets/pages-nav.ts | 2 +- .../Assets/secondary-nav-dropdown.css | 115 +----------------- .../Assets/secondary-nav.css | 4 - .../Assets/secondary-nav.test.ts | 108 +--------------- .../Assets/secondary-nav.ts | 110 +---------------- .../Layout/_SecondaryNav.cshtml | 37 +----- ...edTopNavRendersTheDesktopBar.verified.html | 24 ---- ...RendersOnTheRightOfTheTopBar.verified.html | 24 ---- .../Rendering/SecondaryNavRenderingTests.cs | 6 - 9 files changed, 6 insertions(+), 424 deletions(-) diff --git a/src/Elastic.Documentation.Site/Assets/pages-nav.ts b/src/Elastic.Documentation.Site/Assets/pages-nav.ts index 8dd403e094..1f31e84e80 100644 --- a/src/Elastic.Documentation.Site/Assets/pages-nav.ts +++ b/src/Elastic.Documentation.Site/Assets/pages-nav.ts @@ -1203,7 +1203,7 @@ function ensureFolderRowClick() { } const SECTION_RESET_LINK = - '#secondary-nav a.secondary-nav-item__hit, #secondary-nav a.secondary-nav-dropdown-link, #pages-dropdown a.pages-dropdown_active' + '#secondary-nav a.secondary-nav-item__hit, #pages-dropdown a.pages-dropdown_active' function isSectionResetElement(el: Element | null) { return Boolean(el?.closest(SECTION_RESET_LINK)) diff --git a/src/Elastic.Documentation.Site/Assets/secondary-nav-dropdown.css b/src/Elastic.Documentation.Site/Assets/secondary-nav-dropdown.css index 0e5c5a5ef8..68175143aa 100644 --- a/src/Elastic.Documentation.Site/Assets/secondary-nav-dropdown.css +++ b/src/Elastic.Documentation.Site/Assets/secondary-nav-dropdown.css @@ -1,121 +1,8 @@ /* - * Top-bar dropdown. Rendered for a `top_nav:` entry in navigation.yml that has - * `children:`. The label is a pure toggle, not a link: the panel lists the - * entry's children so users can jump straight to a child page. - * - * Open/close is native
. Closing on outside click or Escape is not, - * so that lives in secondary-nav.ts. - * - * Panel chrome and motion match EuiPopover (Borealis): no visible light-mode - * border, medium drop-shadow via filter, opacity + translateY with bounce. - * Visibility is driven by `.is-open` (added on rAF) so the panel can transition - * instead of popping in from the UA `display:none` on closed
. + * Menu rows for the API hub menu (_ApiIdentity.cshtml, placed by floating.ts). */ @layer components { - .secondary-nav-dropdown { - position: relative; - display: flex; - align-items: stretch; - height: 100%; - } - - /* The nav bar uses overflow-x:auto for horizontal tab scrolling, which - also clips vertically and would cut off an open dropdown. Let the menu - escape while open or still animating out. */ - .secondary-nav-scroll-container:has(.secondary-nav-dropdown[open]), - .secondary-nav-scroll-container:has(.secondary-nav-dropdown.is-open), - .secondary-nav-scroll-container:has(.secondary-nav-dropdown.is-closing) { - overflow: visible; - } - - .secondary-nav-dropdown summary { - list-style: none; - } - .secondary-nav-dropdown summary::-webkit-details-marker { - display: none; - } - - .secondary-nav-icon.secondary-nav-dropdown-chevron { - flex-shrink: 0; - color: #516381; - transition: transform 0.15s ease; - } - .secondary-nav-dropdown[open] .secondary-nav-dropdown-chevron, - .secondary-nav-dropdown.is-open .secondary-nav-dropdown-chevron { - transform: rotate(180deg); - } - - /* Beat the UA `details:not([open]) > :not(summary) { display: none }` so - opacity/transform can actually transition. */ - details.secondary-nav-dropdown > .secondary-nav-dropdown-menu { - display: flex; - content-visibility: visible; - } - - .secondary-nav-dropdown-menu { - position: absolute; - /* Same visual gap as EuiPopover on the 32px version trigger: that - button sits 12px above the bar bottom, with a 12px EUI offset. - This menu is positioned from the 56px tab, so extra offset is 0. */ - top: 100%; - left: 0; - box-sizing: border-box; - width: 175px; - z-index: 50; - flex-direction: column; - padding: 8px; - background: #fff; - border: 0; - border-radius: 4px; - box-shadow: none; - /* Borealis euiShadowMedium as filter (EuiPopover hasShadow=false). */ - filter: drop-shadow(0 0 2px rgb(43 57 79 / 0.16)) - drop-shadow(0 3px 10px rgb(43 57 79 / 0.1)) - drop-shadow(0 6px 14px rgb(43 57 79 / 0.06)); - font-family: var(--font-body); - font-size: 14px; - font-weight: 400; - line-height: 20px; - color: #1d2a3e; - opacity: 0; - visibility: hidden; - pointer-events: none; - backface-visibility: hidden; - transform: translateY(0) translateZ(0); - transition: - opacity 350ms cubic-bezier(0.34, 1.61, 0.7, 1), - transform 450ms cubic-bezier(0.34, 1.61, 0.7, 1), - visibility 0s linear 350ms; - } - .secondary-nav-dropdown.is-open .secondary-nav-dropdown-menu { - opacity: 1; - visibility: visible; - pointer-events: auto; - transform: translateY(-8px) translateZ(0); - transition: - opacity 350ms cubic-bezier(0.34, 1.61, 0.7, 1), - transform 450ms cubic-bezier(0.34, 1.61, 0.7, 1), - visibility 0s; - } - - @media (prefers-reduced-motion: reduce) { - .secondary-nav-dropdown-menu, - .secondary-nav-dropdown.is-open .secondary-nav-dropdown-menu { - transition: none; - transform: translateY(0) translateZ(0); - } - } - - .secondary-nav-dropdown-group-label { - padding: 6px 8px; - font-size: 12px; - font-weight: 600; - line-height: 20px; - color: #516381; - user-select: none; - } - .secondary-nav-dropdown-link { display: flex; align-items: center; diff --git a/src/Elastic.Documentation.Site/Assets/secondary-nav.css b/src/Elastic.Documentation.Site/Assets/secondary-nav.css index ca2da2af2a..f353b6cdb2 100644 --- a/src/Elastic.Documentation.Site/Assets/secondary-nav.css +++ b/src/Elastic.Documentation.Site/Assets/secondary-nav.css @@ -235,10 +235,6 @@ color 0.08s ease; } - .secondary-nav-item__content--dropdown { - gap: 6px; - } - .secondary-nav-item--active { position: relative; z-index: 1; diff --git a/src/Elastic.Documentation.Site/Assets/secondary-nav.test.ts b/src/Elastic.Documentation.Site/Assets/secondary-nav.test.ts index 0dfaee2c3f..f429143d09 100644 --- a/src/Elastic.Documentation.Site/Assets/secondary-nav.test.ts +++ b/src/Elastic.Documentation.Site/Assets/secondary-nav.test.ts @@ -1,114 +1,8 @@ import { initSecondaryNav, syncSecondaryNavActive } from './secondary-nav' -function renderNav() { - document.body.innerHTML = ` - -

page

- ` - return { - products: document.querySelector('#products')!, - extend: document.querySelector('#extend')!, - outside: document.querySelector('#outside')!, - } -} - -describe('initSecondaryNav', () => { +describe('syncSecondaryNavActive', () => { beforeAll(() => initSecondaryNav()) - it('closes an open dropdown when clicking outside of it', () => { - const { products, outside } = renderNav() - products.open = true - - outside.dispatchEvent(new MouseEvent('click', { bubbles: true })) - - expect(products.open).toBe(false) - }) - - it('closes the other dropdowns when one is opened', () => { - const { products, extend } = renderNav() - products.open = true - - // the native
toggle opens this one, our listener closes the sibling - extend - .querySelector('summary')! - .dispatchEvent(new MouseEvent('click', { bubbles: true })) - - expect(products.open).toBe(false) - expect(extend.open).toBe(true) - }) - - it('leaves clicks inside the open panel alone so links still work', () => { - const { products } = renderNav() - products.open = true - - products - .querySelector('a')! - .dispatchEvent(new MouseEvent('click', { bubbles: true })) - - expect(products.open).toBe(true) - }) - - it('closes on Escape and returns focus to the summary', () => { - const { products } = renderNav() - products.open = true - const summary = products.querySelector('summary')! - summary.focus() - - document.dispatchEvent( - new KeyboardEvent('keydown', { key: 'Escape', bubbles: true }) - ) - - expect(products.open).toBe(false) - expect(document.activeElement).toBe(summary) - }) - - it('adds is-open on the next frame so the panel can transition in', () => { - const queued: FrameRequestCallback[] = [] - const raf = vi - .spyOn(window, 'requestAnimationFrame') - .mockImplementation((cb: FrameRequestCallback) => { - queued.push(cb) - return queued.length - }) - const { products } = renderNav() - products.open = true - products.dispatchEvent(new Event('toggle')) - - expect(products.classList.contains('is-open')).toBe(false) - queued.forEach((cb) => cb(0)) - expect(products.classList.contains('is-open')).toBe(true) - raf.mockRestore() - }) - - it('keeps is-closing on the panel until the EUI exit motion finishes', () => { - vi.useFakeTimers() - const { products, outside } = renderNav() - products.open = true - - outside.dispatchEvent(new MouseEvent('click', { bubbles: true })) - - expect(products.open).toBe(false) - expect(products.classList.contains('is-closing')).toBe(true) - - vi.advanceTimersByTime(349) - expect(products.classList.contains('is-closing')).toBe(true) - - vi.advanceTimersByTime(1) - expect(products.classList.contains('is-closing')).toBe(false) - vi.useRealTimers() - }) -}) - -describe('syncSecondaryNavActive', () => { function renderTabs() { document.body.innerHTML = `
-
+ +
@if (content.ProductDescription is { } description) {

@description

@@ -80,7 +81,7 @@ else if (Model.Interactive && Model.Popover is { } content)

@versionNote

}
- +
} else { diff --git a/src/Elastic.Documentation.Site/Components/Primitives/AppliesPopover/applies-popover.css b/src/Elastic.Documentation.Site/Components/Primitives/AppliesPopover/applies-popover.css index 2657395bda..e0ecb8d9e6 100644 --- a/src/Elastic.Documentation.Site/Components/Primitives/AppliesPopover/applies-popover.css +++ b/src/Elastic.Documentation.Site/Components/Primitives/AppliesPopover/applies-popover.css @@ -25,27 +25,19 @@ } .applies-popover { - position: relative; display: inline-block; vertical-align: middle; } -/* The open popover stacks above later siblings, such as badges in the rows below a table cell. */ -.applies-popover[open] { - z-index: var(--z-overlay); -} - .applies-popover__trigger { + padding: 0; + appearance: none; + text-align: left; cursor: pointer; - list-style: none; -} - -.applies-popover__trigger::-webkit-details-marker { - display: none; } .applies-popover__trigger:hover, -.applies-popover[open] > .applies-popover__trigger { +.applies-popover__trigger[aria-expanded='true'] { border-color: var(--color-accent); } @@ -54,12 +46,12 @@ outline-offset: 2px; } +/* ds/applies-popover.ts makes the panel a popover that the button opens and floating.ts places beside it, in the top layer, + so no table or ancestor overflow clips it. */ .applies-popover__panel { - position: absolute; - z-index: var(--z-overlay); - top: calc(100% + var(--space-1)); - left: 0; - width: min(24rem, 85vw); + width: min(24rem, calc(100vw - 16px)); + max-height: var(--floating-available-height, none); + overflow-y: auto; padding: var(--space-4); border: var(--border-width) solid var(--color-border-strong); border-radius: var(--radius-md); @@ -73,12 +65,26 @@ white-space: normal; } -/* In the top layer the panel is placed by script, relative to the viewport. */ -.applies-popover__panel[popover] { - position: fixed; - inset: auto; - margin: 0; - overflow: auto; +/* Without script or the Popover API the panel is not a popover: it shows under the badge while the button has focus. */ +.applies-popover:not([data-applies-bound]) { + position: relative; +} + +.applies-popover:not([data-applies-bound]) > .applies-popover__panel { + position: absolute; + z-index: var(--z-overlay); + top: calc(100% + var(--space-1)); + left: 0; + display: none; +} + +.applies-popover:not([data-applies-bound]):focus-within { + z-index: var(--z-overlay); +} + +.applies-popover:not([data-applies-bound]):focus-within + > .applies-popover__panel { + display: block; } .applies-popover__panel p { @@ -142,37 +148,11 @@ color: var(--color-accent); } -/* - * The inline form sits inside a paragraph, so it is built from phrasing elements only: a button and spans. Without script the panel - * opens while the button has focus; once script has bound it, a click toggles it and Escape or a click elsewhere closes it. - */ +/* The inline form sits inside a paragraph, so it is built from phrasing elements only: a button and spans. */ .applies-popover--inline > .applies-popover__trigger { - padding: 0; - appearance: none; background: var(--color-surface); color: inherit; font: inherit; - text-align: left; -} - -.applies-popover--inline > .applies-popover__panel { - display: none; -} - -.applies-popover--inline:not([data-applies-bound]):focus-within - > .applies-popover__panel, -.applies-popover--inline[data-open] > .applies-popover__panel { - display: block; -} - -.applies-popover--inline:focus-within, -.applies-popover--inline[data-open] { - z-index: var(--z-overlay); -} - -.applies-popover--inline > .applies-popover__trigger:hover, -.applies-popover--inline[data-open] > .applies-popover__trigger { - border-color: var(--color-accent); } .applies-popover--inline .applies-popover__description, @@ -194,15 +174,3 @@ color: var(--color-text-muted); font-size: var(--text-xs); } - -/* In the top layer the panel is placed by script, relative to the viewport, so no ancestor's overflow can clip it. */ -.applies-popover--inline > .applies-popover__panel[popover] { - position: fixed; - inset: auto; - margin: 0; - overflow: auto; -} - -.applies-popover--inline > .applies-popover__panel[popover]:popover-open { - display: block; -} diff --git a/src/Elastic.Documentation.Site/Layout/_DesignSystemAssemblerHeader.cshtml b/src/Elastic.Documentation.Site/Layout/_DesignSystemAssemblerHeader.cshtml index 7a00794f63..5e6dca0fc8 100644 --- a/src/Elastic.Documentation.Site/Layout/_DesignSystemAssemblerHeader.cshtml +++ b/src/Elastic.Documentation.Site/Layout/_DesignSystemAssemblerHeader.cshtml @@ -79,6 +79,7 @@ else Downloads = hasSpecDownload ? new LinkMenuModel { + Id = "spec-download-menu", Label = "Download source", Current = "Download source", Items = [new("JSON", specJsonUrl!, Download: true), new("YAML", specYamlUrl!, Download: true)] diff --git a/src/Elastic.Documentation.Site/Navigation/_TocTree.cshtml b/src/Elastic.Documentation.Site/Navigation/_TocTree.cshtml index f0d2874b4f..95d9b8d662 100644 --- a/src/Elastic.Documentation.Site/Navigation/_TocTree.cshtml +++ b/src/Elastic.Documentation.Site/Navigation/_TocTree.cshtml @@ -11,6 +11,7 @@ SectionMenu = Model.IsUsingNavigationDropdown ? new LinkMenuModel { + Id = "section-menu", Label = "Section", Current = Model.CurrentTopLevelNavigationTitle, Items = [.. Model.DropdownItems.Select(i => new LinkMenuItem(i.NavigationTitle, i.Url, i.IsActive))] diff --git a/tests/Elastic.ApiExplorer.Tests/.snapshots/ApiPagesNavRenderingTests/DesignSystemNav_RendersSwitchersAsLinkMenusAboveTheTree.verified.html b/tests/Elastic.ApiExplorer.Tests/.snapshots/ApiPagesNavRenderingTests/DesignSystemNav_RendersSwitchersAsLinkMenusAboveTheTree.verified.html index 09cbe65901..8d3d42c0c8 100644 --- a/tests/Elastic.ApiExplorer.Tests/.snapshots/ApiPagesNavRenderingTests/DesignSystemNav_RendersSwitchersAsLinkMenusAboveTheTree.verified.html +++ b/tests/Elastic.ApiExplorer.Tests/.snapshots/ApiPagesNavRenderingTests/DesignSystemNav_RendersSwitchersAsLinkMenusAboveTheTree.verified.html @@ -1,13 +1,13 @@
- +
- + diff --git a/tests/Elastic.Authoring.Tests/.snapshots/DesignSystem/AppliesToBlockComponent/RendersHtml.verified.html b/tests/Elastic.Authoring.Tests/.snapshots/DesignSystem/AppliesToBlockComponent/RendersHtml.verified.html new file mode 100644 index 0000000000..90c96a7d9e --- /dev/null +++ b/tests/Elastic.Authoring.Tests/.snapshots/DesignSystem/AppliesToBlockComponent/RendersHtml.verified.html @@ -0,0 +1,28 @@ +

+

+
+ +
+

The + Elastic Stack + includes Elastic's core products such as Elasticsearch, Kibana, Logstash, and Beats.

+

Availability

+
    +
  • +
    + Planned +

    We plan to add this functionality in a future Elastic Stack update. Subject to changes.

    +
    +
  • +
+

Unless stated otherwise on the page, this functionality is available when your Elastic Stack is deployed on Elastic Cloud Hosted, Elastic Cloud Enterprise, Elastic Cloud on Kubernetes, and self-managed environments.

+

This documentation corresponds to the latest patch available for each minor version. If you're not using the latest patch, check the + release notes + for changes.

+
+
+

diff --git a/tests/Elastic.Authoring.Tests/DesignSystem/DesignSystemDirectives.cs b/tests/Elastic.Authoring.Tests/DesignSystem/DesignSystemDirectives.cs index 3c1bb813a0..bcfd0ce1ca 100644 --- a/tests/Elastic.Authoring.Tests/DesignSystem/DesignSystemDirectives.cs +++ b/tests/Elastic.Authoring.Tests/DesignSystem/DesignSystemDirectives.cs @@ -435,6 +435,18 @@ This applies to the stack. public async Task RendersHtml() => await Docs.ConvertsToHtmlSnapshot(); } +public class AppliesToBlockComponent : DesignSystemDirectiveTest +{ + protected override string Markdown => """ + ```{applies_to} + stack: ga 9.1 + ``` + """; + + [Test, DisplayName("renders HTML")] + public async Task RendersHtml() => await Docs.ConvertsToHtmlSnapshot(); +} + public class VectorSizingComponent : DesignSystemDirectiveTest { protected override string Markdown => """ diff --git a/tests/Elastic.Documentation.Journeys.Tests/journeys/versions/synth/version-dropdown.journey b/tests/Elastic.Documentation.Journeys.Tests/journeys/versions/synth/version-dropdown.journey index 7060c1b97a..25703abd4e 100644 --- a/tests/Elastic.Documentation.Journeys.Tests/journeys/versions/synth/version-dropdown.journey +++ b/tests/Elastic.Documentation.Journeys.Tests/journeys/versions/synth/version-dropdown.journey @@ -1,6 +1,6 @@ # The docs version picker is visible on a versioned page, opens, and sits where the layout puts it on a phone. # The legacy layout renders in the right rail; the Design System -# layout (navigation-preview) renders a native