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

Switch to Font Awesome 6 icon names #388

Closed
wants to merge 2 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions R/boxes.R
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ valueBox <- function(value, subtitle, icon = NULL, color = "aqua", width = 4,
#'
#' @export
infoBox <- function(title, value = NULL, subtitle = NULL,
icon = shiny::icon("bar-chart"), color = "aqua", width = 4, href = NULL,
icon = shiny::icon("chart-column"), color = "aqua", width = 4, href = NULL,
fill = FALSE) {

validateColor(color)
Expand Down Expand Up @@ -137,7 +137,7 @@ infoBox <- function(title, value = NULL, subtitle = NULL,
#' "Orders", uiOutput("orderNum2"), "Subtitle", icon = icon("credit-card")
#' ),
#' infoBox(
#' "Approval Rating", "60%", icon = icon("line-chart"), color = "green",
#' "Approval Rating", "60%", icon = icon("chart-line"), color = "green",
#' fill = TRUE
#' ),
#' infoBox(
Expand All @@ -153,7 +153,7 @@ infoBox <- function(title, value = NULL, subtitle = NULL,
#' ),
#' valueBox(
#' tagList("60", tags$sup(style="font-size: 20px", "%")),
#' "Approval Rating", icon = icon("line-chart"), color = "green"
#' "Approval Rating", icon = icon("chart-line"), color = "green"
#' ),
#' valueBox(
#' htmlOutput("progress"), "Progress", icon = icon("users"), color = "purple"
Expand Down
10 changes: 5 additions & 5 deletions R/dashboardHeader.R
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@
#' notificationItem(icon = icon("users"), status = "info",
#' "5 new members joined today"
#' ),
#' notificationItem(icon = icon("warning"), status = "danger",
#' notificationItem(icon = icon("triangle-exclamation"), status = "danger",
#' "Resource usage near limit."
#' ),
#' notificationItem(icon = icon("shopping-cart", lib = "glyphicon"),
Expand Down Expand Up @@ -179,8 +179,8 @@ dropdownMenu <- function(...,
if (is.null(icon)) {
icon <- switch(type,
messages = shiny::icon("envelope"),
notifications = shiny::icon("warning"),
tasks = shiny::icon("tasks")
notifications = shiny::icon("triangle-exclamation"),
tasks = shiny::icon("list-check")
)
}

Expand Down Expand Up @@ -241,7 +241,7 @@ messageItem <- function(from, message, icon = shiny::icon("user"), time = NULL,
icon,
h4(
from,
if (!is.null(time)) tags$small(shiny::icon("clock-o"), time)
if (!is.null(time)) tags$small(shiny::icon("clock"), time)
),
p(message)
)
Expand All @@ -260,7 +260,7 @@ messageItem <- function(from, message, icon = shiny::icon("user"), time = NULL,
#' @family menu items
#' @seealso \code{\link{dashboardHeader}} for example usage.
#' @export
notificationItem <- function(text, icon = shiny::icon("warning"),
notificationItem <- function(text, icon = shiny::icon("triangle-exclamation"),
status = "success", href = NULL)
{
tagAssert(icon, type = "i")
Expand Down
10 changes: 5 additions & 5 deletions R/dashboardSidebar.R
Original file line number Diff line number Diff line change
Expand Up @@ -27,10 +27,10 @@
#' sidebarMenu(
#' # Setting id makes input$tabs give the tabName of currently-selected tab
#' id = "tabs",
#' menuItem("Dashboard", tabName = "dashboard", icon = icon("dashboard")),
#' menuItem("Widgets", icon = icon("th"), tabName = "widgets", badgeLabel = "new",
#' menuItem("Dashboard", tabName = "dashboard", icon = icon("gauge")),
#' menuItem("Widgets", icon = icon("table-cells"), tabName = "widgets", badgeLabel = "new",
#' badgeColor = "green"),
#' menuItem("Charts", icon = icon("bar-chart-o"),
#' menuItem("Charts", icon = icon("chart-bar"),
#' menuSubItem("Sub-item 1", tabName = "subitem1"),
#' menuSubItem("Sub-item 2", tabName = "subitem2")
#' )
Expand Down Expand Up @@ -186,7 +186,7 @@ sidebarUserPanel <- function(name, subtitle = NULL, image = NULL) {
#'
#' @export
sidebarSearchForm <- function(textId, buttonId, label = "Search...",
icon = shiny::icon("search")) {
icon = shiny::icon("magnifying-glass")) {
tags$form(class = "sidebar-form",
div(class = "input-group",
tags$input(id = textId, type = "text", class = "form-control",
Expand Down Expand Up @@ -453,7 +453,7 @@ menuItem <- function(text, ..., icon = NULL, badgeLabel = NULL, badgeColor = "gr
#' @rdname sidebarMenu
#' @export
menuSubItem <- function(text, tabName = NULL, href = NULL, newtab = TRUE,
icon = shiny::icon("angle-double-right"), selected = NULL)
icon = shiny::icon("angles-right"), selected = NULL)
{

if (!is.null(href) && !is.null(tabName)) {
Expand Down
2 changes: 1 addition & 1 deletion R/menuOutput.R
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ menuItemOutput <- function(outputId) {
#' server <- function(input, output) {
#' output$menu <- renderMenu({
#' sidebarMenu(
#' menuItem("Menu item", icon = icon("calendar"))
#' menuItem("Menu item", icon = icon("calendar-days"))
#' )
#' })
#' }
Expand Down
4 changes: 2 additions & 2 deletions R/tabs.R
Original file line number Diff line number Diff line change
Expand Up @@ -50,8 +50,8 @@ tabItem <- function(tabName = NULL, ...) {
#' dashboardSidebar(
#' sidebarMenu(
#' id = "tabs",
#' menuItem("Dashboard", tabName = "dashboard", icon = icon("dashboard")),
#' menuItem("Widgets", tabName = "widgets", icon = icon("th"))
#' menuItem("Dashboard", tabName = "dashboard", icon = icon("gauge")),
#' menuItem("Widgets", tabName = "widgets", icon = icon("table-cells"))
#' ),
#' actionButton('switchtab', 'Switch tab')
#' ),
Expand Down
14 changes: 7 additions & 7 deletions tests-manual/bigDash.R
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ header <- dashboardHeader(
"5 new members joined today"
),
notificationItem(
icon = icon("warning"),
icon = icon("triangle-exclamation"),
status = "danger",
"Resource usage near limit."
),
Expand Down Expand Up @@ -75,18 +75,18 @@ sidebar <- dashboardSidebar(
menuItem(
"Dashboard",
tabName = "dashboard",
icon = icon("dashboard")
icon = icon("gauge")
),
menuItem(
"Widgets",
icon = icon("th"),
icon = icon("table-cells"),
tabName = "widgets",
badgeLabel = "new",
badgeColor = "green"
),
menuItem(
"Charts",
icon = icon("bar-chart-o"),
icon = icon("chart-bar"),
menuSubItem("Sub-item 1", tabName = "subitem1"),
menuSubItem("Sub-item 2", tabName = "subitem2")
)
Expand Down Expand Up @@ -124,7 +124,7 @@ body <- dashboardBody(tabItems(
infoBox(
"Approval Rating",
"60%",
icon = icon("line-chart"),
icon = icon("chart-line"),
color = "green",
fill = TRUE
),
Expand All @@ -147,7 +147,7 @@ body <- dashboardBody(tabItems(
valueBox(
tagList("60", tags$sup(style = "font-size: 20px", "%")),
"Approval Rating",
icon = icon("line-chart"),
icon = icon("chart-line"),
color = "green"
),
valueBox(
Expand Down Expand Up @@ -251,7 +251,7 @@ server <- function(input, output) {
histdata <- rnorm(500)

output$menu <- renderMenu({
sidebarMenu(menuItem("Menu item", icon = icon("calendar")))
sidebarMenu(menuItem("Menu item", icon = icon("calendar-days")))
})

output$plot1 <- renderPlot({
Expand Down
6 changes: 3 additions & 3 deletions tests-manual/box.R
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ body <- dashboardBody(
"Orders", uiOutput("orderNum2"), "Subtitle", icon = icon("credit-card")
),
infoBox(
"Approval Rating", "60%", icon = icon("line-chart"), color = "green",
"Approval Rating", "60%", icon = icon("chart-line"), color = "green",
fill = TRUE
),
infoBox(
Expand All @@ -25,7 +25,7 @@ body <- dashboardBody(
),
valueBox(
tagList("60", tags$sup(style="font-size: 20px", "%")),
"Approval Rating", icon = icon("line-chart"), color = "green"
"Approval Rating", icon = icon("chart-line"), color = "green"
),
valueBox(
htmlOutput("progress"), "Progress", icon = icon("users"), color = "purple"
Expand Down Expand Up @@ -134,7 +134,7 @@ header <- dashboardHeader(
notificationItem(icon = icon("users"), status = "info",
"5 new members joined today"
),
notificationItem(icon = icon("warning"), status = "danger",
notificationItem(icon = icon("triangle-exclamation"), status = "danger",
"Resource usage near limit."
),
notificationItem(icon = icon("shopping-cart", lib = "glyphicon"),
Expand Down
2 changes: 1 addition & 1 deletion tests-manual/dashboardHeader.R
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ header <- dashboardHeader(
notificationItem(icon = icon("users"), status = "info",
"5 new members joined today"
),
notificationItem(icon = icon("warning"), status = "danger",
notificationItem(icon = icon("triangle-exclamation"), status = "danger",
"Resource usage near limit."
),
notificationItem(icon = icon("shopping-cart", lib = "glyphicon"),
Expand Down
6 changes: 3 additions & 3 deletions tests-manual/dashboardSidebar.R
Original file line number Diff line number Diff line change
Expand Up @@ -16,18 +16,18 @@ sidebar <- dashboardSidebar(
menuItem(
"Dashboard",
tabName = "dashboard",
icon = icon("dashboard")
icon = icon("gauge")
),
menuItem(
"Widgets",
icon = icon("th"),
icon = icon("table-cells"),
tabName = "widgets",
badgeLabel = "new",
badgeColor = "green"
),
menuItem(
"Charts",
icon = icon("bar-chart-o"),
icon = icon("chart-column"),
menuSubItem("Sub-item 1", tabName = "subitem1"),
menuSubItem("Sub-item 2", tabName = "subitem2")
)
Expand Down
2 changes: 1 addition & 1 deletion tests-manual/renderMenu.R
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ ui <- dashboardPage(
server <- function(input, output) {
output$menu <- renderMenu({
sidebarMenu(
menuItem("Menu item", icon = icon("calendar"))
menuItem("Menu item", icon = icon("calendar-days"))
)
})
}
Expand Down
6 changes: 3 additions & 3 deletions tests-manual/repro_issues_110.R
Original file line number Diff line number Diff line change
Expand Up @@ -17,18 +17,18 @@ sidebar <- dashboardSidebar(
menuItem(
"Dashboard",
tabName = "dashboard",
icon = icon("dashboard")
icon = icon("gauge")
),
menuItem(
"Widgets",
icon = icon("th"),
icon = icon("table-cells"),
tabName = "widgets",
badgeLabel = "new",
badgeColor = "green"
),
menuItem(
"Charts",
icon = icon("bar-chart-o"),
icon = icon("chart-column"),
menuSubItem("Sub-item 1", tabName = "subitem1"),
menuSubItem("Sub-item 2", tabName = "subitem2")
),
Expand Down
2 changes: 1 addition & 1 deletion tests-manual/repro_issues_229.R
Original file line number Diff line number Diff line change
Expand Up @@ -42,4 +42,4 @@ server <- shinyServer(function(input, output, session) {
})
})

shinyApp(ui, server)
shinyApp(ui, server)
2 changes: 1 addition & 1 deletion tests-manual/repro_issues_42.R
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ ui <- dashboardPage(
dashboardHeader(),
dashboardSidebar(
sidebarMenu(
menuItem("Inputs", icon = icon("bar-chart-o"), tabName = "tabOne"
menuItem("Inputs", icon = icon("chart-column"), tabName = "tabOne"
)
)
),
Expand Down
4 changes: 2 additions & 2 deletions tests-manual/updateTabItems.R
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@
dashboardSidebar(
sidebarMenu(
id = "tabs",
menuItem("Dashboard", tabName = "dashboard", icon = icon("dashboard")),
menuItem("Widgets", tabName = "widgets", icon = icon("th"))
menuItem("Dashboard", tabName = "dashboard", icon = icon("gauge")),
menuItem("Widgets", tabName = "widgets", icon = icon("table-cells"))
),
actionButton('switchtab', 'Switch tab')
),
Expand Down