Skip to content

Commit a32b63b

Browse files
committed
Merge 'origin/main' into branch feat/brand-yml-package
2 parents 6fb4093 + c827d79 commit a32b63b

4 files changed

Lines changed: 16 additions & 6 deletions

File tree

DESCRIPTION

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ Suggests:
6161
yaml
6262
Remotes:
6363
brand.yml=github::posit-dev/brand-yml/pkg-r
64-
Config/Needs/deploy:
64+
Config/Needs/deploy:
6565
BH,
6666
chiflights22,
6767
colourpicker,
@@ -92,7 +92,7 @@ Config/Needs/deploy:
9292
styler,
9393
tibble
9494
Config/Needs/routine: chromote, desc, renv
95-
Config/Needs/website:
95+
Config/Needs/website:
9696
brio,
9797
crosstalk,
9898
dplyr,

NEWS.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,8 @@
1212

1313
* Sidebars from `page_sidebar()` and `layout_sidebar()` are now resizable on desktop-sized screen widths, allowing users to resize the sidebar width as desired. (#1217)
1414

15+
* `sidebar()` gains a `fillable` argument to support vertical fill behavior in sidebars. (#1226)
16+
1517
# bslib 0.9.0
1618

1719
## Breaking changes

R/sidebar.R

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -84,6 +84,9 @@
8484
#' second will be left and right, and the third will be bottom. If four, then
8585
#' the values will be interpreted as top, right, bottom, and left
8686
#' respectively.
87+
#' @param fillable Whether or not the sidebar should be considered a fillable
88+
#' container. When `TRUE`, the sidebar and its content can
89+
#' use `fill` to consume available vertical space.
8790
#'
8891
#' @export
8992
sidebar <- function(
@@ -98,7 +101,8 @@ sidebar <- function(
98101
class = NULL,
99102
max_height_mobile = NULL,
100103
gap = NULL,
101-
padding = NULL
104+
padding = NULL,
105+
fillable = FALSE
102106
) {
103107
position <- rlang::arg_match(position)
104108
gap <- validateCssUnit(gap)
@@ -145,6 +149,7 @@ sidebar <- function(
145149
width = width,
146150
max_height_mobile = max_height_mobile,
147151
color = list(bg = bg, fg = fg),
152+
fillable = fillable,
148153
attributes = dots$attribs,
149154
children = dots$children
150155
)
@@ -215,8 +220,10 @@ as.tags.bslib_sidebar <- function(x, ...) {
215220
id = x$id,
216221
class = c("sidebar", x$class),
217222
hidden = if (hidden_initially) NA,
223+
if (isTRUE(x$fillable)) as_fillable_container(),
218224
tags$div(
219225
class = "sidebar-content bslib-gap-spacing",
226+
if (isTRUE(x$fillable)) as_fill_carrier(),
220227
x$title,
221228
style = css(
222229
gap = x$gap,

man/sidebar.Rd

Lines changed: 4 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)