github posit-dev/py-shiny v0.9.0
Shiny 0.9.0

one month ago

Breaking Changes

  • @render.data_frame return values of DataTable and DataGrid had their parameter of row_selection: Literal["single", "multiple"] become deprecated. Please use selection_mode="row" or selection_mode="rows" instead. (#1198)

  • The col_widths argument of ui.layout_columns() now sets the sm breakpoint by default, rather than the md breakpoint. For example, col_widths=(12, 6, 6) is now equivalent to {"sm": (12, 6, 6)} rather than {"md": (12, 6, 6)}. (#1222)

New features

  • Session objects now have a set_message_handler(name, fn) method that allows you to register a message handler function that will be called when a request message with the given name is received from the client (via Shiny.shinyapp.makeRequest() (JS)). (#1253)

  • Experimental: @render.data_frame return values of DataTable and DataGrid support editable=True to enable editing of the data table cells. (#1198)

  • ui.card() and ui.value_box() now take an id argument that, when provided, is used to report the full screen state of the card or value box to the server. For example, when using ui.card(id = "my_card", full_screen = TRUE) you can determine if the card is currently in full screen mode by reading the boolean value of input.my_card_full_screen(). (#1215, #1266)

  • Added support for using shiny.express in Quarto Dashboards. (#1217)

  • ui.value_box(), ui.layout_columns() and ui.layout_column_wrap() now all have min_height and max_height arguments. These are useful in filling layouts, like ui.page_fillable(), ui.page_sidebar(fillable=True) or ui.page_navbar(fillable=True). For example, you can use ui.layout_columns(min_height=300, max_height=500) to ensure that a set of items (likely arranged in a row of columns) are always between 300 and 500 pixels tall. (#1223)

  • Added an error console which displays errors in the browser's UI. This is enabled by default when running applications locally, and can be disabled with shiny run --no-dev-mode. It is not enabled for applications that are deployed to a server. (#1060)

  • shiny create was updated to include some additional templates as well as an option to choose from the new templates website. (#1273, #1277, #1274)

  • shiny.express.ui.page_opts() now accepts additional keyword arguments that are passed to the underlying page layout chosen by shiny.ui.page_auto(). (#1314)

Bug fixes

  • On Windows, Shiny Express app files are now read in as UTF-8. (#1203)

  • input_dark_mode() now accepts a style argument that can be used to customize the appearance and position of the dark mode toggle switch. (#1207)

  • Calling ui.update_selectize() with choices and selected now clears the current selection before updating the choices and selected value. (#1221)

  • Fixed an issue that could happen with a ui.card() or ui.value_box() that is rendered dynamically via @render.ui when an updated card replaces a card that the user has expanded into full screen mode. Now the full screen state is reset for the new card or value box. If you want to update a card without potentially exiting the full-screen mode, update specific parts of the card using ui.output_ui() or ui.output_text(). (#1221)

  • ui.layout_columns() now correctly applies the row_heights at the xs breakpoint, if supplied. (#1222)

  • ui.panel_conditional() now adds the .shiny-panel-conditional class to the <div> element wrapping the conditional panel contents. (#1257)

  • ui.panel_conditional() no longer results in unwanted double padding when the parent container uses gap for spacing multiple elements (e.g., when used in ui.layout_columns(), ui.page_fillable(), etc). (#1266)

  • Error messages now use var(--bs-danger) instead of var(--bs-danger-text-emphasis) for the text color. (#1266)

Other changes

  • The fill CSS used by fillable containers (i.e. when fillable=True) now uses a CSS cascade layer named htmltools to reduce the precedence order of the fill CSS. (#1228)

Don't miss a new py-shiny release

NewReleases is sending notifications on new releases.