yousoph opened a new pull request, #42290:
URL: https://github.com/apache/superset/pull/42290
### SUMMARY
The antd v5→v6 upgrade (#41636) renamed the modal box wrapper class
`.ant-modal-content` → `.ant-modal-container`. Several Emotion overrides still
targeted the old class, so their rules silently stopped matching.
The main casualty is the shared `superset-ui-core` `Modal`: its
`.ant-modal-content` rule set `padding: 0`, `display: flex; flex-direction:
column`, and top/bottom margins. With the selector stale, the box regained
antd's default `contentPadding` (`20px 24px`) wrapping the whole
header/body/footer stack and lost the flex layout — visibly inflating the
spacing in every "properties" modal (Theme, chart properties, dashboard
properties) and anything else built on the shared component.
antd v5.27 and v6.5 ship **identical** Modal token defaults (`contentPadding
20px 24px`, `headerPadding 0`, `bodyPadding 0`, `footerPadding 0`, etc.), so
only the class name changed — renaming the selector restores the exact
pre-upgrade spacing.
Changes:
- `superset-ui-core` `Modal/Modal.tsx`: `.ant-modal-content` →
`.ant-modal-container` (main + resizable blocks). This alone recovers all
modals built on the shared component.
- Same stale selector fixed in `DatasourceModal` and the native-filter
`ConfigModal` shared styles.
- `antdDomContract.test.tsx`: the Modal test now pins
`container/header/title/body/footer/close` and asserts `.ant-modal-content` is
gone, so a future antd rename fails loudly instead of shipping a silent visual
regression.
- `StandardModal.test.tsx`: snapshot-free assertion pinning the same
contract.
Note: a few `getPopupContainer` callbacks still do
`trigger.closest('.ant-modal-content')` (RoleFormItems, GroupListModal,
UserListModal; Select/AsyncSelect have a `document.body` fallback). That's a
separate symptom (dropdown containment, not spacing) — left out to keep this
diff tight; can follow up.
### BEFORE/AFTER SCREENSHOTS OR ANIMATED GIF
Chart properties — broken on master (left: antd default 20px 24px padding
around everything) vs this PR (right), which matches the pre-#41636 rendering
exactly (verified by computed-style diff against a `e063f5093c~1` checkout):
| master (broken) | this PR (= pre-upgrade) |
|---|---|
| box padding `20px 24px`, `display: block` | box padding `0`, `display:
flex`, margins `16px 0` |
### TESTING INSTRUCTIONS
1. Open any chart's Edit chart properties modal, a dashboard's Edit
properties modal, or Settings → Themes → add/edit theme.
2. Header, body, and footer should be full-bleed with their own padding (as
before 2026-07-13), not inset inside an extra 20/24px ring.
3. `npm run test -- antdDomContract StandardModal` covers the DOM contract.
### ADDITIONAL INFORMATION
- [x] Has associated issue: internal SC-114841
- [ ] Required feature flags:
- [ ] Changes UI
- [ ] Includes DB Migration
- [ ] 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: [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]