Skip to content

Commit

Permalink
update docs of module() server and ui args (#1094)
Browse files Browse the repository at this point in the history
Signed-off-by: Pawel Rucki <[email protected]>
Co-authored-by: 27856297+dependabot-preview[bot]@users.noreply.github.com <27856297+dependabot-preview[bot]@users.noreply.github.com>
  • Loading branch information
pawelru and dependabot-preview[bot] authored Feb 13, 2024
1 parent 33ebb42 commit 45b8c70
Show file tree
Hide file tree
Showing 10 changed files with 40 additions and 26 deletions.
2 changes: 1 addition & 1 deletion R/module_snapshot_manager.R
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#' Filter state snapshot management.
#' Filter state snapshot management
#'
#' Capture and restore snapshots of the global (app) filter state.
#'
Expand Down
2 changes: 1 addition & 1 deletion R/module_tabs_with_filters.R
Original file line number Diff line number Diff line change
@@ -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.
Expand Down
2 changes: 1 addition & 1 deletion R/module_teal_with_splash.R
Original file line number Diff line number Diff line change
@@ -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")`
#'
Expand Down
25 changes: 16 additions & 9 deletions R/modules.R
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#' Create `teal_module` and `teal_modules` objects.
#' Create `teal_module` and `teal_modules` objects
#'
#' @description
#' `r lifecycle::badge("stable")`
Expand All @@ -22,16 +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` - (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
#' 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 `...`.
#' - `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) 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) When provided, the module will be called with `FilteredData` object as the
#' value of this argument. (See [`teal.slice::FilteredData`]).
#' - `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) When provided, the module will be called with `FilterPanelAPI` object
#' as the value of this argument. (See [`teal.slice::FilterPanelAPI`]).
#' - `...` (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) `ui_args` elements will be passed to the module named argument or to the `...`.
#' - `...` (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
#' filter panel will automatically update the shown filters to include only
Expand Down
2 changes: 1 addition & 1 deletion R/validate_inputs.R
Original file line number Diff line number Diff line change
@@ -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`.
Expand Down
2 changes: 1 addition & 1 deletion man/module_tabs_with_filters.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion man/module_teal_with_splash.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion man/snapshot_manager_module.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

25 changes: 16 additions & 9 deletions man/teal_modules.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion man/validate_inputs.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 45b8c70

Please sign in to comment.