Skip to content

Multi-lifecycle applies_to renders weird "Removed Planned" badge #3537

Description

@shainaraskas

Describe the bug

When an applies_to directive uses multiple lifecycles where the highest-version lifecycle is unreleased — for example, a feature that is currently deprecated and is removed in a future version — the badge renders as a weird concatenation of the lifecycle name and the synthesized fallback text:

Stack | Removed Planned

The badge is showing the lifecycle name (Removed) and a synthesized Planned label side by side, which reads awkwardly and is misleading: the feature isn't removed yet, it's currently deprecated.

Expected behavior

Per the applies_to syntax docs, when the highest-version Removed lifecycle is unreleased and there are 2+ lifecycles, the badge should "use the previous lifecycle". For stack: deprecated, removed 10.0 (with stack current 9.4.2), that means the badge should render as:

Stack | Deprecated

…reflecting the page's current state, with the future removal information surfaced in the popover.

Steps to reproduce

  1. Author a page with the following frontmatter or directive:

    ```{applies_to}
    stack: deprecated, removed 10.0
    ```
  2. With stack current: 9.4.2 (per config/versions.yml).

  3. Build the page and inspect the rendered badge.

Observed: Stack | Removed Planned
Expected: Stack | Deprecated

Tooling

  • docs-builder

Root cause

In src/Elastic.Markdown/Myst/Components/ApplicabilityRenderer.cs:

  1. Applicabilities are sorted by version descending, so removed 10.0 is processed first.
  2. BuildBadgeLifecycleText short-circuits to \"\" when lifecycleCount >= 2 (the "use previous lifecycle" rule), so the highest-version candidate produces no displayable badge text or version.
  3. The deprecated (no version) candidate also produces no badge text or version.
  4. The catch-all fallback then forces BadgeLifecycleText = \"Planned\" on the first candidate's badge data — but leaves ShowLifecycleName = true, so the badge renders the lifecycle name (Removed) and the forced text (Planned) together.

The fallback never actually consults the lower-priority lifecycle (deprecated), so the documented "use previous lifecycle" rule is never honoured for this shape of input.

Metadata

Metadata

Assignees

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions