diff --git a/.github/workflows/R-CMD-check.yaml b/.github/workflows/R-CMD-check.yaml index 46ec288b2..592a6d2b2 100644 --- a/.github/workflows/R-CMD-check.yaml +++ b/.github/workflows/R-CMD-check.yaml @@ -75,7 +75,7 @@ jobs: - name: Mac systemdeps if: runner.os == 'macOS' run: | - brew cask install xquartz + brew install --cask xquartz brew install cairo brew install harfbuzz fribidi diff --git a/R/devmode.R b/R/devmode.R index fb0456a5b..eda04eb1c 100644 --- a/R/devmode.R +++ b/R/devmode.R @@ -6,9 +6,11 @@ #' easier, like enabling non-minified JS and printing messages about #' deprecated functions and options. #' +#' Shiny Developer Mode can be enabled by calling `devmode(TRUE)` and disabled +#' by calling `devmode(FALSE)`. +#' #' Please see the function descriptions for more details. #' -#' @keywords internal #' @describeIn devmode Function to set two options to enable/disable Shiny #' Developer Mode and Developer messages #' @param devmode Logical value which should be set to `TRUE` to enable Shiny @@ -151,7 +153,6 @@ with_devmode <- function( #' @describeIn devmode If Shiny Developer Mode and verbosity are enabled, #' displays a message once every 8 hrs (by default) -#' @inheritParams rlang::inform #' @param message Developer Mode message to be sent to [rlang::inform()] #' @param .frequency Frequency of the Developer Mode message used with #' [rlang::inform()]. Defaults to once every 8 hours. @@ -233,11 +234,14 @@ registered_devmode_options <- Map$new() #' ) #' ``` #' @param name Name of option to look for in `options()` +#' @param default Default value to return if `in_devmode()` returns +#' `TRUE` and the specified option is not set in [`options()`]. #' @param devmode_message Message to display once every 8 hours when utilizing #' the `devmode_default` value. If `devmode_message` is missing, the #' registered `devmode_message` value be used. #' @param devmode_default Default value to return if `in_devmode()` returns -#' `TRUE`. For `get_devmode_option()`, if `devmode_default` is missing, the +#' `TRUE` and the specified option is not set in [`options()`]. For +#' `get_devmode_option()`, if `devmode_default` is missing, the #' registered `devmode_default` value will be used. #' @examples #' # Ex: Within shiny, we register the option "shiny.minified" diff --git a/man/devmode.Rd b/man/devmode.Rd index bc3fa6a77..f6d7ef9cc 100644 --- a/man/devmode.Rd +++ b/man/devmode.Rd @@ -63,8 +63,12 @@ the \code{devmode_default} value. If \code{devmode_message} is missing, the registered \code{devmode_message} value be used.} \item{devmode_default}{Default value to return if \code{in_devmode()} returns -\code{TRUE}. For \code{get_devmode_option()}, if \code{devmode_default} is missing, the +\code{TRUE} and the specified option is not set in \code{\link[=options]{options()}}. For +\code{get_devmode_option()}, if \code{devmode_default} is missing, the registered \code{devmode_default} value will be used.} + +\item{default}{Default value to return if \code{in_devmode()} returns +\code{TRUE} and the specified option is not set in \code{\link[=options]{options()}}.} } \description{ \lifecycle{experimental} @@ -73,6 +77,9 @@ Developer Mode enables a number of \code{\link[=options]{options()}} to make a d easier, like enabling non-minified JS and printing messages about deprecated functions and options. +Shiny Developer Mode can be enabled by calling \code{devmode(TRUE)} and disabled +by calling \code{devmode(FALSE)}. + Please see the function descriptions for more details. } \section{Functions}{ @@ -256,4 +263,3 @@ is_minified <- with_devmode(TRUE, { is_minified # FALSE } -\keyword{internal} diff --git a/tools/documentation/checkPkgdown.R b/tools/documentation/checkPkgdown.R index 3ab276bac..75f9dfd64 100644 --- a/tools/documentation/checkPkgdown.R +++ b/tools/documentation/checkPkgdown.R @@ -35,7 +35,7 @@ local({ "pageWithSidebar", "headerPanel", "shiny.appobj", "deprecatedReactives", "reexports", "makeReactiveBinding", "reactiveConsole", "registerThemeDependency", - "memoryCache", "diskCache", "shinyDeprecated", "devmode") + "memoryCache", "diskCache", "shinyDeprecated") ## This test ensures that every documented topic is included in ## staticdocs/index.r, unless explicitly waived by specifying it diff --git a/tools/documentation/pkgdown.yml b/tools/documentation/pkgdown.yml index 3f163ddae..f0a0af542 100644 --- a/tools/documentation/pkgdown.yml +++ b/tools/documentation/pkgdown.yml @@ -166,6 +166,7 @@ reference: - title: Utility functions desc: Miscellaneous utilities that may be useful to advanced users or when extending Shiny. contents: + - devmode - shinyAppTemplate - req - validate