Skip to content

Commit c10c451

Browse files
committed
Deprecate panel_well() in favor of card()
1 parent a713ebd commit c10c451

File tree

2 files changed

+6
-23
lines changed

2 files changed

+6
-23
lines changed

shiny/express/ui/_cm_components.py

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
from htmltools import Tag, TagAttrs, TagAttrValue, TagChild, TagFunction, TagList
88

99
from ... import ui
10+
from ..._deprecated import warn_deprecated
1011
from ..._docstring import add_example, no_example
1112
from ...types import DEPRECATED, MISSING, MISSING_TYPE
1213
from ...ui._accordion import AccordionPanel
@@ -1363,13 +1364,9 @@ def value_box(
13631364
@no_example()
13641365
def panel_well(**kwargs: TagAttrValue) -> RecallContextManager[Tag]:
13651366
"""
1366-
Context manager for a well panel
1367-
1368-
This function wraps :func:`~shiny.ui.panel_well`.
1369-
1370-
A well panel is a simple container with a border and some padding. It's useful for
1371-
grouping related content together.
1367+
Deprecated. Use :func:`~shiny.express.ui.card` instead.
13721368
"""
1369+
warn_deprecated("panel_well() is deprecated. Use shiny.express.ui.card() instead.")
13731370
return RecallContextManager(
13741371
ui.panel_well,
13751372
kwargs=dict(

shiny/ui/_bootstrap.py

Lines changed: 3 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@
1111
"help_text",
1212
)
1313

14-
1514
from typing import Literal, Optional
1615

1716
from htmltools import (
@@ -27,6 +26,7 @@
2726
tags,
2827
)
2928

29+
from .._deprecated import warn_deprecated
3030
from .._docstring import add_example, no_example
3131
from ..module import current_namespace
3232
from ..types import MISSING, MISSING_TYPE
@@ -112,23 +112,9 @@ def column(
112112
@no_example()
113113
def panel_well(*args: TagChild | TagAttrs, **kwargs: TagAttrValue) -> Tag:
114114
"""
115-
Create a well panel.
116-
117-
Creates a panel with a slightly inset border and gray background. Equivalent to
118-
Bootstrap's ``well`` CSS class.
119-
120-
Parameters
121-
----------
122-
*args
123-
UI elements to include inside the panel.
124-
**kwargs
125-
Attributes to place on the panel tag.
126-
127-
Returns
128-
-------
129-
:
130-
A UI element.
115+
Deprecated. Use :func:`~shiny.ui.card` instead.
131116
"""
117+
warn_deprecated("panel_well() is deprecated. Use shiny.ui.card() instead.")
132118
return div({"class": "well"}, *args, **kwargs)
133119

134120

0 commit comments

Comments
 (0)