rusackas opened a new pull request, #41636:
URL: https://github.com/apache/superset/pull/41636

   ### SUMMARY
   
   Upgrades Ant Design from **v5.26 to v6** (`[email protected]`, `@ant-design/icons@6`) 
across the
   Superset frontend. The upgrade is theme-safe: Superset's theme bridge
   (`getDesignToken` → `allowedAntdTokens` → `ConfigProvider` + Emotion) works 
on v6
   with no token loss — the only design-token drift is antd 6 recomputing 
box-shadow
   values (cosmetic; dark-mode shadows are now correctly white-based).
   
   **Approach.** A characterization test locks the full computed token set for 
light and
   dark (`Theme.test.tsx`) so any token rename/removal fails loudly. React is 
already on
   18 (v6's floor), and none of v6's removed legacy components were in use, so 
the code
   surface was small and centralized in the `@superset-ui/core/components` 
wrappers.
   
   **Notable changes**
   - **Theme bridge:** antd 6 dropped `boolean` from `ThemeConfig['cssVar']` 
(now
     object-only); `deserializeThemeConfig` coerces `true`→`{}`, `false`→omit.
   - **Wrappers:** Select (`dropdownAlign` removed, 
`showSearch`/`tokenSeparators` union
     handling), Tooltip/Popover/DropdownContainer 
`styles.body`→`styles.container`.
   - **App code:** `Steps.Step`→`items`, Popover/Tooltip 
`visible`/`onVisibleChange`→
     `open`/`onOpenChange`, Dropdown `overlay`→`menu`, Pagination 
`size="default"`
     removed, `dropdownAlign` removed, 
`.ant-tooltip-inner`→`.ant-tooltip-container`
     and `.ant-select-selector`→`.ant-select-content` in styled CSS.
   - **Genuine bug fix caught by tests:** antd 6's `Tag` clones its `icon` prop 
and
     overwrites the icon's inline `style`, which silently stripped icon colors 
on
     `Label`s. Fixed by wrapping the icon in a span in `Label/index.tsx` so the 
wrapper
     (not the icon) is Tag's clone target.
   - **Dependencies:** removed the unused `@rjsf/antd` (the package pinning 
antd 5) and
     bumped `@rjsf/core`/`utils`/`validator-ajv8` to v6 (theme-agnostic, 
React-only
     peers). `@great-expectations/jsonforms-antd-renderers` has no antd 6 
release, so it
     is pinned to antd 6 via an `overrides` entry. Installs cleanly — no 
ERESOLVE, no
     `legacy-peer-deps`.
   - **Test env:** replaced the `MessageChannel = undefined` stub (an old 
rc-overflow
     workaround) with a lightweight polyfill — antd 6's scheduler requires the
     constructor.
   
   ### BEFORE/AFTER SCREENSHOTS OR ANIMATED GIF
   
   _UI is visually unchanged (parity upgrade). Manual dark/light + Storybook 
pass
   recommended for reviewers; the Label icon-color fix restores v5 behavior._
   
   ### TESTING INSTRUCTIONS
   
   - `cd superset-frontend && npm ci && npm run type` — 0 type errors.
   - `npm run test` — full Jest suite green (antd-6 test-DOM assertions 
updated).
   - New theme characterization tests: `npx jest 
packages/superset-core/src/theme/Theme.test.tsx`.
   - Manual: verify dashboards, Explore, SQL Lab, dark-mode toggle, 
dataset/published
     labels show colored icons, and Select/Tooltip/Popover render correctly.
   
   ### ADDITIONAL INFORMATION
   - [ ] Has associated issue:
   - [ ] Required feature flags:
   - [x] Changes UI
   - [ ] Includes DB Migration
   - [ ] Introduces new feature or API
   - [x] Removes existing feature or API  <!-- removes unused @rjsf/antd 
dependency -->
   


-- 
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]

Reply via email to