diff --git a/.Rbuildignore b/.Rbuildignore index 4ffec2b..9492747 100644 --- a/.Rbuildignore +++ b/.Rbuildignore @@ -14,6 +14,6 @@ ^data-raw$ ^CITATION\.cff$ ^app_hosted$ -^app$ +^app*$ ^page$ ^demo$ diff --git a/.gitignore b/.gitignore index c5e7bc8..96f8628 100644 --- a/.gitignore +++ b/.gitignore @@ -10,7 +10,8 @@ inst/shiny-examples/casting/functions.R functions.R docs inst/doc -app_hosted +app_dev +app_stable app page demo diff --git a/CITATION.cff b/CITATION.cff index c496e4a..29f4814 100644 --- a/CITATION.cff +++ b/CITATION.cff @@ -977,6 +977,19 @@ references: email: alboukadel.kassambara@gmail.com year: '2025' doi: 10.32614/CRAN.package.ggcorrplot +- type: software + title: shinyjs + abstract: 'shinyjs: Easily Improve the User Experience of Your Shiny Apps in Seconds' + notes: Imports + url: https://deanattali.com/shinyjs/ + repository: https://CRAN.R-project.org/package=shinyjs + authors: + - family-names: Attali + given-names: Dean + email: daattali@gmail.com + orcid: https://orcid.org/0000-0002-5645-3493 + year: '2025' + doi: 10.32614/CRAN.package.shinyjs - type: software title: styler abstract: 'styler: Non-Invasive Pretty Printing of R Code' diff --git a/DESCRIPTION b/DESCRIPTION index eea064e..87cc929 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -62,7 +62,8 @@ Imports: eulerr, ggforce, RcppArmadillo, - ggcorrplot + ggcorrplot, + shinyjs Suggests: styler, devtools, diff --git a/NEWS.md b/NEWS.md index a0957d8..0773121 100644 --- a/NEWS.md +++ b/NEWS.md @@ -2,6 +2,8 @@ - *FIX*: correct export of plots. The solution in the last version broke more than it solved. +- *NEW*: added simple loading animation. + A privately hosted version is now live on app.freesearchr.org. For now, it is hosted on Hetzner with Yunohost. # FreesearchR 25.5.1 diff --git a/R/sysdata.rda b/R/sysdata.rda index edbaddb..57d54ff 100644 Binary files a/R/sysdata.rda and b/R/sysdata.rda differ diff --git a/SESSION.md b/SESSION.md index ba86378..da15186 100644 --- a/SESSION.md +++ b/SESSION.md @@ -24,6 +24,7 @@ |package |loadedversion |date |source | |:-------------|:-------------|:----------|:--------------| |apexcharter |0.4.4 |2024-09-06 |CRAN (R 4.4.1) | +|askpass |1.2.1 |2024-10-04 |CRAN (R 4.4.1) | |assertthat |0.2.1 |2019-03-21 |CRAN (R 4.4.1) | |backports |1.5.0 |2024-05-23 |CRAN (R 4.4.1) | |bayestestR |0.15.3 |2025-04-28 |CRAN (R 4.4.1) | @@ -36,6 +37,7 @@ |bslib |0.9.0 |2025-01-30 |CRAN (R 4.4.1) | |cachem |1.1.0 |2024-05-16 |CRAN (R 4.4.1) | |cellranger |1.1.0 |2016-07-27 |CRAN (R 4.4.0) | +|cffr |1.2.0 |2025-01-25 |CRAN (R 4.4.1) | |class |7.3-23 |2025-01-01 |CRAN (R 4.4.1) | |classInt |0.4-11 |2025-01-08 |CRAN (R 4.4.1) | |cli |3.6.5 |2025-04-23 |CRAN (R 4.4.1) | @@ -43,6 +45,7 @@ |correlation |0.8.7 |2025-03-03 |CRAN (R 4.4.1) | |crayon |1.5.3 |2024-06-20 |CRAN (R 4.4.1) | |crosstalk |1.2.1 |2023-11-23 |CRAN (R 4.4.0) | +|curl |6.2.2 |2025-03-24 |CRAN (R 4.4.1) | |data.table |1.17.0 |2025-02-22 |CRAN (R 4.4.1) | |datamods |1.5.3 |2024-10-02 |CRAN (R 4.4.1) | |datawizard |1.0.2 |2025-03-24 |CRAN (R 4.4.1) | @@ -78,6 +81,7 @@ |insight |1.2.0 |2025-04-22 |CRAN (R 4.4.1) | |jquerylib |0.1.4 |2021-04-26 |CRAN (R 4.4.0) | |jsonlite |2.0.0 |2025-03-27 |CRAN (R 4.4.1) | +|jsonvalidate |1.5.0 |2025-02-07 |CRAN (R 4.4.1) | |KernSmooth |2.23-26 |2025-01-01 |CRAN (R 4.4.1) | |keyring |1.3.2 |2023-12-11 |CRAN (R 4.4.0) | |knitr |1.50 |2025-03-16 |CRAN (R 4.4.1) | @@ -95,7 +99,9 @@ |modelbased |0.10.0 |2025-03-10 |CRAN (R 4.4.1) | |nlme |3.1-168 |2025-03-31 |CRAN (R 4.4.1) | |nloptr |2.2.1 |2025-03-17 |CRAN (R 4.4.1) | +|openssl |2.3.2 |2025-02-03 |CRAN (R 4.4.1) | |openxlsx2 |1.15 |2025-04-25 |CRAN (R 4.4.1) | +|pak |0.8.0.2 |2025-04-08 |CRAN (R 4.4.1) | |parameters |0.24.2 |2025-03-04 |CRAN (R 4.4.1) | |patchwork |1.3.0 |2024-09-16 |CRAN (R 4.4.1) | |performance |0.13.0 |2025-01-15 |CRAN (R 4.4.1) | @@ -111,6 +117,10 @@ |ps |1.9.1 |2025-04-12 |CRAN (R 4.4.1) | |purrr |1.0.4 |2025-02-05 |CRAN (R 4.4.1) | |quarto |1.4.4 |2024-07-20 |CRAN (R 4.4.0) | +|R.cache |0.16.0 |2022-07-21 |CRAN (R 4.4.0) | +|R.methodsS3 |1.8.2 |2022-06-13 |CRAN (R 4.4.1) | +|R.oo |1.27.0 |2024-11-01 |CRAN (R 4.4.1) | +|R.utils |2.13.0 |2025-02-24 |CRAN (R 4.4.1) | |R6 |2.6.1 |2025-02-15 |CRAN (R 4.4.1) | |rbibutils |2.3 |2024-10-04 |CRAN (R 4.4.1) | |RColorBrewer |1.1-3 |2022-04-03 |CRAN (R 4.4.1) | @@ -138,9 +148,11 @@ |sessioninfo |1.2.3 |2025-02-05 |CRAN (R 4.4.1) | |shiny |1.10.0 |2024-12-14 |CRAN (R 4.4.1) | |shinybusy |0.3.3 |2024-03-09 |CRAN (R 4.4.0) | +|shinyjs |2.1.0 |2021-12-23 |CRAN (R 4.4.0) | |shinyTime |1.0.3 |2022-08-19 |CRAN (R 4.4.0) | |shinyWidgets |0.9.0 |2025-02-21 |CRAN (R 4.4.1) | |stringi |1.8.7 |2025-03-27 |CRAN (R 4.4.1) | +|styler |1.10.3 |2024-04-07 |CRAN (R 4.4.0) | |tibble |3.2.1 |2023-03-20 |CRAN (R 4.4.0) | |tidyr |1.3.1 |2024-01-24 |CRAN (R 4.4.1) | |tidyselect |1.2.1 |2024-03-11 |CRAN (R 4.4.0) | @@ -148,6 +160,7 @@ |tzdb |0.5.0 |2025-03-15 |CRAN (R 4.4.1) | |urlchecker |1.0.1 |2021-11-30 |CRAN (R 4.4.1) | |usethis |3.1.0 |2024-11-26 |CRAN (R 4.4.1) | +|V8 |6.0.3 |2025-03-26 |CRAN (R 4.4.1) | |vctrs |0.6.5 |2023-12-01 |CRAN (R 4.4.0) | |vroom |1.6.5 |2023-12-05 |CRAN (R 4.4.0) | |withr |3.0.2 |2024-10-28 |CRAN (R 4.4.1) | diff --git a/inst/apps/FreesearchR/app.R b/inst/apps/FreesearchR/app.R index 5e7a78c..e9886d6 100644 --- a/inst/apps/FreesearchR/app.R +++ b/inst/apps/FreesearchR/app.R @@ -9741,7 +9741,7 @@ ui_elements <- list( # shiny::img(shiny::icon("book")), shiny::tags$a( href = "https://redcap.au.dk/surveys/?s=JPCLPTXYDKFA8DA8", - "Feedback",shiny::icon("arrow-up-right-from-square"), + "Feedback", shiny::icon("arrow-up-right-from-square"), target = "_blank", rel = "noopener noreferrer" ) @@ -9755,7 +9755,7 @@ ui_elements <- list( # shiny::img(shiny::icon("book")), shiny::tags$a( href = "https://agdamsbo.github.io/FreesearchR/", - "Docs",shiny::icon("arrow-up-right-from-square"), + "Docs", shiny::icon("arrow-up-right-from-square"), target = "_blank", rel = "noopener noreferrer" ) @@ -9783,39 +9783,49 @@ ui <- bslib::page_fixed( header_include(), ## This adds the actual favicon ## png and ico versions are kept for compatibility - shiny::tags$head(tags$link(rel="shortcut icon", href="favicon.svg")), + shiny::tags$head(tags$link(rel = "shortcut icon", href = "favicon.svg")), title = "FreesearchR", theme = light, shiny::useBusyIndicators(), - bslib::page_navbar( - id = "main_panel", - ui_elements$home, - ui_elements$import, - ui_elements$overview, - ui_elements$describe, - ui_elements$visuals, - ui_elements$analyze, - ui_elements$download, - bslib::nav_spacer(), - ui_elements$feedback, - ui_elements$docs, - fillable = FALSE, - footer = shiny::tags$footer( - style = "background-color: #14131326; padding: 4px; text-align: center; bottom: 0; width: 100%;", - shiny::p( - style = "margin: 1", - "Data is only stored for analyses and deleted when the app is closed.", shiny::markdown("Consider [running ***FreesearchR*** locally](https://agdamsbo.github.io/FreesearchR/#run-locally-on-your-own-machine) if working with sensitive data.") - ), - shiny::p( - style = "margin: 1; color: #888;", - shiny::tags$a("Docs", href = "https://agdamsbo.github.io/FreesearchR/", target = "_blank", rel = "noopener noreferrer")," | ", hosted_version(), " | ", shiny::tags$a("License: AGPLv3", href = "https://github.com/agdamsbo/FreesearchR/blob/main/LICENSE.md", target = "_blank", rel = "noopener noreferrer"), " | ", shiny::tags$a("Source", href = "https://github.com/agdamsbo/FreesearchR/", target = "_blank", rel = "noopener noreferrer"), " | ", shiny::tags$a("Share feedback", href = "https://redcap.au.dk/surveys/?s=JPCLPTXYDKFA8DA8", target = "_blank", rel = "noopener noreferrer") - ), + shinyjs::useShinyjs(), + shiny::div( + id = "loading_page", + # shiny::h1("Loading the FreesearchR app..."), + shinybusy::add_busy_spinner(position = "full-page") + ), + shinyjs::hidden( + shiny::div( + id = "main_content", + bslib::page_navbar( + id = "main_panel", + ui_elements$home, + ui_elements$import, + ui_elements$overview, + ui_elements$describe, + ui_elements$visuals, + ui_elements$analyze, + ui_elements$download, + bslib::nav_spacer(), + ui_elements$feedback, + ui_elements$docs, + fillable = FALSE, + footer = shiny::tags$footer( + style = "background-color: #14131326; padding: 4px; text-align: center; bottom: 0; width: 100%;", + shiny::p( + style = "margin: 1", + "Data is only stored for analyses and deleted when the app is closed.", shiny::markdown("Consider [running ***FreesearchR*** locally](https://agdamsbo.github.io/FreesearchR/#run-locally-on-your-own-machine) if working with sensitive data.") + ), + shiny::p( + style = "margin: 1; color: #888;", + shiny::tags$a("Docs", href = "https://agdamsbo.github.io/FreesearchR/", target = "_blank", rel = "noopener noreferrer"), " | ", hosted_version(), " | ", shiny::tags$a("License: AGPLv3", href = "https://github.com/agdamsbo/FreesearchR/blob/main/LICENSE.md", target = "_blank", rel = "noopener noreferrer"), " | ", shiny::tags$a("Source", href = "https://github.com/agdamsbo/FreesearchR/", target = "_blank", rel = "noopener noreferrer"), " | ", shiny::tags$a("Share feedback", href = "https://redcap.au.dk/surveys/?s=JPCLPTXYDKFA8DA8", target = "_blank", rel = "noopener noreferrer") + ), + ) + ) ) ) ) - ######## #### Current file: /Users/au301842/FreesearchR/app/server.R ######## @@ -9846,17 +9856,26 @@ library(shinyWidgets) library(DT) library(data.table) library(gtsummary) +library(shinyjs) data(starwars) data(mtcars) data(trial) +load_data <- function() { + Sys.sleep(1) + hide("loading_page") + show("main_content") +} + server <- function(input, output, session) { ## Listing files in www in session start to keep when ending and removing ## everything else. files.to.keep <- list.files("www/") + load_data() + ############################################################################## ######### ######### Night mode (just very popular, not really needed) diff --git a/renv.lock b/renv.lock index 500d62b..8172a37 100644 --- a/renv.lock +++ b/renv.lock @@ -7930,6 +7930,40 @@ "Maintainer": "Victor Perrier ", "Repository": "CRAN" }, + "shinyjs": { + "Package": "shinyjs", + "Version": "2.1.0", + "Source": "Repository", + "Title": "Easily Improve the User Experience of Your Shiny Apps in Seconds", + "Authors@R": "person(\"Dean\", \"Attali\", email = \"daattali@gmail.com\", role = c(\"aut\", \"cre\"), comment= c(ORCID=\"0000-0002-5645-3493\"))", + "Description": "Perform common useful JavaScript operations in Shiny apps that will greatly improve your apps without having to know any JavaScript. Examples include: hiding an element, disabling an input, resetting an input back to its original value, delaying code execution by a few seconds, and many more useful functions for both the end user and the developer. 'shinyjs' can also be used to easily call your own custom JavaScript functions from R.", + "URL": "https://deanattali.com/shinyjs/", + "BugReports": "https://github.com/daattali/shinyjs/issues", + "Depends": [ + "R (>= 3.1.0)" + ], + "Imports": [ + "digest (>= 0.6.8)", + "jsonlite", + "shiny (>= 1.0.0)" + ], + "Suggests": [ + "htmltools (>= 0.2.9)", + "knitr (>= 1.7)", + "rmarkdown", + "shinyAce", + "shinydisconnect", + "testthat (>= 0.9.1)" + ], + "License": "MIT + file LICENSE", + "VignetteBuilder": "knitr", + "RoxygenNote": "7.1.1", + "Encoding": "UTF-8", + "NeedsCompilation": "no", + "Author": "Dean Attali [aut, cre] ()", + "Maintainer": "Dean Attali ", + "Repository": "CRAN" + }, "sodium": { "Package": "sodium", "Version": "1.4.0",