Skip to content

Commit dc03b11

Browse files
committed
Show GA lifecycle multi lifecycle state
1 parent dee924f commit dc03b11

File tree

2 files changed

+47
-7
lines changed

2 files changed

+47
-7
lines changed

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

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,8 @@ public ApplicabilityRenderData RenderCombinedApplicability(
6565
return primaryRenderData with
6666
{
6767
TooltipText = combinedTooltip,
68-
HasMultipleLifecycles = hasMultipleLifecycles
68+
HasMultipleLifecycles = hasMultipleLifecycles,
69+
ShowLifecycleName = primaryRenderData.ShowLifecycleName || (string.IsNullOrEmpty(primaryRenderData.BadgeLifecycleText) && hasMultipleLifecycles)
6970
};
7071
}
7172

tests/authoring/Applicability/ApplicableToComponent.fs

Lines changed: 45 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -404,19 +404,22 @@ stack: ga 8.8.0, preview 8.1.0
404404
let ``renders GA planned when preview exists alongside GA`` () =
405405
markdown |> convertsToHtml """
406406
<p class="applies applies-block">
407-
<span class="applicable-info" data-tippy-content="Elastic&nbsp;Stack GA 8.8.0:
408-
We plan to add this functionality in a future Elastic&nbsp;Stack update. Subject to change.
407+
<span class="applicable-info" data-tippy-content="<div><strong>Elastic&nbsp;Stack GA 8.8.0:</strong>We plan to add this functionality in a future Elastic&nbsp;Stack update. Subject to change.
409408
410-
If this functionality is unavailable or behaves differently when deployed on ECH, ECE, ECK, or a self-managed installation, it will be indicated on the page.
409+
If this functionality is unavailable or behaves differently when deployed on ECH, ECE, ECK, or a self-managed installation, it will be indicated on the page.</div>
411410
412-
Elastic&nbsp;Stack Preview 8.1.0:
413-
We plan to add this functionality in a future Elastic&nbsp;Stack update. Subject to change.
411+
<div><strong>Elastic&nbsp;Stack Preview 8.1.0:</strong>We plan to add this functionality in a future Elastic&nbsp;Stack update. Subject to change.
414412
415-
This functionality may be changed or removed in a future release. Elastic will work to fix any issues, but features in technical preview are not subject to the support SLA of official GA features.">
413+
This functionality may be changed or removed in a future release. Elastic will work to fix any issues, but features in technical preview are not subject to the support SLA of official GA features.</div>">
416414
<span class="applicable-name">Stack</span>
417415
<span class="applicable-separator"></span>
418416
<span class="applicable-meta applicable-meta-ga">
419417
GA planned
418+
<span class="applicable-ellipsis">
419+
<span class="applicable-ellipsis__dot"></span>
420+
<span class="applicable-ellipsis__dot"></span>
421+
<span class="applicable-ellipsis__dot"></span>
422+
</span>
420423
</span>
421424
</span>
422425
</p>
@@ -796,3 +799,39 @@ If this functionality is unavailable or behaves differently when deployed on ECH
796799
</span>
797800
</p>
798801
"""
802+
803+
// Test multiple lifecycles for same applicability key
804+
type ``multiple lifecycles same key`` () =
805+
static let markdown = Setup.Markdown """
806+
```{applies_to}
807+
stack: ga 8.0.0, beta 8.1.0
808+
```
809+
"""
810+
811+
[<Fact>]
812+
let ``renders multiple lifecycles with ellipsis and shows GA lifecycle`` () =
813+
markdown |> convertsToHtml """
814+
<p class="applies applies-block">
815+
<span class="applicable-info" data-tippy-content="<div><strong>Elastic&nbsp;Stack GA 8.0.0:</strong>Available on Elastic&nbsp;Stack version 8.0.0 and later unless otherwise specified.
816+
817+
If this functionality is unavailable or behaves differently when deployed on ECH, ECE, ECK, or a self-managed installation, it will be indicated on the page.</div>
818+
819+
<div><strong>Elastic&nbsp;Stack Beta 8.1.0:</strong>We plan to add this functionality in a future Elastic&nbsp;Stack update. Subject to change.
820+
821+
Beta features are subject to change. The design and code is less mature than official GA features and is being provided as-is with no warranties. Beta features are not subject to the support SLA of official GA features.</div>">
822+
<span class="applicable-name">Stack</span>
823+
<span class="applicable-separator"></span>
824+
<span class="applicable-meta applicable-meta-ga">
825+
<span class="applicable-lifecycle applicable-lifecycle-ga">GA</span>
826+
<span class="applicable-version applicable-version-ga">
827+
8.0.0
828+
</span>
829+
<span class="applicable-ellipsis">
830+
<span class="applicable-ellipsis__dot"></span>
831+
<span class="applicable-ellipsis__dot"></span>
832+
<span class="applicable-ellipsis__dot"></span>
833+
</span>
834+
</span>
835+
</span>
836+
</p>
837+
"""

0 commit comments

Comments
 (0)