From 4c5baae4faec82c44ee3fe3346c7770b96dfc904 Mon Sep 17 00:00:00 2001 From: Ove Haugland Jakobsen Date: Tue, 20 Aug 2024 19:57:00 +0200 Subject: [PATCH] Remove preview warning and add info on how to run the bootstrap. --- R/shiny-functions.R | 2 +- R/ui.R | 6 +++++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/R/shiny-functions.R b/R/shiny-functions.R index 3e5780e..532d9ea 100644 --- a/R/shiny-functions.R +++ b/R/shiny-functions.R @@ -113,7 +113,7 @@ set_message <- function(level, message, object = NULL, append = FALSE) { "alert alert-info" ) icon <- if (level == "info") "info-circle" else "exclamation-circle" - div <- div(class = classes, list(bsicons::bs_icon(icon, class = "me-2"), message)) + div <- div(class = classes, role = "alert", list(bsicons::bs_icon(icon, class = "me-2"), message)) # If we do not have a reactive, return the div if (is.null(object)) { return(div) diff --git a/R/ui.R b/R/ui.R index eaef688..064af10 100644 --- a/R/ui.R +++ b/R/ui.R @@ -238,7 +238,11 @@ ui <- function(request) { page_navbar( actionButton("run_boot", "Run bootstrap", class = "btn-primary btn-sm mb-2"), actionButton("clear_boot_cache", "Clear cache", class = "btn-warning btn-sm") ), - div(class = 'alert alert-info', role = 'alert', 'Bootstrap functionality is currently in preview'), + set_message( + "info", + "Results are cached by default. You can clear the cache by pressing the button in the + sidebar. Press \"Run bootstrap\" to estimate the bootstrap" + ), uiOutput('boot_tbl') ) ),