r-lib / cli

Tools for making beautiful & useful command line interfaces
https://cli.r-lib.org/
Other
644 stars 69 forks source link

mark `cli_alert*()` functions as superseded #715

Open simonpcouch opened 1 month ago

simonpcouch commented 1 month ago

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."

cynthiahqy commented 1 month ago

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 commented 1 month ago

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