-
Notifications
You must be signed in to change notification settings - Fork 15.3k
refactor(ui): replace native HTML elements with Ant Design 5 components for consistent theming #33231
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Based on your review schedule, I'll hold off on reviewing this PR until it's marked as ready for review. If you'd like me to take a look now, comment
|
…d FontAwesome icons with Ant Design v5 icons
…onents; adjust pagination colors
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I've completed my review and didn't find any issues.
Files scanned
File Path | Reviewed |
---|---|
superset-frontend/packages/superset-ui-chart-controls/src/components/Menu.tsx | ✅ |
superset-frontend/packages/superset-ui-chart-controls/src/components/Dropdown.tsx | ✅ |
superset-frontend/packages/superset-ui-demo/storybook/shared/components/Expandable.tsx | ✅ |
superset-frontend/plugins/plugin-chart-table/src/DataTable/components/GlobalFilter.tsx | ✅ |
superset-frontend/packages/superset-ui-chart-controls/src/shared-controls/components/RadioButtonControl.tsx | ✅ |
superset-frontend/src/components/Pagination/Wrapper.tsx | ✅ |
superset-frontend/packages/superset-ui-chart-controls/src/components/Select.tsx | ✅ |
superset-frontend/plugins/plugin-chart-pivot-table/src/react-pivottable/Styles.js | ✅ |
superset-frontend/packages/superset-ui-core/src/chart-composition/tooltip/TooltipTable.tsx | ✅ |
superset-frontend/packages/superset-ui-chart-controls/src/components/MetricOption.tsx | ✅ |
superset-frontend/packages/superset-ui-demo/storybook/shared/components/VerifyCORS.tsx | ✅ |
superset-frontend/plugins/plugin-chart-table/src/DataTable/components/SelectPageSize.tsx | ✅ |
superset-frontend/plugins/plugin-chart-table/src/Styles.tsx | ✅ |
superset-frontend/src/components/ErrorMessage/ErrorAlert.tsx | ✅ |
superset-frontend/src/features/databases/DatabaseModal/DatabaseConnectionForm/TableCatalog.tsx | ✅ |
superset-frontend/src/components/index.ts | ✅ |
superset-frontend/src/explore/components/controls/ZoomConfigControl/ZoomConfigControl.tsx | ✅ |
superset-frontend/packages/superset-ui-chart-controls/src/components/ControlHeader.tsx | ✅ |
superset-frontend/src/features/annotationLayers/AnnotationLayerModal.tsx | ✅ |
superset-frontend/src/features/cssTemplates/CssTemplateModal.tsx | ✅ |
superset-frontend/src/features/databases/DatabaseModal/ModalHeader.tsx | ✅ |
superset-frontend/src/features/reports/ReportModal/index.tsx | ✅ |
superset-frontend/plugins/plugin-chart-table/src/DataTable/DataTable.tsx | ✅ |
superset-frontend/src/explore/components/PropertiesModal/index.tsx | ✅ |
superset-frontend/src/features/rls/RowLevelSecurityModal.tsx | ✅ |
superset-frontend/src/components/ListView/ListView.tsx | ✅ |
superset-frontend/src/dashboard/components/PropertiesModal/index.tsx | ✅ |
superset-frontend/plugins/plugin-chart-table/src/TableChart.tsx | ✅ |
superset-frontend/src/features/alerts/AlertReportModal.tsx | ✅ |
Explore our documentation to understand the languages and file types we support and the files we ignore.
Check out our docs on how you can make Korbit work best for you and your team.
superset-frontend/packages/superset-ui-chart-controls/src/components/ControlHeader.tsx
Outdated
Show resolved
Hide resolved
superset-frontend/packages/superset-ui-demo/storybook/shared/components/Expandable.tsx
Outdated
Show resolved
Hide resolved
superset-frontend/plugins/plugin-chart-table/src/TableChart.tsx
Outdated
Show resolved
Hide resolved
superset-frontend/src/explore/components/controls/ZoomConfigControl/ZoomConfigControl.tsx
Outdated
Show resolved
Hide resolved
@@ -17,5 +17,4 @@ | |||
* under the License. | |||
*/ | |||
|
|||
export { Dropdown } from 'antd'; | |||
export type { DropDownProps } from 'antd/lib/dropdown'; | |||
export { Dropdown, type DropDownProps } from 'antd-v5'; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
is the plan to use what's in src/components
once we move it to @superset-ui/core
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
wondering what effect it may have on bundle sizes until we move things around ...
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me
// eslint-disable-next-line no-restricted-imports | ||
import { Form, Tag } from 'antd'; // TODO: Remove antd | ||
import { Form, Tag } from 'antd'; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Shouldn't these have been migrated to Ant Design 5 or at least keep the // TODO: Remove antd?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please follow this #33231 (comment)
SUMMARY
The goal of this PR is to replace all remaining native HTML elements within the
superset-frontend/src
,superset-frontend/plugins
, andsuperset-frontend/packages
directories with their corresponding Ant Design 5 components.This change is being made to ensure that theming colors are applied consistently across all components in the project.
By replacing native HTML elements like
<input>
,<table>
,<button>
,<li>
, and<h3>
/<h4>
tags with Ant Design 5 components such asInput
,Button
,Typography.Title,
andList.Item
, we can guarantee that the Ant Design theming system works as expected.Specifically, this will:
Ensure consistent application of theming 🎨 (colors, fonts, spacing) across the UI.
Improve maintainability by aligning the entire codebase with the Ant Design 5 component system 🔧.
Ensure better responsiveness, theming, and accessibility 🌍 through the Ant Design 5 system.
Facilitate future UI enhancements, as the project will be fully based on Ant Design 5 components, making it easier to integrate new features or updates from the design system 🚀.
This PR can be considered a continuation of #33090, further extending the standardization and theming improvements across the project.
After this change, the theming colors and styles will work uniformly across all components, providing a consistent look and feel throughout the application.
BEFORE/AFTER SCREENSHOTS OR ANIMATED GIF
TESTING INSTRUCTIONS
ADDITIONAL INFORMATION