Skip to content

Shiny 1.1.0

Latest
Compare
Choose a tag to compare
@cpsievert cpsievert released this 03 Sep 19:16
· 36 commits to main since this release

New features

  • ui.Chat() gains a new .update_user_input() method, which adds the ability to update the input placeholder message. As a result, .set_user_message() is now deprecated (since the new method can also be used to update the message). (#1594)

  • shiny create now supports a succinct format for specifying the GitHub repository via the --github flag, e.g. --github posit-dev/py-shiny-templates. You can now also use --github and --template together, in which case --github should point to a repository containing a directory matching the name provided in --template. (#1623)

  • shiny create now identifies templates in external repositories using a _template.json metadata file. This file should contain at an "id" and optionally a "title" and "description". When shiny create is called with the --github flag but without a --template flag, it will offer a menu listing all available templates in the repository. (#1631)

Other changes

  • A few changes for ui.Chat(), including:
    • The .messages() method no longer trims messages by default (i.e., the default value of token_limits is now None instead of the overly generic and conservative value of (4096, 1000)). See the new generative AI in production templates (via shiny create) for examples of setting token_limits based on the model being used. (#1657)
    • User input that contains markdown now renders the expected HTML. (#1607)
    • Busy indication is now visible/apparent during the entire lifecycle of response generation. (#1607)

Bug fixes

  • A few fixes for ui.Chat(), including:

    • A fix for use inside Shiny modules. (#1582)
    • .messages(format="google") now returns the correct role. (#1622)
    • ui.Chat(messages) are no longer dropped when dynamically rendered. (#1593)
    • transform_assistant_response can now return None and correctly handles change of content on the last chunk. (#1641)
  • An empty ui.input_date() value no longer crashes Shiny. (#1528)

  • Fixed bug where calling .update_filter(None) on a data frame renderer did not visually reset non-numeric column filters. (It did reset the column's filtering, just not the label). Now it resets filter's label. (#1557)

  • Require shinyswatch >= 0.7.0 and updated examples accordingly. (#1558)

  • ui.input_text_area(autoresize=True) now resizes properly even when it's not visible when initially rendered (e.g. in a closed accordion or a hidden tab). (#1560)

  • ui.notification_show(duration=None) now persists the notification until the app user closes it. (#1577)

  • Some copies of Windows 10 have registry entries mapping .js files to content type "text/plain", which was causing all sorts of problems for browsers. (#1624)

  • Added missing support for express.ui.navset_card_pill(placement:). (#1602)

  • Added .expect_sidebar() and .expect_title() methods for NavsetCardTab, NavsetCardPill, NavsetCardUnderline, and NavsetBar. (#1602)

  • Added .expect_placement() method for NavsetCardPill and NavsetCardUnderline. (#1602)