-
Notifications
You must be signed in to change notification settings - Fork 217
Closed
Milestone
Description
Lines 567 to 584 in e263689
| if (is.character(rlang::eval_tidy(fn))) { | |
| palette <- rlang::eval_tidy(fn) | |
| fn <- NULL | |
| cli::cli_warn(c( | |
| "Since gt v0.9.0, the `colors` argument has been deprecated.", | |
| "*" = "Please use the `palette` argument to define a color palette." | |
| )) | |
| } else { | |
| cli::cli_warn(c( | |
| "Since gt v0.9.0, the `colors` argument has been deprecated.", | |
| "*" = "Please use the `fn` argument instead." | |
| )) | |
| } | |
gt 0.9.0 deprecates the colors argument in data_color and prints the warning on every call.
Can this be changed to a "once every 8 hours" deprecation warning?
It's possible to do this with either lifcycle (which is a reverse dependency through ggplot2) or by passing .frequency and .frequency_id arguments in the cli_warning like
cli::cli_warn(
c(
"Since gt v0.9.0, the `colors` argument has been deprecated.",
"*" = "Please use the `palette` argument to define a color palette."
),
.frequency = "regularly",
.frequency_id = "data_color_warning"
)
#> Warning: Since gt v0.9.0, the `colors` argument has been deprecated.
#> • Please use the `palette` argument to define a color palette.
#> This warning is displayed once every 8 hours.Reactions are currently unavailable
Metadata
Metadata
Assignees
Type
Projects
Status
Done