Skip to content

Commit e859cfb

Browse files
docs: Fix value_box() id docstring to use correct full_screen reactive syntax (#2325)
Co-authored-by: Barret Schloerke <barret@posit.co>
1 parent 80c5d5b commit e859cfb

3 files changed

Lines changed: 8 additions & 6 deletions

File tree

CHANGELOG.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
3636

3737
* Fixed rare tabset ID collisions in pages with many navsets. Randomly generated `data-tabsetid` values were drawn from a pool of ~1 million, so a page with dozens of tabsets could occasionally produce two navsets with the same ID (a birthday collision), resulting in duplicate DOM ids and broken tab switching. IDs are now drawn from a pool of 9 trillion. (#2296)
3838

39+
* Fixed the `value_box()` `id` parameter docstring, which previously documented the wrong reactive-value syntax (`input.<id>()["full_screen"]`) for observing the value box's full screen state. It now correctly documents `input.<id>_full_screen()`, matching `card()`. (#2324)
40+
3941
### Other changes
4042

4143
* Optimized the test suite by avoiding network-based dataset downloads and heavy library imports during Playwright test app startup, reducing setup time significantly. (#2314)

shiny/ui/_card.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -85,9 +85,9 @@ def card(
8585
class_
8686
Additional CSS classes for the returned Tag.
8787
id
88-
Provide a unique identifier for the :func:`~shiny.ui.card` or to report its
89-
full screen state to Shiny. For example, using `id="my_card"`, you can observe
90-
the card's full screen state with `input.my_card_full_screen()`.
88+
A unique identifier for the card. If provided, the card's full screen
89+
state is reported to Shiny at `input.<id>_full_screen()` (e.g.,
90+
`input.my_card_full_screen()` for `id="my_card"`).
9191
**kwargs
9292
HTML attributes on the returned Tag.
9393

shiny/ui/_valuebox.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -370,9 +370,9 @@ def value_box(
370370
and `text-*` classes (e.g, `"bg-danger"` and `"text-light"`) to customize the
371371
background/foreground colors.
372372
id
373-
Provide a unique identifier for the :func:`~shiny.ui.value_box()` to report its
374-
state to Shiny. For example, using `id="my_value_box"`, you can observe the
375-
value box's full screen state with `input.my_value_box()["full_screen"]`.
373+
A unique identifier for the value box. If provided, the value box's full
374+
screen state is reported to Shiny at `input.<id>_full_screen()` (e.g.,
375+
`input.my_value_box_full_screen()` for `id="my_value_box"`).
376376
**kwargs
377377
Additional attributes to pass to :func:`~shiny.ui.card`.
378378

0 commit comments

Comments
 (0)