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:
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:
…reflecting the page's current state, with the future removal information surfaced in the popover.
Steps to reproduce
-
Author a page with the following frontmatter or directive:
```{applies_to}
stack: deprecated, removed 10.0
```
-
With stack current: 9.4.2 (per config/versions.yml).
-
Build the page and inspect the rendered badge.
Observed: Stack | Removed Planned
Expected: Stack | Deprecated
Tooling
Root cause
In src/Elastic.Markdown/Myst/Components/ApplicabilityRenderer.cs:
- Applicabilities are sorted by version descending, so
removed 10.0 is processed first.
BuildBadgeLifecycleText short-circuits to \"\" when lifecycleCount >= 2 (the "use previous lifecycle" rule), so the highest-version candidate produces no displayable badge text or version.
- The
deprecated (no version) candidate also produces no badge text or version.
- 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.
Describe the bug
When an
applies_todirective uses multiple lifecycles where the highest-version lifecycle is unreleased — for example, a feature that is currentlydeprecatedand isremovedin a future version — the badge renders as a weird concatenation of the lifecycle name and the synthesized fallback text:The badge is showing the lifecycle name (
Removed) and a synthesizedPlannedlabel side by side, which reads awkwardly and is misleading: the feature isn't removed yet, it's currently deprecated.Expected behavior
Per the
applies_tosyntax docs, when the highest-versionRemovedlifecycle is unreleased and there are 2+ lifecycles, the badge should "use the previous lifecycle". Forstack: deprecated, removed 10.0(with stack current 9.4.2), that means the badge should render as:…reflecting the page's current state, with the future removal information surfaced in the popover.
Steps to reproduce
Author a page with the following frontmatter or directive:
With stack
current: 9.4.2(perconfig/versions.yml).Build the page and inspect the rendered badge.
Observed:
Stack | Removed PlannedExpected:
Stack | DeprecatedTooling
Root cause
In
src/Elastic.Markdown/Myst/Components/ApplicabilityRenderer.cs:removed 10.0is processed first.BuildBadgeLifecycleTextshort-circuits to\"\"whenlifecycleCount >= 2(the "use previous lifecycle" rule), so the highest-version candidate produces no displayable badge text or version.deprecated(no version) candidate also produces no badge text or version.BadgeLifecycleText = \"Planned\"on the first candidate's badge data — but leavesShowLifecycleName = 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.