Skip to content

Conversation

@cpsievert
Copy link
Collaborator

@cpsievert cpsievert commented Oct 21, 2022

This PR is a follow up to #452, which added new card() API as well as value_box() and layout_column_wrap(). To learn more about this new functionality, refer to these new pkgdown articles

This PR updates how responsive sizing (i.e., card_body_fill()) works by using the new bindFillRole() function in {htmltools}. Note that shiny::plotOutput() and htmlwidgets::shinyWidgetOutput() will also make use of this to make plots and widgets fill by default when they are a direct child of card_body_fill():

rstudio/htmltools#345
rstudio/shiny#3715
ramnathv/htmlwidgets#442

Testing notes

Automated tests are being added in rstudio/shinycoreci#132

It'd be great to have the same/similar tests running against our pro products and manually tested on Firefox, Safari, and Edge (see the tests added in rstudio/shinycoreci#132 for expected behavior).

https://github.com/rstudio/bslib/tree/main/inst/examples/card
https://github.com/rstudio/bslib/tree/main/inst/examples/value_box

Also, when testing these, make sure to install the development version of {bslib} this way (which will also install the development version of some other packages):

remotes::install_github("rstudio/bslib")

@cpsievert cpsievert changed the title Use htmltools for fill logic (Re)-Introducing card(), value_box(), and layout_column_wrap() Oct 21, 2022
@cpsievert cpsievert marked this pull request as ready for review October 24, 2022 22:29
@cpsievert cpsievert merged commit 035e5f2 into main Oct 25, 2022
@cpsievert cpsievert deleted the fill branch October 25, 2022 21:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants