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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]