Repository navigation
Conversation
|
Important
This repository does not receive automatic reviews because it has fewer than 10 stars.
|
There was a problem hiding this comment.
🟡 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); |
…better keyboard user experience
80c3816 to
83e8b09
Compare
santipalenque
left a comment
There was a problem hiding this comment.
hey @ako3131 I like this idea but it needs some polishing, here are a couple of issues I found on top of what I commented inline:
1- On MuiTableEditable and MuiTableSortable the actions are not grouped in taco menu like in MuiTable, it should be consistent. These two versions of the table keep showing the Edit action on the left and just the Delete action inside taco menu while MuiTable shows all actions inside taco menu.
2- Extra actions like ARCHIVE are left on the right most column, is weird that some actions are inside the taco menu aligned left and others aligned right. I think this solution should also handle this scenario and allow adding custom actions to the menu.
3- Tables that have extra rows like TotalRow are now missaligned (check other extra rows too) , you should create a PR for summit-admin and sponsor-services with amends on these instances.
4- Removed buttons and test IDs will fail summit-admin tests on the version bump: cart-view.test.js, sponsor-forms-tab.test.js, sponsor-pages-tab.test.js, show-pages-list-page.test.js.
5- User cannot longer select a text from the table to copy. When trying to select a value from a table cell, the onClick triggers and you are taken to edit page.
| setAnchorEl(null); | ||
| action.onClick(); | ||
| }} | ||
| sx={action.destructive ? { color: "error.main" } : undefined} |
There was a problem hiding this comment.
why not have a color prop on action ? defaulted to undefined, and allowing to set it to error.main if needed
| destructive: true | ||
| }); | ||
|
|
||
| const RowActionsMenu = ({ actions }) => { |
There was a problem hiding this comment.
if we separate onDelete and onEdit (which are the most common actions) and leave actions as extraActions separate, we then can simplify this a lot and avoid having getDeleteAction altogether

ref: https://app.clickup.com/t/9014802374/86bc67fpv
Summary
Declutters MUI table rows: Delete moves into a "⋮" row actions menu, and
MuiTablerows open for editing on click.onEdit; rows disabled viadisablePropstay 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.aria-label("More actions"), red styling for destructive items, trigger disabled when every action is disabled. New sharedgetDeleteAction()helper.options.responsive,getActionsMenuBreakpoint).hover; hover now only marks clickable rows.Breaking changes
MuiTablehas no Edit column. Extra rows passed aschildren(e.g.TotalRowcolGap/trailing) need updating.action-edit/action-deleteare gone; userow-actions-menu-trigger+ the "Delete" menu item.options.responsiveno longer has any effect.summit-admin follow-up needed:
sponsor-cart-tab/components/cart-view.js(TotalRow layout, test ids).Testing
yarn testandyarn buildpass.