Skip to content

Commit fd98d12

Browse files
continue building out content
1 parent c4f8eee commit fd98d12

File tree

10 files changed

+178
-99
lines changed

10 files changed

+178
-99
lines changed

docs/contribute/cumulative-docs/best-practices.md

Lines changed: 63 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,6 @@ Depending on what you're trying to communicate, you can use the following patter
3838

3939
## Placement of badges
4040

41-
% Reference: https://github.com/elastic/docs-builder/issues/1574
4241
### Headings
4342

4443
Use [section annotations](/syntax/applies.md#section-annotations) immediately after a heading when the entire content between that heading and the next [heading](/syntax/headings.md) of the same and higher level.
@@ -59,12 +58,14 @@ Do **not** use [inline annotations](/syntax/applies.md#inline-annotations) with
5958
::::
6059
:::
6160

62-
% Reference: https://github.com/elastic/kibana/pull/229485/files
61+
6362
### Definition lists
6463

6564
The recommended placement of `applies_to` badges in definition lists varies based what part(s) of the list item relate to the badge.
6665

67-
**If the badge is relevant to the entire contents of a list item, put it at the end of the term.** This means using an inline annotation at the end of the same line as the term. For example, on the Kibana [Advanced settings](https://www.elastic.co/docs/reference/kibana/advanced-settings#kibana-banners-settings) page, the entire `banners:linkColor` option is only available in Elastic Stack 9.1.0 and later.
66+
#### If the badge is relevant to the entire contents of a list item, put it at the end of the term [definition-list-item-full]
67+
68+
This means using an inline annotation at the end of the same line as the term. For example, on the Kibana [Advanced settings](https://www.elastic.co/docs/reference/kibana/advanced-settings#kibana-banners-settings) page, the entire `banners:linkColor` option is only available in Elastic Stack 9.1.0 and later.
6869

6970
:::{image} ./images/definition-list-entire-item.png
7071
:screenshot:
@@ -80,44 +81,64 @@ Do **not** put the `applies_to` badge at the beginning or end of the definition
8081
::::
8182
:::
8283

83-
**If the badge is only relevant to a portion of the definition, follow the appropriate placement guidelines for the elements used in the definition.** This might include labeling just one of multiple paragraphs or one item in an ordered or unordered list. For example, on the ... page, ...
84+
#### If the badge is only relevant to a portion of the definition, follow the appropriate placement guidelines for the elements used in the definition [definition-list-item-part]
85+
86+
This might include labeling just one of multiple paragraphs or one item in an ordered or unordered list. For example, on the ... page, ...
8487

8588
::::{image} ./images/definition-list-portion-correct.png
8689
:screenshot:
8790
:alt: Correctly using inline applies_to in a portion of a definition list item
8891
::::
8992

90-
% Reference: TBD
93+
9194
### Ordered and unordered lists
9295

9396
Reorganize content as needed so the `applies_to` badge is relevant to the entire contents of the list item.
9497
The recommended placement of the badge varies based on the purpose of the list.
9598

96-
**If the purpose of the list is to illustrate the difference between situations, put a badge at the start of each item.**
99+
#### If the purpose of the list is to illustrate the difference between situations, put a badge at the start of each item [list-compare-applies_to]
100+
97101
This could mean distinguishing between deployment types, products, lifecycles, or versions.
102+
Placing the badge at the beginning of the list item, allows the reader to scan the list for the item that is relevant to them.
103+
98104
For example, the [Alerting and action settings in Kibana](https://www.elastic.co/docs/reference/kibana/configuration-reference/alerting-settings) page lists how the default value for the `xpack.actions.preconfigured.<connector-id>.config.defaultModel` setting varies in Serverless/Stack and across versions.
99105

100106
::::{image} ./images/list-correct.png
101107
:screenshot:
102108
:alt:
103109
::::
104110

105-
**If the list just happens to have one or more items that are only relevant to a specific situation, put the badge at the end of the list item.**
106-
(deployment type, product, lifecycle, version, etc.)
111+
#### If the list just happens to have one or more items that are only relevant to a specific situation, put the badge at the end of the list item [list-other]
112+
113+
Placing the badge at the end of the list item maintains the flow of the list without distracting the reader with badges while still making it clear that the content in that list item is only applicable to the specified situation.
114+
115+
For example, the [Add filter controls](https://www.elastic.co/docs/explore-analyze/dashboards/add-controls) page lists ways to configure ES|QL controls. Only one of the ways they can be controlled was added for the first time in 9.1.0.
116+
117+
::::{image} ./images/list-misc-correct.png
118+
:screenshot:
119+
:alt:
120+
::::
107121

108-
<image>
109122

110123
% Reference: Slack conversation
111124
### Tables
112125

113126
The recommended placement in tables varies based on what part(s) of the table related to the `applies_to` label.
114127

115-
**If the badge is relevant to the entire row, add the badge to the end of the first column.**
128+
#### If the badge is relevant to the entire row, add the badge to the end of the first column [table-row]
129+
116130
For example, a table that contains one setting per row and a new setting is added in 9.1.0.
117131

118132
<image>
119133

120-
**If the badge is relevant to one cell or part of a cell, add the badge to the end of the line it applies to.**
134+
#### If the badge is relevant to one cell or part of a cell, add the badge to the cell it applies to [table-cell]
135+
136+
For example, a new property is available in 9.1.0 for a setting that already existed before 9.1.0.
137+
138+
<image>
139+
140+
#### If the badge is relevant to part of a cell, add the badge to the end of the line it applies to [table-cell-part]
141+
121142
For example, a new property is available in 9.1.0 for a setting that already existed before 9.1.0.
122143

123144
<image>
@@ -129,6 +150,37 @@ If needed, break the contents of the cell into multiple lines using `<br>` to is
129150
<image>
130151
:::
131152

153+
### Tabs
154+
155+
In the future ([elastic/docs-builder#1436](https://github.com/elastic/docs-builder/issues/1436)), tabs will be able to accept `applies_to` information. Until then, if an `applies_to` badge is relevant to the entire tab item, add the badge to the beginning of the content.
156+
157+
<image>
158+
159+
### Admonitions
160+
161+
In the future ([elastic/docs-builder#1436](https://github.com/elastic/docs-builder/issues/1436)), admonitions will be able to accept `applies_to` information. Until then, if an `applies_to` badge is relevant to the entire admonition, add the badge to the beginning of the content.
162+
163+
::::{image} ./images/admonition-correct.png
164+
:screenshot:
165+
:alt:
166+
::::
167+
168+
### Dropdowns
169+
170+
In the future ([elastic/docs-builder#1436](https://github.com/elastic/docs-builder/issues/1436)), dropdowns will be able to accept `applies_to` information. Until then, if an `applies_to` badge is relevant to the entire dropdown, add the badge to the beginning of the content.
171+
172+
<image>
173+
174+
### Code blocks
175+
176+
To specify `applies_to` information for a code block, refer to [](/contribute/cumulative-docs/content-patterns.md#code-block).
177+
178+
### Images
179+
180+
To specify `applies_to` information for an image, refer to [](/contribute/cumulative-docs/content-patterns.md#screenshot).
181+
182+
<!-- ### Stepper -->
183+
132184
<!-- ## Scenarios [scenarios]
133185
134186
There are several scenarios you will likely run into at some point when contributing to the docs.

0 commit comments

Comments
 (0)