Loading indicator for large files loaded before calling shinyServer

shiny

#1

My question relates to the best way to indicate that a large file is being loaded before shinyServer gets called (my best guess is that it happens between the shiny:connected and shiny:sessioninitialized events). This is needed because the ui will be non-responsive until the file is completely loaded. Inside shiny I use a conditional panel on has.Class(‘shiny-busy’) to pull a box with a “Loading” icon when shiny is busy, but in this case this doesn’t work because shiny is not even busy yet!
Any suggestions would be greatly appreciated; this is a cross-post from the old Google Groups shiny discussion.


#2

!summon(@daattali)

Dean’s tips & tricks and wonderful shinyjs package handle this pretty well.


#3

Many thanks, had bookmarked Dean’s page a while back, should have started checking there! Worked perfectly!


#4

That specific “tip&trick” for a loading page was developed a long time ago, before shiny had the javascript events. I still use it, but it’s not perfect, you can try using JS events and see if you like it better


#5

A decent working shiny app to demonstrate the JS events: http://shiny.fee.tche.br/examples/107-events/