fix(explore): prevent unnecessary scrollbars during chart rendering#39291
fix(explore): prevent unnecessary scrollbars during chart rendering#39291massucattoj wants to merge 1 commit intoapache:masterfrom
Conversation
Code Review Agent Run #a63950Actionable Suggestions - 0Additional Suggestions - 1
Review Details
Bito Usage GuideCommands Type the following command in the pull request comment and save the comment.
Refer to the documentation for additional commands. Configuration This repository uses Documentation & Help |
Codecov Report✅ All modified and coverable lines are covered by tests. ❌ Your project check has failed because the head coverage (99.81%) is below the target coverage (100.00%). You can increase the head coverage or adjust the target coverage. Additional details and impacted files@@ Coverage Diff @@
## master #39291 +/- ##
=======================================
Coverage 64.42% 64.42%
=======================================
Files 2553 2553
Lines 132588 132588
Branches 30758 30758
=======================================
Hits 85416 85416
Misses 45686 45686
Partials 1486 1486
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
jaymasiwal
left a comment
There was a problem hiding this comment.
I pulled this branch locally to test the layout behavior. I specifically kept an eye out for the clipping risk mentioned by the bot above, but everything looks pristine. No content is being clipped since SuperChart handles the explicit sizing, and those annoying transient scrollbars on initial load/resize are completely gone. Great, clean UI fix! 🚀
|
Before/after screenshots would be nice |
SUMMARY
Charts in the Explore page were occasionally showing unnecessary vertical and horizontal scrollbars on first load, which would disappear after a refresh. This was caused by a race condition in the chart rendering
lifecycle — the ResizeObserver (debounced at 300ms) could report layout dimensions before the container had fully stabilized, causing the chart to momentarily overflow its container.
The chart panel wrapper used
overflow: auto, which made these transient dimension mismatches visible as scrollbars. Changing tooverflow: hiddenprevents this, since charts are always explicitly sized to fittheir container via the
widthandheightprops passed toSuperChart.PS: This fix only applies to the Explore page. The dashboard path was already protected —
ChartWrapperin the dashboard grid usesoverflow: hiddenby default.BEFORE/AFTER SCREENSHOTS OR ANIMATED GIF
Not applicable — this was a race condition that appeared intermittently during chart load. The fix prevents scrollbars from appearing regardless of ResizeObserver timing. Charts should now render without
unnecessary scrollbars on first load.
TESTING INSTRUCTIONS
ADDITIONAL INFORMATION