Skip to content

Commit b092e25

Browse files
committed
revert unnecessary differences with main
1 parent 2556fae commit b092e25

File tree

3 files changed

+52
-71
lines changed

3 files changed

+52
-71
lines changed

R/plotly_with_settings.R

Lines changed: 0 additions & 10 deletions
This file was deleted.

R/roxygen2_templates.R

Lines changed: 0 additions & 52 deletions
Original file line numberDiff line numberDiff line change
@@ -14,55 +14,3 @@ roxygen_ggplot2_args_param <- function(...) {
1414
}
1515

1616
# nocov end
17-
18-
#' Shared parameters documentation
19-
#'
20-
#' Defines common arguments shared across multiple functions in the package
21-
#' to avoid repetition by using `inheritParams`.
22-
#'
23-
#' @param plot_height (`numeric`) optional, specifies the plot height as a three-element vector of
24-
#' `value`, `min`, and `max` intended for use with a slider UI element.
25-
#' @param plot_width (`numeric`) optional, specifies the plot width as a three-element vector of
26-
#' `value`, `min`, and `max` for a slider encoding the plot width.
27-
#' @param rotate_xaxis_labels (`logical`) optional, whether to rotate plot X axis labels. Does not
28-
#' rotate by default (`FALSE`).
29-
#' @param ggtheme (`character`) optional, `ggplot2` theme to be used by default. Defaults to `"gray"`.
30-
#' @param ggplot2_args (`ggplot2_args`) object created by [teal.widgets::ggplot2_args()]
31-
#' with settings for the module plot.
32-
#' The argument is merged with options variable `teal.ggplot2_args` and default module setup.
33-
#'
34-
#' For more details see the vignette: `vignette("custom-ggplot2-arguments", package = "teal.widgets")`
35-
#' @param basic_table_args (`basic_table_args`) object created by [teal.widgets::basic_table_args()]
36-
#' with settings for the module table.
37-
#' The argument is merged with options variable `teal.basic_table_args` and default module setup.
38-
#'
39-
#' For more details see the vignette: `vignette("custom-basic-table-arguments", package = "teal.widgets")`
40-
#' @param pre_output (`shiny.tag`) optional, text or UI element to be displayed before the module's output,
41-
#' providing context or a title.
42-
#' with text placed before the output to put the output into context. For example a title.
43-
#' @param post_output (`shiny.tag`) optional, text or UI element to be displayed after the module's output,
44-
#' adding context or further instructions. Elements like `shiny::helpText()` are useful.
45-
#' @param alpha (`integer(1)` or `integer(3)`) optional, specifies point opacity.
46-
#' - When the length of `alpha` is one: the plot points will have a fixed opacity.
47-
#' - When the length of `alpha` is three: the plot points opacity are dynamically adjusted based on
48-
#' vector of `value`, `min`, and `max`.
49-
#' @param size (`integer(1)` or `integer(3)`) optional, specifies point size.
50-
#' - When the length of `size` is one: the plot point sizes will have a fixed size.
51-
#' - When the length of `size` is three: the plot points size are dynamically adjusted based on
52-
#' vector of `value`, `min`, and `max`.
53-
#' @param decorators `r lifecycle::badge("experimental")`
54-
#' (named `list` of lists of `teal_transform_module`) optional,
55-
#' decorator for tables or plots included in the module output reported.
56-
#' The decorators are applied to the respective output objects.
57-
#'
58-
#' @param table_datanames (`character`) names of the datasets which should be listed below the plot
59-
#' when some data points are selected. Objects named after `table_datanames` will be pulled from
60-
#' `data` so it is important that data actually contains these datasets. Please be aware that
61-
#' table datasets must be linked with `plot_dataname` by the relevant [join_keys()].
62-
#' See section "Decorating Module" below for more details.
63-
#'
64-
#' @return Object of class `teal_module` to be used in `teal` applications.
65-
#'
66-
#' @name shared_params
67-
#' @keywords internal
68-
NULL

R/utils.R

Lines changed: 52 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,55 @@
1+
#' Shared parameters documentation
2+
#'
3+
#' Defines common arguments shared across multiple functions in the package
4+
#' to avoid repetition by using `inheritParams`.
5+
#'
6+
#' @param plot_height (`numeric`) optional, specifies the plot height as a three-element vector of
7+
#' `value`, `min`, and `max` intended for use with a slider UI element.
8+
#' @param plot_width (`numeric`) optional, specifies the plot width as a three-element vector of
9+
#' `value`, `min`, and `max` for a slider encoding the plot width.
10+
#' @param rotate_xaxis_labels (`logical`) optional, whether to rotate plot X axis labels. Does not
11+
#' rotate by default (`FALSE`).
12+
#' @param ggtheme (`character`) optional, `ggplot2` theme to be used by default. Defaults to `"gray"`.
13+
#' @param ggplot2_args (`ggplot2_args`) object created by [teal.widgets::ggplot2_args()]
14+
#' with settings for the module plot.
15+
#' The argument is merged with options variable `teal.ggplot2_args` and default module setup.
16+
#'
17+
#' For more details see the vignette: `vignette("custom-ggplot2-arguments", package = "teal.widgets")`
18+
#' @param basic_table_args (`basic_table_args`) object created by [teal.widgets::basic_table_args()]
19+
#' with settings for the module table.
20+
#' The argument is merged with options variable `teal.basic_table_args` and default module setup.
21+
#'
22+
#' For more details see the vignette: `vignette("custom-basic-table-arguments", package = "teal.widgets")`
23+
#' @param pre_output (`shiny.tag`) optional, text or UI element to be displayed before the module's output,
24+
#' providing context or a title.
25+
#' with text placed before the output to put the output into context. For example a title.
26+
#' @param post_output (`shiny.tag`) optional, text or UI element to be displayed after the module's output,
27+
#' adding context or further instructions. Elements like `shiny::helpText()` are useful.
28+
#' @param alpha (`integer(1)` or `integer(3)`) optional, specifies point opacity.
29+
#' - When the length of `alpha` is one: the plot points will have a fixed opacity.
30+
#' - When the length of `alpha` is three: the plot points opacity are dynamically adjusted based on
31+
#' vector of `value`, `min`, and `max`.
32+
#' @param size (`integer(1)` or `integer(3)`) optional, specifies point size.
33+
#' - When the length of `size` is one: the plot point sizes will have a fixed size.
34+
#' - When the length of `size` is three: the plot points size are dynamically adjusted based on
35+
#' vector of `value`, `min`, and `max`.
36+
#' @param decorators `r lifecycle::badge("experimental")`
37+
#' (named `list` of lists of `teal_transform_module`) optional,
38+
#' decorator for tables or plots included in the module output reported.
39+
#' The decorators are applied to the respective output objects.
40+
#'
41+
#' @param table_datanames (`character`) names of the datasets which should be listed below the plot
42+
#' when some data points are selected. Objects named after `table_datanames` will be pulled from
43+
#' `data` so it is important that data actually contains these datasets. Please be aware that
44+
#' table datasets must be linked with `plot_dataname` by the relevant [join_keys()].
45+
#' See section "Decorating Module" below for more details.
46+
#'
47+
#' @return Object of class `teal_module` to be used in `teal` applications.
48+
#'
49+
#' @name shared_params
50+
#' @keywords internal
51+
NULL
52+
153
#' Add labels for facets to a `ggplot2` object
254
#'
355
#' Enhances a `ggplot2` plot by adding labels that describe
@@ -411,12 +463,3 @@ set_chunk_dims <- function(pws, q_r, inner_classes = NULL) {
411463
q
412464
})
413465
}
414-
415-
.update_cs_input <- function(inputId, data, cs) {
416-
if (!missing(data) && !length(names(cs))) {
417-
labels <- teal.data::col_labels(isolate(data()))[cs$choices]
418-
names(cs$choices) <- labels
419-
}
420-
updateSelectInput(inputId = inputId, choices = cs$choices, selected = cs$selected)
421-
if (length(cs$choices) < 2) shinyjs::hide(inputId)
422-
}

0 commit comments

Comments
 (0)