Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

52 standardise optional notation #231

Merged
merged 13 commits into from
Mar 14, 2024
2 changes: 1 addition & 1 deletion R/nested_closeable_modal.R
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
#' Note that this id can be used to show/hide this modal
#' with the appended `jQuery` methods show/hide.
#' @param ... (`shiny.tag`) `shiny` UI elements that will be displayed in the modal UI
#' @param modal_args (`list`) optional list of arguments for the `shiny::modalDialog` function
#' @param modal_args (`list`) optional, list of arguments for the `shiny::modalDialog` function
kartikeyakirar marked this conversation as resolved.
Show resolved Hide resolved
#' to customize the modal. Has `easyClose` set to `TRUE` as default
#'
#' @return (`shiny.tag`) returns `HTML` for `shiny` module UI which can be nested into a modal popup
Expand Down
16 changes: 8 additions & 8 deletions R/optionalInput.R
Original file line number Diff line number Diff line change
Expand Up @@ -13,13 +13,13 @@
#' A separator string to split the `choices` or `selected` inputs into the values of the different
#' columns.
#'
#' @param label_help (`shiny.tag` optional)\cr
#' @param label_help (`shiny.tag`) optional,\cr
#' e.g. an object returned by [shiny::helpText()].
#'
#' @param fixed (`logical(1)` optional)\cr
#' @param fixed (`logical(1)`) optional,\cr
#' whether to block user to select choices.
#'
#' @param fixed_on_single (`logical(1)` optional)\cr
#' @param fixed_on_single (`logical(1)`) optional,\cr
#' whether to block user to select a choice when there is only one or less choice.
#' When `FALSE`, user is still able to select or deselect the choice.
#'
Expand Down Expand Up @@ -456,9 +456,9 @@ extract_raw_choices <- function(choices, sep) {
#' input widgets that provide only a single choice.
#'
#' @inheritParams shiny::sliderInput
#' @param label_help (`shiny.tag`, optional)\cr
#' @param label_help (`shiny.tag`) optional,\cr
#' an object of class `shiny.tag`. E.g. an object returned by [shiny::helpText()]
kartikeyakirar marked this conversation as resolved.
Show resolved Hide resolved
#' @param ... optional arguments to `sliderInput`
#' @param ... optional, arguments to `sliderInput`
kartikeyakirar marked this conversation as resolved.
Show resolved Hide resolved
#'
#' @return (`shiny.tag`) HTML tag with `sliderInput` widget.
#'
Expand Down Expand Up @@ -508,8 +508,8 @@ optionalSliderInput <- function(inputId, label, min, max, value, label_help = NU
}
}

#' For `teal` modules we parameterize an \code{optionalSliderInput} with one argument
#' \code{value_min_max}
#' For `teal` modules we parameterize an `optionalSliderInput` with one argument
#' `value_min_max`
#'
#' @description `r lifecycle::badge("stable")`
#' The [optionalSliderInput()] function needs three arguments to determine
Expand Down Expand Up @@ -566,7 +566,7 @@ optionalSliderInputValMinMax <- function(inputId, label, value_min_max, label_he
#'
#' @param choices (`list` or `vector`)\cr
#' select choices
#' @param values (optional)\cr
#' @param values optional,\cr
kartikeyakirar marked this conversation as resolved.
Show resolved Hide resolved
#' choices subset for which labels should be extracted, `NULL` for all choices.
#'
#' @return (`character`) vector with labels
Expand Down
4 changes: 2 additions & 2 deletions R/panel_group.R
Original file line number Diff line number Diff line change
Expand Up @@ -78,9 +78,9 @@ panel_group <- function(..., id = NULL) {
#' Designed to be grouped using [`panel_group`] element. Used to handle `shiny` inputs in the encoding panel.
#' @param title (`character`)\cr title of panel
#' @param ... content of panel
#' @param collapsed (`logical`, optional)\cr
#' @param collapsed (`logical`) optional,\cr
#' whether to initially collapse panel
#' @param input_id (`character`, optional)\cr
#' @param input_id (`character`) optional,\cr
kartikeyakirar marked this conversation as resolved.
Show resolved Hide resolved
#' name of the panel item element. If supplied, this will register a shiny input variable that
#' indicates whether the panel item is open or collapsed and is accessed with `input$input_id`.
#'
Expand Down
14 changes: 7 additions & 7 deletions R/plot_with_settings.R
Original file line number Diff line number Diff line change
Expand Up @@ -73,33 +73,33 @@ plot_with_settings_ui <- function(id) {
#' `reactive` expression or a simple `function` to draw a plot.
#' A simple `function` is needed e.g. for base plots like `plot(1)` as the output can not be caught when downloading.
#' Take into account that simple functions are less efficient than reactive, as not catching the result.
#' @param height (`numeric`, optional)\cr
#' @param height (`numeric`) optional,\cr
kartikeyakirar marked this conversation as resolved.
Show resolved Hide resolved
#' vector with three elements c(VAL, MIN, MAX), where VAL is the starting value of the slider in
#' the main and modal plot display. The value in the modal display is taken from the value of the
#' slider in the main plot display.
#' @param width (`numeric`, optional)\cr
#' @param width (`numeric`) optional,\cr
kartikeyakirar marked this conversation as resolved.
Show resolved Hide resolved
#' vector with three elements `c(VAL, MIN, MAX)`, where VAL is the starting value of the slider in
#' the main and modal plot display; `NULL` for default display. The value in the modal
#' display is taken from the value of the slider in the main plot display.
#' @param show_hide_signal optional, (\code{reactive logical} a mechanism to allow modules which call this
#' @param show_hide_signal optional, (`reactive logical` a mechanism to allow modules which call this
#' module to show/hide the plot_with_settings UI)
#' @param brushing (`logical`, optional)\cr
#' @param brushing (`logical`) optional,\cr
#' a mechanism to enable / disable brushing on the main plot (in particular: not the one displayed
kartikeyakirar marked this conversation as resolved.
Show resolved Hide resolved
#' in modal). All the brushing data is stored as a reactive object in the `"brush"` element of
#' returned list. See the example for details.
#' @param clicking (`logical`)\cr
#' a mechanism to enable / disable clicking on data points on the main plot (in particular: not the
#' one displayed in modal). All the clicking data is stored as a reactive object in the `"click"`
#' element of returned list. See the example for details.
#' @param dblclicking (`logical`, optional)\cr
#' @param dblclicking (`logical`) optional,\cr
#' a mechanism to enable / disable double-clicking on data points on the main plot (in particular:
kartikeyakirar marked this conversation as resolved.
Show resolved Hide resolved
#' not the one displayed in modal). All the double clicking data is stored as a reactive object in
#' the `"dblclick"` element of returned list. See the example for details.
#' @param hovering (`logical(1)`, optional)\cr
#' @param hovering (`logical(1)`) optional,\cr
#' a mechanism to enable / disable hovering over data points on the main plot (in particular: not
kartikeyakirar marked this conversation as resolved.
Show resolved Hide resolved
#' the one displayed in modal). All the hovering data is stored as a reactive object in the
#' `"hover"` element of returned list. See the example for details.
#' @param graph_align (`character(1)`, optional)\cr
#' @param graph_align (`character(1)`) optional,\cr
#' one of `"left"` (default), `"center"`, `"right"` or `"justify"`. The alignment of the graph on
#' the main page.
#'
Expand Down
6 changes: 3 additions & 3 deletions R/standard_layout.R
Original file line number Diff line number Diff line change
Expand Up @@ -12,12 +12,12 @@
#' panel on the right is created.
#' @param forms (`tagList`)\cr
#' for example [shiny::actionButton()] that are placed below the encodings panel
#' @param pre_output (`shiny.tag`, optional)\cr
#' @param pre_output (`shiny.tag`) optional,\cr
#' with text placed before the output to put the output into context. For example a title.
#' @param post_output (`shiny.tag`, optional) with text placed after the output to put the output
#' @param post_output (`shiny.tag`) optional, with text placed after the output to put the output
#' into context. For example the [shiny::helpText()] elements are useful.
#'
#' @return an object of class \code{shiny.tag} with the UI code.
#' @return an object of class `shiny.tag` with the UI code.
#'
#' @examples
#' library(shiny)
Expand Down
2 changes: 1 addition & 1 deletion R/table_with_settings.R
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ table_with_settings_ui <- function(id, ...) {
#' @inheritParams shiny::moduleServer
#' @param table_r (`reactive`)\cr
#' reactive expression that yields an `rtable` object (`ElementaryTable` or `TableTree`)
#' @param show_hide_signal (`reactive logical`, optional)\cr
#' @param show_hide_signal (`reactive logical`) optional,\cr
#' a mechanism to allow modules which call this module to show/hide the table_with_settings UI.
kartikeyakirar marked this conversation as resolved.
Show resolved Hide resolved
#'
#' @rdname table_with_settings
Expand Down
2 changes: 1 addition & 1 deletion R/utils.R
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ apply_plot_modifications <- function(plot_obj, plot_type, dblclicking, ranges) {
}
}

#' This function opens a PDF graphics device using \code{\link[grDevices]{pdf}} to suppress
#' This function opens a PDF graphics device using [grDevices::pdf()] to suppress
#' the plot display in the IDE. The purpose of this function is to avoid opening graphic devices
#' directly in the IDE.
#'
Expand Down
2 changes: 1 addition & 1 deletion man/extract_choices_labels.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/nested_closeable_modal.Rd

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

6 changes: 3 additions & 3 deletions man/optionalSelectInput.Rd

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

4 changes: 2 additions & 2 deletions man/optionalSliderInput.Rd

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

4 changes: 2 additions & 2 deletions man/optionalSliderInputValMinMax.Rd

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

4 changes: 2 additions & 2 deletions man/panel_item.Rd

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

4 changes: 2 additions & 2 deletions man/plot_suppress.Rd

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

14 changes: 7 additions & 7 deletions man/plot_with_settings.Rd

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

4 changes: 2 additions & 2 deletions man/standard_layout.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/table_with_settings.Rd

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

Loading