Skip to content

Commit e719ddb

Browse files
committed
Add more admonitions
1 parent d5a8502 commit e719ddb

File tree

9 files changed

+262
-114
lines changed

9 files changed

+262
-114
lines changed

.rubocop.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,4 +37,4 @@ Metrics/ClassLength:
3737
Max: 120
3838

3939
Metrics/MethodLength:
40-
Max: 20
40+
Max: 35

README.asciidoc

Lines changed: 32 additions & 102 deletions
Original file line numberDiff line numberDiff line change
@@ -1399,23 +1399,16 @@ The path should be as specific as possible because we skip rebuilding books if
13991399
changes to the referenced repository don't change the referenced path.
14001400

14011401
[[changes]]
1402-
== Additions and deprecations
1402+
== Additions, deprecations, and discontinuations
14031403

1404-
Documentation is built for various branches, eg `0.90`,
1405-
`1.00`, `master`. However, we release versions
1406-
`0.90.0`, `0.90.1`, etc, which are all based on the
1407-
`0.90` branch.
1404+
When adding, deprecating, or discontinuing functionality, you can mark the change as
1405+
_coming_, _generally available_ (formerly _added_), _deprecated_, or _discontinued_.
14081406

1409-
When adding new functionality to a branch, or deprecating
1410-
existing functionality, you can mark the change as
1411-
_added_, _coming_ or _deprecated_. Use `coming` when the addition is
1412-
in an as yet unreleased version of the current branch, and `added` when
1413-
the functionality is already released.
1414-
1415-
The `update_versions.pl` script can be used to change `coming` notices
1416-
to `added` notices when doing a new release, and can also be used
1417-
to remove `added`, `coming` and `deprecated` notices completely.
1407+
Use `coming` when the addition is in an as yet unreleased version of the current branch.
1408+
Use `generally_available` when the functionality is released and no longer in a beta, dev, or preview state.
14181409

1410+
For Elastic Serverless and Elasticsearch Service content, there currently isn't a public identifier for individual releases.
1411+
In other contexts, you can qualify the addition, deprecation, or discontinuation with a specific version number.
14191412

14201413
=== Inline notifications
14211414

@@ -1425,33 +1418,20 @@ the addition or deprecation of individual parameters.
14251418
[source,asciidoc]
14261419
----------------------------------
14271420
[horizontal]
1428-
`foo.bar`:: Does XYZ. added:[0.90.4]
1429-
`foo.bar`:: Does XYZ. coming:[0.90.4]
1430-
`foo.baz`:: Does XYZ. deprecated:[0.90.4]
1421+
`foo.bar`:: Does XYZ. ga_stack:[0.90.4]
1422+
`foo.bar`:: Does XYZ. coming:[0.90.4] coming_serverless:[] coming_ess:[]
1423+
`foo.baz`:: Does XYZ. deprecated:[0.90.4] deprecated_serverless:[] deprecated_ess:[]
14311424
----------------------------------
14321425

1433-
[horizontal]
1434-
`foo.bar`:: Does XYZ. added:[0.90.4]
1435-
`foo.bar`:: Does XYZ. coming:[0.90.4]
1436-
`foo.baz`:: Does XYZ. deprecated:[0.90.4]
1437-
1438-
You can also include details about additional
1439-
notes in the notifications which show up when the
1440-
user hovers over it:
1426+
Some annotations also enable you add custom notes that show up when the user hovers over it:
14411427

14421428
[source,asciidoc]
14431429
----------------------------------
14441430
[horizontal]
1445-
`foo.bar`:: Does XYZ. added:[0.90.4,Replaces `foo.baz`]
14461431
`foo.bar`:: Does XYZ. coming:[0.90.4,Replaces `foo.baz`]
14471432
`foo.baz`:: Does XYZ. deprecated:[0.90.4,Replaced by `foo.bar`]
14481433
----------------------------------
14491434

1450-
[horizontal]
1451-
`foo.bar`:: Does XYZ. added:[0.90.4,Replaces `foo.baz`]
1452-
`foo.bar`:: Does XYZ. coming:[0.90.4,Replaces `foo.baz`]
1453-
`foo.baz`:: Does XYZ. deprecated:[0.90.4,Replaced by `foo.bar`]
1454-
14551435
[NOTE]
14561436
====
14571437
If the details include a comma, you must use quotation marks. For example:
@@ -1463,98 +1443,48 @@ deprecated::[1.1.0,"Span started automatically by <<apm-start-span,apm.startSpan
14631443

14641444
=== Section notifications
14651445

1466-
Use section notifications to mark an entire chapter or
1467-
section as _added_/_deleted_. Notifications can just refer
1468-
to the version in which the change was made:
1446+
Use section notifications to annotate an entire page or section.
14691447

14701448
[source,asciidoc]
14711449
----------------------------------
14721450
==== New section
14731451
1474-
added::[0.90.4]
1452+
ga_stack::[0.90.4]
14751453
14761454
Text about new functionality...
14771455
14781456
==== New section not yet released
14791457
1480-
coming::[0.90.9]
1458+
coming_ess::[]
14811459
14821460
Text about new functionality...
14831461
14841462
==== Old section
14851463
1486-
deprecated::[0.90.4]
1464+
deprecated_serverless::[]
14871465
14881466
Text about old functionality...
14891467
----------------------------------
14901468

1491-
==== New section
1492-
1493-
added::[0.90.4]
1494-
1495-
Text about new functionality...
1496-
1497-
==== New section not yet released
1498-
1499-
coming::[0.90.9]
1500-
1501-
Text about new functionality...
1502-
1503-
==== Old section
1504-
1505-
deprecated::[0.90.4]
1506-
1507-
Text about old functionality...
1508-
1509-
[[with_details]]
1510-
==== With details...
1511-
1512-
Or they can include extra text, including more
1513-
Asciidoc markup:
1469+
In some cases you can add extra text, including more Asciidoc markup.
1470+
For example:
15141471

15151472
[source,asciidoc]
15161473
----------------------------------
1517-
[[new-section]]
1518-
==== New section
1519-
1520-
added::[0.90.4,Replaces `foo.bar`. See <<old-section>>]
1521-
1522-
Text about new functionality...
1523-
15241474
[[coming-section]]
15251475
==== New section not yet released
15261476
15271477
coming::[0.90.9,Replaces `foo.bar`. See <<old-section>>]
15281478
15291479
Text about new functionality...
1530-
1531-
[[old-section]]
1532-
==== Old section
1533-
1534-
deprecated::[0.90.4,Replace by `foo.baz`. See <<new-section>>]
1535-
1536-
Text about old functionality...
15371480
----------------------------------
15381481

1539-
[[new-section]]
1540-
==== New section
1541-
1542-
added::[0.90.4,Replaces `foo.bar`. See <<old-section>>]
1543-
1544-
Text about new functionality...
1545-
1546-
[[old-section]]
1547-
==== Old section
1548-
1549-
deprecated::[0.90.4,Replace by `foo.baz`. See <<new-section>>]
1550-
1551-
Text about old functionality...
1552-
15531482
[[experimental]]
15541483
== Beta, Dev, and Preview (experimental)
15551484

1556-
APIs or parameters that are in beta, in development, or in technical preview (formerly experimental) can be
1485+
Functionality that is in beta, in development, or in technical preview (formerly experimental) can be
15571486
marked as such, using markup similar to that used in <<changes>>.
1487+
Since a feature might be in different lifecycle stages in different contexts, there are multiple variations of each admonition (for example, `beta`, `beta_ess`, and `beta_serverless`).
15581488

15591489
In the block format, you have the option of adding a related GitHub issue link.
15601490
If both custom text and a GitHub link are provided, the GitHub link **must** be
@@ -1570,15 +1500,15 @@ attribute in place of the GitHub issue link.
15701500
15711501
beta::[]
15721502
1573-
beta::[https://github.com/elastic/docs/issues/505]
1503+
beta_serverless::[https://github.com/elastic/docs/issues/505]
15741504
15751505
beta::[{issue}505]
15761506
1577-
beta::["Custom text goes here."]
1507+
beta_ess::["Custom text goes here."]
15781508
15791509
beta::["Custom text goes here.",https://github.com/elastic/docs/issues/505]
15801510
1581-
beta::["Custom text goes here.",{issue}505]
1511+
beta_serverless::["Custom text goes here.",{issue}505]
15821512
15831513
Text about new feature...
15841514
@@ -1592,11 +1522,11 @@ a new parameter that's in beta:
15921522
This param has been around for ages and won't change.
15931523
15941524
`beta_param`::
1595-
beta:[]
1525+
beta:[]
15961526
This param is in beta and may change in the future.
15971527
15981528
`beta_param`::
1599-
beta:["Custom text goes here."]
1529+
beta_serverless:["Custom text goes here."]
16001530
This param is in beta and may change in the future.
16011531
----
16021532

@@ -1609,15 +1539,15 @@ This param is in beta and may change in the future.
16091539
16101540
dev::[]
16111541
1612-
dev::[https://github.com/elastic/docs/issues/505]
1542+
dev_serverless::[https://github.com/elastic/docs/issues/505]
16131543
16141544
dev::[{issue}505]
16151545
1616-
dev::["Custom text goes here."]
1546+
dev_ess::["Custom text goes here."]
16171547
16181548
dev::["Custom text goes here.",https://github.com/elastic/docs/issues/505]
16191549
1620-
dev::["Custom text goes here.",{issue}505]
1550+
dev_serverless::["Custom text goes here.",{issue}505]
16211551
16221552
Text about feature in development...
16231553
@@ -1635,7 +1565,7 @@ dev:[]
16351565
This param is in development and may change in the future.
16361566
16371567
`dev_param`::
1638-
dev:["Custom text goes here."]
1568+
dev_ess:["Custom text goes here."]
16391569
This param is in development and may change in the future.
16401570
----
16411571

@@ -1656,15 +1586,15 @@ See below.
16561586
16571587
preview::[]
16581588
1659-
preview::[https://github.com/elastic/docs/issues/505]
1589+
preview_serverless::[https://github.com/elastic/docs/issues/505]
16601590
16611591
preview::[{issue}505]
16621592
1663-
preview::["Custom text goes here."]
1593+
preview_ess::["Custom text goes here."]
16641594
16651595
preview::["Custom text goes here.",https://github.com/elastic/docs/issues/505]
16661596
1667-
preview::["Custom text goes here.",{issue}505]
1597+
preview_serverless::["Custom text goes here.",{issue}505]
16681598
16691599
Text about new feature...
16701600
@@ -1682,7 +1612,7 @@ preview:[]
16821612
This param is in technical preview and may change in the future.
16831613
16841614
`experimental_param`::
1685-
preview:["Custom text goes here."]
1615+
preview_ess:["Custom text goes here."]
16861616
This param is in technical preview and may change in the future.
16871617
----
16881618

resources/asciidoctor/lib/care_admonition/extension.rb

Lines changed: 92 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,16 +3,43 @@
33
require 'asciidoctor/extensions'
44

55
##
6-
# Extensions for marking something as `beta`, `dev`, or technical `preview`.
6+
# Extensions for marking something as `beta`, `beta_serverless`, `beta_ess`,
7+
# `dev`, `dev_serverless`, `dev_ess`, technical `preview`, `preview_serverless`,
8+
# `preview_ess`, `ga_serverless`, `ga_ess`.
79
#
810
# Usage
911
#
1012
# beta::[]
1113
# dev::[]
1214
# preview::[]
15+
# beta_ess::[]
16+
# beta_serverless::[]
17+
# dev_ess::[]
18+
# dev_serverless::[]
19+
# ga_serverless::[]
20+
# deprecated_ess::[]
21+
# deprecated_serverless::[]
22+
# discontinued_ess::[]
23+
# discontinued_serverless::[]
24+
# coming_ess::[]
25+
# coming_serverless::[]
1326
# Foo beta:[]
1427
# Foo dev:[]
1528
# Foo preview:[]
29+
# Foo beta_ess:[]
30+
# Foo beta_serverless:[]
31+
# Foo dev_ess:[]
32+
# Foo dev_serverless:[]
33+
# Foo preview_ess:[]
34+
# Foo preview_serverless:[]
35+
# Foo ga_ess:[]
36+
# Foo ga_serverless:[]
37+
# Foo deprecated_ess:[]
38+
# Foo deprecated_serverless:[]
39+
# Foo discontinued_ess:[]
40+
# Foo discontinued_serverless:[]
41+
# Foo coming_ess:[]
42+
# Foo coming_serverless::[]
1643
#
1744
# !! `experimental:[]` is supported as a deprecated alternative to `preview:[]`.
1845
# !! But please use `preview:[]` instead.
@@ -21,19 +48,83 @@ class CareAdmonition < Asciidoctor::Extensions::Group
2148
BETA_DEFAULT_TEXT = <<~TEXT.strip
2249
This functionality is in beta and is 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.
2350
TEXT
51+
BETA_SERVERLESS_TEXT = <<~TEXT.strip
52+
This functionality is in beta in Elastic Serverless and is 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.
53+
TEXT
54+
BETA_ESS_TEXT = <<~TEXT.strip
55+
This functionality is in beta in Elasticsearch Service and is 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.
56+
TEXT
2457
DEV_DEFAULT_TEXT = <<~TEXT.strip
2558
This functionality is in development and may be changed or removed completely in a future release. These features are unsupported and not subject to the support SLA of official GA features.
2659
TEXT
60+
DEV_SERVERLESS_TEXT = <<~TEXT.strip
61+
This functionality is in development in Elastic Serverless and may be changed or removed completely in a future release. These features are unsupported and not subject to the support SLA of official GA features.
62+
TEXT
63+
DEV_ESS_TEXT = <<~TEXT.strip
64+
This functionality is in development in Elasticsearch Service and may be changed or removed completely in a future release. These features are unsupported and not subject to the support SLA of official GA features.
65+
TEXT
2766
PREVIEW_DEFAULT_TEXT = <<~TEXT.strip
2867
This functionality is in technical preview and may be changed or removed in a future release. Elastic will work to fix any issues, but features in technical preview are not subject to the support SLA of official GA features.
2968
TEXT
69+
PREVIEW_SERVERLESS_TEXT = <<~TEXT.strip
70+
This functionality is in technical preview in Elastic Serverless and may be changed or removed in a future release. Elastic will work to fix any issues, but features in technical preview are not subject to the support SLA of official GA features.
71+
TEXT
72+
PREVIEW_ESS_TEXT = <<~TEXT.strip
73+
This functionality is in technical in preview in Elasticsearch Service and may be changed or removed in a future release. Elastic will work to fix any issues, but features in technical preview are not subject to the support SLA of official GA features.
74+
TEXT
75+
DEPRECATED_ESS_TEXT = <<~TEXT.strip
76+
This functionality is deprecated in Elasticsearch Service and will be removed in a future release.
77+
TEXT
78+
DEPRECATED_SERVERLESS_TEXT = <<~TEXT.strip
79+
This functionality is deprecated in Elastic Serverless and will be removed in a future release.
80+
TEXT
81+
DISCONTINUED_ESS_TEXT = <<~TEXT.strip
82+
This functionality is discontinued in Elasticsearch Service.
83+
TEXT
84+
DISCONTINUED_SERVERLESS_TEXT = <<~TEXT.strip
85+
This functionality is discontinued in Elastic Serverless.
86+
TEXT
87+
COMING_ESS_TEXT = <<~TEXT.strip
88+
This functionality is coming in Elasticsearch Service.
89+
TEXT
90+
COMING_SERVERLESS_TEXT = <<~TEXT.strip
91+
This functionality is coming in Elastic Serverless.
92+
TEXT
93+
GA_ESS_TEXT = <<~TEXT.strip
94+
This functionality is generally available in Elasticsearch Service.
95+
TEXT
96+
GA_SERVERLESS_TEXT = <<~TEXT.strip
97+
This functionality is generally available in Elastic Serverless.
98+
TEXT
3099

31100
def activate(registry)
32101
[
33102
[:beta, 'beta', BETA_DEFAULT_TEXT],
103+
[:beta_serverless, 'Serverless:beta', BETA_SERVERLESS_TEXT],
104+
[:beta_ess, 'ESS:beta', BETA_ESS_TEXT],
34105
[:dev, 'dev', DEV_DEFAULT_TEXT],
106+
[:dev_serverless, 'Serverless:dev', DEV_SERVERLESS_TEXT],
107+
[:dev_ess, 'ESS:dev', DEV_ESS_TEXT],
35108
[:experimental, 'preview', PREVIEW_DEFAULT_TEXT],
36109
[:preview, 'preview', PREVIEW_DEFAULT_TEXT],
110+
[:preview_serverless, 'Serverless:preview', PREVIEW_SERVERLESS_TEXT],
111+
[:preview_ess, 'ESS:preview', PREVIEW_ESS_TEXT],
112+
[
113+
:deprecated_serverless,
114+
'Serverless:deprecated',
115+
DEPRECATED_SERVERLESS_TEXT,
116+
],
117+
[:deprecated_ess, 'ESS:deprecated', DEPRECATED_ESS_TEXT],
118+
[
119+
:discontinued_serverless,
120+
'Serverless:discontinued',
121+
DISCONTINUED_SERVERLESS_TEXT,
122+
],
123+
[:discontinued_ess, 'ESS:discontinued', DISCONTINUED_ESS_TEXT],
124+
[:coming_serverless, 'Serverless:coming', COMING_SERVERLESS_TEXT],
125+
[:coming_ess, 'ESS:coming', COMING_ESS_TEXT],
126+
[:ga_serverless, 'Serverless:GA', GA_SERVERLESS_TEXT],
127+
[:ga_ess, 'ESS:GA', GA_ESS_TEXT],
37128
].each do |(name, role, default_text)|
38129
registry.block_macro ChangeAdmonitionBlock.new(role, default_text), name
39130
registry.inline_macro ChangeAdmonitionInline.new(role, default_text), name

0 commit comments

Comments
 (0)