cli icon indicating copy to clipboard operation
cli copied to clipboard

mark `cli_alert*()` functions as superseded

Open simonpcouch opened this issue 1 year ago • 2 comments
trafficstars

Working on a cli cheatsheet with a tidy dev day participant and we were trying to figure out how cli_alert*() functions should be situated in the cheatsheet. It was my sense that they are essentially a different way of wrapping cli__message() that automatically prepend the x and ! icons, and their use case wasn't clear to me—Hadley confirmed that those functions are now superseded in favor of e.g. cli_inform() with named elements.

The cli_alert*() functions likely ought to be marked as superseded in the documentation and removed (or pushed later) from the first section of "Building a semantic cli."

simonpcouch avatar Aug 15 '24 17:08 simonpcouch

If superseded, these lines/content should be updated:

Move into Superseded section of Reference Index: https://github.com/r-lib/cli/blob/2ddcc1af364cf6737a06cec8a344a52b26dd9afa/_pkgdown.yml#L64-L68

Remove from Building a Semantic CLI vignette https://github.com/r-lib/cli/blob/2ddcc1af364cf6737a06cec8a344a52b26dd9afa/vignettes/semantic-cli.Rmd#L59-L82

cynthiahqy avatar Aug 15 '24 18:08 cynthiahqy

cli_alert_*() also appears in the usethis_ui vignette -- e.g. https://cli.r-lib.org/articles/usethis-ui.html#with-cli-8

cynthiahqy avatar Aug 15 '24 21:08 cynthiahqy

I don't think they are superseded, they are an alternative to cli_inform(). They also work well with progress bars, whereas cli_inform() does not, unfortunately.

gaborcsardi avatar Feb 10 '25 11:02 gaborcsardi