Skip to content

Fix: responsive grids - #311

Open
santipalenque wants to merge 10 commits into
mainfrom
fix/responsive-mui-table
Open

Fix: responsive grids#311
santipalenque wants to merge 10 commits into
mainfrom
fix/responsive-mui-table

Conversation

@santipalenque

@santipalenque santipalenque commented Aug 7, 2026

Copy link
Copy Markdown
Contributor

https://app.clickup.com/t/9014802374/86bb7tvh1

Summary by CodeRabbit

  • New Features
    • Added refreshed editable, sortable, and standard table experiences with responsive layouts, pagination, row actions, drag-and-drop ordering, and deletion confirmation.
    • Added inline editing with validation and save-on-blur or Enter behavior.
    • Added support for payment, fee, refund, discount, notes, and total detail rows.
    • Added responsive action menus and horizontal scroll indicators.
  • Enhancements
    • Improved boolean and custom cell rendering behavior.
    • Standardized tooltip text sizing for improved readability.

@coderabbitai

coderabbitai Bot commented Aug 7, 2026

Copy link
Copy Markdown

Review Change Stack

Important

  • 🔍 Trigger review

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

⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: de2f5292-85fa-4792-bfdf-91eabed0eaf4

📝 Walkthrough

Walkthrough

The PR rebuilds MUI table components under src/components/mui/tables, adds shared table utilities and extra-row components, removes legacy implementations, and updates exports, imports, tests, and Webpack entries.

Changes

MUI table restructuring

Layer / File(s) Summary
Shared table foundation
src/components/mui/tables/components/*, src/components/mui/MuiBaseCustomTheme.js
Adds shared table layout, styling, scroll-fade, sorting-header, row-action, deletion, and pagination utilities. Custom cell renderers now take precedence over boolean rendering.
Extra table rows
src/components/mui/tables/extra-rows/*, src/components/mui/SponsorOrderGrid/index.js, src/components/mui/__tests__/*row.test.js
Adds six extra-row components and a barrel export. Consumers and tests use the new paths.
Editable table
src/components/mui/tables/editable-table/index.js, src/components/mui/__tests__/mui-table-editable.test.js
Adds inline editing, validation, sorting, pagination, and row actions.
Standard MUI table
src/components/mui/tables/mui-table/index.js, src/components/mui/__tests__/mui-table.test.js
Adds sorting, responsive actions, archived-row handling, deletion confirmation, injected children, and empty-state rendering.
Sortable table
src/components/mui/tables/sortable-table/index.js, src/components/mui/__tests__/mui-table-sortable.test.js
Adds drag-and-drop reordering with pagination, sorting, edit/delete actions, and empty-state rendering.
Export and build integration
src/components/index.js, src/components/mui/BulkEditTable/BulkEditTable.js, webpack.common.js
Updates public exports, imports, and Webpack entries for the new table locations.

Estimated code review effort: 4 (Complex) | ~45 minutes

Sequence Diagram(s)

sequenceDiagram
  participant MuiTable
  participant TableShell
  participant SortableHeaderContent
  participant TableCellContent
  participant RowActionsMenu
  participant createDeleteHandler
  MuiTable->>TableShell: render table content and pagination
  MuiTable->>SortableHeaderContent: provide sort state and callback
  MuiTable->>TableCellContent: render row cell values
  MuiTable->>RowActionsMenu: provide responsive row actions
  RowActionsMenu->>createDeleteHandler: invoke delete action
  createDeleteHandler-->>MuiTable: confirm item deletion
Loading

Possibly related PRs

Suggested reviewers: smarcet

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately identifies the PR's primary focus on responsive behavior in MUI tables and table actions.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch fix/responsive-mui-table

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.

@coderabbitai coderabbitai Bot 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.

Actionable comments posted: 12

🧹 Nitpick comments (1)
src/components/mui/tables/mui-table/index.js (1)

203-203: 📐 Maintainability & Code Quality | 🔵 Trivial | 💤 Low value

Coerce disabled to a boolean.

options.disableProp && row[options.disableProp] can evaluate to null, undefined, a string, or a number. IconButton expects a boolean for disabled. getRowActions already applies !!(...) for the same conditions, so the menu path and the icon path can disagree in typing. Apply !! at each icon button for consistency.

♻️ Proposed change
-                        disabled={options.disableProp && row[options.disableProp]}
+                        disabled={!!(options.disableProp && row[options.disableProp])}

Also applies to: 234-238, 268-268, 293-293

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@src/components/mui/tables/mui-table/index.js` at line 203, Update each
IconButton disabled prop in the table row-action rendering, including the
instances near the current expression and the additional highlighted locations,
to coerce the disable condition with !!. Match the boolean coercion already used
by getRowActions so every icon path passes a boolean to IconButton.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@src/components/mui/tables/components/create-delete-handler.js`:
- Around line 19-20: Update the dialog options in create-delete-handler to use
the showConfirmDialog API field iconType instead of type, preserving the
"warning" value so the delete confirmation displays its warning state.
- Around line 4-10: Update createDeleteHandler to accept a getId callback and
use it when invoking onDelete instead of always reading item.id. In
sortable-table, pass a callback that returns item[idKey], preserving the
configured row identifier for deletion while retaining existing behavior for the
default idKey.

In `@src/components/mui/tables/components/row-actions-menu.js`:
- Around line 28-34: Add a localized aria-label to the icon-only IconButton that
opens the row actions menu, using the component’s existing localization
mechanism and an existing translation key where available. Preserve the current
click behavior and data-testid.

In `@src/components/mui/tables/components/sortable-header-content.js`:
- Around line 15-17: Update the onClick handler in the sortable header content
to pass ascending order when col.columnKey differs from sortCol, and only negate
sortDir when the clicked column is already active. Preserve the existing column
key passed to onSort.

In `@src/components/mui/tables/components/styles.module.less`:
- Around line 7-12: Center the absolutely positioned border pseudo-element by
updating its positioning declarations: replace the top-zero alignment with top:
50% and apply a vertical translate matching half its 60% height. Remove the
ineffective align-self declaration while preserving the existing bottom, left,
border, and height styling.

In `@src/components/mui/tables/components/use-scroll-fade.js`:
- Around line 15-23: Update the React.useEffect around updateFades to observe
container and table dimension changes with a ResizeObserver, invoking
updateFades when either resizes. Observe the relevant container and table
elements, and disconnect the observer during cleanup alongside removing the
scroll listener.

In `@src/components/mui/tables/editable-table/index.js`:
- Around line 251-263: Update the editable-cell TableCell rendering around
isEditable, adding tabIndex only for editable cells and handling Enter or Space
keyboard activation by invoking handleCellClick with the row and column key.
Ignore keyboard events originating from the nested TextField, while preserving
non-editable cell behavior.

In `@src/components/mui/tables/mui-table/index.js`:
- Around line 115-119: Update the select action in the table component to use
the existing T.translate mechanism for the "View" label, including both the menu
entry and its tooltip. Add or reuse the appropriate translation key so both
visible labels follow the current locale while preserving the existing onSelect
behavior.
- Line 180: Update the className construction in the table cell rendering to
omit falsy or undefined values instead of interpolating them as strings.
Preserve both the conditional dotted-border class from col.dottedBorder and
col.className when present, while ensuring the rendered class list contains only
valid class names.

In `@src/components/mui/tables/sortable-table/index.js`:
- Around line 77-80: Use the configured idKey consistently for item identity in
the sortable table. Update the reorder logic around movedItemId and the
createDeleteHandler helper to derive IDs through a getId callback, then pass
(item) => item[idKey] when creating the delete handler so onReorder and onDelete
receive the configured item ID.
- Around line 182-217: Add localized aria-label values to the edit, delete, and
reorder IconButton elements in the table row actions, using the existing
localization mechanism and clear action-specific labels while preserving their
current click and drag behavior.
- Around line 66-75: Update the reorder logic around reordered and
updateOrderKey so assigning the new order does not mutate item objects supplied
through data. Create new item objects when applying updateOrderKey, while
preserving unchanged item references or values as appropriate, then pass the
resulting reordered collection to onReorder.

---

Nitpick comments:
In `@src/components/mui/tables/mui-table/index.js`:
- Line 203: Update each IconButton disabled prop in the table row-action
rendering, including the instances near the current expression and the
additional highlighted locations, to coerce the disable condition with !!. Match
the boolean coercion already used by getRowActions so every icon path passes a
boolean to IconButton.
🪄 Autofix

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: e76a6e75-5930-4cee-8a49-64a1205c7f32

📥 Commits

Reviewing files that changed from the base of the PR and between e7face6 and d0aa639.

📒 Files selected for processing (38)
  • src/components/index.js
  • src/components/mui/BulkEditTable/BulkEditTable.js
  • src/components/mui/MuiBaseCustomTheme.js
  • src/components/mui/SponsorOrderGrid/index.js
  • src/components/mui/__tests__/fee-row.test.js
  • src/components/mui/__tests__/mui-table-editable.test.js
  • src/components/mui/__tests__/mui-table-sortable.test.js
  • src/components/mui/__tests__/mui-table.test.js
  • src/components/mui/__tests__/notes-row.test.js
  • src/components/mui/__tests__/payment-row.test.js
  • src/components/mui/__tests__/refund-row.test.js
  • src/components/mui/__tests__/total-row.test.js
  • src/components/mui/editable-table/mui-table-editable.js
  • src/components/mui/editable-table/mui-table-editable.module.less
  • src/components/mui/sortable-table/mui-table-sortable.js
  • src/components/mui/sortable-table/styles.module.less
  • src/components/mui/table/mui-table.js
  • src/components/mui/tables/components/CustomTablePagination.js
  • src/components/mui/tables/components/create-delete-handler.js
  • src/components/mui/tables/components/row-actions-menu.js
  • src/components/mui/tables/components/scroll-fade-overlay.js
  • src/components/mui/tables/components/sortable-header-content.js
  • src/components/mui/tables/components/styles.module.less
  • src/components/mui/tables/components/table-cell-content.js
  • src/components/mui/tables/components/table-shell.js
  • src/components/mui/tables/components/table-styles.js
  • src/components/mui/tables/components/use-scroll-fade.js
  • src/components/mui/tables/editable-table/index.js
  • src/components/mui/tables/extra-rows/DiscountRow.jsx
  • src/components/mui/tables/extra-rows/FeeRow.jsx
  • src/components/mui/tables/extra-rows/NotesRow.jsx
  • src/components/mui/tables/extra-rows/PaymentRow.jsx
  • src/components/mui/tables/extra-rows/RefundRow.jsx
  • src/components/mui/tables/extra-rows/TotalRow.jsx
  • src/components/mui/tables/extra-rows/index.js
  • src/components/mui/tables/mui-table/index.js
  • src/components/mui/tables/sortable-table/index.js
  • webpack.common.js
💤 Files with no reviewable changes (5)
  • src/components/mui/sortable-table/styles.module.less
  • src/components/mui/editable-table/mui-table-editable.module.less
  • src/components/mui/table/mui-table.js
  • src/components/mui/sortable-table/mui-table-sortable.js
  • src/components/mui/editable-table/mui-table-editable.js

Comment thread src/components/mui/tables/components/create-delete-handler.js
Comment thread src/components/mui/tables/components/create-delete-handler.js Outdated
Comment thread src/components/mui/tables/components/row-actions-menu.js
Comment thread src/components/mui/tables/components/sortable-header-content.js
Comment thread src/components/mui/tables/components/use-scroll-fade.js
Comment thread src/components/mui/tables/mui-table/index.js
Comment thread src/components/mui/tables/mui-table/index.js
Comment thread src/components/mui/tables/sortable-table/index.js Outdated
Comment thread src/components/mui/tables/sortable-table/index.js Outdated
Comment thread src/components/mui/tables/sortable-table/index.js

@coderabbitai coderabbitai Bot 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.

Caution

Inline review comments failed to post. This is likely due to GitHub's internal server error or limits when posting large numbers of comments. If you are seeing this consistently it is likely a permissions issue. Please check "Moderation" -> "Code review limits" under your organization settings.

Actionable comments posted: 12

🧹 Nitpick comments (1)
src/components/mui/tables/mui-table/index.js (1)

203-203: 📐 Maintainability & Code Quality | 🔵 Trivial | 💤 Low value

Coerce disabled to a boolean.

options.disableProp && row[options.disableProp] can evaluate to null, undefined, a string, or a number. IconButton expects a boolean for disabled. getRowActions already applies !!(...) for the same conditions, so the menu path and the icon path can disagree in typing. Apply !! at each icon button for consistency.

♻️ Proposed change
-                        disabled={options.disableProp && row[options.disableProp]}
+                        disabled={!!(options.disableProp && row[options.disableProp])}

Also applies to: 234-238, 268-268, 293-293

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@src/components/mui/tables/mui-table/index.js` at line 203, Update each
IconButton disabled prop in the table row-action rendering, including the
instances near the current expression and the additional highlighted locations,
to coerce the disable condition with !!. Match the boolean coercion already used
by getRowActions so every icon path passes a boolean to IconButton.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@src/components/mui/tables/components/create-delete-handler.js`:
- Around line 19-20: Update the dialog options in create-delete-handler to use
the showConfirmDialog API field iconType instead of type, preserving the
"warning" value so the delete confirmation displays its warning state.
- Around line 4-10: Update createDeleteHandler to accept a getId callback and
use it when invoking onDelete instead of always reading item.id. In
sortable-table, pass a callback that returns item[idKey], preserving the
configured row identifier for deletion while retaining existing behavior for the
default idKey.

In `@src/components/mui/tables/components/row-actions-menu.js`:
- Around line 28-34: Add a localized aria-label to the icon-only IconButton that
opens the row actions menu, using the component’s existing localization
mechanism and an existing translation key where available. Preserve the current
click behavior and data-testid.

In `@src/components/mui/tables/components/sortable-header-content.js`:
- Around line 15-17: Update the onClick handler in the sortable header content
to pass ascending order when col.columnKey differs from sortCol, and only negate
sortDir when the clicked column is already active. Preserve the existing column
key passed to onSort.

In `@src/components/mui/tables/components/styles.module.less`:
- Around line 7-12: Center the absolutely positioned border pseudo-element by
updating its positioning declarations: replace the top-zero alignment with top:
50% and apply a vertical translate matching half its 60% height. Remove the
ineffective align-self declaration while preserving the existing bottom, left,
border, and height styling.

In `@src/components/mui/tables/components/use-scroll-fade.js`:
- Around line 15-23: Update the React.useEffect around updateFades to observe
container and table dimension changes with a ResizeObserver, invoking
updateFades when either resizes. Observe the relevant container and table
elements, and disconnect the observer during cleanup alongside removing the
scroll listener.

In `@src/components/mui/tables/editable-table/index.js`:
- Around line 251-263: Update the editable-cell TableCell rendering around
isEditable, adding tabIndex only for editable cells and handling Enter or Space
keyboard activation by invoking handleCellClick with the row and column key.
Ignore keyboard events originating from the nested TextField, while preserving
non-editable cell behavior.

In `@src/components/mui/tables/mui-table/index.js`:
- Around line 115-119: Update the select action in the table component to use
the existing T.translate mechanism for the "View" label, including both the menu
entry and its tooltip. Add or reuse the appropriate translation key so both
visible labels follow the current locale while preserving the existing onSelect
behavior.
- Line 180: Update the className construction in the table cell rendering to
omit falsy or undefined values instead of interpolating them as strings.
Preserve both the conditional dotted-border class from col.dottedBorder and
col.className when present, while ensuring the rendered class list contains only
valid class names.

In `@src/components/mui/tables/sortable-table/index.js`:
- Around line 77-80: Use the configured idKey consistently for item identity in
the sortable table. Update the reorder logic around movedItemId and the
createDeleteHandler helper to derive IDs through a getId callback, then pass
(item) => item[idKey] when creating the delete handler so onReorder and onDelete
receive the configured item ID.
- Around line 182-217: Add localized aria-label values to the edit, delete, and
reorder IconButton elements in the table row actions, using the existing
localization mechanism and clear action-specific labels while preserving their
current click and drag behavior.
- Around line 66-75: Update the reorder logic around reordered and
updateOrderKey so assigning the new order does not mutate item objects supplied
through data. Create new item objects when applying updateOrderKey, while
preserving unchanged item references or values as appropriate, then pass the
resulting reordered collection to onReorder.

---

Nitpick comments:
In `@src/components/mui/tables/mui-table/index.js`:
- Line 203: Update each IconButton disabled prop in the table row-action
rendering, including the instances near the current expression and the
additional highlighted locations, to coerce the disable condition with !!. Match
the boolean coercion already used by getRowActions so every icon path passes a
boolean to IconButton.
🪄 Autofix

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: e76a6e75-5930-4cee-8a49-64a1205c7f32

📥 Commits

Reviewing files that changed from the base of the PR and between e7face6 and d0aa639.

📒 Files selected for processing (38)
  • src/components/index.js
  • src/components/mui/BulkEditTable/BulkEditTable.js
  • src/components/mui/MuiBaseCustomTheme.js
  • src/components/mui/SponsorOrderGrid/index.js
  • src/components/mui/__tests__/fee-row.test.js
  • src/components/mui/__tests__/mui-table-editable.test.js
  • src/components/mui/__tests__/mui-table-sortable.test.js
  • src/components/mui/__tests__/mui-table.test.js
  • src/components/mui/__tests__/notes-row.test.js
  • src/components/mui/__tests__/payment-row.test.js
  • src/components/mui/__tests__/refund-row.test.js
  • src/components/mui/__tests__/total-row.test.js
  • src/components/mui/editable-table/mui-table-editable.js
  • src/components/mui/editable-table/mui-table-editable.module.less
  • src/components/mui/sortable-table/mui-table-sortable.js
  • src/components/mui/sortable-table/styles.module.less
  • src/components/mui/table/mui-table.js
  • src/components/mui/tables/components/CustomTablePagination.js
  • src/components/mui/tables/components/create-delete-handler.js
  • src/components/mui/tables/components/row-actions-menu.js
  • src/components/mui/tables/components/scroll-fade-overlay.js
  • src/components/mui/tables/components/sortable-header-content.js
  • src/components/mui/tables/components/styles.module.less
  • src/components/mui/tables/components/table-cell-content.js
  • src/components/mui/tables/components/table-shell.js
  • src/components/mui/tables/components/table-styles.js
  • src/components/mui/tables/components/use-scroll-fade.js
  • src/components/mui/tables/editable-table/index.js
  • src/components/mui/tables/extra-rows/DiscountRow.jsx
  • src/components/mui/tables/extra-rows/FeeRow.jsx
  • src/components/mui/tables/extra-rows/NotesRow.jsx
  • src/components/mui/tables/extra-rows/PaymentRow.jsx
  • src/components/mui/tables/extra-rows/RefundRow.jsx
  • src/components/mui/tables/extra-rows/TotalRow.jsx
  • src/components/mui/tables/extra-rows/index.js
  • src/components/mui/tables/mui-table/index.js
  • src/components/mui/tables/sortable-table/index.js
  • webpack.common.js
💤 Files with no reviewable changes (5)
  • src/components/mui/sortable-table/styles.module.less
  • src/components/mui/editable-table/mui-table-editable.module.less
  • src/components/mui/table/mui-table.js
  • src/components/mui/sortable-table/mui-table-sortable.js
  • src/components/mui/editable-table/mui-table-editable.js
🛑 Comments failed to post (1)
src/components/mui/tables/components/styles.module.less (1)

7-12: 🎯 Functional Correctness | 🟡 Minor | ⚡ Quick win

Center the dotted border pseudo-element.

align-self has no effect on an absolutely positioned pseudo-element.

The current border starts at the top. Use top: 50% and transform to center the 60% height border.

Proposed fix
-    top: 0;
-    bottom: 0;
+    top: 50%;
     left: 0;
     border-left: 1px dashed `#e0e0e0`;
     height: 60%;
-    align-self: center;
+    transform: translateY(-50%);
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

    top: 50%;
    left: 0;
    border-left: 1px dashed `#e0e0e0`;
    height: 60%;
    transform: translateY(-50%);
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@src/components/mui/tables/components/styles.module.less` around lines 7 - 12,
Center the absolutely positioned border pseudo-element by updating its
positioning declarations: replace the top-zero alignment with top: 50% and apply
a vertical translate matching half its 60% height. Remove the ineffective
align-self declaration while preserving the existing bottom, left, border, and
height styling.

Comment thread src/components/mui/MuiBaseCustomTheme.js Outdated
Comment thread src/components/mui/tables/mui-table/index.js Outdated
Comment thread src/components/mui/tables/components/create-delete-handler.js Outdated
Comment thread src/components/mui/tables/sortable-table/index.js Outdated
Comment thread src/components/mui/tables/components/use-scroll-fade.js
Comment thread src/components/mui/tables/mui-table/index.js Outdated
Comment thread src/components/mui/tables/components/row-actions-menu.js
@smarcet

smarcet commented Aug 26, 2026

Copy link
Copy Markdown
Collaborator

@santipalenque please review and fix code conflicts

@santipalenque
santipalenque force-pushed the fix/responsive-mui-table branch from c7d45e5 to f2798b7 Compare August 27, 2026 14:10
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