Skip to content

Refactor/move table action buttons - #377

Open
ako3131 wants to merge 13 commits into
mainfrom
refactor/move-table-action-buttons
Open

ako3131 wants to merge 13 commits into
mainfrom
refactor/move-table-action-buttons

Conversation

@ako3131

@ako3131 ako3131 commented Oct 29, 2026 •

Copy link
Copy Markdown
Contributor

ref: https://app.clickup.com/t/9014802374/86bc67fpv

Summary

Declutters MUI table rows: Delete moves into a "⋮" row actions menu, and MuiTable rows open for editing on click.

  • MuiTable: Edit column removed. Clicking a row (or Enter on a focused row) calls onEdit; rows disabled via disableProp stay inert. Clicks on buttons, links, inputs and popups opened from a cell are ignored. Delete is in a new first column menu, disabled on disabled rows. Archive / View are unchanged.
  • MuiTableEditable, MuiTableSortable, MuiTableSortableV2, BulkEditTable: Delete moves to the same front menu. Edit buttons stay.
  • RowActionsMenu: tooltip + aria-label ("More actions"), red styling for destructive items, trigger disabled when every action is disabled. New shared getDeleteAction() helper.
  • Removed the responsive "collapse actions into a menu" logic (options.responsive, getActionsMenuBreakpoint).
  • BulkEditTable rows no longer use hover; hover now only marks clickable rows.

Breaking changes

  • Column order: MuiTable has no Edit column. Extra rows passed as children (e.g. TotalRow colGap / trailing) need updating.
  • Test ids action-edit / action-delete are gone; use row-actions-menu-trigger + the "Delete" menu item.
  • options.responsive no longer has any effect.

summit-admin follow-up needed: sponsor-cart-tab/components/cart-view.js (TotalRow layout, test ids).

Testing

  • Updated table tests for the menu; added tests for row click, Enter key, clicks on in-cell controls / action columns, clicks inside popups opened from a cell, and BulkEditTable delete via menu.
  • yarn test and yarn build pass.

@ako3131
ako3131 requested a balanced review from Copilot October 29, 2026 18:22
@ako3131 ako3131 self-assigned this Oct 29, 2026
@coderabbitai

coderabbitai Bot commented Oct 29, 2026 •

Copy link
Copy Markdown

Important

  • 🔍 Trigger review

This repository does not receive automatic reviews because it has fewer than 10 stars.

Run configuration
  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: defaults
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: e2f854f0-9738-462c-8188-36fee864bd46
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🟡 Changes recommended

In-cell controls can still unintentionally trigger row editing, and removing the Edit button leaves no named edit control discoverable by assistive-technology users.

2 open issues
What changed in this PR

Standardizes Delete actions across the MUI table components and replaces MuiTable’s Edit column with row-click and Enter-key editing.

Changes:

  • Moves Delete into a leading row-actions menu with shared labels, destructive styling, and disabled-state support.
  • Removes responsive action collapsing while retaining existing Edit buttons in other table variants.
  • Updates tests for menu-based deletion and row-edit interactions.
File Description
src/​i18n/​en.json Adds the “More actions” label.
src/​components/​mui/​tables/​sortable-table/​index.js Moves Delete into a leading menu.
src/​components/​mui/​tables/​sortable-table-v2/​mui-table-sortable-v2.js Adopts the shared Delete menu.
src/​components/​mui/​tables/​mui-table/​index.js Adds row editing and reorganizes action columns.
src/​components/​mui/​tables/​editable-table/​index.js Moves Delete into the shared menu.
src/​components/​mui/​tables/​components/​table-styles.js Removes action-collapse breakpoint utilities.
src/​components/​mui/​tables/​components/​row-actions-menu.js Adds shared Delete configuration and menu styling.
src/​components/​mui/​BulkEditTable/​components/​Row.js Separates Delete from Edit and removes row hover.
src/​components/​mui/​BulkEditTable/​BulkEditTable.js Updates headers and removes responsive action props.
src/​components/​mui/​BulkEditTable/​__tests__/​BulkEditTable.test.js Tests menu deletion with a custom row identifier.
src/​components/​mui/​__tests__/​mui-table.test.js Tests row editing, disabled rows, and interaction guards.
src/​components/​mui/​__tests__/​mui-table-sortable.test.js Updates deletion tests for the menu.
src/​components/​mui/​__tests__/​mui-table-sortable-v2.test.js Updates menu deletion and custom-identifier tests.
src/​components/​mui/​__tests__/​mui-table-editable.test.js Updates deletion tests and forwards the mocked button ref.

Review effort: Balanced

onEdit && !(options.disableProp && row[options.disableProp])
? {
hover: true,
tabIndex: 0,
// ignore clicks from popups (menus, dialogs) opened by a cell
if (!ev.currentTarget.contains(ev.target)) return;
// ignore clicks on controls rendered inside cells
if (!ev.target.closest("button, a, input, [role=button]")) onEdit(row);
@ako3131
ako3131 force-pushed the refactor/move-table-action-buttons branch from 80c3816 to 83e8b09 Compare October 29, 2026 20:29
@ako3131
ako3131 requested a review from santipalenque October 29, 2026 21:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants