Repository navigation
[WC-3594]: Chart previews no longer overlap other widgets in design mode - #2469
Draft
samuelreichert wants to merge 1 commit into
Draft
samuelreichert wants to merge 1 commit into
samuelreichert wants to merge 1 commit into
Conversation
… mode The design mode preview used fixed widths (385px with legend, 300px without) and an inline-flex wrapper, so in narrow containers it overflowed and overlapped neighbouring widgets. The preview now fills the available width, capped at the previous size, and the plot image shrinks while the legend keeps its width. WC-3594 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Pull request type
Bug fix (non-breaking change which fixes an issue)
Description
In Studio Pro design mode, the preview of the Area, Bar, Bubble, Column, Heat map, Line, Pie/Doughnut and Time series charts overflowed narrow containers (e.g. a
col-4layout grid column) and overlapped the neighbouring widgets.Cause: the shared
ChartPreviewrendered the chart with fixed widths (385pxwith legend,300pxwithout) and the plot image with a fixed300pxwidth, inside aninline-flexwrapper. When the container was narrower than that, the content overflowed visibly on top of the next column.Fix (minimal, preview only):
display: flexwithmax-widthset to the previous size (385px/300px).width: 100%, so it fills the available width up to that cap.flex: 1 1 0; min-width: 0) and the legend keeps its85pxwidth (flex: none).When there is enough room, the preview keeps its current size (385×232 / 300×232). It only shrinks when the container is narrower. The runtime chart is not affected. Custom chart uses its own preview and is not affected either.
Also added a unit test for
ChartPreviewand anUnreleased → Fixedchangelog entry to each affected chart package.What should be covered while testing?
col-4columns. Put a Line chart in the first column and a Text widget in the second.🤖 Generated with Claude Code