Skip to content

Commit 4bb59ab

Browse files
authored
Revert applies_to in directives design for recognition value (#1977)
* Revert applies_to in directives design for recognition value * Run prettier * Fix tests
1 parent d6c849e commit 4bb59ab

File tree

5 files changed

+27
-37
lines changed

5 files changed

+27
-37
lines changed

src/Elastic.Documentation.Site/Assets/markdown/applies-switch.css

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -13,22 +13,18 @@
1313
}
1414
}
1515

16-
.applies-item {
16+
& > .applies-switch-label > .applies-item {
1717
@apply cursor-pointer text-inherit;
1818

1919
&:hover {
2020
@apply text-inherit;
2121
}
2222
.applicable-info {
23-
@apply cursor-pointer border-none bg-transparent p-0;
24-
25-
&:not(:last-child):after {
26-
content: ',';
27-
}
23+
@apply cursor-pointer;
2824
}
2925
.applicable-name,
3026
.applicable-meta {
31-
@apply text-base;
27+
@apply text-xs;
3228
}
3329
}
3430

src/Elastic.Documentation.Site/Assets/markdown/applies-to.css

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
}
1010

1111
.applicable-info {
12-
@apply border-grey-20 inline-grid cursor-default grid-cols-[auto_1fr_auto] rounded-full border-[1px] bg-white pt-1.5 pr-3 pb-1.5 pl-3;
12+
@apply border-grey-20 inline-flex cursor-default rounded-full border-[1px] bg-white pt-1.5 pr-3 pb-1.5 pl-3;
1313
}
1414

1515
.applicable-meta {
@@ -22,11 +22,9 @@
2222
}
2323

2424
.applicable-separator {
25+
@apply bg-grey-20 mx-2 self-stretch;
26+
mix-blend-mode: multiply;
2527
width: 1px;
26-
height: 100%;
27-
background-color: var(--color-grey-20);
28-
margin-left: calc(var(--spacing) * 2);
29-
margin-right: calc(var(--spacing) * 2);
3028
}
3129
}
3230

src/Elastic.Documentation.Site/Assets/markdown/dropdown.css

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -38,17 +38,13 @@
3838
}
3939

4040
.applies-dropdown {
41-
@apply flex cursor-pointer items-center gap-1 p-2 px-4 font-normal;
41+
@apply flex cursor-pointer items-center gap-1 p-2 px-2 font-normal;
4242
.applicable-info {
43-
@apply cursor-pointer border-none bg-transparent p-0;
44-
&:not(:last-child):after {
45-
@apply text-sm;
46-
content: ',';
47-
}
43+
@apply cursor-pointer;
4844
}
4945
.applicable-name,
5046
.applicable-meta {
51-
@apply text-sm;
47+
@apply text-xs;
5248
}
5349
}
5450
}

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

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -64,16 +64,16 @@ public IEnumerable<ApplicabilityItem> GetApplicabilityItems()
6464
{
6565
var items = new List<ApplicabilityItem>();
6666

67-
if (AppliesTo.Stack is not null)
68-
items.AddRange(ProcessSingleCollection(AppliesTo.Stack, ApplicabilityMappings.Stack));
69-
7067
if (AppliesTo.Serverless is not null)
7168
{
7269
items.AddRange(AppliesTo.Serverless.AllProjects is not null
7370
? ProcessSingleCollection(AppliesTo.Serverless.AllProjects, ApplicabilityMappings.Serverless)
7471
: ProcessMappedCollections(AppliesTo.Serverless, ServerlessMappings));
7572
}
7673

74+
if (AppliesTo.Stack is not null)
75+
items.AddRange(ProcessSingleCollection(AppliesTo.Stack, ApplicabilityMappings.Stack));
76+
7777
if (AppliesTo.Deployment is not null)
7878
items.AddRange(ProcessMappedCollections(AppliesTo.Deployment, DeploymentMappings));
7979

tests/authoring/Applicability/ApplicableToComponent.fs

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -554,15 +554,6 @@ apm_agent_java: beta 9.1.0
554554
let ``renders complex mixed scenario`` () =
555555
markdown |> convertsToHtml """
556556
<p class="applies applies-block">
557-
<span class="applicable-info" data-tippy-content="We plan to add this functionality in a future Elastic&nbsp;Stack update. Subject to change.
558-
559-
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.">
560-
<span class="applicable-name">Stack</span>
561-
<span class="applicable-separator"></span>
562-
<span class="applicable-meta applicable-meta-ga">
563-
Planned
564-
</span>
565-
</span>
566557
<span class="applicable-info" data-tippy-content="We plan to add this functionality in a future Serverless&nbsp;Elasticsearch projects update. Subject to change.
567558
568559
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.">
@@ -581,6 +572,15 @@ This functionality may be changed or removed in a future release. Elastic will w
581572
Planned
582573
</span>
583574
</span>
575+
<span class="applicable-info" data-tippy-content="We plan to add this functionality in a future Elastic&nbsp;Stack update. Subject to change.
576+
577+
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.">
578+
<span class="applicable-name">Stack</span>
579+
<span class="applicable-separator"></span>
580+
<span class="applicable-meta applicable-meta-ga">
581+
Planned
582+
</span>
583+
</span>
584584
<span class="applicable-info" data-tippy-content="We plan to add this functionality in a future Elastic&nbsp;Cloud&nbsp;on&nbsp;Kubernetes update. Subject to change.
585585
586586
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.">
@@ -723,17 +723,17 @@ product: ga 9.0.0
723723
let ``renders missing VersioningSystemId coverage`` () =
724724
markdown |> convertsToHtml """
725725
<p class="applies applies-block">
726-
<span class="applicable-info" data-tippy-content="We plan to add this functionality in a future Elastic&nbsp;Stack update. Subject to change.
727-
728-
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.">
729-
<span class="applicable-name">Stack</span>
726+
<span class="applicable-info" data-tippy-content="We plan to add this functionality in a future Elastic&nbsp;Cloud&nbsp;Serverless update. Subject to change.">
727+
<span class="applicable-name">Serverless</span>
730728
<span class="applicable-separator"></span>
731729
<span class="applicable-meta applicable-meta-ga">
732730
Planned
733731
</span>
734732
</span>
735-
<span class="applicable-info" data-tippy-content="We plan to add this functionality in a future Elastic&nbsp;Cloud&nbsp;Serverless update. Subject to change.">
736-
<span class="applicable-name">Serverless</span>
733+
<span class="applicable-info" data-tippy-content="We plan to add this functionality in a future Elastic&nbsp;Stack update. Subject to change.
734+
735+
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.">
736+
<span class="applicable-name">Stack</span>
737737
<span class="applicable-separator"></span>
738738
<span class="applicable-meta applicable-meta-ga">
739739
Planned

0 commit comments

Comments
 (0)