-
Notifications
You must be signed in to change notification settings - Fork 32
Applies_to - Mention new supported components in more cumulative docs docs #2104
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from 1 commit
Commits
Show all changes
2 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
6 changes: 6 additions & 0 deletions
6
docs/contribute/cumulative-docs/_snippets/applies-switch-and-tabs.md
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,6 @@ | ||
| :::{tip} - Use applies-switch instead of traditional tabs | ||
|
|
||
| When you'd like to build a tabbed experience for content that varies specifically between two or more versions, or between two or more deployment types, prefer using [applies-switch](/syntax/applies-switch.md) over regular [tabs](/syntax/tabs.md). | ||
|
|
||
| **Applies-switch** natively support using `applies_to` metadata keys as tab titles and offer a more consistent experience with recognizable badges. | ||
| ::: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,63 @@ | ||
| Admonitions support the `applies_to` property to indicate which products or versions the information applies to. | ||
|
|
||
| :::::{tab-set} | ||
|
|
||
| ::::{tab-item} Output | ||
|
|
||
| :::{note} | ||
| :applies_to: stack: ga 9.1.0 | ||
|
|
||
| This note applies to the Elastic Stack GA version 9.1.0. | ||
| ::: | ||
|
|
||
| :::{warning} | ||
| :applies_to: serverless: ga | ||
|
|
||
| This warning applies to serverless GA. | ||
| ::: | ||
|
|
||
| :::{tip} | ||
| :applies_to: { ess:, ece: } | ||
|
|
||
| This tip applies to ECH and ECE. | ||
| ::: | ||
|
|
||
| :::{important} | ||
| :applies_to: {"stack": "ga 9.2, preview 9.1", "serverless": "ga"} | ||
|
|
||
| This important note applies to Elastic Stack GA version 9.2 and Elastic Stack Preview version 9.1. It also applies to serverless GA. | ||
| ::: | ||
|
|
||
| :::: | ||
|
|
||
| ::::{tab-item} Markdown | ||
|
|
||
| ```markdown | ||
| :::{note} | ||
| :applies_to: stack: ga 9.1.0 | ||
|
|
||
| This note applies to the Elastic Stack GA version 9.1.0. | ||
| ::: | ||
|
|
||
| :::{warning} | ||
| :applies_to: serverless: ga | ||
|
|
||
| This warning applies to serverless GA. | ||
| ::: | ||
|
|
||
| :::{tip} | ||
| :applies_to: { ess:, ece: } | ||
|
|
||
| This tip applies to ECH and ECE. | ||
| ::: | ||
|
|
||
| :::{important} | ||
| :applies_to: {"stack": "ga 9.2, preview 9.1", "serverless": "ga"} | ||
|
|
||
| This important note applies to Elastic Stack GA version 9.2 and Elastic Stack Preview version 9.1. It also applies to serverless GA. | ||
| ::: | ||
| ``` | ||
|
|
||
| :::: | ||
|
|
||
| ::::: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,19 @@ | ||
| You can add an applies_to badge to the dropdown title by specifying the `:applies_to:` option. This displays a badge indicating which deployment types, versions, or other applicability criteria the dropdown content applies to. | ||
|
|
||
| **Source** | ||
|
|
||
| ```markdown | ||
| :::{dropdown} Dropdown Title | ||
| :applies_to: stack: ga 9.0 | ||
| Dropdown content for Stack GA 9.0 | ||
| ::: | ||
| ``` | ||
|
|
||
| **Rendering** | ||
|
|
||
| :::{dropdown} Dropdown Title | ||
| :applies_to: stack: ga 9.0 | ||
| Dropdown content for Stack GA 9.0 | ||
| ::: | ||
|
|
||
| You can also specify multiple definitions in the same `:applies_to:` parameter. For example, `:applies_to: { ece:, ess: }` renders both ECE and ECH badges. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should we just update all these examples to use applies-switch instead of just adding a note? I'd be happy to help with that if you agree!!
Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I went lazy mode for now until we have ranges and can use it in 100% of versioning cases, to avoid forcing one or the other onto people
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ooooooook.