Skip to content

Commit ba86904

Browse files
committed
Address review feedback
1 parent 9fbfb2e commit ba86904

File tree

3 files changed

+7
-8
lines changed

3 files changed

+7
-8
lines changed

shiny/api-examples/MarkdownStream/app-core.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
from shiny import App, ui
66

77
app_ui = ui.page_fluid(
8-
ui.markdown_stream_ui("shiny-readme"),
8+
ui.output_markdown_stream("shiny-readme"),
99
)
1010

1111

@@ -23,7 +23,6 @@ def chunk_generator():
2323
yield chunk + " "
2424

2525
md = ui.MarkdownStream("shiny-readme")
26-
md.ui()
2726
md.stream(chunk_generator())
2827

2928

shiny/ui/__init__.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,7 @@
109109
from ._layout import layout_column_wrap
110110
from ._layout_columns import layout_columns
111111
from ._markdown import markdown
112-
from ._markdown_stream import MarkdownStream, markdown_stream_ui
112+
from ._markdown_stream import MarkdownStream, output_markdown_stream
113113
from ._modal import modal, modal_button, modal_remove, modal_show
114114
from ._navs import (
115115
nav_control,
@@ -274,7 +274,7 @@
274274
# _markdown
275275
"markdown",
276276
# _markdown_stream
277-
"markdown_stream_ui",
277+
"output_markdown_stream",
278278
"MarkdownStream",
279279
# _modal
280280
"modal_button",

shiny/ui/_markdown_stream.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
from ._html_deps_py_shiny import markdown_stream_dependency
1010

1111
__all__ = (
12-
"markdown_stream_ui",
12+
"output_markdown_stream",
1313
"MarkdownStream",
1414
)
1515

@@ -67,15 +67,15 @@ def ui(self) -> Tag:
6767
Get the UI element for this markdown stream.
6868
6969
This method is only relevant fpr Shiny Express. In Shiny Core, use
70-
:func:`~shiny.ui.markdown_stream_ui` for placing the markdown stream
70+
:func:`~shiny.ui.output_markdown_stream` for placing the markdown stream
7171
in the UI.
7272
7373
Returns
7474
-------
7575
Tag
7676
The UI element for this markdown stream.
7777
"""
78-
return markdown_stream_ui(self.id, self._content, self._content_type)
78+
return output_markdown_stream(self.id, self._content, self._content_type)
7979

8080
def stream(self, content: Iterable[str], clear: bool = True):
8181
"""
@@ -143,7 +143,7 @@ def _send_custom_message(self, msg: ContentMessage | isStreamingMessage):
143143
)
144144

145145

146-
def markdown_stream_ui(
146+
def output_markdown_stream(
147147
id: str,
148148
content: str = "",
149149
content_type: StreamingContentType = "markdown",

0 commit comments

Comments
 (0)