Skip to content

Commit

Permalink
Merge branch 'main' into 241_dwnl@main
Browse files Browse the repository at this point in the history
  • Loading branch information
donyunardi authored Jun 26, 2024
2 parents 8938710 + 285e85e commit dd19165
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 9 deletions.
4 changes: 2 additions & 2 deletions DESCRIPTION
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
Package: teal.widgets
Title: 'shiny' Widgets for 'teal' Applications
Version: 0.4.2.9012
Date: 2024-05-24
Version: 0.4.2.9013
Date: 2024-06-26
Authors@R: c(
person("Dawid", "Kaledkowski", , "[email protected]", role = c("aut", "cre")),
person("Pawel", "Rucki", , "[email protected]", role = "aut"),
Expand Down
2 changes: 1 addition & 1 deletion NEWS.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# teal.widgets 0.4.2.9012
# teal.widgets 0.4.2.9013

# teal.widgets 0.4.2

Expand Down
12 changes: 6 additions & 6 deletions vignettes/custom-basic-table-arguments.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -17,23 +17,23 @@ creator in the server function, which has the lowest priority.

The implementation should consist of 5 steps:

1. Adding `basic_table_args` argument to the `tm_t_*` function and then its server function.
1. Add the `basic_table_args` arguments to the `tm_t_*` function and then its server function.
The default should be set to
the `basic_table_args()` function for a single plot.
and `list(default = basic_table_args())` multi-table modules.
2. Adding a validation (e.g. `stopifnot` or `checkmate`) of the `basic_table_args` argument to the `tm_*` function.
2. Add validation (e.g. `stopifnot` or `checkmate`) for the `basic_table_args` arguments to the `tm_*` function.
The validation is more complex for multi-table modules, where the `ggplot2_args` could be a `list`.
The module creator has to provide a list of plots names, which should be validated at this step and added to the `param`
field in `roxygen2`. For multi-table modules the step
`if (is_basic_table_args) basic_table_args <- list(default = basic_table_args)` is recommended.
3. Aggregating and reducing all `basic_table_args` sources with `resolve_basic_table_args()`.
4. Usage of the `parse_basic_table_args()` function which will aggregate and reduce all inputs
3. Aggregate and reduce all `basic_table_args` sources with `resolve_basic_table_args()`.
4. Use the `parse_basic_table_args()` function which will aggregate and reduce all inputs
to one expression.
5. Adding the created expression to the chunk with a table.
5. Add the created expression to the chunk with a table.

The `parse_basic_table_args()` function picks the first non NULL value for each argument, checking in order:

1. `basic_table_args` argument provided by the end user.
1. `basic_table_args` arguments provided by the end user.
For multi-table case, per table (`basic_table_args_table`) and then default (`basic_table_args_default`) setup.
2. Global R variable (`options`), `teal.basic_table_args`.
3. `basic_table_args_developer` which is a developer setup, lowest priority.
Expand Down

0 comments on commit dd19165

Please sign in to comment.