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
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

### Bug fixes

* `ui.input_date()`'s `datesdisabled` now works when `format` is not the default `yyyy-mm-dd`. The dates are now converted on the client the same way `min`/`max` are, instead of being parsed by bootstrap-datepicker with the display `format`. The `data-date-dates-disabled` attribute is replaced by `data-dates-disabled` (and omitted when `datesdisabled` is `None`), and `controller.InputDate.expect_datesdisabled()` checks the new attribute. Requires the updated vendored `shiny.js` (rstudio/shiny#4434). (#2523)

* Fixed an issue where data frames containing Polars `Categorical` or `Enum` columns raised `AttributeRemovedError: get_categories was removed in version 2.0` when serialized with Polars >= 2.0. (#2529)

* `near_points(add_dist=True)` now adds the `dist_` column its documentation describes, instead of a column named `dist`. Shiny for R names it `dist_` as well, and the trailing underscore is what keeps it from colliding with a `dist` column of the caller's own data. Code reading `df["dist"]` from the result must read `df["dist_"]`. (#2510)
Expand Down
9 changes: 5 additions & 4 deletions shiny/playwright/controller/_input_fields.py
Original file line number Diff line number Diff line change
Expand Up @@ -612,21 +612,22 @@ def expect_datesdisabled(
timeout: Timeout = None,
) -> None:
"""
Asserts that the input element has the expected `data-date-dates-disabled` attribute value.
Asserts that the input element has the expected `data-dates-disabled` attribute value.

Parameters
----------
value
The expected `data-date-dates-disabled` attribute value.
The expected `data-dates-disabled` attribute value. When `None`, the
attribute is expected to be absent.
timeout
The maximum time to wait for the value to appear. Defaults to `None`.
"""
if isinstance(value, list):
assert len(value) > 0, "`value` must be `None` or a non-empty list"
value_str = "null" if value is None else json.dumps(value)
value_str = None if value is None else json.dumps(value)
_expect_attribute_to_have_value(
self.loc,
"data-date-dates-disabled",
"data-dates-disabled",
value=value_str,
timeout=timeout,
)
Expand Down
2 changes: 1 addition & 1 deletion shiny/pytest/_generate/_data/testing-documentation.json
Original file line number Diff line number Diff line change
Expand Up @@ -384,7 +384,7 @@
},
{
"name": "expect_datesdisabled",
"description": "Asserts that the input element has the expected `data-date-dates-disabled` attribute value.",
"description": "Asserts that the input element has the expected `data-dates-disabled` attribute value.",
"parameters": "value (list\\[str\\] \\), timeout (Timeout)"
},
{
Expand Down
7 changes: 6 additions & 1 deletion shiny/ui/_input_date.py
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,12 @@ def input_date(
weekstart=weekstart,
language=language,
autoclose=autoclose,
data_date_dates_disabled=json.dumps(datesdisabled),
# Not `data-date-*`: bootstrap-datepicker would parse the dates with the
# display `format`, but `datesdisabled` is always `yyyy-mm-dd`. The
# client-side binding reads `data-dates-disabled` instead (rstudio/shiny#4281).
data_dates_disabled=(
json.dumps(datesdisabled) if datesdisabled is not None else None
),
data_date_days_of_week_disabled=json.dumps(daysofweekdisabled),
),
id=resolved_id,
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.14.0.9000 (rstudio/shiny@d19095f4b3dd2b699406db2693c487fb38bd2d4a)"
"version": "1.14.0.9000 (rstudio/shiny@bbc43849f06059f5daa7310ea0f40ec901f0ed0f)"
}
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.14.0.9000 (rstudio/shiny@d19095f4b3dd2b699406db2693c487fb38bd2d4a)",
"bslib_version": "0.12.0.9000 (rstudio/bslib@97aa1abc262bff3fdfab686d4206a45fe7276ad6)",
"shiny_version": "1.14.0.9000 (rstudio/shiny@bbc43849f06059f5daa7310ea0f40ec901f0ed0f)",
"bslib_version": "0.12.0.9000 (rstudio/bslib@ac1e25f8070e1f952509b6575ced19b4237e7ec5)",
"htmltools_version": "0.5.9.9000 (rstudio/htmltools@5135d17923ab80b3599da1f335d5d33eb9aa63a3)",
"bootstrap_version": "5.3.8"
}
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.12.0.9000 (rstudio/bslib@97aa1abc262bff3fdfab686d4206a45fe7276ad6)"
"version": "0.12.0.9000 (rstudio/bslib@ac1e25f8070e1f952509b6575ced19b4237e7ec5)"
}
2 changes: 1 addition & 1 deletion shiny/www/shared/bslib/components/components.css

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion shiny/www/shared/bslib/components/web-components.min.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions shiny/www/shared/bslib/components/web-components.min.js.map

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion shiny/www/shared/prism-code-editor/_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.12.0.9000 (rstudio/bslib@97aa1abc262bff3fdfab686d4206a45fe7276ad6)"
"version": "0.12.0.9000 (rstudio/bslib@ac1e25f8070e1f952509b6575ced19b4237e7ec5)"
}
23 changes: 17 additions & 6 deletions shiny/www/shared/sass/bslib/components/scss/page_sidebar.scss
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ $bslib-sidebar-padding: $spacer * 1.5 !default;
// the sidebar side only to make room for content.
.bslib-page-sidebar,
.bslib-page-navbar>div {
>.bslib-page-main>.bslib-sidebar-layout.sidebar-collapsed,
>.bslib-sidebar-layout.sidebar-collapsed {
&:not(.sidebar-right)>.main {
padding-right: var(--_padding);
Expand All @@ -43,18 +44,28 @@ $bslib-sidebar-padding: $spacer * 1.5 !default;
@include media-breakpoint-up(sm) {
// 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.html-fill-container {
min-height: var(--bslib-page-main-min-height, #{$bslib-page-main-min-height});
.bslib-page-sidebar .bslib-sidebar-layout > .main.html-fill-container,
.bslib-page-navbar .bslib-sidebar-layout .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.
.bslib-page-sidebar .bslib-sidebar-layout {
&:not(.sidebar-collapsed),
&.transitioning {
> .main.html-fill-container {
min-width: var(--bslib-page-main-min-width, #{$bslib-page-main-min-width});
}
}
}

// But only apply the width constraint when the sidebar expanded (i.e.
// not collapsed or in transition) to prevent overlap with toggle button.
.bslib-page-navbar .bslib-sidebar-layout {
&:not(.sidebar-collapsed),
&.transitioning {
.bslib-page-main.html-fill-container {
min-width: var(--bslib-page-main-min-width, #{$bslib-page-main-min-width});
}
}
}
}
}
3 changes: 2 additions & 1 deletion shiny/www/shared/sass/bslib/components/scss/toolbar.scss
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
// Sets the height/width (toolbar buttons are square) for toolbar buttons
// Icon size is controlled by font-size
--_toolbar-btn-size: var(--bslib-toolbar-btn-size, 1.75rem);
--_toolbar-font-size: var(--bslib-toolbar-font-size, 0.9rem);
display: flex;
flex-wrap: wrap;
align-items: center;
Expand Down Expand Up @@ -130,7 +131,7 @@
// as part of the toolbar, and shouldn't inherit the toolbar's compact styling.
&,
& :not(bslib-offcanvas, bslib-offcanvas *) {
font-size: 0.9rem;
font-size: var(--_toolbar-font-size);
}

&>:not(bslib-offcanvas, .offcanvas-backdrop) {
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.

13 changes: 13 additions & 0 deletions shiny/www/shared/shiny.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions shiny/www/shared/shiny.js.map

Large diffs are not rendered by default.

Loading
Loading