Stack the chart legends below the plots up to 950px - #124
Open
bendichter wants to merge 2 commits into
Open
Conversation
At window widths between about 700 and 950px, half a laptop screen, the dashboard kept the legend in its fixed side column, which squeezed the charts to around 500px and left the mostly empty legend column as dead space on the right. The side layout now applies only above 950px, where the chart still gets about 700px of width; below that the legend stacks under the chart as it already did on phones. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_014827duyb34XeyPz1XF4mmt
✅ Deploy Preview for catalystneuro ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
The stacked layout inherited align-items: flex-start from the base rule, which in column direction sizes children to their content width. An SVG with width 100 percent has no intrinsic width, so the chart div collapsed to the 300px replaced-element fallback and the rest of the figure sat empty to its right. This was the actual cause of the empty space at narrow widths, present on phones all along; the breakpoint change alone widened the range where it showed. Verified in the browser: the chart went from 300px to filling the 843px container. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_014827duyb34XeyPz1XF4mmt
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.
Fixes the empty space to the right of the dashboard charts at narrow window widths. Two changes, and the second is the actual root cause:
align-items: flex-startfrom the base rule, which in column direction sizes children to their content width. An SVG withwidth: 100%has no intrinsic width, so the chart div collapsed to the 300px replaced-element fallback and the rest of the figure sat empty to its right. This bug was present on phones all along. Verified live in the browser: with the column layout forced, the chart measured 300px in an 843px container before the fix and fills all 843px withalign-items: stretch.🤖 Generated with Claude Code
https://claude.ai/code/session_014827duyb34XeyPz1XF4mmt