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 edbab37
Showing 1 changed file with 3 additions and 3 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

0 comments on commit edbab37

Please sign in to comment.