Uh oh!
There was an error while loading. Please reload this page.
Copy width/height calculating logic from kaleido - #5325
Conversation
closes plotly/Kaleido#378 |
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
emilykl
commented
Aug 14, 2025
Looks good @ayjayt ! Just run Let's add a test for this one. I'm happy to do that if you don't have the bandwidth, just let me know. |
Co-authored-by: Emily KL <4672118+emilykl@users.noreply.github.com>
Co-authored-by: Emily KL <4672118+emilykl@users.noreply.github.com>
| mock_get_chrome.assert_called_once() | ||
| def create_figure(width=None, height=None): |
There was a problem hiding this comment.
nit: could you move these two utility functions to the top of the file so they're not mixed in with the test functions?
| fig = create_figure() | ||
| svg_bytes = pio.to_image(fig, format="svg") | ||
| width, height = parse_svg_dimensions(svg_bytes) | ||
| assert width is not None and height is not None, ( |
There was a problem hiding this comment.
You should be able to import pio.defaults here and check that the dimensions equal the defaults
emilykl
commented
Aug 19, 2025
@ayjayt Looks good to me -- may I merge? |
Uh oh!
There was an error while loading. Please reload this page.
Code PR
plotly.graph_objects, my modifications concern the code generator and not the generated files.plotly/Kaleido#378