Skip to content

Commit 38f4b41

Browse files
goodrootgtback
andauthored
Adds tech preview macro, updates experimental (#2340)
* adds tech preview macro, updates experimental * updates usage section * updates docs * removes spaec * and tidies * Update resources/asciidoctor/lib/care_admonition/extension.rb Co-authored-by: Greg Back <[email protected]> * Update resources/asciidoctor/lib/care_admonition/extension.rb Co-authored-by: Greg Back <[email protected]> * feedback polish * whitespace and styling nags * fixes build * fixes build * Update test strings for tech preview admonition * Make rubocop happy * Make rubocop happier Co-authored-by: Greg Back <[email protected]> Co-authored-by: Greg Back <[email protected]>
1 parent bf603fd commit 38f4b41

File tree

4 files changed

+47
-22
lines changed

4 files changed

+47
-22
lines changed

README.asciidoc

Lines changed: 22 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1534,9 +1534,9 @@ deprecated::[0.90.4,Replace by `foo.baz`. See <<new-section>>]
15341534
Text about old functionality...
15351535

15361536
[[experimental]]
1537-
== Beta, Dev, and Experimental
1537+
== Beta, Dev, and Preview (experimental)
15381538

1539-
APIs or parameters that are in beta, in development, or experimental can be
1539+
APIs or parameters that are in beta, in development, or in technical preview (formerly experimental) can be
15401540
marked as such, using markup similar to that used in <<changes>>.
15411541

15421542
In the block format, you have the option of adding a related GitHub issue link.
@@ -1624,41 +1624,49 @@ This param is in development and may change in the future.
16241624

16251625
=== Using the `experimental` admonition
16261626

1627+
Experimental language is deprecated.
1628+
1629+
We decided on the much less raw sounding "technical preview".
1630+
1631+
See below.
1632+
1633+
=== Using the technical `preview` admonition
1634+
16271635
[source,asciidoc]
16281636
----
16291637
[[new-feature]]
1630-
=== New experimental feature
1638+
=== New feature in technical preview
16311639
1632-
experimental::[]
1640+
preview::[]
16331641
1634-
experimental::[https://github.com/elastic/docs/issues/505]
1642+
preview::[https://github.com/elastic/docs/issues/505]
16351643
1636-
experimental::[{issue}505]
1644+
preview::[{issue}505]
16371645
1638-
experimental::["Custom text goes here."]
1646+
preview::["Custom text goes here."]
16391647
1640-
experimental::["Custom text goes here.",https://github.com/elastic/docs/issues/505]
1648+
preview::["Custom text goes here.",https://github.com/elastic/docs/issues/505]
16411649
1642-
experimental::["Custom text goes here.",{issue}505]
1650+
preview::["Custom text goes here.",{issue}505]
16431651
16441652
Text about new feature...
16451653
16461654
[[old-feature]]
16471655
=== Established feature
16481656
16491657
This feature has been around for a while, but we're adding
1650-
a new experimental parameter:
1658+
a new preview parameter:
16511659
16521660
`established_param`::
16531661
This param has been around for ages and won't change.
16541662
16551663
`experimental_param`::
1656-
experimental:[]
1657-
This param is experimental and may change in the future.
1664+
preview:[]
1665+
This param is in technical preview and may change in the future.
16581666
16591667
`experimental_param`::
1660-
experimental:["Custom text goes here."]
1661-
This param is experimental and may change in the future.
1668+
preview:["Custom text goes here."]
1669+
This param is in technical preview and may change in the future.
16621670
----
16631671

16641672
[[images]]

integtest/spec/single_book_spec.rb

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -287,7 +287,10 @@
287287
page_context 'chapter.html' do
288288
it 'includes the experimental text' do
289289
expect(body).to include(
290-
'This functionality is experimental and may be changed or removed'
290+
'This functionality is in technical preview and may be changed or '\
291+
'removed in a future release. Elastic will apply best effort to fix '\
292+
'any issues, but features in technical preview are not subject to '\
293+
'the support SLA of official GA features.'
291294
)
292295
end
293296
end

resources/asciidoctor/lib/care_admonition/extension.rb

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -3,16 +3,19 @@
33
require 'asciidoctor/extensions'
44

55
##
6-
# Extensions for marking when something as `beta`, `dev`, or `experimental`.
6+
# Extensions for marking something as `beta`, `dev`, or technical `preview`.
77
#
88
# Usage
99
#
1010
# beta::[]
1111
# dev::[]
12-
# experimental::[]
12+
# preview::[]
1313
# Foo beta:[]
1414
# Foo dev:[]
15-
# Foo experimental:[]
15+
# Foo preview:[]
16+
#
17+
# !! `experimental:[]` is supported as a deprecated alternative to `preview:[]`.
18+
# !! But please use `preview:[]` instead.
1619
#
1720
class CareAdmonition < Asciidoctor::Extensions::Group
1821
BETA_DEFAULT_TEXT = <<~TEXT.strip
@@ -21,15 +24,16 @@ class CareAdmonition < Asciidoctor::Extensions::Group
2124
DEV_DEFAULT_TEXT = <<~TEXT.strip
2225
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.
2326
TEXT
24-
EXPERIMENTAL_DEFAULT_TEXT = <<~TEXT.strip
25-
This functionality is experimental and may be changed or removed completely in a future release. Elastic will take a best effort approach to fix any issues, but experimental features are not subject to the support SLA of official GA features.
27+
PREVIEW_DEFAULT_TEXT = <<~TEXT.strip
28+
This functionality is in technical preview and may be changed or removed in a future release. Elastic will apply best effort to fix any issues, but features in technical preview are not subject to the support SLA of official GA features.
2629
TEXT
2730

2831
def activate(registry)
2932
[
3033
[:beta, 'beta', BETA_DEFAULT_TEXT],
3134
[:dev, 'dev', DEV_DEFAULT_TEXT],
32-
[:experimental, 'experimental', EXPERIMENTAL_DEFAULT_TEXT],
35+
[:experimental, 'experimental', PREVIEW_DEFAULT_TEXT],
36+
[:preview, 'preview', PREVIEW_DEFAULT_TEXT],
3337
].each do |(name, role, default_text)|
3438
registry.block_macro ChangeAdmonitionBlock.new(role, default_text), name
3539
registry.inline_macro ChangeAdmonitionInline.new(role, default_text), name

resources/asciidoctor/spec/care_admonition_spec.rb

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -247,7 +247,17 @@ def expect_inline_admonition(text)
247247
let(:admon_class) { 'warning' }
248248
let(:default_text) do
249249
<<~TEXT.strip
250-
This functionality is experimental and may be changed or removed completely in a future release. Elastic will take a best effort approach to fix any issues, but experimental features are not subject to the support SLA of official GA features.
250+
This functionality is in technical preview and may be changed or removed in a future release. Elastic will apply best effort to fix any issues, but features in technical preview are not subject to the support SLA of official GA features.
251+
TEXT
252+
end
253+
include_examples 'care admonition'
254+
end
255+
context 'preview' do
256+
let(:key) { 'preview' }
257+
let(:admon_class) { 'warning' }
258+
let(:default_text) do
259+
<<~TEXT.strip
260+
This functionality is in technical preview and may be changed or removed in a future release. Elastic will apply best effort to fix any issues, but features in technical preview are not subject to the support SLA of official GA features.
251261
TEXT
252262
end
253263
include_examples 'care admonition'

0 commit comments

Comments
 (0)