Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix height of Plotly wrappers #195

Merged
merged 2 commits into from
Jan 29, 2024
Merged

Fix height of Plotly wrappers #195

merged 2 commits into from
Jan 29, 2024

Conversation

brianlove
Copy link
Contributor

The div.svg-container elements wrapping the Plotly SVG charts was getting height: 100%; set under certain viewport widths (instead of the fixed height set under other viewport widths), which led to the charts overlapping each other and other content. By fixing the height of div above that one, we can keep the chart dimensions consistent.

Made the charts slightly smaller on phone-sized viewports since they didn't seem to need to be quite as tall in that case.

Updated browserslist DB

Closes #116

@brianlove brianlove requested a review from jmelot January 17, 2024 22:38
@brianlove brianlove self-assigned this Jan 17, 2024
Copy link

github-actions bot commented Jan 17, 2024

No need for rebasing 👍
behind_count is 0
ahead_count is 2

Copy link

github-actions bot commented Jan 17, 2024

JavaScript Coverage

Summary

Lines Statements Branches Functions
Coverage: 65%
66.08% (339/513) 56.87% (149/262) 65.51% (114/174)
Modified Files • (65%)
File% Stmts% Branch% Funcs% LinesUncovered Line #s
All files66.0856.8765.5165.69 
components62.7260.4758.9762.22 
   TrendsChart.jsx000011–68

@jmelot jmelot force-pushed the 116-charts-overlap branch from cb4477f to 5afe79e Compare January 22, 2024 17:06
Copy link
Member

@jmelot jmelot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The issue appears to be addressed when resizing, but I still see some overlap at 450px if I refresh the page at that window size

Screenshot 2024-01-22 at 12 18 52 PM

brianlove added a commit that referenced this pull request Jan 22, 2024
The different SVG heights for phone vs larger viewports seems to cause
its own issues with overlapping charts (see comments in #195), so stick
to a consistent height (450px) across all viewport widths.
@brianlove brianlove requested a review from jmelot January 22, 2024 20:54
Copy link
Member

@jmelot jmelot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good now!

The `div.svg-container` elements wrapping the Plotly SVG charts was
getting `height: 100%;` set under certain viewport widths (instead of
the fixed height set under other viewport widths), which led to the
charts overlapping each other and other content.  By fixing the height
of div above that one, we can keep the chart dimensions consistent.

Made the charts slightly smaller on phone-sized viewports since they
didn't seem to need to be quite as tall in that case.

Updated browserslist DB

Closes #116
The different SVG heights for phone vs larger viewports seems to cause
its own issues with overlapping charts (see comments in #195), so stick
to a consistent height (450px) across all viewport widths.
@jmelot jmelot force-pushed the 116-charts-overlap branch from 5d0e0aa to 96b7a38 Compare January 29, 2024 20:56
@jmelot jmelot merged commit 41fe326 into version2 Jan 29, 2024
3 checks passed
@jmelot jmelot deleted the 116-charts-overlap branch January 29, 2024 20:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants