hi @chriddyp, coming from shiny I do miss this functionality in Dash quite frequently. (mainly 2) for enabling very interactive feedback while callbacks are processing, updating stats, messages, gives a very cool feel to the app, also without extensive code needed, just ocasional log/notify messages in callbacks code)
Donāt know if today thereās a better way in shiny, but the solution I was using at the time, was around shiny sendCustomMessage function (server-> client). I rendered the html from any R shiny object, then update on client with custom
shiny handler:
(Shiny - How to send messages from the browser to the server and back using Shiny)
R code (server)
updateUI=function(session,id,elem)
{
session$sendCustomMessage(type = āupdateUIā, message = list(id = id, html=paste0(elem)) )
}
Added javascript handler
Shiny.addCustomMessageHandler(āupdateUIā,
function(message) {
elem=document.getElementById(message.id);
elem.outerHTML=message.html;
}
);
Usage:
updateUI(session,āprogressā,
paste0(gsub(āā,āā,infoBoxOutput(āprogressā)),
valueBox(title, detail, icon = icon(āinfoā),
color = āgreenā,width = NULL)
,āā)
)