Skip to content

shiny 1.2.0

Compare
Choose a tag to compare
@cpsievert cpsievert released this 29 Oct 21:19
· 8 commits to main since this release

Breaking changes

  • .expect_inverse() for Navset controllers in shiny.playwright.controllers now requires a bool value. To keep behavior the same, use .expect_inverse(False). (#1668)

  • .expect_layout() for Navset controllers in shiny.playwright.controllers is now renamed to .expect_fluid() and requires a bool value. To keep behavior the same, use .expect_fluid(True) (#1668)

  • .expect_icon() for Accordion controllers in shiny.playwright.controllers now requires a bool value instead of a str. (#1710)

New features

  • New features for @render.data_frame:

    • Added narwhals support for @render.data_frame. This allows for any eager data frame supported by narwhals to be returned from a @render.data_frame output method. All internal methods and helper methods now leverage the narwhals API to be data frame agnostic. (#1570)

    • Added .data_patched() reactive calculation that applies all .cell_patches() to .data(). (#1719)

    • Added .update_cell_value() method to programmatically update the contents of a data frame cell. (#1719)

    • Added .update_data() method to update the rendered data without resetting any user sort or filter. Note, all user edits will be forgotten. (#1719)

  • Added narwhals support for @render.table. This allows for any eager data frame supported by narwhals to be returned from a @render.table output method. (#1570)

  • Shiny now supports theming via brand.yml with a single _brand.yml file. Call ui.Theme.from_brand() with __file__ or the path to a _brand.yml file and pass the resulting theme to the theme argument of express.ui.page_opts() (Shiny Express) or ui.page_*() functions (Shiny Core) to apply the brand theme to the entire app. (#1743)

  • chat_ui() and Chat.ui() gain a messages parameter for providing starting messages. (#1736)

Other changes

  • Incorporated orjson for faster data serialization in @render.data_frame outputs. (#1570)

  • Added PageNavbar class to the list of shiny.playwright.controllers for testing ui.page_navbar(). (#1668)

  • Added .expect_widths() to NavsetPillList in shiny.playwright.controllers for testing ui.navset_pill_list(widths=). (#1668)

  • Added .expect_title() for Popover in shiny.playwright.controllers (#1683)

  • Added .expect_disabled() for InputActionButton in shiny.playwright.controllers (#1705)

  • Small improvements to the default pulse busy indicator to better blend with any background. It's also now slightly smaller by default.(#1707)

  • Added .expect_class(), .expect_gap(), .expect_bg_color(), .expect_desktop_state(), .expect_mobile_state(), .expect_mobile_max_height(), .expect_title(), and .expect_padding() for Sidebar in shiny.playwright.controllers (#1715)

  • Modified .expect_text() for Sidebar in shiny.playwright.controllers to use .loc_content instead of loc for text. Also modified .expect_width() to check the .loc_container's style instead of the .loc element. (#1715)

  • Modified .expect_text() and .expect_width() for Sidebar in shiny.playwright.controllers to use loc_content instead of loc for text. (#1715)

  • Added .expect_class() and .expect_multiple() for Accordion in shiny.playwright.controllers (#1710)

Bug fixes

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

    • Fixed a bug with Chat() sometimes silently dropping errors. (#1672)
    • Fixed a bug with Chat() sometimes not removing it's loading icon (on error or a None transform). (#1679)
    • .messages(format="anthropic") correctly removes non-user starting messages (once again). (#1685)
  • shiny create now uses the template id rather than the directory name as the default directory. (#1666)

  • ui.Theme() now works correctly on Windows when the theme requires Sass compilation. (Thanks, @yuuuxt!) (#1684)

  • Fixed multiple input controllers (InputSlider, InputDate, InputDateRange, InputCheckbox, and InputCheckboxGroup) in shiny.playwright.controller to check the width property within the style attribute. (#1691, #1696, #1702)

  • Fixed multiple input controllers (InputSwitch, InputRadioButtons, InputNumeric, InputText, InputTextArea, InputPassword, InputActionButton, and InputActionLink) in shiny.playwright.controller to correctly validate the width style property in `.expect_width(). (#1705)

  • Fixed input controller InputTextArea in shiny.playwright.controller to correctly validate the resize style property in .expect_resize(). (#1705)

  • Fixed a bug in ui.conditional_panel() that would cause the panel to repeatedly show/hide itself when the provided condition did not evaluate to a boolean value. (#1707)

  • Fixed a bug with ui.input_slider() when used as a range slider that made it impossible to change the slider value when both handles were at the maximum value. (#1707)

  • Fixed bug in @render.data_frame where bool or object columns were not being rendered. (#1570)

  • Fixed output controller OutputDataFrame in shiny.playwright.controller to correctly assert the number of rows in .expect_nrow() as the total number of virtual rows, not the number of currently displaying rows. (#1719)

  • Fixed issue where @render.download did not respect the module namespacing. (Thanks, @nsiicm0!) (#1732)

  • Added workaround in Accordion in shiny.playwright.controller where .expect_open() and .expect_panels() would hang while resolving a playwright locator. (Thanks, @joesho112358!) (#1165)