(Re)-Introducing card(), value_box(), and layout_column_wrap() #454
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR is a follow up to #452, which added new
card()
API as well asvalue_box()
andlayout_column_wrap()
. To learn more about this new functionality, refer to these new pkgdown articlesThis PR updates how responsive sizing (i.e.,
card_body_fill()
) works by using the newbindFillRole()
function in{htmltools}
. Note thatshiny::plotOutput()
andhtmlwidgets::shinyWidgetOutput()
will also make use of this to make plots and widgets fill by default when they are a direct child ofcard_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):