From 95c9af63f3faa66fd00a45aab630550773f4f157 Mon Sep 17 00:00:00 2001 From: Garrick Aden-Buie Date: Thu, 28 Mar 2024 10:39:44 -0400 Subject: [PATCH 1/2] fix(panel_conditional): Include `.shiny-panel-conditional` class --- shiny/ui/_bootstrap.py | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/shiny/ui/_bootstrap.py b/shiny/ui/_bootstrap.py index dc767442d..9014c83fb 100644 --- a/shiny/ui/_bootstrap.py +++ b/shiny/ui/_bootstrap.py @@ -197,7 +197,13 @@ def panel_conditional( if ns_prefix != "": ns_prefix += "-" - return div(*args, data_display_if=condition, data_ns_prefix=ns_prefix, **kwargs) + return div( + *args, + {"class": "shiny-panel-conditional"}, + data_display_if=condition, + data_ns_prefix=ns_prefix, + **kwargs, + ) @add_example() From cbd37c0c3e3ef0a736652cfcd274803f2638c248 Mon Sep 17 00:00:00 2001 From: Garrick Aden-Buie Date: Thu, 28 Mar 2024 10:41:23 -0400 Subject: [PATCH 2/2] docs: update changelog --- CHANGELOG.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 2846e8920..b0d5ab48d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -39,6 +39,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 * `ui.layout_columns()` now correctly applies the `row_heights` at the `xs` breakpoint, if supplied. (#1222) +* `ui.panel_conditional()` now adds the `.shiny-panel-conditional` class to the `
` element wrapping the conditional panel contents. (#1257) + ### Other changes * The fill CSS used by fillable containers (i.e. when `fillable=True`) now uses a [CSS cascade layer](https://developer.mozilla.org/en-US/docs/Learn/CSS/Building_blocks/Cascade_layers) named `htmltools` to reduce the precedence order of the fill CSS. (#1228)