Skip to content

Express' value_box() no longer includes named positional args #966

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jan 3, 2024
Merged
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
13 changes: 4 additions & 9 deletions shiny/express/ui/_cm_components.py
Original file line number Diff line number Diff line change
Expand Up @@ -1115,8 +1115,6 @@ def nav_menu(
# Value boxes
# ======================================================================================
def value_box(
title: TagChild,
value: TagChild,
*,
showcase: Optional[TagChild] = None,
showcase_layout: ui._valuebox.SHOWCASE_LAYOUTS_STR
Expand All @@ -1134,16 +1132,14 @@ def value_box(

This function wraps :func:`~shiny.ui.value_box`.

An opinionated (:func:`~shiny.ui.card`-powered) box, designed for
displaying a `value` and `title`. Optionally, a `showcase` can provide for context
for what the `value` represents (for example, it could hold an icon, or even a
An opinionated (:func:`~shiny.ui.card`-powered) box, designed for displaying a title
(the 1st child), value (the 2nd child), and other explanation text (other children,
if any). Optionally, a `showcase` can provide for context for what the `value`
represents (for example, it could hold an icon, or even a
:func:`~shiny.ui.output_plot`).

Parameters
----------
title,value
A string, number, or :class:`~htmltools.Tag` child to display as
the title or value of the value box. The `title` appears above the `value`.
showcase
A :class:`~htmltools.Tag` child to showcase (e.g., an icon, a
:func:`~shiny.ui.output_plot`, etc).
Expand Down Expand Up @@ -1184,7 +1180,6 @@ def value_box(
"""
return RecallContextManager(
ui.value_box,
args=(title, value),
kwargs=dict(
showcase=showcase,
showcase_layout=showcase_layout,
Expand Down