Repository navigation
Conversation
… deleted responsive options
5.0.74 and later replace the MuiTable Edit and Delete icon columns with a row actions menu and pass the column count to a function child, which the cart total row and the sponsor table tests rely on.
There was a problem hiding this comment.
🟢 Approval recommended
No active review issues remain for the dependency upgrade and row-actions menu compatibility changes.
No open issues 🎉
What changed in this PR
Updates summit-admin to openstack-uicore-foundation 5.0.75 and adapts sponsor tables to its unified row-actions menu. This pairs the compatibility changes from #1147 with the required dependency bump, allowing #1141 to rebase onto them.
Changes:
- Updates the dependency pin and lockfile to 5.0.75.
- Aligns the cart total using MuiTable’s reported column count and removes the unused responsive option.
- Updates four test suites to use the row-actions menu instead of separate Edit/Delete buttons.
| File | Description |
|---|---|
yarn.lock |
Locks uicore to 5.0.75. |
src/pages/sponsors/sponsor-page/tabs/sponsor-pages-tab/__tests__/sponsor-pages-tab.test.js |
Selects Edit through the row-actions menu. |
src/pages/sponsors/sponsor-page/tabs/sponsor-forms-tab/__tests__/sponsor-forms-tab.test.js |
Updates deletion and action-visibility checks for the menu. |
src/pages/sponsors/sponsor-page/tabs/sponsor-cart-tab/components/cart-view.js |
Calculates total-row spacing dynamically and removes the unused option. |
src/pages/sponsors/sponsor-page/tabs/sponsor-cart-tab/components/__tests__/cart-view.test.js |
Checks menu visibility and available cart actions. |
src/pages/sponsors/show-pages-list-page/__tests__/show-pages-list-page.test.js |
Selects Edit/Delete through the row-actions menu. |
package.json |
Pins uicore to 5.0.75. |
Review effort: Balanced
caseylocker
left a comment
There was a problem hiding this comment.
Approving. One non-blocking note.
One behaviour change from the bump that the description doesn't call out: archived rows lose Edit and Delete on the two MuiTableEditable tables that set disableProp: "is_archived".
src/pages/sponsors/sponsor-form-item-list-page/index.js(L259)src/pages/sponsors/sponsor-page/tabs/sponsor-forms-tab/components/manage-items/sponsor-forms-manage-items.js(L329)
On 5.0.73-beta.1 the editable table's Edit and Delete buttons had no disabled prop, so an archived item could still be opened or deleted. On 5.0.75 both sit behind RowActionsMenu, which is disabled when row[options.disableProp] is truthy. With Show Archived on, an admin now has to unarchive an item before editing or deleting it.
This matches how the plain MuiTable pages already behave, so it may be what we want. Can you confirm it's intended? Nothing in the suite would catch it either way: the manage-items tests mock the table, and the item-list tests have no row-action assertions.
ref: https://app.clickup.com/t/9014802374/86bcxj2kh
Summary
Bumps
openstack-uicore-foundationfrom5.0.73-beta.1to5.0.75(latest 5.0.x) and updates summit-admin for the row actions menu that 5.0.74 introduced (OpenStackweb/openstack-uicore-foundation#380), which replaces MuiTable's Edit and Delete icon columns with a single ⋮ menu.cart-viewcomputescolGap/trailingfrom the column count MuiTable now passes to a function child, so the total stays under Amount (editable cart: 9 columns, read-only: 7).options={{ responsive: false }}fromcart-view. uicore no longer reads it.action-edit/action-deleteor theEditIcon/DeleteIconbuttons.The
cart-viewand test changes are the commit from #1147 by @ako3131, cherry-picked unchanged. This PR adds the version bump that #1147 was waiting on. The two have to land together: on5.0.73-beta.1MuiTable renderschildrenas-is, so the function child renders no total row.Once this merges, #1141 can drop its own uicore bump and rebase onto it.
Tests
yarn jest(full run, local): 2233 of 2243 pass. The 10 failures are 5000 ms timeouts in five suites unrelated to this change (event-form,event-form-notify,page-template-popup,delete-extra-question-popup,process-request-popup), hit while the machine was under load. All 74 tests in those suites pass with--runInBandon both5.0.75and5.0.73-beta.1.show-pages-list-page,cart-view,sponsor-forms-tab,sponsor-pages-tab) pass on5.0.75.eslinton the changed files: 0 errors.Summary by CodeRabbit