From 9c54424c9d6aa523c22a4e5ae03f9336c59b9b1f Mon Sep 17 00:00:00 2001 From: lgnbhl Date: Sun, 15 Jun 2025 12:56:04 +0200 Subject: [PATCH] use waiter to add loading screen when shiny server is busy to hid previous elements on page when page changing --- inst/examples/shiny.fluent/app/main.R | 9 +++++++++ inst/examples/shiny.fluent/dependencies.R | 3 ++- 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/inst/examples/shiny.fluent/app/main.R b/inst/examples/shiny.fluent/app/main.R index 0ff0f47..a79cfec 100644 --- a/inst/examples/shiny.fluent/app/main.R +++ b/inst/examples/shiny.fluent/app/main.R @@ -11,6 +11,15 @@ ui <- function(id) { ns <- shiny::NS(id) shiny::tagList( shiny.fluent::fluentPage( + waiter::use_waiter(), + waiter::waiterOnBusy( + color = "#C7C6C6", + html = shiny::tagList( + waiter::spin_fading_circles(), + "Fetching OpenDota API data and creating page..." + ), + fadeout = TRUE + ), reactRouter::HashRouter( reactRouter::Routes( reactRouter::Route( diff --git a/inst/examples/shiny.fluent/dependencies.R b/inst/examples/shiny.fluent/dependencies.R index 6e23b38..d3c5f7f 100644 --- a/inst/examples/shiny.fluent/dependencies.R +++ b/inst/examples/shiny.fluent/dependencies.R @@ -6,4 +6,5 @@ library(httr) library(shiny.fluent) library(reactRouter) library(stringdist) -library(echarts4r) \ No newline at end of file +library(echarts4r) +library(waiter) \ No newline at end of file