diff --git a/pkg-py/src/querychat/_querychat.py b/pkg-py/src/querychat/_querychat.py index 5292061d..cda4b7ce 100644 --- a/pkg-py/src/querychat/_querychat.py +++ b/pkg-py/src/querychat/_querychat.py @@ -167,6 +167,7 @@ def sidebar( *, width: int = 400, height: str = "100%", + fillable: bool = True, **kwargs, ) -> ui.Sidebar: """ @@ -178,6 +179,8 @@ def sidebar( Width of the sidebar in pixels. height Height of the sidebar. + fillable + Whether the sidebar should be fillable. Default is `True`. **kwargs Additional arguments passed to `shiny.ui.sidebar()`. @@ -191,6 +194,7 @@ def sidebar( self.ui(), width=width, height=height, + fillable=fillable, class_="querychat-sidebar", **kwargs, ) diff --git a/pkg-r/R/QueryChat.R b/pkg-r/R/QueryChat.R index 3bde18bf..e2c2101a 100644 --- a/pkg-r/R/QueryChat.R +++ b/pkg-r/R/QueryChat.R @@ -383,6 +383,7 @@ QueryChat <- R6::R6Class( #' #' @param width Width of the sidebar in pixels. Default is 400. #' @param height Height of the sidebar. Default is "100%". + #' @param fillable Whether the sidebar should be fillable. Default is `TRUE`. #' @param ... Additional arguments passed to [bslib::sidebar()]. #' #' @return A [bslib::sidebar()] UI component. @@ -396,10 +397,11 @@ QueryChat <- R6::R6Class( #' # Main content here #' ) #' } - sidebar = function(width = 400, height = "100%", ...) { + sidebar = function(width = 400, height = "100%", fillable = TRUE, ...) { bslib::sidebar( width = width, height = height, + fillable = fillable, class = "querychat-sidebar", ..., self$ui() diff --git a/pkg-r/man/QueryChat.Rd b/pkg-r/man/QueryChat.Rd index 7e72d1b0..ef747a96 100644 --- a/pkg-r/man/QueryChat.Rd +++ b/pkg-r/man/QueryChat.Rd @@ -414,7 +414,7 @@ Create a sidebar containing the querychat UI. This method generates a \code{\link[bslib:sidebar]{bslib::sidebar()}} component containing the chat interface, suitable for use with \code{\link[bslib:page_sidebar]{bslib::page_sidebar()}} or similar layouts. \subsection{Usage}{ -\if{html}{\out{
}}\preformatted{QueryChat$sidebar(width = 400, height = "100\%", ...)}\if{html}{\out{
}} +\if{html}{\out{
}}\preformatted{QueryChat$sidebar(width = 400, height = "100\%", fillable = TRUE, ...)}\if{html}{\out{
}} } \subsection{Arguments}{ @@ -424,6 +424,8 @@ interface, suitable for use with \code{\link[bslib:page_sidebar]{bslib::page_sid \item{\code{height}}{Height of the sidebar. Default is "100\%".} +\item{\code{fillable}}{Whether the sidebar should be fillable. Default is \code{TRUE}.} + \item{\code{...}}{Additional arguments passed to \code{\link[bslib:sidebar]{bslib::sidebar()}}.} } \if{html}{\out{}}