rstudio / shinydashboard

Shiny Dashboarding framework
https://rstudio.github.io/shinydashboard/
Other
896 stars 298 forks source link

messageItem() with timestamp produces warning #373

Open samssann opened 3 years ago

samssann commented 3 years ago

Function messageItem() uses shiny::icon("clock-o") which produces a warning for non-existent icons in the new shiny >= 1.7.0 and fontawesome framework. There are two easy options to fix this:

  1. add verify_fa = FALSE argument to shiny::icon()
  2. use shiny::icon("clock") or fontawesome::fa("clock")
    > shinydashboard::messageItem
    function (from, message, icon = shiny::icon("user"), time = NULL, 
    href = NULL) 
    {
    tagAssert(icon, type = "i")
    if (is.null(href)) 
        href <- "#"
    tags$li(a(href = href, icon, h4(from, if (!is.null(time)) 
        tags$small(shiny::icon("clock-o"), time)), p(message)))
    }
    > shiny::icon("clock-o")
    This Font Awesome icon ('clock-o') does not exist:
    * if providing a custom `html_dependency` these `name` checks can 
    be deactivated with `verify_fa = FALSE`

    Package information shinydashboard 0.7.2 shiny 1.7.1 fontawesome 0.2.2