Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions docs/testing/req.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
---

Check notice on line 1 in docs/testing/req.md

View workflow job for this annotation

GitHub Actions / build

The 'deprecated' lifecycle is deprecated and will be removed in a future release.

Check notice on line 1 in docs/testing/req.md

View workflow job for this annotation

GitHub Actions / build

The 'deprecated' lifecycle is deprecated and will be removed in a future release.

Check notice on line 1 in docs/testing/req.md

View workflow job for this annotation

GitHub Actions / build

The 'deprecated' lifecycle is deprecated and will be removed in a future release.

Check notice on line 1 in docs/testing/req.md

View workflow job for this annotation

GitHub Actions / build

The 'deprecated' lifecycle is deprecated and will be removed in a future release.

Check notice on line 1 in docs/testing/req.md

View workflow job for this annotation

GitHub Actions / build

The 'deprecated' lifecycle is deprecated and will be removed in a future release.
applies_to:
stack: ga 9.1
---
Expand Down Expand Up @@ -29,6 +29,7 @@
| `` {applies_to}`stack: removed 8.18` `` | {applies_to}`stack: removed 8.18` |
| `` {applies_to}`stack: removed 9.0` `` | {applies_to}`stack: removed 9.0` |
| `` {applies_to}`stack: removed 9.1` `` | {applies_to}`stack: removed 9.1` |
| `` {applies_to}`stack: ` `` | {applies_to}`stack: ` |

{applies_to}`stack: deprecated 9.1, removed 9.4`

Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
@using System.Diagnostics.CodeAnalysis
@using Elastic.Documentation
@using Elastic.Markdown.Myst.FrontMatter
@inherits RazorSlice<Elastic.Markdown.Myst.Components.ApplicableToViewModel>
Expand Down Expand Up @@ -94,7 +95,7 @@
switch (applicability.Lifecycle)
{
case ProductLifecycle.TechnicalPreview:
if (applicability.Version is not null && applicability.Version > currentStackVersion)
if (TryGetRealVersion(applicability, out var previewVersion) && previewVersion > currentStackVersion)
{
badgeText = "Planned";
tooltip = "We plan to add this functionality in a future update. Plans may change without notice.";
Expand All @@ -105,7 +106,7 @@
}
break;
case ProductLifecycle.Beta:
if (applicability.Version is not null && applicability.Version > currentStackVersion)
if (TryGetRealVersion(applicability, out var betaVersion) && betaVersion > currentStackVersion)
{
badgeText = "Planned";
tooltip = "We plan to add this functionality in a future update. Plans may change without notice.";
Expand All @@ -117,23 +118,23 @@

break;
case ProductLifecycle.GenerallyAvailable:
if (applicability.Version is not null && applicability.Version > currentStackVersion)
if (TryGetRealVersion(applicability, out var version) && version > currentStackVersion)
{
badgeText = "Planned";
tooltip = "We plan to add this functionality in a future update. Plans may change without notice.";
}

break;
case ProductLifecycle.Deprecated:
if (applicability.Version is not null && applicability.Version > currentStackVersion)
if (TryGetRealVersion(applicability, out var deprecatedVersion) && deprecatedVersion > currentStackVersion)
{
badgeText = "Deprecation planned";
tooltip = "We plan to deprecate this functionality in a future update. Plans may change without notice.";
}

break;
case ProductLifecycle.Removed:
if (applicability.Version is not null && applicability.Version > currentStackVersion)
if (TryGetRealVersion(applicability, out var removedVersion) && removedVersion > currentStackVersion)
{
badgeText = "Removal planned";
tooltip = "We plan to remove this functionality in a future update. Plans may change without notice.";
Expand Down Expand Up @@ -177,3 +178,16 @@
return HtmlString.Empty;
}
}
@functions {
private static bool TryGetRealVersion(Applicability applicability, [NotNullWhen(true)] out SemVersion? version)
{
version = null;
if (applicability.Version is not null && applicability.Version != AllVersions.Instance)
{
version = applicability.Version;
return true;
}

return false;
}
}
Loading