Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

* The `.get_latest_stream_result()` method on `ui.MarkdownStream()` was deprecated in favor of the new `.latest_stream` property. Call `.result()` on the property to get the latest result, `.status` to check the status, and `.cancel()` to cancel the stream.

### Bug fixes

* Fixed an issue where the `<main>` areas of `ui.page_sidebar()` and `ui.page_navbar()` (with a `sidebar`) were made to be a fillable containers even when `fillable=False`. (#1816)

## [1.3.0] - 2025-03-03

### New features
Expand Down
2 changes: 1 addition & 1 deletion scripts/_pkg-sources.R
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
list(
bslib = "rstudio/bslib@main",
bslib = "rstudio/bslib@fix/page-main-container-fillable",
shiny = "rstudio/shiny@main",
sass = "sass",
htmltools = "rstudio/htmltools@main"
Expand Down
4 changes: 3 additions & 1 deletion shiny/ui/_navs.py
Original file line number Diff line number Diff line change
Expand Up @@ -1365,7 +1365,9 @@ def layout(self, nav: Tag, content: Tag) -> TagList:
# TODO-future: This could also be applied to the non-sidebar page layout above
from ._page import page_main_container

tab_content = page_main_container(*contents)
tab_content = page_main_container(
*contents, fillable=self.fillable is not False
)

content_div = div(
# In the fluid case, the sidebar layout should be flush (i.e.,
Expand Down
6 changes: 4 additions & 2 deletions shiny/ui/_page.py
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,7 @@ def page_sidebar(
navbar_title,
layout_sidebar(
sidebar,
page_main_container(*children),
page_main_container(*children, fillable=fillable),
attrs,
fillable=fillable,
border=False,
Expand All @@ -149,8 +149,10 @@ def page_sidebar(
)


def page_main_container(*args: TagChild) -> Tag:
def page_main_container(*args: TagChild, fillable: bool = True) -> Tag:
main = tags.main({"class": "bslib-page-main bslib-gap-spacing"}, *args)
if not fillable:
return main
return as_fillable_container(as_fill_item(main))


Expand Down
2 changes: 1 addition & 1 deletion shiny/www/shared/_version.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"note!": "Generated by scripts/htmlDependencies.R: do not edit by hand",
"package": "shiny",
"version": "1.10.0.9000 (rstudio/shiny@531f31b66f0d83d07341b5e88e33386e4dc10f3e)"
"version": "1.10.0.9000 (rstudio/shiny@f55c26af4a0493b082d2967aca6d36b90795adf1)"
}
4 changes: 2 additions & 2 deletions shiny/www/shared/bootstrap/_version.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"note!": "Generated by scripts/htmlDependencies.R: do not edit by hand",
"shiny_version": "1.10.0.9000 (rstudio/shiny@531f31b66f0d83d07341b5e88e33386e4dc10f3e)",
"bslib_version": "0.9.0.9000 (rstudio/bslib@ee34398b1d93056c302560512a090c1326aff7cf)",
"shiny_version": "1.10.0.9000 (rstudio/shiny@f55c26af4a0493b082d2967aca6d36b90795adf1)",
"bslib_version": "0.9.0.9000 (rstudio/bslib@142b19053fed81b42a4efa90c497ab2682383b86)",
"htmltools_version": "0.5.8.9000 (rstudio/htmltools@487aa0bed7313d7597b6edd5810e53cab0061198)",
"bootstrap_version": "5.3.1"
}
2 changes: 1 addition & 1 deletion shiny/www/shared/bootstrap/bootstrap.min.css

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion shiny/www/shared/bslib/_version.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"note!": "Generated by scripts/htmlDependencies.R: do not edit by hand",
"package": "bslib",
"version": "0.9.0.9000 (rstudio/bslib@ee34398b1d93056c302560512a090c1326aff7cf)"
"version": "0.9.0.9000 (rstudio/bslib@142b19053fed81b42a4efa90c497ab2682383b86)"
}
2 changes: 1 addition & 1 deletion shiny/www/shared/bslib/components/components.css

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions shiny/www/shared/sass/bslib/components/scss/page_sidebar.scss
Original file line number Diff line number Diff line change
Expand Up @@ -44,15 +44,15 @@ $bslib-sidebar-padding: $spacer * 1.5 !default;
// Ensure the page-level main area has a minimum height and width to prevent
// overly squished content in small screens, like IDE preview panels.
.bslib-sidebar-layout {
.bslib-page-main {
.bslib-page-main.html-fill-container {
min-height: var(--bslib-page-main-min-height, #{$bslib-page-main-min-height});
}

// But only apply the width constraint when the sidebar expanded (i.e.
// not collapsed or in transition) to prevent overlap with toggle button.
&:not(.sidebar-collapsed),
&.transitioning {
.bslib-page-main {
.bslib-page-main.html-fill-container {
min-width: var(--bslib-page-main-min-width, #{$bslib-page-main-min-width});
}
}
Expand Down
2 changes: 1 addition & 1 deletion shiny/www/shared/sass/preset/bootstrap/bootstrap.min.css

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion shiny/www/shared/sass/preset/shiny/bootstrap.min.css

Large diffs are not rendered by default.

Loading