diff --git a/R/verbatim_popup.R b/R/verbatim_popup.R index 2c72979a..f2f4d3ed 100644 --- a/R/verbatim_popup.R +++ b/R/verbatim_popup.R @@ -1,11 +1,11 @@ -#' A `shiny` module that pops up verbatim text +#' A `shiny` module that pops up verbatim text. #' @name verbatim_popup #' @description `r lifecycle::badge("experimental")` #' This module consists of a button that once clicked pops up a #' modal window with verbatim-styled text. #' #' @param id (`character(1)`) the `shiny` id -#' @param button_label (`charater(1)`) the text printed on the button +#' @param button_label (`character(1)`) the text printed on the button #' @param ... additional arguments to `[shiny::actionButton()]` #' #' @return the UI function returns a `shiny.tag.list` object @@ -20,6 +20,7 @@ #' verbatim_popup_ui <- function(id, button_label, ...) { checkmate::assert_string(id) + checkmate::assert_string(button_label) ns <- shiny::NS(id) shiny::tagList( shiny::tags$head(shiny::singleton( @@ -64,7 +65,7 @@ verbatim_popup_srv <- function(id, verbatim_content, title, disabled = shiny::re }) } -#' Creates a `shiny` observer handling the disabled flag +#' Creates a `shiny` observer handling the disabled flag. #' #' @details #' When the flag is `TRUE` the button to open the popup is disabled; it is enabled otherwise. @@ -87,6 +88,9 @@ disabled_flag_observer <- function(disabled_flag, button_id) { #' Creates a `shiny` observer handling button clicks. #' +#' @description +#' When the button is clicked it pop up a modal window with the text. +#' #' @keywords internal #' @param click_event `reactive` the click event #' @param copy_button_id (`character(1)`) the id of the button to copy the modal content diff --git a/man/button_click_observer.Rd b/man/button_click_observer.Rd index 8d998288..0b1a6aeb 100644 --- a/man/button_click_observer.Rd +++ b/man/button_click_observer.Rd @@ -24,6 +24,6 @@ button_click_observer( \item{modal_content}{(\code{reactive}) the content of the modal window} } \description{ -Creates a \code{shiny} observer handling button clicks. +When the button is clicked it pop up a modal window with the text. } \keyword{internal} diff --git a/man/disabled_flag_observer.Rd b/man/disabled_flag_observer.Rd index 94cc17ee..4eab7d7a 100644 --- a/man/disabled_flag_observer.Rd +++ b/man/disabled_flag_observer.Rd @@ -2,7 +2,7 @@ % Please edit documentation in R/verbatim_popup.R \name{disabled_flag_observer} \alias{disabled_flag_observer} -\title{Creates a \code{shiny} observer handling the disabled flag} +\title{Creates a \code{shiny} observer handling the disabled flag.} \usage{ disabled_flag_observer(disabled_flag, button_id) } @@ -12,7 +12,7 @@ disabled_flag_observer(disabled_flag, button_id) \item{button_id}{(\code{character(1)}) the id of the controlled button} } \description{ -Creates a \code{shiny} observer handling the disabled flag +Creates a \code{shiny} observer handling the disabled flag. } \details{ When the flag is \code{TRUE} the button to open the popup is disabled; it is enabled otherwise. diff --git a/man/verbatim_popup.Rd b/man/verbatim_popup.Rd index e050dbaa..a89c332f 100644 --- a/man/verbatim_popup.Rd +++ b/man/verbatim_popup.Rd @@ -4,7 +4,7 @@ \alias{verbatim_popup} \alias{verbatim_popup_ui} \alias{verbatim_popup_srv} -\title{A \code{shiny} module that pops up verbatim text} +\title{A \code{shiny} module that pops up verbatim text.} \usage{ verbatim_popup_ui(id, button_label, ...) @@ -18,7 +18,7 @@ verbatim_popup_srv( \arguments{ \item{id}{(\code{character(1)}) the \code{shiny} id} -\item{button_label}{(\code{charater(1)}) the text printed on the button} +\item{button_label}{(\code{character(1)}) the text printed on the button} \item{...}{additional arguments to \verb{[shiny::actionButton()]}}