I haven't been working on my shiny app for a few months, since about June 2024, and I got back to it today, running the latest version of Shiny, and discovered that my app is now automatically using Busy Indicators.
I discovered the app was using Busy Indicators because the text on one page was appearing faded, and checking why via the Development Tools in Firefox showed that it was because of the busy indicator rules in Shiny.
I switched off the BusyIndicator fade in the UI, via the useBusyIndicators() function.
According to the Busy Indicators documentation (Enable/disable busy indication — useBusyIndicators) the busy indicators should NOT be enabled by default unless the app was built using bslib. I have never heard of bslib, so my understanding is that my app was not built with bslib, so I am confused as to why the BusyIndicators were enabled without me setting them up?
The bslib package is used for customizing the UI of a Shiny app. If you've never heard of it, presumably you did not load with (no library(bslib) statement in your code). Might you be using a library that has bslib as a dependency and loads it in the background? If so, it would be a library related to UI appearance, controls etc., not a library used for the back end computations.
I just discovered a function in the tools library (part of the basic R installation) that lists the reverse dependencies of a library X, meaning those libraries that depend on X. Here is what I get for bslib.
So it appears to be pretty easy to inadvertently load bslib. I'm not sure what to make of the fact that shiny itself is on the list. Possibly shiny loads bslib automatically when certain UI features are used? I've got a couple of Shiny apps that use bslib, and I'm pretty sure I've had to explicitly load it.
Yes, I agree it seems very easy to inadvertently load it, though unclear what conditions it loads under. I see that shinyjs is also on that list so if I didn't end up loading it via Shiny it seems quite likely I loaded it via shinyjs.
Useful to know about the reverse dependencies function, which will be useful for future, thanks!
I think most of the mystery is now resolved, though not for certain. I appreciate your help.
Hi prubin,
In case you're interested I just tried to run the app on my work machine, which was running up to date shinyjs but an older version of shiny, and it said the useBusyIndicators function did not exist. So the busyIndicators element has been added only in a recent version of shiny, and therefore the fact that the busy indicators were active in my app may have been just due to shiny and not due to shinyjs.
That is interesting. Thanks for mentioning it. I did not run into busy indicators in earlier apps that used bslib, and I wasn't sure if that just meant they did not have any operations slow enough to trigger them. Apparently it could be they used a version of shiny that predates the indicators.