rusackas opened a new pull request, #44177: URL: https://github.com/apache/superset/pull/44177
### SUMMARY Follow-up to a frontend DRY audit. Original grep for direct `antd` imports outside `@superset-ui/core/components` found ~79 hits, but almost all of those turned out to be that wrapper package's own legitimate internals (it has to import `antd` to wrap it) plus a handful of theme-system test files -- not real violations. The actual, actionable set was much smaller: **Three components wrapped ad hoc at the app level instead of living in the core package.** `Splitter`, `Descriptions`, and `TimePicker`/`TimeRangePicker` each had a thin one-off wrapper under `src/components/X`, not because anyone was avoiding the convention, but because no wrapper existed yet for these three in `@superset-ui/core/components` (confirmed: no `Splitter`/`Descriptions`/`TimePicker` directory there before this PR). Moved all three into the core package alongside every other antd wrapper, following the same export pattern already used for ~150 other components in `components/index.ts`, and updated the six call sites. Component bodies are byte-identical -- this only changes where they live and how they're imported. **One real "should have used the existing wrapper" case.** `plugin-chart-ag-grid-table`'s `TimeComparisonVisibility.tsx` imported `Dropdown` straight from `antd`, under an `eslint-disable-next-line import/no-extraneous-dependencies` (since `antd` isn't a declared dependency of that plugin) -- even though a `Dropdown` wrapper already exists in `@superset-ui/core/components`, which *is* a real dependency of the plugin. Swapped the import and dropped the now-unnecessary suppression. ### TESTING INSTRUCTIONS - `tsc -b` clean across `superset-ui-core`, `plugin-chart-ag-grid-table`, and the full app project (only pre-existing errors on completely unrelated, untouched files remain, e.g. `SafeMarkdown.stories.tsx`). - `oxlint` clean on every changed file. - The three affected Jest suites pass: `AppLayout.test.tsx`, `UserInfo.test.tsx`, `SqlEditor.test.tsx` -- 27 tests, including the `AppLayout` mock now targeting the new `@superset-ui/core/components/Splitter` subpath instead of the old `src/components/Splitter` path (same pattern already used for the neighboring `Grid` mock in that file). ### ADDITIONAL INFORMATION - [ ] Has associated issue: - [ ] 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]
