Skip to content

Commit

Permalink
Respect usethis.quiet.
Browse files Browse the repository at this point in the history
  • Loading branch information
olivroy committed Jan 17, 2024
1 parent 199bbf8 commit c095f08
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 9 deletions.
6 changes: 3 additions & 3 deletions R/ui.R
Original file line number Diff line number Diff line change
Expand Up @@ -62,20 +62,20 @@ ui_line <- function(x = character(), .envir = parent.frame()) {
#' @export
ui_todo <- function(x, .envir = parent.frame()) {
# No longer red
cli::cli_ul(x, .envir = .envir)
if (!is_quiet()) cli::cli_ul(x, .envir = .envir)
}

#' @rdname ui
#' @export
ui_done <- function(x, .envir = parent.frame()) {
cli::cli_alert_success(paste(x, collapse = "\n\u00a0\u00a0"), .envir = .envir)
if (!is_quiet()) cli::cli_alert_success(paste(x, collapse = "\n\u00a0\u00a0"), .envir = .envir)
}

#' @rdname ui
#' @export
ui_oops <- function(x, .envir = parent.frame()) {
# Adding collapse = "\n " so that the text is aligned in multiple lines.
cli::cli_alert_danger(paste(x, collapse = "\n\u00a0\u00a0"), .envir = .envir)
if (!is_quiet()) cli::cli_alert_danger(paste(x, collapse = "\n\u00a0\u00a0"), .envir = .envir)
}

#' @rdname ui
Expand Down
6 changes: 0 additions & 6 deletions tests/testthat/_snaps/tidyverse.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,5 @@
v Adding "@importFrom glue glue" to 'R/{TESTPKG}-package.R'
v Adding "@importFrom lifecycle deprecated" to 'R/{TESTPKG}-package.R'
v Writing 'NAMESPACE'
v Creating 'man/figures/'
v Copied SVG badges to 'man/figures/'
* Add badges in documentation topics by inserting one of:
#' `r lifecycle::badge('experimental')`
#' `r lifecycle::badge('superseded')`
#' `r lifecycle::badge('deprecated')`
v Writing 'R/import-standalone-purrr.R'

0 comments on commit c095f08

Please sign in to comment.