rkc9937 opened a new pull request, #36345: URL: https://github.com/apache/superset/pull/36345
<!--- Please write the PR title following the conventions at https://www.conventionalcommits.org/en/v1.0.0/ Example: fix(dashboard): load charts correctly --> ### SUMMARY This proof-of-concept replaces Superset’s custom list-view table implementation with [Ant Design Pro Table](https://procomponents.ant.design/en-US/components/table), reducing custom table logic and simplifying ListView by delegating table behavior (pagination, sorting, filtering, selection) to a well-supported component. ### TESTING INSTRUCTIONS 1. Navigate to a ListView-based page (e.g., Dashboards, Charts, Datasets). 2. Verify: - Table renders with the expected columns and data. - Pagination works and triggers server-side fetches. - Clicking column headers updates sort order and URL parameters. - External filters still apply correctly and affect results + URL. - Bulk selection, bulk actions, and bulk tagging work as before. - Toggling between card/table view works and persists in URL. - Empty states show the correct messaging and “clear all filters” behavior. 3. Hard-refresh the page and confirm the list view restores its state from the URL. ### ADDITIONAL INFORMATION ### Why Pro Table? The current ListView table includes a lot of custom logic — manual pagination, sorting, filtering, selection, and URL syncing. Ant Design Pro Table already provides these capabilities out of the box, fits naturally with Superset’s existing Ant Design stack, and avoids the licensing issues we ran into with other table libraries. Moving to Pro Table removes a large amount of bespoke table code and lets ListView focus on data and state rather than re-implementing table behavior. ### What Changed #### `ListView.tsx` - Replaces the `react-table` implementation with `ProTable`. - Converts existing column definitions into Pro Table’s format. - Integrates pagination, sorting, filtering, and row selection through the new state hook. - Preserves all existing ListView UX features: - external filters (`FilterControls`) - bulk selection and bulk tagging - row highlighting - card/table view toggle - loading and empty states #### `useProTableState.ts` (new) - Centralizes all ListView state: pagination, sorting, filters, selection. - Syncs this state with the URL using `use-query-params` and Rison. - Triggers server-side fetches whenever state changes. - Works seamlessly with both table and card views and keeps the existing filter structure. --- ### Architecture Notes This POC significantly cuts down on custom table code inside ListView and moves that responsibility to a component already aligned with Superset’s UI choices. The user experience stays the same, while the architecture becomes easier to maintain and extend — making features like built-in Pro Table filters, shared state hooks across list views, or a refreshed card view design more achievable in the future. -- 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]
