Hi Patrick,
thank you for looking at this. I've now also run this
locally (windows+firefox, shiny 0.8.0), and then the conditional text
appears and disappears so quickly you really have to look for it; when i run it
over our server (ubuntu+firefox, shiny 0.8.0) the flicker is more
obvious. And as the actual object i try to display (includeHTML call in a
conditionalPanel) takes several seconds to load this is ofcourse even more obvious.
If i run the modified code below, when i refresh the page with 'no'
selected i see the following:
* the panel for the textoutput, but not the text itself, flashes (very very briefly)
* the 'bla's flash, starting below the plot area (suggesting the plot area (but not the plot) are briefly displayed as well).
Also, but maybe unrelated, when i toggle from 'no' to 'yes' the
textoutput briefly shows 'no' before switching to 'yes'- at least in my
setup. I am curious whether this happens for you as well, considering that you didn't get a textoutput flash.
i wonder if this may be more a javascript thing than a shiny thing?
Janna
#ui.r:
library(shiny)
shinyUI(pageWithSidebar(
# Application title
headerPanel("New Application"),
# Sidebar with a slider input for number of observations
sidebarPanel(
radioButtons("show",
"display all the things:",
c('yes','no'),
selected = 'no')
),
mainPanel(
conditionalPanel(condition = "input.show=='yes'", verbatimTextOutput('show'),
plotOutput("distPlot")),
conditionalPanel(condition = "input.show=='yes'", h4(paste0(rep('bla ',100),rep('',10000))))
)
))
#server.r
library(shiny)