Skip to content

feat: refactor tables to TanStack Table and consolidate components#232

Open
prakharsingh-74 wants to merge 1 commit intovolcano-sh:mainfrom
prakharsingh-74:FEAT/tanstack-table
Open

feat: refactor tables to TanStack Table and consolidate components#232
prakharsingh-74 wants to merge 1 commit intovolcano-sh:mainfrom
prakharsingh-74:FEAT/tanstack-table

Conversation

@prakharsingh-74
Copy link
Copy Markdown

fixes: #85

Description:

This PR transitions the dashboard's table implementations from a purely MUI-based approach to using TanStack Table. This refactor addresses the previous fragmentation by consolidating table logic and UI into a more maintainable, "headless" architecture.

Core Improvements:

  • Architectural Shift: Migrated JobTable, PodsTable, QueueTable, and PodGroupsTable to utilize @tanstack/react-table. This leverages industry-standard data management while keeping our custom MUI styling.
  • Component Streamlining: Removed the overhead of managing 10+ separate Header and Row files. Each table's structure is now defined via a clean columns configuration within its primary component.
  • Unified Filter UI: Introduced a generic TableFilterMenu component. This ensures that filtering interactions (Namespace, Status, etc.) are perfectly consistent across the entire application.
  • Performance & Scalability: Improved handling of sorting and filtering operations, ensuring the dashboard remains responsive even with larger Kubernetes datasets.

Cleanup:

  • Deleted Redundant Components: Cleaned up the file tree by removing resource-specific headers, rows, and individual filter menus.
  • DRY Principles: Consolidated duplicated logic for status chips and date formatting within the new table definitions.

@volcano-sh-bot
Copy link
Copy Markdown
Contributor

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by:
Once this PR has been reviewed and has the lgtm label, please assign jessestutler for approval. For more information see the Kubernetes Code Review Process.

The full list of commands accepted by this bot can be found here.

Details Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

Signed-off-by: prakharsingh-74 <prakharsingh7014@gmail.com>
Copy link
Copy Markdown

@gemini-code-assist gemini-code-assist Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request introduces @tanstack/react-table to manage data and rendering for the JobTable, PodGroupsTable, PodsTable, and QueueTable components. It renames JobFilters to TableFilterMenu, updates its event handlers, and integrates edit and delete dialogs directly into the table components, allowing for the removal of several redundant sub-components. I have no feedback to provide.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[feature] Better performance with Tanstack-Table

2 participants