diff --git a/src/Elastic.Markdown/Myst/Components/ApplicableToComponent.cshtml b/src/Elastic.Markdown/Myst/Components/ApplicableToComponent.cshtml index 4c852be6e..fa0034614 100644 --- a/src/Elastic.Markdown/Myst/Components/ApplicableToComponent.cshtml +++ b/src/Elastic.Markdown/Myst/Components/ApplicableToComponent.cshtml @@ -272,7 +272,7 @@ case ProductLifecycle.GenerallyAvailable: if (TryGetRealVersion(applicability, out var version) && version > versioningSystem.Current) { - badgeText = "Planned"; + badgeText = applications.Any(a => a.Lifecycle is ProductLifecycle.TechnicalPreview or ProductLifecycle.Beta) ? "GA planned" : "Planned"; lifecycleTooltip = "We plan to add this functionality in a future update. Plans may change without notice."; lifecycleClass = "planned"; } diff --git a/tests/authoring/Inline/AppliesToRole.fs b/tests/authoring/Inline/AppliesToRole.fs index 90cea9ea1..946ffd9bb 100644 --- a/tests/authoring/Inline/AppliesToRole.fs +++ b/tests/authoring/Inline/AppliesToRole.fs @@ -121,3 +121,44 @@ type ``parses multiple applies_to in one line`` () = Ece=AppliesCollection.op_Explicit "removed" ) )) + +type ``render 'GA Planned' if preview exists alongside ga`` () = + static let markdown = Setup.Markdown """ + +This is an inline {applies_to}`stack: preview 9.0, ga 9.1` element. +""" + + [] + let ``parses to AppliesDirective`` () = + let directives = markdown |> converts "index.md" |> parses + test <@ directives.Length = 1 @> + directives |> appliesToDirective (ApplicableTo( + Stack=AppliesCollection.op_Explicit "preview 9.0, ga 9.1" + )) + + [] + let ``validate HTML: generates link and alt attr`` () = + markdown |> convertsToHtml """ +

This is an inline + + + Stack + + + Planned + + + + Stack + + + GA planned + + + + element.

+"""