Skip to content

Commit 220fc23

Browse files
first attempt
1 parent b767a42 commit 220fc23

File tree

5 files changed

+81
-27
lines changed

5 files changed

+81
-27
lines changed

docs/contribute/cumulative-docs/example-scenarios.md

Lines changed: 79 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -24,25 +24,51 @@ the Serverless UI, add both the `stack` and `serverless` keys to the `applies_to
2424
:::{include} /syntax/_snippets/stack-serverless-lifecycle-example.md
2525
:::
2626

27-
% FOR THE REVIEWER: SHOULD THESE ACTUALLY BE THE SAME?
28-
% In the existing docs (https://elastic.github.io/docs-builder/contribute/cumulative-docs/#section-or-inline-contexts-situational),
29-
% we say to treat Stack/Serverless and deployment types differently.
30-
% Should we?
31-
## Section applicability differs from page applicability [page-section-varies]
27+
28+
## Section applicability differs from page-level applicability [page-section-varies]
3229

3330
When a section has different applicability than the applicability indicated at the
3431
page level in the frontmatter, use section-level `applies_to` badges.
3532

36-
### If labeling deployment modes [one-section]
33+
### If labeling deployment modes [page-section-varies-deployment]
34+
35+
<!--
36+
TO DO: Consider other alternative titles:
37+
* If labeling parallel content on a single page
38+
* If labeling applicable vs. not applicable
39+
-->
40+
41+
<!--
42+
TO DO: Please make this better
43+
-->
44+
When a documentation set or page is primarily about orchestrating, deploying,
45+
or configuring an installation, it usually includes parallel content about multiple
46+
deployment modes (the reader picks one of several sections that is applicable to them).
47+
48+
% Contributor experience
49+
In this case, docs contributors include all the deployment types that are mentioned
50+
throughout the page in the frontmatter `applies_to`, and in each section they include
51+
only the applicable deployment modes using section-level `applies_to`.
3752

53+
% Reader experience
54+
The reader should assume that content in a section with a section-level `applies_to` is
55+
not applicable to any deployment modes that are omitted.
56+
57+
:::{tip}
58+
**Don’t overload with exclusions unless it is necessary.**
59+
In content that is primarily about deployment modes, we do not include `unavailable` badges
60+
for anything in `applies_to` > `deployment`.
61+
:::
62+
63+
% Example
3864
For example, the content on the [Security](https://www.elastic.co/docs/deploy-manage/security) page is generally applicable to all deployment types, but the first section only applies to Elastic Cloud Hosted and Serverless:
3965

4066
* In the frontmatter, specify that the content on the page applies to all deployment types unless otherwise specified.
4167
* In a section-level annotation, specify that the content only applies to `ech` and `serverless`.
4268

4369
:::::{tab-set}
4470
::::{tab-item} Image
45-
:::{image} ./images/example-one-section.png
71+
:::{image} ./images/page-section-varies-deployment.png
4672
:screenshot:
4773
:alt:
4874
:::
@@ -71,35 +97,62 @@ serverless: ga
7197
::::
7298
:::::
7399

74-
:::{warning}
75-
**Don’t overload with exclusions unless it is necessary.**
76-
77-
% FOR THE REVIEWER: IS THIS TRUE?
78-
In this example, we expect the reader to understand that in sections where only some deployment types are listed,
79-
the content is only applicable to the deployment types listed in the section-level annotation
80-
(and is _not_ applicable to the deployment types that are listed at the page level,
81-
but are omitted from section-level annotation).
82-
:::
83-
84100
:::{tip}
85101
Likewise, when the difference is specific to just one paragraph or list item, the same rules apply.
86102
Just the syntax slightly differs so that it stays inline: `` {applies_to}`ech: ga` {applies_to}`serverless: ga` ``.
87103
:::
88104

89-
### If labeling serverless and stateful [not-one-section]
105+
### If labeling serverless vs. stateful [page-section-varies-product]
90106

107+
<!--
108+
TO DO: Consider other alternative titles:
109+
* If labeling versioned products or serverless vs. stateful
110+
* If labeling available vs. unavailable
111+
-->
112+
113+
<!--
114+
TO DO: Please make this better
115+
-->
116+
When a documentation set or page is primarily about using a product following its own
117+
versioning schema or some combination of Elastic Stack components and the Serverless UI,
118+
it usually includes content that is meant to be used together (i.e. not parallel sections
119+
like in [If labeling deployment modes](#page-section-varies-deployment)), but is only
120+
available in specific versions or either serverless or stateful.
121+
122+
% Contributor experience
123+
In this case, docs contributors should include the following at the page level:
124+
125+
* `stack` with the lowest version that applies to any content (unless it is lower
126+
than the base version, {{version.stack.base}}, in which case omit the version number altogether)
127+
* `serverless` if applicable
128+
129+
Then if a section contains content that applies to a different context than what is
130+
defined at the page level, include section-level `applies_to` only with the items
131+
that are different than the page-level `applies_to`.
132+
133+
% Reader experience
134+
The reader should assume that content in a section with a section-level `applies_to`
135+
is applicable to all the contexts included in the page-level `applies_to` unless
136+
explicitly stated.
137+
138+
:::{tip}
139+
**Don’t overload with badges that restate the page-level applicability.**
140+
In content that is primarily about serverless vs. stateful, use `unavailable`
141+
if functionality is not available at all in `serverless` or `stack`.
142+
Do not use `unavailable` for specific `stack` versions.
143+
Instead, include the lifecycle and version and the fact that it is not applicable
144+
to other versions will be implied.
145+
:::
146+
147+
% Example
91148
For example, if a whole page is generally applicable to Elastic Stack 9.0.0 and to Serverless, but one specific section isn’t applicable to Serverless. The content on the [Spaces](https://www.elastic.co/docs/deploy-manage/manage-spaces) page is generally applicable to both Serverless and stateful, but one section only applies stateful:
92149

93150
* In the frontmatter, specify that the content on the page applies to both unless otherwise specified.
94-
95-
% FOR THE REVIEWER: WHICH IS CORRECT?
96-
% The existing docs and the "real" example in the wild use different strategies.
97-
% Do we include `stack: ga` in the section annotation or not?
98-
* In a section-level annotation, specify that the content is `ga` in `stack` and is `unavailable` in `serverless`.
151+
* In a section-level annotation, specify that the content is `unavailable` in `serverless`.
99152

100153
:::::{tab-set}
101154
::::{tab-item} Image
102-
:::{image} ./images/example-not-one-section.png
155+
:::{image} ./images/page-section-varies-product.png
103156
:screenshot:
104157
:alt:
105158
:::
@@ -119,9 +172,10 @@ applies_to:
119172
## Configure a space-level landing page [space-landing-page]
120173
121174
```{applies_to}
122-
stack: ga
123175
serverless: unavailable
124176
```
177+
178+
[...]
125179
````
126180
::::
127181
:::::

docs/contribute/cumulative-docs/guidelines.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -163,11 +163,11 @@ Here are some common scenarios you might come across:
163163
% ([example](/contribute/cumulative-docs/example-scenarios.md#))
164164
* A whole page is generally applicable to Elastic Stack 9.0 and to Serverless,
165165
but one specific section isn’t applicable to Serverless.
166-
([example](/contribute/cumulative-docs/example-scenarios.md#not-one-section))
166+
([example](/contribute/cumulative-docs/example-scenarios.md#page-section-varies-product))
167167
* The whole page is generally applicable to all deployment types,
168168
but one specific paragraph only applies to Elastic Cloud Hosted and Serverless,
169169
and another paragraph only applies to Elastic Cloud Enterprise.
170-
([example](/contribute/cumulative-docs/example-scenarios.md#one-section))
170+
([example](/contribute/cumulative-docs/example-scenarios.md#page-section-varies-deployment))
171171
* Likewise, when the difference is specific to just one paragraph or list item, the same rules apply.
172172
Just the syntax slightly differs so that it stays inline.
173173
% TO DO: Add example
Binary file not shown.
177 KB
Loading

0 commit comments

Comments
 (0)