Skip to content

(Re)-Introducing card(), value_box(), and layout_column_wrap() #454

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

Merged
merged 6 commits into from
Oct 25, 2022
Merged

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.

1 participant