Skip to content

Commit f9ead22

Browse files
authored
feat: sidebar() is now fillable by default (#152)
* feat: sidebar() is now fillable by default * `devtools::document()` (GitHub Actions) --------- Co-authored-by: cpsievert <[email protected]>
1 parent a626c06 commit f9ead22

File tree

3 files changed

+10
-2
lines changed

3 files changed

+10
-2
lines changed

pkg-py/src/querychat/_querychat.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -167,6 +167,7 @@ def sidebar(
167167
*,
168168
width: int = 400,
169169
height: str = "100%",
170+
fillable: bool = True,
170171
**kwargs,
171172
) -> ui.Sidebar:
172173
"""
@@ -178,6 +179,8 @@ def sidebar(
178179
Width of the sidebar in pixels.
179180
height
180181
Height of the sidebar.
182+
fillable
183+
Whether the sidebar should be fillable. Default is `True`.
181184
**kwargs
182185
Additional arguments passed to `shiny.ui.sidebar()`.
183186
@@ -191,6 +194,7 @@ def sidebar(
191194
self.ui(),
192195
width=width,
193196
height=height,
197+
fillable=fillable,
194198
class_="querychat-sidebar",
195199
**kwargs,
196200
)

pkg-r/R/QueryChat.R

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -383,6 +383,7 @@ QueryChat <- R6::R6Class(
383383
#'
384384
#' @param width Width of the sidebar in pixels. Default is 400.
385385
#' @param height Height of the sidebar. Default is "100%".
386+
#' @param fillable Whether the sidebar should be fillable. Default is `TRUE`.
386387
#' @param ... Additional arguments passed to [bslib::sidebar()].
387388
#'
388389
#' @return A [bslib::sidebar()] UI component.
@@ -396,10 +397,11 @@ QueryChat <- R6::R6Class(
396397
#' # Main content here
397398
#' )
398399
#' }
399-
sidebar = function(width = 400, height = "100%", ...) {
400+
sidebar = function(width = 400, height = "100%", fillable = TRUE, ...) {
400401
bslib::sidebar(
401402
width = width,
402403
height = height,
404+
fillable = fillable,
403405
class = "querychat-sidebar",
404406
...,
405407
self$ui()

pkg-r/man/QueryChat.Rd

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

0 commit comments

Comments
 (0)