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
10 changes: 10 additions & 0 deletions docs/_quartodoc.yml
Original file line number Diff line number Diff line change
Expand Up @@ -280,6 +280,16 @@ quartodoc:
- experimental.ui.value_box
- experimental.ui.showcase_left_center
- experimental.ui.showcase_top_right
- kind: page
path: ExTooltip
summary:
name: "Tooltips"
desc: "Display additional information when focusing (or hovering over) a UI element."
flatten: true
contents:
- experimental.ui.tooltip
- experimental.ui.tooltip_toggle
- experimental.ui.update_tooltip
- kind: page
path: ExFillingLayout
summary:
Expand Down
10 changes: 5 additions & 5 deletions shiny/experimental/ui/_card.py
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ def card(
Returns
-------
:
An :func:`~htmltools.div` tag.
An :func:`~shiny.ui.tags.div` tag.

See Also
--------
Expand Down Expand Up @@ -314,12 +314,12 @@ def card_body(
# https://mypy.readthedocs.io/en/stable/protocols.html#callback-protocols
class WrapperCallable(Protocol):
"""
A callable that wraps children into a :func:`~shiny.experimental.ui.CardItem`.
A callable that wraps children into a :class:`~shiny.experimental.ui.CardItem`.
"""

def __call__(self, *args: TagChild) -> CardItem:
"""
Wraps children into a :func:`~shiny.experimental.ui.CardItem`.
Wraps children into a :class:`~shiny.experimental.ui.CardItem`.

Parameters
----------
Expand Down Expand Up @@ -554,7 +554,7 @@ def card_footer(

class ImgContainer(Protocol):
"""
A callable that wraps the return value of `card_image()`. To isolate your object in a card, return a :func:`~shiny.experimental.ui.CardItem`.
A callable that wraps the return value of `card_image()`. To isolate your object in a card, return a :class:`~shiny.experimental.ui.CardItem`.
"""

def __call__(self, *args: Tag) -> Tagifiable:
Expand Down Expand Up @@ -628,7 +628,7 @@ def card_image(
If :func:`~shiny.experimental.ui.card_body` is used, each image will be in separate cards. If
the `container` method does not return a :class:`~shiny.experimental.ui.CardItem`, it
allows for consecutive non-`CardItem` objects to be bundled into a single
:func:`~.shiny.experimental.card_body` within :func:`~shiny.experimental.ui.card`.
:func:`~shiny.experimental.ui.card_body` within :func:`~shiny.experimental.ui.card`.
**kwargs
Additional HTML attributes for the resolved Tag.
"""
Expand Down
13 changes: 9 additions & 4 deletions shiny/experimental/ui/_fill.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,11 @@
)

TagFillingLayoutT = TypeVar("TagFillingLayoutT", bound="Tag | FillingLayout")
"""
A :class:`~htmltools.Tag` object or an object that implements the
:class:`~shiny.experimental.ui.FillingLayout` protocol.
"""

TagT = TypeVar("TagT", bound="Tag")


Expand Down Expand Up @@ -103,7 +108,7 @@ def bind_fill_role(
-------
:
The original :class:`~htmltools.Tag` object (`tag`) with additional attributes
(and an :class:`~htmltools.HtmlDependency`).
(and an :class:`~htmltools.HTMLDependency`).
"""
tag = _add_role(
tag,
Expand Down Expand Up @@ -166,7 +171,7 @@ def as_fill_carrier(
-------
:
The original :class:`~htmltools.Tag` object (`tag`) with additional attributes
(and an :class:`~htmltools.HtmlDependency`).
(and an :class:`~htmltools.HTMLDependency`).

See Also
--------
Expand Down Expand Up @@ -220,7 +225,7 @@ def as_fillable_container(
-------
:
The original :class:`~htmltools.Tag` object (`tag`) with additional attributes
(and an :class:`~htmltools.HtmlDependency`).
(and an :class:`~htmltools.HTMLDependency`).

See Also
--------
Expand Down Expand Up @@ -273,7 +278,7 @@ def as_fill_item(
-------
:
The original :class:`~htmltools.Tag` object (`tag`) with additional attributes
(and an :class:`~htmltools.HtmlDependency`).
(and an :class:`~htmltools.HTMLDependency`).

See Also
--------
Expand Down
2 changes: 1 addition & 1 deletion shiny/experimental/ui/_page.py
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,7 @@ def page_navbar(
Choose a particular nav item to select by default value (should match it's
``value``).
sidebar
A :func:`~shiny.ui.sidebar` component to display on every page.
A :func:`~shiny.experimental.ui.sidebar` component to display on every page.
fillable
Whether or not the main content area should be considered a fillable
(i.e., flexbox) container.
Expand Down
10 changes: 5 additions & 5 deletions shiny/experimental/ui/_sidebar.py
Original file line number Diff line number Diff line change
Expand Up @@ -132,8 +132,7 @@ def sidebar(
`sidebar=` argument of:

* :func:`~shiny.experimental.ui.layout_sidebar`
* Creates a sidebar layout component which can be dropped inside any
:func:`~shiny.ui.page` or :func:`~shiny.experimental.ui.card` context.
* Creates a sidebar layout component which can be dropped inside any Shiny UI page method (e.g. :func:`~shiny.experimental.ui.page_fillable`) or :func:`~shiny.experimental.ui.card` context.
* :func:`~shiny.experimental.ui.navset_bar`, :func:`~shiny.experimental.ui.navset_tab_card`, and :func:`~shiny.experimental.ui.navset_pill_card`
* Creates a multi page/tab UI with a singular `sidebar()` (which is
shown on every page/tab).
Expand Down Expand Up @@ -164,7 +163,7 @@ def sidebar(
title
A character title to be used as the sidebar title, which will be wrapped in a
`<div>` element with class `sidebar-title`. You can also provide a custom
:func:`~shiny.htmltools.tag` for the title element, in which case you'll
:class:`~htmltools.Tag` for the title element, in which case you'll
likely want to give this element `class = "sidebar-title"`.
bg,fg
A background or foreground color.
Expand Down Expand Up @@ -259,8 +258,9 @@ def layout_sidebar(
"""
Sidebar layout

Create a sidebar layout component which can be dropped inside any
:func:`~shiny.ui.page` or :func:`~shiny.experimental.ui.card` context.
Create a sidebar layout component which can be dropped inside any Shiny UI page
method (e.g. :func:`~shiny.experimental.ui.page_fillable`) or
:func:`~shiny.experimental.ui.card` context.

Parameters
----------
Expand Down
3 changes: 2 additions & 1 deletion shiny/experimental/ui/_tooltip.py
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,8 @@ def tooltip(
If `trigger` yields multiple HTML elements (e.g., a :class:`~htmltools.TagList` or
complex [`shinywidgets`](https://github.com/rstudio/py-shinywidgets) object), the
last HTML element is used as the trigger. If the `trigger` should contain all of
those elements, wrap the object in a :func:`~htmltools.div` or :func:`~htmltools.span`.
those elements, wrap the object in a :func:`~shiny.ui.tags.div` or
:func:`~shiny.ui.tags.span`.

See Also
--------
Expand Down
6 changes: 3 additions & 3 deletions shiny/session/_session.py
Original file line number Diff line number Diff line change
Expand Up @@ -880,10 +880,10 @@ class Inputs:
"""
A class representing Shiny input values.

This class provides access to a :class:`~shiny.session.Session`'s input values. The
input values are reactive :class:`~shiny.reactive.Values`, and can be accessed with
This class provides access to a :class:`~shiny.Session`'s input values. The
input values are reactive :class:`~shiny.reactive.Value`s, and can be accessed with
the ``[]`` operator, or with ``.``. For example, if there is an input named ``x``,
it can be accessed via ``input["x"]()`` or ``input.x()``.
it can be accessed via `input["x"]()` or ``input.x()``.
"""

def __init__(
Expand Down