shiny 1.2.0
Breaking changes
-
.expect_inverse()for Navset controllers inshiny.playwright.controllersnow requires aboolvalue. To keep behavior the same, use.expect_inverse(False). (#1668) -
.expect_layout()for Navset controllers inshiny.playwright.controllersis now renamed to.expect_fluid()and requires aboolvalue. To keep behavior the same, use.expect_fluid(True)(#1668) -
.expect_icon()for Accordion controllers inshiny.playwright.controllersnow requires aboolvalue instead of astr. (#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_frameoutput method. All internal methods and helper methods now leverage thenarwhalsAPI 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.tableoutput method. (#1570) -
Shiny now supports theming via brand.yml with a single
_brand.ymlfile. Callui.Theme.from_brand()with__file__or the path to a_brand.ymlfile and pass the resulting theme to thethemeargument ofexpress.ui.page_opts()(Shiny Express) orui.page_*()functions (Shiny Core) to apply the brand theme to the entire app. (#1743) -
chat_ui()andChat.ui()gain amessagesparameter for providing starting messages. (#1736)
Other changes
-
Incorporated
orjsonfor faster data serialization in@render.data_frameoutputs. (#1570) -
Added
PageNavbarclass to the list ofshiny.playwright.controllersfor testingui.page_navbar(). (#1668) -
Added
.expect_widths()toNavsetPillListinshiny.playwright.controllersfor testingui.navset_pill_list(widths=). (#1668) -
Added
.expect_title()forPopoverinshiny.playwright.controllers(#1683) -
Added
.expect_disabled()forInputActionButtoninshiny.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()forSidebarinshiny.playwright.controllers(#1715) -
Modified
.expect_text()forSidebarinshiny.playwright.controllersto use.loc_contentinstead oflocfor text. Also modified.expect_width()to check the.loc_container's style instead of the.locelement. (#1715) -
Modified
.expect_text()and.expect_width()forSidebarinshiny.playwright.controllersto useloc_contentinstead oflocfor text. (#1715) -
Added
.expect_class()and.expect_multiple()forAccordioninshiny.playwright.controllers(#1710)
Bug fixes
-
A few fixes for
ui.Chat(), including: -
shiny createnow uses the templateidrather 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, andInputCheckboxGroup) inshiny.playwright.controllerto check thewidthproperty within thestyleattribute. (#1691, #1696, #1702) -
Fixed multiple input controllers (
InputSwitch,InputRadioButtons,InputNumeric,InputText,InputTextArea,InputPassword,InputActionButton, andInputActionLink) inshiny.playwright.controllerto correctly validate thewidthstyle property in `.expect_width(). (#1705) -
Fixed input controller
InputTextAreainshiny.playwright.controllerto correctly validate theresizestyle 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_framewhereboolorobjectcolumns were not being rendered. (#1570) -
Fixed output controller
OutputDataFrameinshiny.playwright.controllerto 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.downloaddid not respect the module namespacing. (Thanks, @nsiicm0!) (#1732) -
Added workaround in
Accordioninshiny.playwright.controllerwhere.expect_open()and.expect_panels()would hang while resolving a playwright locator. (Thanks, @joesho112358!) (#1165)