rstudio / fontawesome

Easily insert FontAwesome icons into R Markdown docs and Shiny apps
https://rstudio.github.io/fontawesome/
Other
296 stars 39 forks source link

Verify FA - Turn off globally #95

Closed JohnCoene closed 1 year ago

JohnCoene commented 1 year ago

My console is flooded with:

This Font Awesome icon ('search') does not exist:
* if providing a custom `html_dependency` these `name` checks can 
  be deactivated with `verify_fa = FALSE`

It's available because I imported from CDN separately (maybe not the right way about it). Could the verify_fa in the fa_i function (used by shiny::icon) default to an option so we can easily turn that off globally? fa_i(..., verify_fa = getOption("htmltools.verify_fa"))

rich-iannone commented 1 year ago

Thanks for reporting this and, also, sorry about the current way that it's working.

There's no opportunity to set verify_fa from shiny::icon(), which is frustrating enough but I think your idea of having the new verify_fa argument in icon() default to a global option is a good one.

Once https://github.com/rstudio/fontawesome/pull/96 is merged and fontawesome gets a new CRAN release, I'll open a PR to make those changes in shiny::icon().

rich-iannone commented 1 year ago

Actually, it'll be better than that. We've decided to remove verify_fa and icon name deprecation messages entirely. Upon merging #96 there's nothing further to do (except release to CRAN).

daattali commented 1 year ago

I didn't want to open a new issue to ask, but was there a regression bug in the current CRAN release (0.3.0) that causes a lot of icons to not be known? I'm getting this message even for "cog" and "sliders-h" and "file-alt", which I've been using in my code for many years and they never caused warning messages until now.