Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: allow plotly plots to shrink inside ui.flex/grid layouts (#1946)
- set responsive config to true which allows plots to properly grow and shrink - removed unnecessary useResizeHandler (which only watches window), as we have our own observer - fixed failing test by changing locator to plotly parent container. Responsive setting has an absolutely positioned child that makes the other locator have zero height, Tested with the following script, and resizing golden-layout panels both vertically and horizontally and resizing browser window horizontally and vertically. ```py from deephaven import ui, empty_table from deephaven.plot import express as dx t = empty_table(100).update(["x = i", "y = i"]) p = dx.line(t, x="x", y="y") @ui.component def common_example(): return ui.panel( ui.flex( ui.text_field(label="Text Field"), ui.text_field(label="Text Field"), ui.text_field(label="Text Field"), ), t, p ) ui_common_example = common_example() @ui.component def common_example_row(): return ui.panel( ui.flex( ui.text_field(label="Text Field"), ui.text_field(label="Text Field"), ui.text_field(label="Text Field"), direction="column" ), t, p, direction="row" ) ui_common_example_row = common_example_row() ```
- Loading branch information