Skip to content

Commit 6f066e4

Browse files
cpsievertgadenbuie
andauthored
v0.6.0 release candidate (#869)
Co-authored-by: gadenbuie <gadenbuie@users.noreply.github.com> Co-authored-by: Garrick Aden-Buie <garrick@adenbuie.com>
1 parent ecada4b commit 6f066e4

16 files changed

+265
-32
lines changed

.Rbuildignore

+1
Original file line numberDiff line numberDiff line change
@@ -29,3 +29,4 @@ inst/lib/bsw3/.npmignore
2929
^\.github$
3030
^\.gitattributes$
3131
^CODE_OF_CONDUCT\.md$
32+
^cran-comments\.md$

DESCRIPTION

+3-6
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
Package: bslib
22
Title: Custom 'Bootstrap' 'Sass' Themes for 'shiny' and 'rmarkdown'
3-
Version: 0.5.1.9000
3+
Version: 0.6.0
44
Authors@R: c(
55
person("Carson", "Sievert", , "carson@posit.co", role = c("aut", "cre"),
66
comment = c(ORCID = "0000-0002-4958-2844")),
@@ -32,7 +32,7 @@ Imports:
3232
base64enc,
3333
cachem,
3434
grDevices,
35-
htmltools (>= 0.5.6.9001),
35+
htmltools (>= 0.5.7),
3636
jquerylib (>= 0.1.3),
3737
jsonlite,
3838
lifecycle,
@@ -49,13 +49,10 @@ Suggests:
4949
magrittr,
5050
rappdirs,
5151
rmarkdown (>= 2.7),
52-
shiny (>= 1.7.5.9001),
52+
shiny (>= 1.8.0),
5353
testthat,
5454
thematic,
5555
withr
56-
Remotes:
57-
rstudio/htmltools,
58-
rstudio/shiny
5956
Config/Needs/deploy:
6057
BH,
6158
chiflights22,

NEWS.md

+22-15
Original file line numberDiff line numberDiff line change
@@ -1,39 +1,46 @@
1-
# bslib (development version)
1+
# bslib 0.6.0
22

33
## Breaking changes
44

55
* `bs_theme()` now defaults to `preset="shiny"`. This provides an additional set of theming defaults and rules that make it easier to create Shiny apps (in particular, dashboards) that look good out of the box. To revert to the previous behavior, set `bs_theme(preset="bootstrap")`. (#711)
6+
67
* `value_box()` no longer defaults to `theme_color = "primary"`. To restore the previous behavior, please use `theme = "primary"`. In addition to the default style change, the `theme_color` is now deprecated in favor of `theme`. (#758)
8+
79
* `page_navbar()` now defaults to `underline = TRUE`, meaning that navigation links in the navbar now have underline styling by default (set `underline = FALSE` to revert to previous behavior). (#784)
8-
* `page()` now returns a `<body>` tag instead of `tagList()`. This change allows `page()` to treat named arguments as HTML attributes. (#809)
10+
11+
* `page()` now returns a `<body>` tag instead of `tagList()`. This change allows `page()` to treat named arguments as HTML attributes for the `<body>` tag, making it possible to add page-level classes or other attributes. (#809)
12+
913
* The JS/CSS assets behind `{bslib}` components (e.g., `card()`, `value_box()`, etc) are all now bundled into one `htmlDependency()` and included with the return value of `bs_theme_dependencies()` (previously they were attached at the component-level). (#810)
10-
* `layout_column_wrap()` no longer requires `width` and `width` is no longer the first argument, meaning that `width` must be named if used. The new default is `width = "200px"`, which combines with `fixed_width = FALSE` and produces an automatically responsive layout where each column is at least 200px wide. This means that, in most cases, `layout_column_wrap()` can layout an unknown number of items without you having to set `width`. (#853)
14+
15+
* `layout_column_wrap()` no longer requires `width` and `width` is no longer the first argument, meaning that `width` must be named if used. The new default is `width = "200px"`, which combines with `fixed_width = FALSE` to produce a responsive layout where each column is at least 200px wide. This means that, in most cases, `layout_column_wrap()` can automatically layout an unknown number of items without you having to set `width`. (#853)
1116

1217
## New features
1318

14-
* Upgraded the default version of Bootstrap from v5.2.2 to v5.3.1. The most notable thing that comes with the update is the ability to toggle between light/dark [color modes](https://getbootstrap.com/docs/5.3/customize/color-modes/) purely client-side (i.e., no calls to Sass required). (#749, #764)
19+
* The default version of Bootstrap is now v5.3.1, upgraded from v5.2.2. The most notable thing that comes with the update is the ability to toggle between light/dark [color modes](https://getbootstrap.com/docs/5.3/customize/color-modes/) purely client-side (i.e., no calls to Sass required). (#749, #764)
1520

16-
* Added new `navset_underline()` & `navset_card_underline()` functions as well as a `underline` argument to `page_navbar()` to leverage the new [nav-underline](https://getbootstrap.com/docs/5.3/components/navs-tabs/#underline) styling on navigation links. (#784)
21+
* Added `input_dark_mode()`, a new input control that provides a toggle button that can be used to switch between the dark and light modes when using Bootstrap 5.3. By default, dark mode is applied automatically if the user's operating system is also in dark mode. App authors can toggle dark mode programmatically from the server using `toggle_dark_mode()`, and if you provide `input_dark_mode()` with an `id`, you can read the current color mode via the corresponding input value. (#787)
1722

18-
* `value_box()` now supports many new themes and styles, or fully customizable themes using the new `value_box_theme()` function. To reflect the new capabilities, we've replaced `theme_color` with a new `theme` argument. The previous argument will continue work as expected, but with a deprecation warning. (#758)
23+
* Shiny's Bootstrap theme preset is now used by default in `bs_theme()` and all related `page_*()` functions in bslib. This theme brings a fresh new design to all Shiny apps and dashboards created with bslib. This dashboard design anticipates heavy use of cards for organizing content, and works best with a gray background for contrast with minimalistic white cards. This treatment can be enabled in `page_sidebar()`, `page_fillable()` and other `page_*()` functions by adding the `bslib-page-dashboard` class to the page container or body tag.
1924

20-
In addition to the Bootstrap theme names (`primary` ,`secondary`, etc.), you can now use the main Boostrap colors (`purple`, `blue`, `red`, etc.). You can also choose to apply the color to the background or foreground by prepending a `bg-` or `text-` prefix to the theme or color name. Finally, we've also added new gradient themes allowing you to pair any two color names as `bg-gradient-{from}-{to}` (e.g., `bg-gradient-purple-blue`).
25+
The preset can also be customized using the `$bslib-dashboard-design` and `$bslib-enable-shadows` Sass variables. Set these to `false` to disable the dashboard treatment and card shadows, respectively. These variables can be set via `bs_theme()`, e.g. `bs_theme("bslib-dashboard-design" = "false")`. (#897, #906)
2126

22-
These named color themes aren't limited to value boxes: because they're powered by small utility classes, you can use them anywhere within your bslib-powered UI.
27+
* `value_box()` has been updated with a number of new features and improvements:
2328

24-
* Added `showcase_bottom()`, a new `value_box()` layout that places the showcase below the value box title and value, perfect for a full-bleed plot. (#758)
29+
* `value_box()` now supports many new themes and styles, or fully customizable themes using the new `value_box_theme()` function. To reflect the new capabilities, we've replaced `theme_color` with a new `theme` argument. The previous argument will continue work as expected, but with a deprecation warning. (#758)
2530

26-
* `showcase_left_center()` and `showcase_top_right()` no longer take two values for the `width` argument. Instead, they now take a single value (e.g., `width = "30%"`) representing the width of the showcase are in the value box. Furthermore, they've both gained `width_full_screen` arguments that determine the width of the showcase area when the value box is expanded to fill the screen. (#758)
31+
In addition to the Bootstrap theme names (`primary` ,`secondary`, etc.), you can now use the main Boostrap colors (`purple`, `blue`, `red`, etc.). You can also choose to apply the color to the background or foreground by prepending a `bg-` or `text-` prefix to the theme or color name. Finally, we've also added new gradient themes allowing you to pair any two color names as `bg-gradient-{from}-{to}` (e.g., `bg-gradient-purple-blue`).
2732

28-
* The `showcase_layout` argument of `value_box()` now accepts one of three character values: `"left center"`, `"top right"`, `"bottom"`. (#758)
33+
These named color themes aren't limited to value boxes: because they're powered by small utility classes, you can use them anywhere within your bslib-powered UI.
2934

30-
* A new [Build a Box app](https://bslib.shinyapps.io/build-a-box/) is now available online or via bslib. See `?value_box()` for details. The app helps preview a set of value boxes while you configure and customize their appearance and provides you with code to copy and paste into your app. (#790)
35+
* Added `showcase_bottom()`, a new `value_box()` layout that places the showcase below the value box title and value, perfect for a full-bleed plot. (#758)
3136

32-
* Added `input_dark_mode()`, a new input control that provides a toggle button that can be used to switch between the dark and light modes when using Bootstrap 5.3. By default, dark mode is applied automatically if the user's operating system is also in dark mode. App authors can toggle dark mode programmatically from the server using `toggle_dark_mode()`, and if you provide `input_dark_mode()` with an `id`, you can read the current color mode via the corresponding input value. (#787)
37+
* `showcase_left_center()` and `showcase_top_right()` no longer take two values for the `width` argument. Instead, they now take a single value (e.g., `width = "30%"`) representing the width of the showcase are in the value box. Furthermore, they've both gained `width_full_screen` arguments that determine the width of the showcase area when the value box is expanded to fill the screen. (#758)
3338

34-
* Shiny's Bootstrap theme preset is now used by default in `bs_theme()` and all related `page_*()` functions in bslib. This theme brings a fresh new design to all Shiny apps and dashboards created with bslib. This dashboard design anticipates heavy use of cards for organizing content, and works best with a gray background for contrast with minimalistic white cards. This treatment can be enabled in `page_sidebar()`, `page_fillable()` and other `page_*()` functions by adding the `bslib-page-dashboard` class to the page container or body tag.
39+
* The `showcase_layout` argument of `value_box()` now accepts one of three character values: `"left center"`, `"top right"`, `"bottom"`. (#758)
3540

36-
The preset can also be customized using the `$bslib-dashboard-design` and `$bslib-enable-shadows` Sass variables. Set these to `false` to disable the dashboard treatment and card shadows, respectively. These variables can be set via `bs_theme()`, e.g. `bs_theme("bslib-dashboard-design" = "false")`. (#897, #906)
41+
* A new [Build a Box app](https://bslib.shinyapps.io/build-a-box/) is now available online or via bslib. See `?value_box()` for details. The app helps preview a set of value boxes while you configure and customize their appearance and provides you with code to copy and paste into your app. (#790)
42+
43+
* Added new `navset_underline()` & `navset_card_underline()` functions as well as a `underline` argument to `page_navbar()` to leverage the new [nav-underline](https://getbootstrap.com/docs/5.3/components/navs-tabs/#underline) styling on navigation links. (#784)
3744

3845
## Improvements
3946

R/bs-theme-layers.R

+1-1
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,7 @@
8787
#' )
8888
#'
8989
#' @describeIn bs_bundle Add Bootstrap Sass
90-
#' [variable defaults](http://rstudio.github.io/bslib/articles/bs5-variables/index.html).
90+
#' [variable defaults](https://rstudio.github.io/bslib/articles/bs5-variables/index.html).
9191
#' @export
9292
bs_add_variables <- function(theme, ..., .where = "defaults", .default_flag = identical(.where, "defaults")) {
9393
assert_bs_theme(theme)

R/print.R

+1-1
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ print.bslib_fragment <- function(x, ...) {
2525

2626
#' Save a bslib page/fragment as HTML
2727
#'
28-
#' @param x a bslib page/fragment.
28+
#' @param html a bslib page/fragment.
2929
#' @param ... passed along to an underlying [save_html()] method.
3030
#' @export
3131
#' @keywords internal

cran-comments.md

+7
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
2+
## revdepcheck results
3+
4+
We checked 57 reverse dependencies (51 from CRAN + 6 from Bioconductor), comparing R CMD check results across CRAN and dev versions of this package.
5+
6+
* We saw 0 new problems
7+
* We failed to check 0 packages

inst/components/dist/components.js

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)