Skip to content

Commit

Permalink
Improve reference to shiny_validate (#239)
Browse files Browse the repository at this point in the history
* chore: Use phrase "input validation" when describing shiny_validate

* docs: add link to shiny_validate

* make code links for .tags

* chore: update markup

---------

Co-authored-by: Greg Swinehart <[email protected]>
  • Loading branch information
gadenbuie and gregswinehart authored Jan 9, 2025
1 parent 642b7f1 commit 9321dc9
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 8 deletions.
15 changes: 11 additions & 4 deletions quarto-style.scss
Original file line number Diff line number Diff line change
Expand Up @@ -1622,10 +1622,17 @@ code .parameter-default a {
}

.tags li a:not(.tags li code) {
font-weight: 600 !important;
text-transform: uppercase;
font-size: .75rem;
padding-bottom: .125rem;
font-weight: 600 !important;
text-transform: uppercase;
font-size: .75rem;
padding-bottom: .125rem;
}

.tags li a code {
color: shade-color($primary, 13%);
font-weight: 400;
font-size: 0.855rem;
text-transform: lowercase;
}

/*.tag.badge.text-bg-light {
Expand Down
8 changes: 6 additions & 2 deletions templates/survey-wizard/index.qmd
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,8 @@ shiny create --template survey-wizard --mode core --github posit-dev/py-shiny-te


A simple survey wizard that simply writes responses to a file and displays a confirmation message when submitted.
In this example, we use the `shiny_validate` package to validate the form inputs, and make clever use of [`navset_hidden()`](/api/core/ui.navset_hidden.qmd) to show/hide different steps of the form via action buttons.
In this example, we use the [shiny_validate] package for input validation, providing direct feedback when the user enters invalid responses.
We also make clever use of [`navset_hidden()`](/api/core/ui.navset_hidden.qmd) to show/hide different steps of the form via action buttons.


:::: {.grid .tags}
Expand All @@ -45,7 +46,10 @@ In this example, we use the `shiny_validate` package to validate the form inputs
**Packages:**

* `pandas`
* `shiny_validate`
* [`shiny_validate`][shiny_validate]

:::
::::


[shiny_validate]: https://github.com/posit-dev/py-shiny-validate
6 changes: 4 additions & 2 deletions templates/survey/index.qmd
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ shiny create --template survey --mode core --github posit-dev/py-shiny-templates


A simple survey form with a few input fields that simply writes responses to a file and displays a confirmation message when submitted.
In this example, we use the `shiny_validate` package to validate the form inputs.
In this example, we use the [shiny_validate] package for input validation, providing direct feedback when the user enters invalid responses.


:::: {.grid .tags}
Expand All @@ -49,7 +49,9 @@ In this example, we use the `shiny_validate` package to validate the form inputs
**Packages:**

* `pandas`
* `shiny_validate`
* [`shiny_validate`][shiny_validate]

:::
::::

[shiny_validate]: https://github.com/posit-dev/py-shiny-validate

0 comments on commit 9321dc9

Please sign in to comment.