You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@superset.apache.org by "massucattoj (via GitHub)" <gi...@apache.org> on 2026/05/25 01:37:38 UTC
[PR] fix(explore): tighten popover title-to-tabs spacing to 12px [superset]
massucattoj opened a new pull request, #40410:
URL: https://github.com/apache/superset/pull/40410
### SUMMARY
In the explore view, control popovers (metric editor, column selector, filter editor) have too much vertical space between the popover title and the tab bar (Saved / Simple / Custom SQL).
The total gap between the bottom of the title text and the top of the tab bar should be 12px. Currently it is visibly larger.
**Approach** (scoped to explore popovers only):
1. **`ControlPopover.tsx`** — pass `rootClassName="superset-explore-popover"` to antd Popover so we can target all explore control popovers from CSS without touching unrelated popovers across the app.
2. **`GlobalStyles.tsx`** — three scoped rules behind `:has(.ant-popover-title)` so popovers *without* a title (e.g. filter editor) keep antd defaults:
- `.ant-popover-inner` → `padding-top: 0` (removes 12px dead space above title)
- `.ant-popover-title` → `padding-top: 8px` (breathing room), `margin-bottom: 12px` (exact gap to tab bar), `line-height: 1` (collapses font leading so the visible 12px gap actually matches the spec)
- `.ant-tabs-tab` → `padding-top: 0` (removes the hidden ~14px inside the tab bar that made the gap visibly larger than 12px)
### BEFORE/AFTER SCREENSHOTS OR ANIMATED GIF
BEFORE:
<img width="448" height="375" alt="Screenshot 2026-05-24 at 22 36 27" src="https://github.com/user-attachments/assets/815629ed-b94b-4eb5-a2c9-85bb575e3336" />
AFTER:
<img width="379" height="349" alt="Screenshot 2026-05-24 at 22 36 54" src="https://github.com/user-attachments/assets/650c816e-d5b0-4694-b439-8b82fa47704d" />
### TESTING INSTRUCTIONS
1. Open the explore view for any chart (e.g. a Table chart)
2. **Metric editor**: click a metric chip (`COUNT(*)`) — verify the gap between the title `COUNT(*)` and the tab bar (`Saved / Simple / Custom SQL`) is visibly tighter (~12px), not the previous loose spacing
3. **Column selector**: click a column chip in Dimensions (`school_degree`) — same verification; the `g` descender should not be visually clipped
4. **Filter editor (no title)**: click a filter chip (`is_software_dev = 0`) — verify nothing changed; tabs (`Simple / Custom SQL`) should sit at the antd-default position
5. **Other popovers** (date filter, annotation layers, time series column): open one of each and confirm visual consistency
### ADDITIONAL INFORMATION
<!--- Check any relevant boxes with "x" -->
<!--- HINT: Include "Fixes #nnn" if you are fixing an existing issue -->
- [ ] Has associated issue:
- [ ] Required feature flags:
- [x] Changes UI
- [ ] Includes DB Migration (follow approval process in [SIP-59](https://github.com/apache/superset/issues/13351))
- [ ] Migration is atomic, supports rollback & is backwards-compatible
- [ ] Confirm DB migration upgrade and downgrade tested
- [ ] Runtime estimates and downtime expectations provided
- [ ] Introduces new feature or API
- [ ] Removes existing feature or API
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org
Re: [PR] fix(explore): tighten popover title-to-tabs spacing to 12px [superset]
Posted by "codecov[bot] (via GitHub)" <gi...@apache.org>.
codecov[bot] commented on PR #40410:
URL: https://github.com/apache/superset/pull/40410#issuecomment-4530933788
## [Codecov](https://app.codecov.io/gh/apache/superset/pull/40410?dropdown=coverage&src=pr&el=h1&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) Report
:white_check_mark: All modified and coverable lines are covered by tests.
:white_check_mark: Project coverage is 64.20%. Comparing base ([`5003ee1`](https://app.codecov.io/gh/apache/superset/commit/5003ee1499a2543eea9005d1454b18f199b4d5d6?dropdown=coverage&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache)) to head ([`b2ad7d4`](https://app.codecov.io/gh/apache/superset/commit/b2ad7d4690ba682decb9e92a850eed2f583062b0?dropdown=coverage&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache)).
:warning: Report is 6 commits behind head on master.
<details><summary>Additional details and impacted files</summary>
```diff
@@ Coverage Diff @@
## master #40410 +/- ##
==========================================
- Coverage 64.20% 64.20% -0.01%
==========================================
Files 2592 2592
Lines 139232 139232
Branches 32327 32327
==========================================
- Hits 89389 89388 -1
- Misses 48308 48309 +1
Partials 1535 1535
```
| [Flag](https://app.codecov.io/gh/apache/superset/pull/40410/flags?src=pr&el=flags&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | Coverage Δ | |
|---|---|---|
| [javascript](https://app.codecov.io/gh/apache/superset/pull/40410/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `67.33% <ø> (-0.01%)` | :arrow_down: |
Flags with carried forward coverage won't be shown. [Click here](https://docs.codecov.io/docs/carryforward-flags?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache#carryforward-flags-in-the-pull-request-comment) to find out more.
</details>
[:umbrella: View full report in Codecov by Sentry](https://app.codecov.io/gh/apache/superset/pull/40410?dropdown=coverage&src=pr&el=continue&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache).
:loudspeaker: Have feedback on the report? [Share it here](https://about.codecov.io/codecov-pr-comment-feedback/?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache).
<details><summary> :rocket: New features to boost your workflow: </summary>
- :snowflake: [Test Analytics](https://docs.codecov.com/docs/test-analytics): Detect flaky tests, report on failures, and find test suite problems.
- :package: [JS Bundle Analysis](https://docs.codecov.com/docs/javascript-bundle-analysis): Save yourself from yourself by tracking and limiting bundle sizes in JS merges.
</details>
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org
Re: [PR] fix(explore): tighten popover title-to-tabs spacing to 12px [superset]
Posted by "msyavuz (via GitHub)" <gi...@apache.org>.
msyavuz commented on code in PR #40410:
URL: https://github.com/apache/superset/pull/40410#discussion_r3304573817
##########
superset-frontend/packages/superset-core/src/theme/GlobalStyles.tsx:
##########
@@ -115,6 +115,21 @@ export const GlobalStyles = () => {
display: flex;
margin-top: ${theme.marginXS}px;
}
+
+ .superset-explore-popover.ant-popover
+ .ant-popover-inner:has(.ant-popover-title) {
+ padding-top: 0;
+ }
+ .superset-explore-popover.ant-popover .ant-popover-title {
+ padding-top: ${theme.paddingXS}px;
+ margin-bottom: ${theme.paddingSM}px;
+ line-height: 1;
Review Comment:
IS there a way we can avoid global styles?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org
Re: [PR] fix(explore): tighten popover title-to-tabs spacing to 12px [superset]
Posted by "bito-code-review[bot] (via GitHub)" <gi...@apache.org>.
bito-code-review[bot] commented on PR #40410:
URL: https://github.com/apache/superset/pull/40410#issuecomment-4530901082
AI Code Review is in progress (usually takes 3 to 15 minutes unless it's a very large PR).
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org
Re: [PR] fix(explore): tighten popover title-to-tabs spacing to 12px [superset]
Posted by "bito-code-review[bot] (via GitHub)" <gi...@apache.org>.
bito-code-review[bot] commented on PR #40410:
URL: https://github.com/apache/superset/pull/40410#issuecomment-4530929847
<!-- Bito Reply -->
The PR comments file contains only the header row and no actual comment data. I cannot analyze or validate the suggestion without the specific review comments.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org
Re: [PR] fix(explore): tighten popover title-to-tabs spacing to 12px [superset]
Posted by "massucattoj (via GitHub)" <gi...@apache.org>.
massucattoj commented on code in PR #40410:
URL: https://github.com/apache/superset/pull/40410#discussion_r3330546984
##########
superset-frontend/packages/superset-core/src/theme/GlobalStyles.tsx:
##########
@@ -115,6 +115,21 @@ export const GlobalStyles = () => {
display: flex;
margin-top: ${theme.marginXS}px;
}
+
+ .superset-explore-popover.ant-popover
+ .ant-popover-inner:has(.ant-popover-title) {
+ padding-top: 0;
+ }
+ .superset-explore-popover.ant-popover .ant-popover-title {
+ padding-top: ${theme.paddingXS}px;
+ margin-bottom: ${theme.paddingSM}px;
+ line-height: 1;
Review Comment:
@msyavuz @EnxDev replying here because pretty much you guys did the same review
A few alternatives I looked at while working on this but didn't pan out:
- `styled(Popover)` doesn't work — the popover renders into `document.body` via portal, so the styled className lands on the trigger, not on the actual popover content.
- `ConfigProvider.components.Popover` doesn't either — `titleMarginBottom` is an antd internal token (called out in the ticket's root cause), not exposed in the theme API.
- The `styles` prop on antd v5.26 Popover only has semantic keys for `root` and `body`, nothing for `title`, so I can't fully replace these rules via React props.
The styles are scoped via `rootClassName="superset-explore-popover"` on `ControlPopover`, so they only apply to explore control popovers — not actually global in scope, just lives in
that file. Same pattern `GlobalStyles.tsx` already uses for color-picker, column-config-popover, etc.
Open to ideas if you see a path I missed!
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org
Re: [PR] fix(explore): tighten popover title-to-tabs spacing to 12px [superset]
Posted by "aminghadersohi (via GitHub)" <gi...@apache.org>.
aminghadersohi commented on code in PR #40410:
URL: https://github.com/apache/superset/pull/40410#discussion_r3343403704
##########
superset-frontend/src/explore/components/controls/ControlPopover/ControlPopover.tsx:
##########
@@ -202,6 +202,7 @@ const ControlPopover: FC<PopoverProps> = ({
getPopupContainer={handleGetPopupContainer}
destroyOnHidden={destroyOnHidden}
afterOpenChange={handleAfterOpenChange}
+ rootClassName="superset-explore-popover"
/>
);
};
Review Comment:
NIT: hardcoded `rootClassName` comes after `{...props}` (line 197), so any `rootClassName` a caller passes is silently dropped. No current callers are affected, but it's a composability footgun.
Safe fix — destructure and merge:
```tsx
const ControlPopover: FC<PopoverProps> = ({
...
rootClassName,
...props
}) => {
...
return (
<Popover
{...props}
...
rootClassName={['superset-explore-popover', rootClassName].filter(Boolean).join(' ')}
/>
);
}
```
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org
Re: [PR] fix(explore): tighten popover title-to-tabs spacing to 12px [superset]
Posted by "codeant-ai-for-open-source[bot] (via GitHub)" <gi...@apache.org>.
codeant-ai-for-open-source[bot] commented on code in PR #40410:
URL: https://github.com/apache/superset/pull/40410#discussion_r3295723854
##########
superset-frontend/packages/superset-core/src/theme/GlobalStyles.tsx:
##########
@@ -115,6 +115,21 @@ export const GlobalStyles = () => {
display: flex;
margin-top: ${theme.marginXS}px;
}
+
+ .superset-explore-popover.ant-popover
+ .ant-popover-inner:has(.ant-popover-title) {
+ padding-top: 0;
+ }
+ .superset-explore-popover.ant-popover .ant-popover-title {
+ padding-top: ${theme.paddingXS}px;
+ margin-bottom: ${theme.paddingSM}px;
+ line-height: 1;
Review Comment:
**Suggestion:** This selector applies title spacing changes to every titled explore control popover, not just the tabbed metric/column/filter editors described in the PR. Titled popovers without tabs (for example other control editors) will get compressed header spacing and altered typography unintentionally. Scope this rule to titled popovers that also contain the tab bar (or a dedicated class on the targeted editors) to avoid cross-control layout regressions. [css layout issue]
<details>
<summary><b>Severity Level:</b> Major ⚠️</summary>
```mdx
- ❌ Explore column/metric popovers get inconsistent header spacing.
- ⚠️ Annotation layer editor header spacing compressed unexpectedly.
- ⚠️ Time-series column config popover loses original title padding.
```
</details>
<details>
<summary><b>Steps of Reproduction ✅ </b></summary>
```mdx
1. Global popover styles are defined in
`superset-frontend/packages/superset-core/src/theme/GlobalStyles.tsx`, where lines 119–132
introduce the `.superset-explore-popover.ant-popover .ant-popover-title` rule and related
selectors (see lines 30–42 in the tool output), applying padding and `line-height: 1` to
any `.ant-popover-title` inside an explore popover.
2. The explore wrapper `ControlPopover` in
`superset-frontend/src/explore/components/controls/ControlPopover/ControlPopover.tsx`
(lines 51–58 and 26–37) forwards all `PopoverProps` to AntD's `Popover` and hardcodes
`rootClassName="superset-explore-popover"` at line 205, so every explore control popover
rendered via this component receives the `.superset-explore-popover` class.
3. Several explore controls render titled popovers without tab bars; for example,
`TimeSeriesColumnControl` in
`superset-frontend/src/explore/components/controls/TimeSeriesColumnControl/index.tsx` uses
`<ControlPopover ... title={t('Column Configuration')}>` at lines 413–420, and
`AnnotationLayerControl` in
`superset-frontend/src/explore/components/controls/AnnotationLayerControl/index.tsx`
renders `<ControlPopover ... title={t('Edit annotation layer')}>` and `<ControlPopover ...
title={t('Add annotation layer')}>` at lines 12–15 and 42–50 respectively.
4. When a user opens these non-tabbed popovers in Explore (e.g., click the column
configuration icon to open the `TimeSeriesColumnControl` popover, or click an annotation
row to edit it), AntD renders `.ant-popover-title` for the supplied `title`, the
`.superset-explore-popover.ant-popover .ant-popover-title` rule from `GlobalStyles.tsx`
applies, and header padding/line-height are compressed even though these popovers have no
tab bar, altering their layout beyond the tabbed metric/column/filter editors described in
the PR.
```
</details>
[Fix in Cursor](https://app.codeant.ai/fix-in-ide?tool=cursor&prompt_id=27b7d46e45b44f2ebb9d2ece681f6c0c&service=github&base_url=https%3A%2F%2Fgithub.com&org=apache&repo=apache%2Fsuperset) | [Fix in VSCode Claude](https://app.codeant.ai/fix-in-ide?tool=vscode-claude&prompt_id=27b7d46e45b44f2ebb9d2ece681f6c0c&service=github&base_url=https%3A%2F%2Fgithub.com&org=apache&repo=apache%2Fsuperset)
*(Use Cmd/Ctrl + Click for best experience)*
<details>
<summary><b>Prompt for AI Agent 🤖 </b></summary>
```mdx
This is a comment left during a code review.
**Path:** superset-frontend/packages/superset-core/src/theme/GlobalStyles.tsx
**Line:** 123:126
**Comment:**
*Css Layout Issue: This selector applies title spacing changes to every titled explore control popover, not just the tabbed metric/column/filter editors described in the PR. Titled popovers without tabs (for example other control editors) will get compressed header spacing and altered typography unintentionally. Scope this rule to titled popovers that also contain the tab bar (or a dedicated class on the targeted editors) to avoid cross-control layout regressions.
Validate the correctness of the flagged issue. If correct, How can I resolve this? If you propose a fix, implement it and please make it concise.
Once fix is implemented, also check other comments on the same PR, and ask user if the user wants to fix the rest of the comments as well. if said yes, then fetch all the comments validate the correctness and implement a minimal fix
```
</details>
<a href='https://app.codeant.ai/feedback?pr_url=https%3A%2F%2Fgithub.com%2Fapache%2Fsuperset%2Fpull%2F40410&comment_hash=e2b4d76ce46caf60d9c0347d61d7f8e706bf7c51be57134970f04836dcaeaa7f&reaction=like'>👍</a> | <a href='https://app.codeant.ai/feedback?pr_url=https%3A%2F%2Fgithub.com%2Fapache%2Fsuperset%2Fpull%2F40410&comment_hash=e2b4d76ce46caf60d9c0347d61d7f8e706bf7c51be57134970f04836dcaeaa7f&reaction=dislike'>👎</a>
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org
Re: [PR] fix(explore): tighten popover title-to-tabs spacing to 12px [superset]
Posted by "EnxDev (via GitHub)" <gi...@apache.org>.
EnxDev commented on code in PR #40410:
URL: https://github.com/apache/superset/pull/40410#discussion_r3304586044
##########
superset-frontend/packages/superset-core/src/theme/GlobalStyles.tsx:
##########
@@ -115,6 +115,21 @@ export const GlobalStyles = () => {
display: flex;
margin-top: ${theme.marginXS}px;
}
+
+ .superset-explore-popover.ant-popover
+ .ant-popover-inner:has(.ant-popover-title) {
+ padding-top: 0;
+ }
+ .superset-explore-popover.ant-popover .ant-popover-title {
+ padding-top: ${theme.paddingXS}px;
+ margin-bottom: ${theme.paddingSM}px;
+ line-height: 1;
Review Comment:
Do we really need this?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org
Re: [PR] fix(explore): tighten popover title-to-tabs spacing to 12px [superset]
Posted by "sadpandajoe (via GitHub)" <gi...@apache.org>.
sadpandajoe merged PR #40410:
URL: https://github.com/apache/superset/pull/40410
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org