bslib icon indicating copy to clipboard operation
bslib copied to clipboard

Card sidebar opening causes delay in plot re-positioning

Open asadow opened this issue 1 year ago • 3 comments

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)

asadow avatar Jul 19 '24 13:07 asadow

Could you include a video from your original example? I'm having hard time finding the effect you're describing in the reprex.

gadenbuie avatar Jul 19 '24 14:07 gadenbuie

sidebar

asadow avatar Aug 13 '24 19:08 asadow

Is it more clear with the gif? When expanding, there isn't much delay in repositioning the plot. When closing, it's significant.

asadow avatar Jan 02 '25 15:01 asadow