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

Support package specific themes #256

Open
gaborcsardi opened this issue Apr 22, 2021 · 1 comment
Open

Support package specific themes #256

gaborcsardi opened this issue Apr 22, 2021 · 1 comment
Labels
feature a feature request or enhancement

Comments

@gaborcsardi
Copy link
Member

gaborcsardi commented Apr 22, 2021

So a package could register a theme, and then this would be used when printing errors from that package, using topenv().

This is still not ideal, though. E.g. if I define custom formatting for a (say) processx::process object, then that should be used, always, when formatting such an object.

Maybe cli_format() or rather a similar function could return a style instead of the formatted string, and then this style would be applied for .val? And the function would be S3, so it would be always used.

So these are actually two different features.

@gaborcsardi gaborcsardi added the feature a feature request or enhancement label Apr 22, 2021
@sda030
Copy link

sda030 commented Nov 3, 2022

If I can chip in on your first statement, if I understand you correctly. I think it would lead to a nightmare if each package can implement their own formatting theme for their error and warnings. Not only would it be difficult for beginners and users with visual impairments to struggle with various ways of communicating the same thing, but also for regular users who prefer consistency. But beyond errors and warnings, I would not have nightmares. :) (P.S. Among my top-5 favourite packages)

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

No branches or pull requests

2 participants