-
Notifications
You must be signed in to change notification settings - Fork 6
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add 312-bslib-sidebar-resize #166
base: main
Are you sure you want to change the base?
Conversation
71f34d4
to
daf5438
Compare
inst/apps/312-bslib-sidebar-resize/tests/testthat/test-shinytest2.R
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm happy that it is automated. I'll let you and @cpsievert work out the details
inst/apps/312-bslib-sidebar-resize/tests/testthat/test-shinytest2.R
Outdated
Show resolved
Hide resolved
@gadenbuie do you know why these tests fail pretty consistently on Windows (and sometimes on Mac)? |
The Mac 3.6.3 errors are due to ggiraph
I was just starting to try to figure out how to look into the Windows failures (any ideas?) |
There's some general flakiness in this PR that I want to resolve before merging. Carson and I talked through some options in person, one of which would be to do all of the sidebar size polling in the browser, rather than communicating back and forth via shinytest2. |
Adds a manual testing app for plot and output resizing in sidebars (without cards).
Pairs with rstudio/bslib#566 where this behavior is improved for sidebars.
Expected behavior
In the app below, both the "static" ggplot2 output and the htmlwidget plotly plot output will stretch during the sidebar transition. The static plot will re-render when the transition is complete, so there's a small "snap" when the new plot is rendered. (No snap is seen in the case of an htmlwidget like plotly.)
All plots stretch during resize when the shared sidebar is toggled; only the sidebar in the local sidebar layout stretches when the local sidebar is toggled.
Kapture.2023-05-09.at.15.56.42.mp4
Failing behavior
When the behavior isn't present, neither the plot nor the htmlwidget's will update its width until after receiving a re-render event from the server.
Kapture.2023-05-09.at.15.55.44.mp4