New features
-
Added support for bookmarking Shiny applications. Bookmarking allows users to save the current state of an application and return to it later. This feature is available in both Shiny Core and Shiny Express. (#1870, #1915, #1919, #1920, #1922, #1934, #1938, #1945, #1955)
- To enable bookmarking in Express mode, set
shiny.express.app_opts(bookmark_store=)
during the app's initial construction. - To enable bookmarking in Core mode, set
shiny.App(bookmark_store=)
when constructing theapp
object.
- To enable bookmarking in Express mode, set
-
Added a new
.enable_bookmarking(client)
method toui.Chat()
. This method will attach bookmark hooks to save and restore the chat's messages and client state. (#1951, #1954) -
Both
ui.Chat()
andui.MarkdownStream()
now support the inclusion of Shiny UI elements inside of messages. This allows for gathering input from the user (e.g.,ui.input_select()
), displaying of rich output (e.g.,render.DataGrid()
), and more. (#1868) -
Added a new
.message_stream_context()
method toui.Chat()
. This context manager is a useful alternative to.append_message_stream()
when you want to: (1) Nest a stream within another and/or (2) Overwrite/replace streaming content. (#1906)
Changes
-
Express mode's
app_opts()
requires all arguments to be keyword-only. If you are using positional arguments, you will need to update your code. (#1895) -
The
.get_latest_stream_result()
method onui.MarkdownStream()
was deprecated in favor of the new.latest_stream
property. Call.result()
on the property to get the latest result,.status
to check the status, and.cancel()
to cancel the stream. -
MarkdownStream()
now has a default maximum width of680px
for better readability. Also, similar toChat()
, it now also horizontally centers itself. (#1944) -
ui.page_navbar()
andui.navset_bar()
now correctly applytheme
and additional attributes fromnavbar_options
created withui.navbar_options()
. (#1942)
Bug fixes
-
Fixed an issue where the
<main>
areas ofui.page_sidebar()
andui.page_navbar()
(with asidebar
) were made to be a fillable containers even whenfillable=False
. (#1816) -
Fixed an issue where the
.update_user_input()
method onui.Chat()
isn't working in shinylive. (#1891) -
Fixed an issue where
width
andheight
onMarkdownStream()
were not working as intended. (#1944) -
Fixed an issue with the
.click()
method on InputActionButton controllers inshiny.playwright.controllers
where the method would not work as expected. (#1886)