fix(explore): restore spacing between tabs and content in control popovers#40023
Conversation
Code Review Agent Run #6d32eaActionable 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 |
…overs Superset's global Tabs styled component overrides antd's default margin-bottom on .ant-tabs-nav to 0, which removed all visual separation between the tab bar and the form content inside metric/column/filter popovers. This also caused item spacing in those popovers to use the unscoped antd FormItem default (24px) rather than the compact value appropriate for a small popover panel. - Use `&&` (doubled class = higher CSS specificity) in ExplorePopoverContent to restore 12px below the tab bar and 8px between form items, overriding the global Tabs CSS without touching Tabs globally - Remove two dead CSS selectors in FilterPopoverContentContainer that used Bootstrap class names (.nav-tabs, .adhoc-filter-simple-column- dropdown) and never matched anything since the antd migration - Replace all sizeUnit arithmetic with the equivalent named antd margin/ padding tokens (marginXS, marginSM, marginMD, marginXXL, etc.) in the filter popover styled components and SimpleTabContent selects - Drop the redundant marginTop on the filter subject select — the tab bar now provides the leading gap Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
0200107 to
625a1e3
Compare
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #40023 +/- ##
==========================================
- Coverage 64.08% 64.08% -0.01%
==========================================
Files 2590 2590
Lines 137964 137963 -1
Branches 31998 31998
==========================================
- Hits 88409 88407 -2
- Misses 48037 48038 +1
Partials 1518 1518
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:
|
|
Bito Automatic Review Skipped – PR Already Merged |
SUMMARY
The Superset global
Tabsstyled component overrides antd's defaultmargin-bottomon.ant-tabs-navto0, which removed all visual separation between the tab bar and the form content inside explore control popovers (metric editor, column selector, filter editor). This also caused the spacing between form items inside those popovers to fall back to antd's defaultFormItemmargin-bottom of 24px — far too large for a compact popover panel.Changes:
ExplorePopoverContent– adds&& .ant-tabs-nav { margin-bottom: 12px }and&& .ant-form-item { margin-bottom: 8px }using the doubled&&class to win the CSS specificity race against the per-instance Tabs CSS (which injects at component render time, after global styles). Only affects Tabs inside explore popover content, not Tabs elsewhere in the app.FilterPopoverContentContainer– removes two dead CSS selectors that referenced Bootstrap class names (.nav-tabs,.adhoc-filter-simple-column-dropdown) which never matched any elements after the antd migration.FilterActionsContainer/LayerSelectContainer– replacessizeUnitarithmetic with the named antd spacing tokens (marginXS,marginXXL,marginMD).AdhocFilterEditPopoverSimpleTabContent– removes the redundantmarginTopfrom the subject (column) Select — the tab bar's own bottom margin now provides the leading gap — and reducesmarginTop/marginBottomon filter selects fromsizeUnit * 4(legacy) tomarginXS(8px) for consistency.Spacing result (all explore control popovers):
marginSMmarginXSmarginXSBEFORE/AFTER SCREENSHOTS OR ANIMATED GIF
Before: The tab bar was flush against the form content (0px gap). FormItems had 24px separation.
After: 12px below the tab bar, 8px between form items — consistent with compact antd panel conventions.
TESTING INSTRUCTIONS
ADDITIONAL INFORMATION