Migrate docs shell samples to asciinema

- Update antora settings
- Move cast files and remove old ones
- Switch shell svg's to asciinema
- Fixes #884
This commit is contained in:
Janne Valkealahti
2023-10-14 15:45:09 +01:00
parent 52b242dcbf
commit 860c8dcb93
26 changed files with 49 additions and 65 deletions

View File

@@ -1,7 +1,7 @@
[[using-shell-components-ui-confirmation]]
= Confirmation
ifndef::snippets[:snippets: ../../test/java/org/springframework/shell/docs]
ifndef::snippets[:snippets: ../../../../../src/test/java/org/springframework/shell/docs]
The confirmation component asks a user for a simple confirmation. It is essentially a
yes-or-no question.
@@ -11,9 +11,12 @@ yes-or-no question.
include::{snippets}/UiComponentSnippets.java[tag=snippet5]
----
The following image shows the typical output from a confirmation component:
The following screencast shows the typical output from a confirmation component:
image::component-confirmation-1.svg[text input]
[asciinema,rows=8]
----
include::example$component-confirmation-1.cast[]
----
The context object is `ConfirmationInputContext`. The following table describes its context variables:

View File

@@ -1,7 +1,7 @@
[[using-shell-components-ui-multiselect]]
= Multi Select
ifndef::snippets[:snippets: ../../test/java/org/springframework/shell/docs]
ifndef::snippets[:snippets: ../../../../../src/test/java/org/springframework/shell/docs]
The multi select component asks a user to select multiple items from a list.
The following listing shows an example:
@@ -11,9 +11,12 @@ The following listing shows an example:
include::{snippets}/UiComponentSnippets.java[tag=snippet7]
----
The following image shows a typical multi-select component:
The following screencast shows a typical multi-select component:
image::component-multi-select-1.svg[text input]
[asciinema,rows=9]
----
include::example$component-multi-select-1.cast[]
----
The context object is `MultiItemSelectorContext`. The following table describes its context variables:

View File

@@ -1,7 +1,7 @@
[[using-shell-components-ui-pathinput]]
= Path Input
ifndef::snippets[:snippets: ../../test/java/org/springframework/shell/docs]
ifndef::snippets[:snippets: ../../../../../src/test/java/org/springframework/shell/docs]
The path input component asks a user for a `Path` and gives additional information about a path itself.
@@ -10,9 +10,12 @@ The path input component asks a user for a `Path` and gives additional informati
include::{snippets}/UiComponentSnippets.java[tag=snippet4]
----
The following image shows typical output from a path input component:
The following screencast shows typical output from a path input component:
image::component-path-input-1.svg[text input]
[asciinema,rows=6]
----
include::example$component-path-input-1.cast[]
----
The context object is `PathInputContext`. The following table describes its context variables:

View File

@@ -15,9 +15,12 @@ include::{snippets}/UiComponentSnippets.java[tag=snippet9]
NOTE: Logic for search is passed as is into algorithms documented
in xref:appendices/techintro/searchalgorithm.adoc[Search Algorithms].
The following image shows typical output from a path search component:
The following screencast shows typical output from a path search component:
image::component-path-search-1.svg[text input]
[asciinema,rows=10]
----
include::example$component-path-search-1.cast[]
----
The context object is `PathSearchContext`. The following table describes its context variables:

View File

@@ -1,7 +1,7 @@
[[using-shell-components-ui-singleselect]]
= Single Select
ifndef::snippets[:snippets: ../../test/java/org/springframework/shell/docs]
ifndef::snippets[:snippets: ../../../../../src/test/java/org/springframework/shell/docs]
A single select component asks a user to choose one item from a list. It is similar to a simple
dropbox implementation. The following listing shows an example:
@@ -11,9 +11,12 @@ dropbox implementation. The following listing shows an example:
include::{snippets}/UiComponentSnippets.java[tag=snippet6]
----
The following image shows typical output for a single select component:
The following screencast shows typical output for a single select component:
image::component-single-select-1.svg[text input]
[asciinema,rows=8]
----
include::example$component-single-select-1.cast[]
----
The context object is `SingleItemSelectorContext`. The following table describes its context variables:

View File

@@ -1,7 +1,7 @@
[[using-shell-components-ui-stringinput]]
= String Input
ifndef::snippets[:snippets: ../../test/java/org/springframework/shell/docs]
ifndef::snippets[:snippets: ../../../../../src/test/java/org/springframework/shell/docs]
The string input component asks a user for simple text input, optionally masking values
if the content contains something sensitive. The following listing shows an example:
@@ -11,9 +11,12 @@ if the content contains something sensitive. The following listing shows an exam
include::{snippets}/UiComponentSnippets.java[tag=snippet3]
----
The following image shows typical output from a string input component:
The following screencast shows typical output from a string input component:
image::component-text-input-1.svg[text input]
[asciinema,rows=6]
----
include::example$component-text-input-1.cast[]
----
The context object is `StringInputContext`. The following table lists its context variables: