Skip to content

shiny 1.4.0

Latest
Compare
Choose a tag to compare
@schloerke schloerke released this 08 Apr 16:41
· 15 commits to main since this release

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 the app object.
  • Added a new .enable_bookmarking(client) method to ui.Chat(). This method will attach bookmark hooks to save and restore the chat's messages and client state. (#1951, #1954)

  • Both ui.Chat() and ui.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 to ui.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 on ui.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 of 680px for better readability. Also, similar to Chat(), it now also horizontally centers itself. (#1944)

  • ui.page_navbar() and ui.navset_bar() now correctly apply theme and additional attributes from navbar_options created with ui.navbar_options(). (#1942)

Bug fixes

  • Fixed an issue where the <main> areas of ui.page_sidebar() and ui.page_navbar() (with a sidebar) were made to be a fillable containers even when fillable=False. (#1816)

  • Fixed an issue where the .update_user_input() method on ui.Chat() isn't working in shinylive. (#1891)

  • Fixed an issue where width and height on MarkdownStream() were not working as intended. (#1944)

  • Fixed an issue with the .click() method on InputActionButton controllers in shiny.playwright.controllers where the method would not work as expected. (#1886)