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)
,“”)
)