fix(explore): stop the viz switcher from overflowing the control panel - #42911
fix(explore): stop the viz switcher from overflowing the control panel#42911verdier wants to merge 1 commit into
Conversation
The wrapper around `FastVizSwitcher` sets `min-width: ${theme.sizeUnit * 72}px`
(288px) as a hard floor. That floor ignores the control panel's own horizontal
inset and the gutter taken by its vertical scrollbar, so the panel gains a
horizontal scrollbar as soon as it scrolls vertically — which it does on most
charts.
Measured on the Explore control panel at its default width: the tab content
holder offers 305px of client width (320px minus the 15px scrollbar gutter),
while the wrapper asks for 288px placed 24px from the left edge, i.e. 312px.
Seven pixels of overflow, and a scrollbar under every control.
`min()` keeps 288px as the preferred floor and gives it up only when the
container cannot offer that much. Nothing changes where there is room. Where
there is not, the wrapper settles at 265px and every tile stays legible: the
active tile keeps its label, the others their icons.
Code Review Agent Run #bda73bActionable Suggestions - 0Review 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. Additional details and impacted files@@ Coverage Diff @@
## master #42911 +/- ##
==========================================
- Coverage 66.41% 66.41% -0.01%
==========================================
Files 2857 2857
Lines 161293 161293
Branches 37134 37134
==========================================
- Hits 107124 107117 -7
- Misses 52144 52151 +7
Partials 2025 2025
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
SUMMARY
The wrapper around
FastVizSwitchersets a hardmin-widthfloor oftheme.sizeUnit * 72(288px). That floor does not account for the control panel's own horizontal inset, nor for the gutter taken by its vertical scrollbar — so the panel gains a horizontal scrollbar as soon as it scrolls vertically, which it does on most charts.Measured on the Explore control panel at its default width:
.ant-tabs-content-holderclient widthmin-widthmin()keeps 288px as the preferred floor and gives it up only when the container cannot offer that much. Nothing changes where there is room.TESTING INSTRUCTIONS
Verified in the browser by measuring the container before and after: overflow 7px → 0px. The wrapper settles at 265px and every tile stays legible — the active tile keeps its label, the others keep their icons.
ADDITIONAL INFORMATION