Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

mark cli_alert*() functions as superseded #715

Open
simonpcouch opened this issue Aug 15, 2024 · 2 comments
Open

mark cli_alert*() functions as superseded #715

simonpcouch opened this issue Aug 15, 2024 · 2 comments

Comments

@simonpcouch
Copy link
Contributor

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
Copy link
Contributor

If superseded, these lines/content should be updated:

Move into Superseded section of Reference Index:

cli/_pkgdown.yml

Lines 64 to 68 in 2ddcc1a

- cli_alert
- cli_alert_danger
- cli_alert_info
- cli_alert_success
- cli_alert_warning

Remove from Building a Semantic CLI vignette

## Alerts
Alerts are typically short messages.
cli has four types of alerts (success, info, warning, danger) and also a generic alert type:
```{asciicast}
cli_alert_success("Updated database.")
```
```{asciicast}
cli_alert_info("Reopened database.")
```
```{asciicast}
cli_alert_warning("Cannot reach GitHub, using local database cache.")
```
```{asciicast}
cli_alert_danger("Failed to connect to database.")
```
```{asciicast}
cli_alert("A generic alert")
```

@cynthiahqy
Copy link
Contributor

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants