From 61e3e61593b4998a7d2e308588d56fbb56fa9020 Mon Sep 17 00:00:00 2001 From: Pawel Rucki <12943682+pawelru@users.noreply.github.com> Date: Wed, 7 Feb 2024 13:17:56 +0100 Subject: [PATCH 1/8] update docs of module() server and ui args Signed-off-by: Pawel Rucki <12943682+pawelru@users.noreply.github.com> --- R/modules.R | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/R/modules.R b/R/modules.R index 05b91cd2a5..5727c8f3f5 100644 --- a/R/modules.R +++ b/R/modules.R @@ -3,7 +3,7 @@ #' @description #' `r lifecycle::badge("stable")` #' -#' Create a nested tab structure to embed modules in a `teal` application. +#' Create a nested tab structure to embed modules in a `teal` application #' #' @details #' `module()` creates an instance of a `teal_module` that can be placed in a `teal` application. @@ -23,15 +23,15 @@ #' @param server (`function`) `shiny` module with following arguments: #' - `id` - `teal` will set proper `shiny` namespace for this module (see [shiny::moduleServer()]). #' - `input`, `output`, `session` - (not recommended) then [shiny::callModule()] will be used to call a module. -#' - `data` (optional) module will receive a `teal_data` object, a list of reactive (filtered) data specified in +#' - `data` (optional) If present, module will receive a `teal_data` object, a list of reactive (filtered) data specified in #' the `filters` argument. -#' - `datasets` (optional) module will receive `FilteredData`. (See [`teal.slice::FilteredData`]). -#' - `reporter` (optional) module will receive `Reporter`. (See [`teal.reporter::Reporter`]). -#' - `filter_panel_api` (optional) module will receive `FilterPanelAPI`. (See [`teal.slice::FilterPanelAPI`]). -#' - `...` (optional) `server_args` elements will be passed to the module named argument or to the `...`. +#' - `datasets` (optional) If present, module will receive `FilteredData`. (See [`teal.slice::FilteredData`]). +#' - `reporter` (optional) If present, module will receive `Reporter`. (See [`teal.reporter::Reporter`]). +#' - `filter_panel_api` (optional) If present, module will receive `FilterPanelAPI`. (See [`teal.slice::FilterPanelAPI`]). +#' - `...` (optional) If present, `server_args` elements will be passed to the module named argument or to the `...`. #' @param ui (`function`) `shiny` UI module function with following arguments: #' - `id` - `teal` will set proper `shiny` namespace for this module. -#' - `...` (optional) `ui_args` elements will be passed to the module named argument or to the `...`. +#' - `...` (optional) If present, `ui_args` elements will be passed to the module named argument or to the `...`. #' @param filters (`character`) Deprecated. Use `datanames` instead. #' @param datanames (`character`) A vector with `datanames` that are relevant for the item. The #' filter panel will automatically update the shown filters to include only From ccdb0c8ff38e40e117705c138e6b34a76a80db4c Mon Sep 17 00:00:00 2001 From: "27856297+dependabot-preview[bot]@users.noreply.github.com" <27856297+dependabot-preview[bot]@users.noreply.github.com> Date: Wed, 7 Feb 2024 12:21:41 +0000 Subject: [PATCH 2/8] [skip actions] Roxygen Man Pages Auto Update --- man/teal_modules.Rd | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/man/teal_modules.Rd b/man/teal_modules.Rd index e8e0f01fa3..72f4403f88 100644 --- a/man/teal_modules.Rd +++ b/man/teal_modules.Rd @@ -46,18 +46,18 @@ For \code{modules()} defaults to \code{"root"}. See \code{Details}.} \itemize{ \item \code{id} - \code{teal} will set proper \code{shiny} namespace for this module (see \code{\link[shiny:moduleServer]{shiny::moduleServer()}}). \item \code{input}, \code{output}, \code{session} - (not recommended) then \code{\link[shiny:callModule]{shiny::callModule()}} will be used to call a module. -\item \code{data} (optional) module will receive a \code{teal_data} object, a list of reactive (filtered) data specified in +\item \code{data} (optional) If present, module will receive a \code{teal_data} object, a list of reactive (filtered) data specified in the \code{filters} argument. -\item \code{datasets} (optional) module will receive \code{FilteredData}. (See \code{\link[teal.slice:FilteredData]{teal.slice::FilteredData}}). -\item \code{reporter} (optional) module will receive \code{Reporter}. (See \code{\link[teal.reporter:Reporter]{teal.reporter::Reporter}}). -\item \code{filter_panel_api} (optional) module will receive \code{FilterPanelAPI}. (See \code{\link[teal.slice:FilterPanelAPI]{teal.slice::FilterPanelAPI}}). -\item \code{...} (optional) \code{server_args} elements will be passed to the module named argument or to the \code{...}. +\item \code{datasets} (optional) If present, module will receive \code{FilteredData}. (See \code{\link[teal.slice:FilteredData]{teal.slice::FilteredData}}). +\item \code{reporter} (optional) If present, module will receive \code{Reporter}. (See \code{\link[teal.reporter:Reporter]{teal.reporter::Reporter}}). +\item \code{filter_panel_api} (optional) If present, module will receive \code{FilterPanelAPI}. (See \code{\link[teal.slice:FilterPanelAPI]{teal.slice::FilterPanelAPI}}). +\item \code{...} (optional) If present, \code{server_args} elements will be passed to the module named argument or to the \code{...}. }} \item{ui}{(\code{function}) \code{shiny} UI module function with following arguments: \itemize{ \item \code{id} - \code{teal} will set proper \code{shiny} namespace for this module. -\item \code{...} (optional) \code{ui_args} elements will be passed to the module named argument or to the \code{...}. +\item \code{...} (optional) If present, \code{ui_args} elements will be passed to the module named argument or to the \code{...}. }} \item{filters}{(\code{character}) Deprecated. Use \code{datanames} instead.} @@ -94,7 +94,7 @@ their \code{label} attribute converted to a valid \code{shiny} id. \description{ \ifelse{html}{\href{https://lifecycle.r-lib.org/articles/stages.html#stable}{\figure{lifecycle-stable.svg}{options: alt='[Stable]'}}}{\strong{[Stable]}} -Create a nested tab structure to embed modules in a \code{teal} application. +Create a nested tab structure to embed modules in a \code{teal} application } \details{ \code{module()} creates an instance of a \code{teal_module} that can be placed in a \code{teal} application. From 021b570845e41fc386f10e3f68ddffcb59b8c2f4 Mon Sep 17 00:00:00 2001 From: Pawel Rucki <12943682+pawelru@users.noreply.github.com> Date: Wed, 7 Feb 2024 13:35:03 +0100 Subject: [PATCH 3/8] rm dot from the title for consistency --- R/module_teal_with_splash.R | 2 +- R/modules.R | 2 +- man/module_teal_with_splash.Rd | 2 +- man/teal_modules.Rd | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/R/module_teal_with_splash.R b/R/module_teal_with_splash.R index a87f48fa64..e9cd7b304e 100644 --- a/R/module_teal_with_splash.R +++ b/R/module_teal_with_splash.R @@ -1,6 +1,6 @@ # This file adds a splash screen for delayed data loading on top of teal -#' Add splash screen to `teal` application. +#' Add splash screen to `teal` application #' #' @description `r lifecycle::badge("stable")` #' diff --git a/R/modules.R b/R/modules.R index 5727c8f3f5..6b0ed874d0 100644 --- a/R/modules.R +++ b/R/modules.R @@ -1,4 +1,4 @@ -#' Create `teal_module` and `teal_modules` objects. +#' Create `teal_module` and `teal_modules` objects #' #' @description #' `r lifecycle::badge("stable")` diff --git a/man/module_teal_with_splash.Rd b/man/module_teal_with_splash.Rd index edbe3746ff..cc8aa3bc79 100644 --- a/man/module_teal_with_splash.Rd +++ b/man/module_teal_with_splash.Rd @@ -4,7 +4,7 @@ \alias{module_teal_with_splash} \alias{ui_teal_with_splash} \alias{srv_teal_with_splash} -\title{Add splash screen to \code{teal} application.} +\title{Add splash screen to \code{teal} application} \usage{ ui_teal_with_splash( id, diff --git a/man/teal_modules.Rd b/man/teal_modules.Rd index 72f4403f88..c272c579f3 100644 --- a/man/teal_modules.Rd +++ b/man/teal_modules.Rd @@ -9,7 +9,7 @@ \alias{print.teal_module} \alias{format.teal_modules} \alias{print.teal_modules} -\title{Create \code{teal_module} and \code{teal_modules} objects.} +\title{Create \code{teal_module} and \code{teal_modules} objects} \usage{ module( label = "module", From 4aa15ff0f685bc6062efc38bac65e4affb0befdf Mon Sep 17 00:00:00 2001 From: Pawel Rucki <12943682+pawelru@users.noreply.github.com> Date: Wed, 7 Feb 2024 13:36:52 +0100 Subject: [PATCH 4/8] restore dot --- R/modules.R | 2 +- man/teal_modules.Rd | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/R/modules.R b/R/modules.R index 6b0ed874d0..b83f15ce78 100644 --- a/R/modules.R +++ b/R/modules.R @@ -3,7 +3,7 @@ #' @description #' `r lifecycle::badge("stable")` #' -#' Create a nested tab structure to embed modules in a `teal` application +#' Create a nested tab structure to embed modules in a `teal` application. #' #' @details #' `module()` creates an instance of a `teal_module` that can be placed in a `teal` application. diff --git a/man/teal_modules.Rd b/man/teal_modules.Rd index c272c579f3..aad89c22e3 100644 --- a/man/teal_modules.Rd +++ b/man/teal_modules.Rd @@ -94,7 +94,7 @@ their \code{label} attribute converted to a valid \code{shiny} id. \description{ \ifelse{html}{\href{https://lifecycle.r-lib.org/articles/stages.html#stable}{\figure{lifecycle-stable.svg}{options: alt='[Stable]'}}}{\strong{[Stable]}} -Create a nested tab structure to embed modules in a \code{teal} application +Create a nested tab structure to embed modules in a \code{teal} application. } \details{ \code{module()} creates an instance of a \code{teal_module} that can be placed in a \code{teal} application. From f8547a682f16d8b3579d976ad5a584d2d2042ed3 Mon Sep 17 00:00:00 2001 From: Pawel Rucki <12943682+pawelru@users.noreply.github.com> Date: Wed, 7 Feb 2024 13:48:34 +0100 Subject: [PATCH 5/8] lint --- R/modules.R | 7 ++++--- man/teal_modules.Rd | 7 ++++--- 2 files changed, 8 insertions(+), 6 deletions(-) diff --git a/R/modules.R b/R/modules.R index b83f15ce78..0ab0c06c36 100644 --- a/R/modules.R +++ b/R/modules.R @@ -23,11 +23,12 @@ #' @param server (`function`) `shiny` module with following arguments: #' - `id` - `teal` will set proper `shiny` namespace for this module (see [shiny::moduleServer()]). #' - `input`, `output`, `session` - (not recommended) then [shiny::callModule()] will be used to call a module. -#' - `data` (optional) If present, module will receive a `teal_data` object, a list of reactive (filtered) data specified in -#' the `filters` argument. +#' - `data` (optional) If present, module will receive a `teal_data` object, a list of reactive (filtered) +#' data specified in the `filters` argument. #' - `datasets` (optional) If present, module will receive `FilteredData`. (See [`teal.slice::FilteredData`]). #' - `reporter` (optional) If present, module will receive `Reporter`. (See [`teal.reporter::Reporter`]). -#' - `filter_panel_api` (optional) If present, module will receive `FilterPanelAPI`. (See [`teal.slice::FilterPanelAPI`]). +#' - `filter_panel_api` (optional) If present, module will receive `FilterPanelAPI`. +#' (See [`teal.slice::FilterPanelAPI`]). #' - `...` (optional) If present, `server_args` elements will be passed to the module named argument or to the `...`. #' @param ui (`function`) `shiny` UI module function with following arguments: #' - `id` - `teal` will set proper `shiny` namespace for this module. diff --git a/man/teal_modules.Rd b/man/teal_modules.Rd index aad89c22e3..21b1fa8624 100644 --- a/man/teal_modules.Rd +++ b/man/teal_modules.Rd @@ -46,11 +46,12 @@ For \code{modules()} defaults to \code{"root"}. See \code{Details}.} \itemize{ \item \code{id} - \code{teal} will set proper \code{shiny} namespace for this module (see \code{\link[shiny:moduleServer]{shiny::moduleServer()}}). \item \code{input}, \code{output}, \code{session} - (not recommended) then \code{\link[shiny:callModule]{shiny::callModule()}} will be used to call a module. -\item \code{data} (optional) If present, module will receive a \code{teal_data} object, a list of reactive (filtered) data specified in -the \code{filters} argument. +\item \code{data} (optional) If present, module will receive a \code{teal_data} object, a list of reactive (filtered) +data specified in the \code{filters} argument. \item \code{datasets} (optional) If present, module will receive \code{FilteredData}. (See \code{\link[teal.slice:FilteredData]{teal.slice::FilteredData}}). \item \code{reporter} (optional) If present, module will receive \code{Reporter}. (See \code{\link[teal.reporter:Reporter]{teal.reporter::Reporter}}). -\item \code{filter_panel_api} (optional) If present, module will receive \code{FilterPanelAPI}. (See \code{\link[teal.slice:FilterPanelAPI]{teal.slice::FilterPanelAPI}}). +\item \code{filter_panel_api} (optional) If present, module will receive \code{FilterPanelAPI}. +(See \code{\link[teal.slice:FilterPanelAPI]{teal.slice::FilterPanelAPI}}). \item \code{...} (optional) If present, \code{server_args} elements will be passed to the module named argument or to the \code{...}. }} From 23e640128bbb07529198369f029e057f4345706d Mon Sep 17 00:00:00 2001 From: Pawel Rucki <12943682+pawelru@users.noreply.github.com> Date: Mon, 12 Feb 2024 14:47:44 +0100 Subject: [PATCH 6/8] further enhance description --- R/modules.R | 17 ++++++++++------- man/teal_modules.Rd | 15 +++++++++------ 2 files changed, 19 insertions(+), 13 deletions(-) diff --git a/R/modules.R b/R/modules.R index 24dbfcffd5..087d648acd 100644 --- a/R/modules.R +++ b/R/modules.R @@ -22,13 +22,16 @@ #' For `modules()` defaults to `"root"`. See `Details`. #' @param server (`function`) `shiny` module with following arguments: #' - `id` - `teal` will set proper `shiny` namespace for this module (see [shiny::moduleServer()]). -#' - `input`, `output`, `session` - (not recommended) then [shiny::callModule()] will be used to call a module. -#' - `data` (optional) If present, module will receive a `teal_data` object, a list of reactive (filtered) -#' data specified in the `filters` argument. -#' - `datasets` (optional) If present, module will receive `FilteredData`. (See [`teal.slice::FilteredData`]). -#' - `reporter` (optional) If present, module will receive `Reporter`. (See [`teal.reporter::Reporter`]). -#' - `filter_panel_api` (optional) If present, module will receive `FilterPanelAPI`. -#' (See [`teal.slice::FilterPanelAPI`]). +#' - `input`, `output`, `session` - (optional; not recommended) If present, then [shiny::callModule()] will be used to call a module. +#' From `shiny` 1.5.0, the recommended way is to use [shiny::moduleServer()] instead which doesn't require these arguments. +#' - `data` (optional) If present, the module will be called with `teal_data` object (i.e. a list of reactive (filtered) +#' data specified in the `filters` argument) as the value of this argument. +#' - `datasets` (optional) If present, the module will be called with `FilteredData` object as the value of this argument. +#' (See [`teal.slice::FilteredData`]). +#' - `reporter` (optional) If present, the module will be called with `Reporter` object as the value of this argument. +#' (See [`teal.reporter::Reporter`]). +#' - `filter_panel_api` (optional) If present, the module will be called with `FilterPanelAPI` object as the value of this argument. +#' (See [`teal.slice::FilterPanelAPI`]). #' - `...` (optional) If present, `server_args` elements will be passed to the module named argument or to the `...`. #' @param ui (`function`) `shiny` UI module function with following arguments: #' - `id` - `teal` will set proper `shiny` namespace for this module. diff --git a/man/teal_modules.Rd b/man/teal_modules.Rd index 21b1fa8624..57cc6cfe8c 100644 --- a/man/teal_modules.Rd +++ b/man/teal_modules.Rd @@ -45,12 +45,15 @@ For \code{modules()} defaults to \code{"root"}. See \code{Details}.} \item{server}{(\code{function}) \code{shiny} module with following arguments: \itemize{ \item \code{id} - \code{teal} will set proper \code{shiny} namespace for this module (see \code{\link[shiny:moduleServer]{shiny::moduleServer()}}). -\item \code{input}, \code{output}, \code{session} - (not recommended) then \code{\link[shiny:callModule]{shiny::callModule()}} will be used to call a module. -\item \code{data} (optional) If present, module will receive a \code{teal_data} object, a list of reactive (filtered) -data specified in the \code{filters} argument. -\item \code{datasets} (optional) If present, module will receive \code{FilteredData}. (See \code{\link[teal.slice:FilteredData]{teal.slice::FilteredData}}). -\item \code{reporter} (optional) If present, module will receive \code{Reporter}. (See \code{\link[teal.reporter:Reporter]{teal.reporter::Reporter}}). -\item \code{filter_panel_api} (optional) If present, module will receive \code{FilterPanelAPI}. +\item \code{input}, \code{output}, \code{session} - (optional; not recommended) If present, then \code{\link[shiny:callModule]{shiny::callModule()}} will be used to call a module. +From \code{shiny} 1.5.0, the recommended way is to use \code{\link[shiny:moduleServer]{shiny::moduleServer()}} instead which doesn't require these arguments. +\item \code{data} (optional) If present, the module will be called with \code{teal_data} object (i.e. a list of reactive (filtered) +data specified in the \code{filters} argument) as the value of this argument. +\item \code{datasets} (optional) If present, the module will be called with \code{FilteredData} object as the value of this argument. +(See \code{\link[teal.slice:FilteredData]{teal.slice::FilteredData}}). +\item \code{reporter} (optional) If present, the module will be called with \code{Reporter} object as the value of this argument. +(See \code{\link[teal.reporter:Reporter]{teal.reporter::Reporter}}). +\item \code{filter_panel_api} (optional) If present, the module will be called with \code{FilterPanelAPI} object as the value of this argument. (See \code{\link[teal.slice:FilterPanelAPI]{teal.slice::FilterPanelAPI}}). \item \code{...} (optional) If present, \code{server_args} elements will be passed to the module named argument or to the \code{...}. }} From 3bca0d57af246ae3e7b74420d9db2376f48f300b Mon Sep 17 00:00:00 2001 From: Pawel Rucki <12943682+pawelru@users.noreply.github.com> Date: Mon, 12 Feb 2024 14:56:31 +0100 Subject: [PATCH 7/8] lint - line length --- R/modules.R | 27 +++++++++++++++------------ man/teal_modules.Rd | 27 +++++++++++++++------------ 2 files changed, 30 insertions(+), 24 deletions(-) diff --git a/R/modules.R b/R/modules.R index 087d648acd..7fb9cb7b6b 100644 --- a/R/modules.R +++ b/R/modules.R @@ -22,20 +22,23 @@ #' For `modules()` defaults to `"root"`. See `Details`. #' @param server (`function`) `shiny` module with following arguments: #' - `id` - `teal` will set proper `shiny` namespace for this module (see [shiny::moduleServer()]). -#' - `input`, `output`, `session` - (optional; not recommended) If present, then [shiny::callModule()] will be used to call a module. -#' From `shiny` 1.5.0, the recommended way is to use [shiny::moduleServer()] instead which doesn't require these arguments. -#' - `data` (optional) If present, the module will be called with `teal_data` object (i.e. a list of reactive (filtered) -#' data specified in the `filters` argument) as the value of this argument. -#' - `datasets` (optional) If present, the module will be called with `FilteredData` object as the value of this argument. -#' (See [`teal.slice::FilteredData`]). -#' - `reporter` (optional) If present, the module will be called with `Reporter` object as the value of this argument. -#' (See [`teal.reporter::Reporter`]). -#' - `filter_panel_api` (optional) If present, the module will be called with `FilterPanelAPI` object as the value of this argument. -#' (See [`teal.slice::FilterPanelAPI`]). -#' - `...` (optional) If present, `server_args` elements will be passed to the module named argument or to the `...`. +#' - `input`, `output`, `session` - (optional; not recommended) If present, then [shiny::callModule()] +#' will be used to call a module. From `shiny` 1.5.0, the recommended way is to use +#' [shiny::moduleServer()] instead which doesn't require these arguments. +#' - `data` (optional) If present, the module will be called with `teal_data` object (i.e. a list of +#' reactive (filtered) data specified in the `filters` argument) as the value of this argument. +#' - `datasets` (optional) If present, the module will be called with `FilteredData` object as the +#' value of this argument. (See [`teal.slice::FilteredData`]). +#' - `reporter` (optional) If present, the module will be called with `Reporter` object as the value +#' of this argument. (See [`teal.reporter::Reporter`]). +#' - `filter_panel_api` (optional) If present, the module will be called with `FilterPanelAPI` object +#' as the value of this argument. (See [`teal.slice::FilterPanelAPI`]). +#' - `...` (optional) If present, `server_args` elements will be passed to the module named argument +#' or to the `...`. #' @param ui (`function`) `shiny` UI module function with following arguments: #' - `id` - `teal` will set proper `shiny` namespace for this module. -#' - `...` (optional) If present, `ui_args` elements will be passed to the module named argument or to the `...`. +#' - `...` (optional) If present, `ui_args` elements will be passed to the module named argument +#' or to the `...`. #' @param filters (`character`) Deprecated. Use `datanames` instead. #' @param datanames (`character`) A vector with `datanames` that are relevant for the item. The #' filter panel will automatically update the shown filters to include only diff --git a/man/teal_modules.Rd b/man/teal_modules.Rd index 57cc6cfe8c..36b8d0e3e1 100644 --- a/man/teal_modules.Rd +++ b/man/teal_modules.Rd @@ -45,23 +45,26 @@ For \code{modules()} defaults to \code{"root"}. See \code{Details}.} \item{server}{(\code{function}) \code{shiny} module with following arguments: \itemize{ \item \code{id} - \code{teal} will set proper \code{shiny} namespace for this module (see \code{\link[shiny:moduleServer]{shiny::moduleServer()}}). -\item \code{input}, \code{output}, \code{session} - (optional; not recommended) If present, then \code{\link[shiny:callModule]{shiny::callModule()}} will be used to call a module. -From \code{shiny} 1.5.0, the recommended way is to use \code{\link[shiny:moduleServer]{shiny::moduleServer()}} instead which doesn't require these arguments. -\item \code{data} (optional) If present, the module will be called with \code{teal_data} object (i.e. a list of reactive (filtered) -data specified in the \code{filters} argument) as the value of this argument. -\item \code{datasets} (optional) If present, the module will be called with \code{FilteredData} object as the value of this argument. -(See \code{\link[teal.slice:FilteredData]{teal.slice::FilteredData}}). -\item \code{reporter} (optional) If present, the module will be called with \code{Reporter} object as the value of this argument. -(See \code{\link[teal.reporter:Reporter]{teal.reporter::Reporter}}). -\item \code{filter_panel_api} (optional) If present, the module will be called with \code{FilterPanelAPI} object as the value of this argument. -(See \code{\link[teal.slice:FilterPanelAPI]{teal.slice::FilterPanelAPI}}). -\item \code{...} (optional) If present, \code{server_args} elements will be passed to the module named argument or to the \code{...}. +\item \code{input}, \code{output}, \code{session} - (optional; not recommended) If present, then \code{\link[shiny:callModule]{shiny::callModule()}} +will be used to call a module. From \code{shiny} 1.5.0, the recommended way is to use +\code{\link[shiny:moduleServer]{shiny::moduleServer()}} instead which doesn't require these arguments. +\item \code{data} (optional) If present, the module will be called with \code{teal_data} object (i.e. a list of +reactive (filtered) data specified in the \code{filters} argument) as the value of this argument. +\item \code{datasets} (optional) If present, the module will be called with \code{FilteredData} object as the +value of this argument. (See \code{\link[teal.slice:FilteredData]{teal.slice::FilteredData}}). +\item \code{reporter} (optional) If present, the module will be called with \code{Reporter} object as the value +of this argument. (See \code{\link[teal.reporter:Reporter]{teal.reporter::Reporter}}). +\item \code{filter_panel_api} (optional) If present, the module will be called with \code{FilterPanelAPI} object +as the value of this argument. (See \code{\link[teal.slice:FilterPanelAPI]{teal.slice::FilterPanelAPI}}). +\item \code{...} (optional) If present, \code{server_args} elements will be passed to the module named argument +or to the \code{...}. }} \item{ui}{(\code{function}) \code{shiny} UI module function with following arguments: \itemize{ \item \code{id} - \code{teal} will set proper \code{shiny} namespace for this module. -\item \code{...} (optional) If present, \code{ui_args} elements will be passed to the module named argument or to the \code{...}. +\item \code{...} (optional) If present, \code{ui_args} elements will be passed to the module named argument +or to the \code{...}. }} \item{filters}{(\code{character}) Deprecated. Use \code{datanames} instead.} From fab6d1880bae658e6e4f7e4411af3931ead203a8 Mon Sep 17 00:00:00 2001 From: Pawel Rucki <12943682+pawelru@users.noreply.github.com> Date: Mon, 12 Feb 2024 17:34:57 +0100 Subject: [PATCH 8/8] code review comments --- R/module_snapshot_manager.R | 2 +- R/module_tabs_with_filters.R | 2 +- R/modules.R | 14 +++++++------- R/validate_inputs.R | 2 +- man/module_tabs_with_filters.Rd | 2 +- man/snapshot_manager_module.Rd | 2 +- man/teal_modules.Rd | 14 +++++++------- man/validate_inputs.Rd | 2 +- 8 files changed, 20 insertions(+), 20 deletions(-) diff --git a/R/module_snapshot_manager.R b/R/module_snapshot_manager.R index ba7693e788..fb92f8919e 100644 --- a/R/module_snapshot_manager.R +++ b/R/module_snapshot_manager.R @@ -1,4 +1,4 @@ -#' Filter state snapshot management. +#' Filter state snapshot management #' #' Capture and restore snapshots of the global (app) filter state. #' diff --git a/R/module_tabs_with_filters.R b/R/module_tabs_with_filters.R index 49e2bea529..4cf2f58fdc 100644 --- a/R/module_tabs_with_filters.R +++ b/R/module_tabs_with_filters.R @@ -1,4 +1,4 @@ -#' Add right filter panel into each of the top-level `teal_modules` UIs. +#' Add right filter panel into each of the top-level `teal_modules` UIs #' #' The [ui_nested_tabs] function returns a nested tabbed UI corresponding #' to the nested modules. diff --git a/R/modules.R b/R/modules.R index 7fb9cb7b6b..9db36cd712 100644 --- a/R/modules.R +++ b/R/modules.R @@ -22,22 +22,22 @@ #' For `modules()` defaults to `"root"`. See `Details`. #' @param server (`function`) `shiny` module with following arguments: #' - `id` - `teal` will set proper `shiny` namespace for this module (see [shiny::moduleServer()]). -#' - `input`, `output`, `session` - (optional; not recommended) If present, then [shiny::callModule()] +#' - `input`, `output`, `session` - (optional; not recommended) When provided, then [shiny::callModule()] #' will be used to call a module. From `shiny` 1.5.0, the recommended way is to use #' [shiny::moduleServer()] instead which doesn't require these arguments. -#' - `data` (optional) If present, the module will be called with `teal_data` object (i.e. a list of +#' - `data` (optional) When provided, the module will be called with `teal_data` object (i.e. a list of #' reactive (filtered) data specified in the `filters` argument) as the value of this argument. -#' - `datasets` (optional) If present, the module will be called with `FilteredData` object as the +#' - `datasets` (optional) When provided, the module will be called with `FilteredData` object as the #' value of this argument. (See [`teal.slice::FilteredData`]). -#' - `reporter` (optional) If present, the module will be called with `Reporter` object as the value +#' - `reporter` (optional) When provided, the module will be called with `Reporter` object as the value #' of this argument. (See [`teal.reporter::Reporter`]). -#' - `filter_panel_api` (optional) If present, the module will be called with `FilterPanelAPI` object +#' - `filter_panel_api` (optional) When provided, the module will be called with `FilterPanelAPI` object #' as the value of this argument. (See [`teal.slice::FilterPanelAPI`]). -#' - `...` (optional) If present, `server_args` elements will be passed to the module named argument +#' - `...` (optional) When provided, `server_args` elements will be passed to the module named argument #' or to the `...`. #' @param ui (`function`) `shiny` UI module function with following arguments: #' - `id` - `teal` will set proper `shiny` namespace for this module. -#' - `...` (optional) If present, `ui_args` elements will be passed to the module named argument +#' - `...` (optional) When provided, `ui_args` elements will be passed to the module named argument #' or to the `...`. #' @param filters (`character`) Deprecated. Use `datanames` instead. #' @param datanames (`character`) A vector with `datanames` that are relevant for the item. The diff --git a/R/validate_inputs.R b/R/validate_inputs.R index b11073af86..c146dc04c6 100644 --- a/R/validate_inputs.R +++ b/R/validate_inputs.R @@ -1,4 +1,4 @@ -#' Send input validation messages to output. +#' Send input validation messages to output #' #' Captures messages from `InputValidator` objects and collates them #' into one message passed to `validate`. diff --git a/man/module_tabs_with_filters.Rd b/man/module_tabs_with_filters.Rd index 46b31dc8fd..5014c415e4 100644 --- a/man/module_tabs_with_filters.Rd +++ b/man/module_tabs_with_filters.Rd @@ -4,7 +4,7 @@ \alias{module_tabs_with_filters} \alias{ui_tabs_with_filters} \alias{srv_tabs_with_filters} -\title{Add right filter panel into each of the top-level \code{teal_modules} UIs.} +\title{Add right filter panel into each of the top-level \code{teal_modules} UIs} \usage{ ui_tabs_with_filters(id, modules, datasets, filter = teal_slices()) diff --git a/man/snapshot_manager_module.Rd b/man/snapshot_manager_module.Rd index 5bf1a6382f..307abaf06a 100644 --- a/man/snapshot_manager_module.Rd +++ b/man/snapshot_manager_module.Rd @@ -6,7 +6,7 @@ \alias{snapshot} \alias{snapshot_manager} \alias{snapshot_manager_srv} -\title{Filter state snapshot management.} +\title{Filter state snapshot management} \usage{ snapshot_manager_ui(id) diff --git a/man/teal_modules.Rd b/man/teal_modules.Rd index 36b8d0e3e1..0e5d4aaf77 100644 --- a/man/teal_modules.Rd +++ b/man/teal_modules.Rd @@ -45,25 +45,25 @@ For \code{modules()} defaults to \code{"root"}. See \code{Details}.} \item{server}{(\code{function}) \code{shiny} module with following arguments: \itemize{ \item \code{id} - \code{teal} will set proper \code{shiny} namespace for this module (see \code{\link[shiny:moduleServer]{shiny::moduleServer()}}). -\item \code{input}, \code{output}, \code{session} - (optional; not recommended) If present, then \code{\link[shiny:callModule]{shiny::callModule()}} +\item \code{input}, \code{output}, \code{session} - (optional; not recommended) When provided, then \code{\link[shiny:callModule]{shiny::callModule()}} will be used to call a module. From \code{shiny} 1.5.0, the recommended way is to use \code{\link[shiny:moduleServer]{shiny::moduleServer()}} instead which doesn't require these arguments. -\item \code{data} (optional) If present, the module will be called with \code{teal_data} object (i.e. a list of +\item \code{data} (optional) When provided, the module will be called with \code{teal_data} object (i.e. a list of reactive (filtered) data specified in the \code{filters} argument) as the value of this argument. -\item \code{datasets} (optional) If present, the module will be called with \code{FilteredData} object as the +\item \code{datasets} (optional) When provided, the module will be called with \code{FilteredData} object as the value of this argument. (See \code{\link[teal.slice:FilteredData]{teal.slice::FilteredData}}). -\item \code{reporter} (optional) If present, the module will be called with \code{Reporter} object as the value +\item \code{reporter} (optional) When provided, the module will be called with \code{Reporter} object as the value of this argument. (See \code{\link[teal.reporter:Reporter]{teal.reporter::Reporter}}). -\item \code{filter_panel_api} (optional) If present, the module will be called with \code{FilterPanelAPI} object +\item \code{filter_panel_api} (optional) When provided, the module will be called with \code{FilterPanelAPI} object as the value of this argument. (See \code{\link[teal.slice:FilterPanelAPI]{teal.slice::FilterPanelAPI}}). -\item \code{...} (optional) If present, \code{server_args} elements will be passed to the module named argument +\item \code{...} (optional) When provided, \code{server_args} elements will be passed to the module named argument or to the \code{...}. }} \item{ui}{(\code{function}) \code{shiny} UI module function with following arguments: \itemize{ \item \code{id} - \code{teal} will set proper \code{shiny} namespace for this module. -\item \code{...} (optional) If present, \code{ui_args} elements will be passed to the module named argument +\item \code{...} (optional) When provided, \code{ui_args} elements will be passed to the module named argument or to the \code{...}. }} diff --git a/man/validate_inputs.Rd b/man/validate_inputs.Rd index 64d63638fb..50ae876d0e 100644 --- a/man/validate_inputs.Rd +++ b/man/validate_inputs.Rd @@ -2,7 +2,7 @@ % Please edit documentation in R/validate_inputs.R \name{validate_inputs} \alias{validate_inputs} -\title{Send input validation messages to output.} +\title{Send input validation messages to output} \usage{ validate_inputs(..., header = "Some inputs require attention") }