You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@superset.apache.org by "EnxDev (via GitHub)" <gi...@apache.org> on 2025/02/25 16:19:07 UTC

[PR] refactor(table): Upgrade table component from antd4 to antd5 [superset]

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

   <!---
   Please write the PR title following the conventions at https://www.conventionalcommits.org/en/v1.0.0/
   Example:
   fix(dashboard): load charts correctly
   -->
   
   ### SUMMARY
   <!--- Describe the change below, including rationale and design decisions -->
   Upgrade Table to Ant Design 5
   
   ### BEFORE/AFTER SCREENSHOTS OR ANIMATED GIF
   <!--- Skip this if not applicable -->
   - Before
   ![before-1](https://github.com/user-attachments/assets/49621497-e74c-4ea6-9ec0-88a67379744c)
   ![before-2](https://github.com/user-attachments/assets/5d5020e7-2905-476a-bd69-e69db23903b1)
   ![before-3](https://github.com/user-attachments/assets/b52b2074-6d11-4245-b2d4-47f7c68521eb)
   ![before-4](https://github.com/user-attachments/assets/c0ead125-f5c9-4350-be1d-07229635b8b2)
   
   - After
   ![after-1](https://github.com/user-attachments/assets/e8e94ab4-2190-4f27-9b43-6a7330bc0df0)
   ![after-2](https://github.com/user-attachments/assets/5c4adc11-7674-4d7b-ae1b-be2c1439975d)
   ![after-3](https://github.com/user-attachments/assets/ddcc8680-af63-44ad-8716-1a1bf9800de7)
   ![after-4](https://github.com/user-attachments/assets/83468c4a-3679-4b41-a27a-2f4c2a32e287)
   
   ### TESTING INSTRUCTIONS
   <!--- Required! What steps can be taken to manually verify the changes? -->
   1) All CI tests should pass
   2) Run the tests/check, visual changes in storybook or dev-server.
   
   ### ADDITIONAL INFORMATION
   <!--- Check any relevant boxes with "x" -->
   <!--- HINT: Include "Fixes #nnn" if you are fixing an existing issue -->
   - [ ] Has associated issue:
   - [ ] Required feature flags:
   - [ ] Changes UI
   - [ ] Includes DB Migration (follow approval process in [SIP-59](https://github.com/apache/superset/issues/13351))
     - [ ] Migration is atomic, supports rollback & is backwards-compatible
     - [ ] Confirm DB migration upgrade and downgrade tested
     - [ ] Runtime estimates and downtime expectations provided
   - [ ] 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: notifications-unsubscribe@superset.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org


Re: [PR] refactor(table): Upgrade table component from antd4 to antd5 [superset]

Posted by "mistercrunch (via GitHub)" <gi...@apache.org>.
mistercrunch commented on code in PR #32378:
URL: https://github.com/apache/superset/pull/32378#discussion_r2019235384


##########
superset-frontend/src/components/Table/index.tsx:
##########
@@ -163,42 +158,41 @@ const defaultRowSelection: Key[] = [];
 const PAGINATION_HEIGHT = 40;
 const HEADER_HEIGHT = 68;
 
-const StyledTable = styled(AntTable)<{ height?: number }>(
+const StyledTable = styled(AntTable as FC<AntTableProps>)<{ height?: number }>(
   ({ theme, height }) => `
     color: ${theme.colorText};
     .ant-table-body {
       overflow: auto;
       height: ${height ? `${height}px` : undefined};
     }
 
-    th.ant-table-cell {
-      font-weight: ${theme.fontWeightStrong};
-      color: ${theme.colorText};
-      white-space: nowrap;
-      overflow: hidden;
-      text-overflow: ellipsis;
+    .antd5-spin-nested-loading .antd5-spin .antd5-spin-dot {
+      width: ${theme.sizeXXL}px;
+      height: unset;
     }
 
-    .ant-table-tbody > tr > td {
+   td.antd5-table-cell {
       white-space: nowrap;
       overflow: hidden;
       text-overflow: ellipsis;
-      border-bottom: 1px solid ${theme.colorSplit};
     }
 
-    .ant-pagination-item-active {
-      border-color: ${theme.colorPrimary};
+    .antd5-table-tbody > tr > td {
+      white-space: nowrap;
+      overflow: hidden;
     }
 
-    .ant-table.ant-table-small {
+    .antd5-table.antd5-table-small {

Review Comment:
   wondering if that's needed or implicit (?) Seems this might exactly re-implement internal classes (?)



-- 
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: notifications-unsubscribe@superset.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org


Re: [PR] refactor(table): Upgrade table component from antd4 to antd5 [superset]

Posted by "EnxDev (via GitHub)" <gi...@apache.org>.
EnxDev commented on PR #32378:
URL: https://github.com/apache/superset/pull/32378#issuecomment-2688663390

   /testenv up


-- 
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: notifications-unsubscribe@superset.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org


Re: [PR] refactor(table): Upgrade table component from antd4 to antd5 [superset]

Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] commented on PR #32378:
URL: https://github.com/apache/superset/pull/32378#issuecomment-2688673849

   @EnxDev Processing your ephemeral environment request [here](https://github.com/apache/superset/actions/runs/13572591437). Action: **up**.


-- 
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: notifications-unsubscribe@superset.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org


Re: [PR] refactor(table): Upgrade table component from antd4 to antd5 [superset]

Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] commented on PR #32378:
URL: https://github.com/apache/superset/pull/32378#issuecomment-2688689330

   @EnxDev Ephemeral environment spinning up at http://34.216.142.223:8080. Credentials are 'admin'/'admin'. Please allow several minutes for bootstrapping and startup.


-- 
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: notifications-unsubscribe@superset.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org


Re: [PR] refactor(table): Upgrade table component from antd4 to antd5 [superset]

Posted by "mistercrunch (via GitHub)" <gi...@apache.org>.
mistercrunch commented on code in PR #32378:
URL: https://github.com/apache/superset/pull/32378#discussion_r2019237305


##########
superset-frontend/src/features/datasets/AddDataset/EditDataset/UsageTab/index.tsx:
##########
@@ -124,11 +124,11 @@ const columns: ColumnsType<Chart> = [
 ];
 
 const emptyStateTableCSS = (theme: SupersetTheme) => css`
-  && th.ant-table-cell {
+  && th.antd5-table-cell {

Review Comment:
   could try and use the standard tokens if/where possible, though we'll probably do a big pass to replace all `theme.colors\..*` soon



-- 
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: notifications-unsubscribe@superset.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org


Re: [PR] refactor(table): Upgrade table component from antd4 to antd5 [superset]

Posted by "mistercrunch (via GitHub)" <gi...@apache.org>.
mistercrunch merged PR #32378:
URL: https://github.com/apache/superset/pull/32378


-- 
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: notifications-unsubscribe@superset.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org