diff --git a/R/data-summary.R b/R/data-summary.R index 62f5e0bf..27c11b3e 100644 --- a/R/data-summary.R +++ b/R/data-summary.R @@ -309,21 +309,29 @@ class_icons <- function(x) { lapply(x,class_icons) } else { if (identical(x, "numeric")) { - shiny::icon("calculator") + phosphoricons::ph("calculator") + # shiny::icon("calculator") } else if (identical(x, "factor")) { - shiny::icon("chart-simple") + phosphoricons::ph("chart-bar") + # shiny::icon("chart-simple") } else if (identical(x, "integer")) { - shiny::icon("arrow-down-1-9") + phosphoricons::ph("list-numbers") + # shiny::icon("arrow-down-1-9") } else if (identical(x, "character")) { - shiny::icon("arrow-down-a-z") + phosphoricons::ph("text-aa") + # shiny::icon("arrow-down-a-z") } else if (identical(x, "logical")) { - shiny::icon("toggle-off") + phosphoricons::ph("toggle-left") + # shiny::icon("toggle-off") } else if (any(c("Date", "POSIXt") %in% x)) { - shiny::icon("calendar-days") + phosphoricons::ph("calendar") + # shiny::icon("calendar-days") } else if (any("POSIXct", "hms") %in% x) { - shiny::icon("clock") + phosphoricons::ph("clock") + # shiny::icon("clock") } else { - shiny::icon("table") + phosphoricons::ph("calendar") + # shiny::icon("table") }} } @@ -342,21 +350,29 @@ type_icons <- function(x) { lapply(x,class_icons) } else { if (identical(x, "continuous")) { - shiny::icon("calculator") + phosphoricons::ph("calculator") + # shiny::icon("calculator") } else if (identical(x, "categorical")) { - shiny::icon("chart-simple") + phosphoricons::ph("chart-bar") + # shiny::icon("chart-simple") } else if (identical(x, "ordinal")) { - shiny::icon("arrow-down-1-9") + phosphoricons::ph("list-numbers") + # shiny::icon("arrow-down-1-9") } else if (identical(x, "text")) { - shiny::icon("arrow-down-a-z") + phosphoricons::ph("text-aa") + # shiny::icon("arrow-down-a-z") } else if (identical(x, "dichotomous")) { - shiny::icon("toggle-off") + phosphoricons::ph("toggle-left") + # shiny::icon("toggle-off") } else if (identical(x,"datetime")) { - shiny::icon("calendar-days") + phosphoricons::ph("calendar") + # shiny::icon("calendar-days") } else if (identical(x,"id")) { - shiny::icon("id-card") + phosphoricons::ph("identification-badge") + # shiny::icon("id-card") } else { - shiny::icon("table") + phosphoricons::ph("table") + # shiny::icon("table") } } } diff --git a/R/data_plots.R b/R/data_plots.R index 439b0ccf..bc1995e6 100644 --- a/R/data_plots.R +++ b/R/data_plots.R @@ -20,7 +20,8 @@ data_visuals_ui <- function(id, tab_title = "Plots", ...) { bslib::accordion_panel( value = "acc_pan_plot", title = "Create plot", - icon = bsicons::bs_icon("graph-up"), + icon = phosphoricons::ph("chart-line"), + # icon = bsicons::bs_icon("graph-up"), shiny::uiOutput(outputId = ns("primary")), shiny::helpText( i18n$t( @@ -37,7 +38,8 @@ data_visuals_ui <- function(id, tab_title = "Plots", ...) { inputId = ns("act_plot"), label = i18n$t("Plot"), width = "100%", - icon = shiny::icon("palette"), + icon = phosphoricons::ph("paint-brush"), + # icon = shiny::icon("palette"), disabled = FALSE ), shiny::helpText(i18n$t('Adjust settings, then press "Plot".')) @@ -45,7 +47,8 @@ data_visuals_ui <- function(id, tab_title = "Plots", ...) { bslib::accordion_panel( value = "acc_pan_download", title = "Download", - icon = bsicons::bs_icon("download"), + icon = phosphoricons::ph("download-simple"), + # icon = bsicons::bs_icon("download"), shinyWidgets::noUiSliderInput( inputId = ns("height_slide"), label = i18n$t("Plot height (mm)"), @@ -84,7 +87,8 @@ data_visuals_ui <- function(id, tab_title = "Plots", ...) { shiny::downloadButton( outputId = ns("download_plot"), label = i18n$t("Download plot"), - icon = shiny::icon("download") + icon = phosphoricons::ph("arrow-fat-down") + # icon = shiny::icon("download") ) ) ), diff --git a/R/landing_page_ui.R b/R/landing_page_ui.R index 1123640e..8301309a 100644 --- a/R/landing_page_ui.R +++ b/R/landing_page_ui.R @@ -37,20 +37,6 @@ landing_page_ui <- function(i18n) { div( class = "container my-5", - # Introduction text - # div( - # class = "row mb-5", - # div( - # class = "col-12 text-center", - # p( - # class = "lead", - # i18n$t("Start with FreesearchR for basic data evaluation and analysis."), - # i18n$t("When you need more advanced tools, you'll be better prepared to use R directly."), - # style = "font-size: 1.2rem; color: #555;" - # ) - # ) - # ), - # Core Features Section h2(i18n$t("Core Features"), class = "text-center mb-4", style = "color: #1E4A8F; font-weight: 600;"), @@ -68,7 +54,8 @@ landing_page_ui <- function(i18n) { class = "card-body text-center p-4", div( style = "font-size: 3rem; color: #1E4A8F; margin-bottom: 15px;", - fa("file-import") + phosphoricons::ph("folder-simple-plus", weight = "bold") + # fa("file-import") ), h4(i18n$t("Import Data"), class = "card-title", style = "color: #2D2D42; font-weight: 600;"), p( @@ -89,7 +76,8 @@ landing_page_ui <- function(i18n) { class = "card-body text-center p-4", div( style = "font-size: 3rem; color: #1E4A8F; margin-bottom: 15px;", - fa("pen-to-square") + phosphoricons::ph("note-pencil", weight = "bold") + # fa("pen-to-square") ), h4(i18n$t("Data Management"), class = "card-title", style = "color: #2D2D42; font-weight: 600;"), p( @@ -110,7 +98,8 @@ landing_page_ui <- function(i18n) { class = "card-body text-center p-4", div( style = "font-size: 3rem; color: #1E4A8F; margin-bottom: 15px;", - fa("magnifying-glass-chart") + phosphoricons::ph("magnifying-glass", weight = "bold") + # fa("magnifying-glass-chart") ), h4(i18n$t("Descriptive Statistics"), class = "card-title", style = "color: #2D2D42; font-weight: 600;"), p( @@ -135,7 +124,7 @@ landing_page_ui <- function(i18n) { style = "border-left: 4px solid #8A4FFF;", div( class = "card-body", - h5(fa("chart-line"), " ", i18n$t("Data Visualization"), class = "card-title", style = "color: #2D2D42;"), + h5(phosphoricons::ph("chart-line", weight = "bold"), " ", i18n$t("Data Visualization"), class = "card-title", style = "color: #2D2D42;"), p(class = "card-text small", i18n$t("Create simple, clean plots for quick insights and overview")) ) ) @@ -147,7 +136,7 @@ landing_page_ui <- function(i18n) { style = "border-left: 4px solid #8A4FFF;", div( class = "card-body", - h5(fa("calculator"), " ", i18n$t("Regression Models"), class = "card-title", style = "color: #2D2D42;"), + h5(phosphoricons::ph("calculator", weight = "bold"), " ", i18n$t("Regression Models"), class = "card-title", style = "color: #2D2D42;"), p(class = "card-text small", i18n$t("Build simple regression models for advanced analysis")) ) ) @@ -164,7 +153,7 @@ landing_page_ui <- function(i18n) { style = "background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%); border: none;", div( class = "card-body p-4", - h4(fa("download"), " ", i18n$t("Export & Learn"), class = "text-center mb-3", style = "color: #1E4A8F;"), + h4(phosphoricons::ph("book-bookmark", weight = "bold"), " ", i18n$t("Export & Learn"), class = "text-center mb-3", style = "color: #1E4A8F;"), div( class = "row text-center", div( diff --git a/R/missings-module.R b/R/missings-module.R index 003a35f4..bb247b18 100644 --- a/R/missings-module.R +++ b/R/missings-module.R @@ -19,7 +19,8 @@ data_missings_ui <- function(id, ...) { bslib::accordion_panel( value = "acc_pan_mis", title = "Settings", - icon = bsicons::bs_icon("gear"), + icon = phosphoricons::ph("gear"), + # icon = bsicons::bs_icon("gear"), shiny::conditionalPanel( condition = "output.missings == true", shiny::uiOutput(ns("missings_method")), @@ -36,14 +37,16 @@ data_missings_ui <- function(id, ...) { inputId = ns("act_miss"), label = i18n$t("Evaluate"), width = "100%", - icon = shiny::icon("calculator"), + icon = phosphoricons::ph("calculator"), + # icon = shiny::icon("calculator"), disabled = TRUE ) ), do.call(bslib::accordion_panel, c( list( title = "Download", - icon = bsicons::bs_icon("file-earmark-arrow-down") + icon = phosphoricons::ph("download-simple") + # icon = bsicons::bs_icon("file-earmark-arrow-down") ), table_download_ui(id = ns("tbl_dwn"), title = NULL) )) diff --git a/R/plot-download-module.R b/R/plot-download-module.R index 4caf94bf..ac1d58a5 100644 --- a/R/plot-download-module.R +++ b/R/plot-download-module.R @@ -39,7 +39,8 @@ plot_download_ui <- regression_ui <- function(id, ...) { shiny::downloadButton( outputId = ns("download_plot"), label = "Download plot", - icon = shiny::icon("download") + icon = phosphoricons::ph("arrow-fat-down") + # icon = shiny::icon("download") ) ) } diff --git a/R/redcap_read_shiny_module.R b/R/redcap_read_shiny_module.R index 810cab0c..bb704325 100644 --- a/R/redcap_read_shiny_module.R +++ b/R/redcap_read_shiny_module.R @@ -43,7 +43,8 @@ m_redcap_readUI <- function(id, title = TRUE, url = NULL) { shiny::actionButton( inputId = ns("data_connect"), label = i18n$t("Connect"), - icon = shiny::icon("link", lib = "glyphicon"), + icon = phosphoricons::ph("link",weight = "bold"), + # icon = shiny::icon("link", lib = "glyphicon"), width = "100%", disabled = TRUE ), @@ -99,7 +100,8 @@ m_redcap_readUI <- function(id, title = TRUE, url = NULL) { shinyWidgets::dropMenu( shiny::actionButton( inputId = ns("dropdown_params"), - label = shiny::icon("filter"), + label = phosphoricons::ph("funnel",weight = "bold"), + # label = shiny::icon("filter"), width = "50px" ), filter_ui @@ -118,7 +120,8 @@ m_redcap_readUI <- function(id, title = TRUE, url = NULL) { shiny::actionButton( inputId = ns("data_import"), label = i18n$t("Import"), - icon = shiny::icon("download", lib = "glyphicon"), + icon = phosphoricons::ph("download-simple",weight = "bold"), + # icon = shiny::icon("download", lib = "glyphicon"), width = "100%", disabled = TRUE ), diff --git a/R/regression-module.R b/R/regression-module.R index d569bd54..c8a0f20d 100644 --- a/R/regression-module.R +++ b/R/regression-module.R @@ -57,7 +57,8 @@ regression_ui <- function(id, ...) { bslib::accordion_panel( value = "acc_pan_reg", title = i18n$t("Regression"), - icon = bsicons::bs_icon("calculator"), + icon = phosphoricons::ph("calculator"), + # icon = bsicons::bs_icon("calculator"), shiny::uiOutput(outputId = ns("outcome_var")), # shiny::selectInput( # inputId = "design", @@ -91,7 +92,8 @@ regression_ui <- function(id, ...) { bslib::input_task_button( id = ns("load"), label = i18n$t("Analyse"), - icon = bsicons::bs_icon("pencil"), + icon = phosphoricons::ph("math-operations"), + # icon = bsicons::bs_icon("pencil"), label_busy = i18n$t("Working..."), icon_busy = fontawesome::fa_i("arrows-rotate", class = "fa-spin", @@ -136,7 +138,8 @@ regression_ui <- function(id, ...) { list( value = "acc_pan_coef_plot", title = "Coefficients plot", - icon = bsicons::bs_icon("bar-chart-steps"), + icon = phosphoricons::ph("chart-bar-horizontal"), + # icon = bsicons::bs_icon("bar-chart-steps"), shiny::tags$br(), shiny::uiOutput(outputId = ns("plot_model")) ), @@ -179,7 +182,8 @@ regression_ui <- function(id, ...) { shiny::downloadButton( outputId = ns("download_plot"), label = i18n$t("Download plot"), - icon = shiny::icon("download") + icon = phosphoricons::ph("arrow-fat-down") + # icon = shiny::icon("download") ) ) ) @@ -200,7 +204,8 @@ regression_ui <- function(id, ...) { bslib::accordion_panel( value = "acc_pan_checks", title = "Checks", - icon = bsicons::bs_icon("clipboard-check"), + icon = phosphoricons::ph("checks"), + # icon = bsicons::bs_icon("clipboard-check"), shiny::uiOutput(outputId = ns("plot_checks")) ) ) diff --git a/R/table-download-module.R b/R/table-download-module.R index baa566fa..aebbb98d 100644 --- a/R/table-download-module.R +++ b/R/table-download-module.R @@ -37,7 +37,8 @@ table_download_server <- function(id, data, file_name = "table", ...) { shiny::downloadButton( outputId = ns("act_table"), label = i18n$t("Download table"), - icon = shiny::icon("download") + icon = phosphoricons::ph("arrow-fat-down") + # icon = shiny::icon("download") ) } else { # Return NULL to show nothing diff --git a/R/ui_elements.R b/R/ui_elements.R index 96175376..2cd23878 100644 --- a/R/ui_elements.R +++ b/R/ui_elements.R @@ -15,7 +15,8 @@ ui_elements <- function(selection) { "home" = bslib::nav_panel( title = "FreesearchR", # title = shiny::div(htmltools::img(src="FreesearchR-logo-white-nobg-h80.png")), - icon = shiny::icon("house"), + icon = phosphoricons::ph("house", weight = "bold"), + # icon = shiny::icon("house"), shiny::fluidRow( # "The browser language is", # textOutput("your_lang"), @@ -45,7 +46,8 @@ ui_elements <- function(selection) { ############################################################################## "import" = bslib::nav_panel( title = i18n$t("Get started"), - icon = shiny::icon("play"), + icon = phosphoricons::ph("play", weight = "bold"), + # icon = shiny::icon("play"), value = "nav_import", shiny::fluidRow( shiny::column(width = 2), @@ -122,7 +124,8 @@ ui_elements <- function(selection) { inputId = "modal_initial_view", label = i18n$t("Quick overview"), width = "100%", - icon = shiny::icon("binoculars"), + icon = phosphoricons::ph("binoculars"), + # icon = shiny::icon("binoculars"), disabled = FALSE ), shiny::br(), @@ -166,7 +169,8 @@ ui_elements <- function(selection) { inputId = "act_start", label = i18n$t("Let's begin!"), width = "100%", - icon = shiny::icon("play"), + icon = phosphoricons::ph("play"), + # icon = shiny::icon("play"), disabled = TRUE ), shiny::br(), @@ -185,11 +189,13 @@ ui_elements <- function(selection) { ############################################################################## "prepare" = bslib::nav_menu( title = i18n$t("Prepare"), - icon = shiny::icon("pen-to-square"), + icon = phosphoricons::ph("note-pencil", weight = "bold"), + # icon = shiny::icon("pen-to-square"), value = "nav_prepare", bslib::nav_panel( title = i18n$t("Overview and filter"), - icon = shiny::icon("eye"), + icon = phosphoricons::ph("eye"), + # icon = shiny::icon("eye"), value = "nav_prepare_overview", tags$h3(i18n$t("Overview and filtering")), fluidRow( @@ -264,7 +270,8 @@ ui_elements <- function(selection) { ), bslib::nav_panel( title = i18n$t("Edit and create data"), - icon = shiny::icon("file-pen"), + icon = phosphoricons::ph("pencil-line"), + # icon = shiny::icon("file-pen"), tags$h3(i18n$t("Subset, rename and convert variables")), fluidRow(shiny::column( width = 9, shiny::tags$p( @@ -293,13 +300,13 @@ ui_elements <- function(selection) { width = 3, shiny::actionButton( inputId = "modal_update", - label = i18n$t("Modify factor levels"), + label = i18n$t("Modify factor"), width = "100%" ), shiny::tags$br(), - shiny::helpText( - i18n$t("Reorder or rename the levels of factor/categorical variables.") - ), + shiny::helpText(i18n$t( + "Modify the levels of factor/categorical variables." + )), shiny::tags$br(), shiny::tags$br() ), @@ -312,9 +319,7 @@ ui_elements <- function(selection) { ), shiny::tags$br(), shiny::helpText( - i18n$t( - "Create factor/categorical variable from a continous variable (number/date/time)." - ) + i18n$t("Create factor/categorical variable from other variables.") ), shiny::tags$br(), shiny::tags$br() @@ -391,14 +396,16 @@ ui_elements <- function(selection) { "describe" = bslib::nav_menu( title = i18n$t("Evaluate"), - icon = shiny::icon("magnifying-glass-chart"), + icon = phosphoricons::ph("magnifying-glass", weight = "bold"), + # icon = shiny::icon("magnifying-glass-chart"), value = "nav_describe", # id = "navdescribe", # bslib::navset_bar( # title = "", bslib::nav_panel( title = i18n$t("Characteristics"), - icon = bsicons::bs_icon("table"), + icon = phosphoricons::ph("table"), + # icon = bsicons::bs_icon("table"), bslib::layout_sidebar( sidebar = bslib::sidebar( shiny::uiOutput(outputId = "data_info_nochar", inline = TRUE), @@ -410,7 +417,8 @@ ui_elements <- function(selection) { open = TRUE, value = "acc_pan_chars", title = "Settings", - icon = bsicons::bs_icon("table"), + icon = phosphoricons::ph("table"), + # icon = bsicons::bs_icon("table"), # vectorSelectInput( # inputId = "baseline_theme", # selected = "none", @@ -452,7 +460,8 @@ ui_elements <- function(selection) { inputId = "act_eval", label = i18n$t("Evaluate"), width = "100%", - icon = shiny::icon("calculator"), + icon = phosphoricons::ph("calculator"), + # icon = shiny::icon("calculator"), disabled = TRUE ), shiny::helpText(i18n$t( @@ -466,7 +475,8 @@ ui_elements <- function(selection) { ), bslib::nav_panel( title = i18n$t("Correlations"), - icon = bsicons::bs_icon("bounding-box"), + icon = phosphoricons::ph("graph"), + # icon = bsicons::bs_icon("bounding-box"), bslib::layout_sidebar( sidebar = bslib::sidebar( # shiny::uiOutput(outputId = "data_info_nochar", inline = TRUE), @@ -507,7 +517,8 @@ ui_elements <- function(selection) { do.call(bslib::nav_panel, c( list( title = i18n$t("Missings"), - icon = bsicons::bs_icon("x-circle") + icon = phosphoricons::ph("placeholder") + # icon = bsicons::bs_icon("x-circle") ), data_missings_ui(id = "missingness", validation_ui("validation_mcar")) )) @@ -522,7 +533,8 @@ ui_elements <- function(selection) { c( list( title = i18n$t("Visuals"), - icon = shiny::icon("chart-line"), + icon = phosphoricons::ph("chart-line", weight = "bold"), + # icon = shiny::icon("chart-line"), value = "nav_visuals" ), data_visuals_ui("visuals") @@ -543,7 +555,8 @@ ui_elements <- function(selection) { "analyze" = bslib::nav_panel( title = i18n$t("Regression"), - icon = shiny::icon("calculator"), + icon = phosphoricons::ph("calculator", weight = "bold"), + # icon = shiny::icon("calculator"), value = "nav_analyses", do.call(bslib::navset_card_tab, regression_ui("regression")) ), @@ -555,7 +568,8 @@ ui_elements <- function(selection) { "download" = bslib::nav_panel( title = i18n$t("Download"), - icon = shiny::icon("download"), + icon = phosphoricons::ph("download-simple", weight = "bold"), + # icon = shiny::icon("download"), value = "nav_download", shiny::fluidRow( shiny::column(width = 2), @@ -591,7 +605,8 @@ ui_elements <- function(selection) { shiny::downloadButton( outputId = "report", label = "Download report", - icon = shiny::icon("download") + icon = phosphoricons::ph("arrow-fat-down") + # icon = shiny::icon("download") ), shiny::br() # shiny::helpText("If choosing to output to MS Word, please note, that when opening the document, two errors will pop-up. Choose to repair and choose not to update references. The issue is being worked on. You can always choose LibreOffice instead."), @@ -621,7 +636,8 @@ ui_elements <- function(selection) { shiny::downloadButton( outputId = "data_modified", label = "Download data", - icon = shiny::icon("download") + icon = phosphoricons::ph("arrow-fat-down") + # icon = shiny::icon("download") ) ) ), diff --git a/R/update-factor-ext.R b/R/update-factor-ext.R index 7f3380cd..e8699886 100644 --- a/R/update-factor-ext.R +++ b/R/update-factor-ext.R @@ -44,7 +44,7 @@ update_factor_ui <- function(id) { actionButton( disabled = TRUE, inputId = ns("drop_levels"), - label = tagList(phosphoricons::ph("sort-ascending"), i18n$t("Drop empty")), + label = tagList(phosphoricons::ph("trash"), i18n$t("Drop empty")), class = "btn-outline-primary mb-3", width = "100%" )