bslib
bslib copied to clipboard
Card sidebar opening causes delay in plot re-positioning
I'm making heavy use of the sidebar open/close feature and I've noticed there is a 2'nd jitter from a sidebar opening. This effect is more pronounced for my actual plot (not the reprex below), but I'm having trouble reprex'ing that.
library(bslib)
library(shiny)
library(plotly)
# -------------------------------------------------------------------------
fig <- plot_ly(z = ~volcano)
fig <- fig %>% add_surface()
ui <- page_fluid(
card(
layout_sidebar(
sidebar = sidebar(),
plotlyOutput("plot")
)
)
)
# Server logic
server <- function(input, output, session) {
output$plot <- renderPlotly({
fig
})
}
shinyApp(ui, server)
Could you include a video from your original example? I'm having hard time finding the effect you're describing in the reprex.
Is it more clear with the gif? When expanding, there isn't much delay in repositioning the plot. When closing, it's significant.