Repository navigation
Conversation
|
Important
This repository does not receive automatic reviews because it has fewer than 10 stars. ⚙️ Run configuration
Comment |
|
/deploy-preview |
|
🚀 Deployed on https://pr-1131--show-admin-preview.netlify.app |
There was a problem hiding this comment.
🟡 Changes recommended
Bulk-edit relationship handling and unresolved search, visibility, and keyboard interaction defects affect core activity-list workflows.
5 open issues
Dropdown edits replace relation objects with IDs · New Stale fetch responses overwrite newer search results · New Global keydown suppression blocks Escape and Tab dismissal · New Clearing search input hides field while old filter remains · New Actions column can be hidden permanently from the columns panel · New
What changed in this PR
Migrates the activity list to MUI Data Grid and consolidates its controls into a toolbar.
Changes:
- Adds resizable columns, bulk editing, and top/bottom pagination.
- Introduces searchable Saved Views and optional-column persistence.
- Adds grid and saved-view interaction tests.
| File | Description |
|---|---|
| yarn.lock | Locks Data Grid dependencies. |
| src/reducers/events/event-list-reducer.js | Stores optional-column selections. |
| src/pages/events/summit-event-list-page/index.js | Integrates the grid and Saved Views. |
| src/pages/events/summit-event-list-page/helpers.js | Makes Selection Status optional. |
| src/pages/events/__tests__/summit-event-list-page.test.js | Tests column visibility and persistence. |
| src/i18n/en.json | Updates toolbar and saved-view labels. |
| src/components/mui/bulk-edit-data-grid.js | Adds the reusable bulk-edit grid. |
| src/components/mui/__tests__/bulk-edit-data-grid.test.js | Tests grid interactions. |
| src/components/filters/saved-views/index.js | Adds saved-view selection and management. |
| src/components/filters/saved-views/__tests__/saved-views.test.js | Tests saved-view workflows. |
| src/actions/event-actions.js | Adds the column-selection action. |
| package.json | Adds MUI Data Grid. |
Review effort: Balanced
| const editField = (rowId, key, value) => { | ||
| setEditRows((current) => ({ | ||
| ...current, | ||
| [rowId]: { ...current[rowId], [key]: value } |
| const loadViews = (input) => | ||
| queryFilterCriterias(summitId, context, input, setViews); |
| onChange={handleSearch} | ||
| placeholder={T.translate("general.placeholders.search")} | ||
| // the menu otherwise treats typing as item navigation | ||
| onKeyDown={(ev) => ev.stopPropagation()} |
| // its input and its clear button with nothing typed | ||
| onBlur={(ev) => { | ||
| if (ev.currentTarget.contains(ev.relatedTarget)) return; | ||
| if (!ev.currentTarget.querySelector("input").value) setExpanded(false); |
| field: "actions", | ||
| type: "actions", | ||
| headerName: T.translate("general.actions"), |
santipalenque
left a comment
There was a problem hiding this comment.
hey @ako3131 good job so far!, apart from the inline comments I also found these:
- columns selection not stored in view, search filter not stored in view. We should try to fix this without any API change
- why is list cleared and refetch on every Saved Views dropdown open? I think we can pull in the background and avoid clearing it
- some columns are not resizable (speakers), not sure if any more.
| onSubmit: (values) => | ||
| onSave({ id: selectedView?.id, ...values }) | ||
| .then(() => onClose()) | ||
| // the action's error handler reports the failure; keep the dialog |
There was a problem hiding this comment.
remove, unnecessary comment, this is our code standard behavior
There was a problem hiding this comment.
also dialog covers API error message
| }; | ||
|
|
||
| return ( | ||
| <Dialog |
There was a problem hiding this comment.
can you use uicore CustomDialog instead ? so we start standarizing dialogs
| VISIBILITY_OPTION_ME | ||
| } from "../../../utils/filter-criteria-constants"; | ||
|
|
||
| const SaveViewDialog = ({ selectedView, onSave, onClose }) => { |
| "& .MuiButton-startIcon": { m: 0 } | ||
| }; | ||
|
|
||
| const renderEditor = (col, editRow, onChange) => { |
There was a problem hiding this comment.
please put auxiliary components in their own files following our codebase convention on directories and file org
| reset(); | ||
| }, [dataIds]); | ||
|
|
||
| const enterEditMode = () => { |
There was a problem hiding this comment.
I think we can improve UX here, wdyt about a double click in a row triggering edit mode for that row, then a blur (click outside the row) would save and escape would cancel. I think if you want to edit a single row you have to click too many times, and selecting many presentations to edit doesn't make it any easier.
| onExport={handleExport} | ||
| searchProps={{ | ||
| term, | ||
| placeholder: T.translate("general.placeholders.search"), |
There was a problem hiding this comment.
this should not be the generic one, we had one specific for this grid
| const ColumnMenu = (props) => { | ||
| const { colDef } = props; | ||
| return ( | ||
| <GridColumnMenu |
There was a problem hiding this comment.
can we sort the columns alphabetically ?
| name: requiredStringValidation().trim(), | ||
| visibility: requiredStringValidation() | ||
| }), | ||
| // keeps the id of the active view so saving updates it instead of |
There was a problem hiding this comment.
API doesn't allow this, please test
|
@santipalenque I made fixes according to your suggestions. However I'd like to put the double click to edit and storing search/columns in a saved view in another PR. Let me know what you think. Thank you! |
yes thats ok |
|
@ako3131 I found new issues with the solution:
|
|
@ako3131 more findings by using it: |
… with the top one
…a fail to make space for error
bf2c4dc to
0876d6c
Compare
|
@santipalenque In regards to the selection status change, I moved it to optional since it seemed like it was usually an empty column. Let me know if it should be added back. I think it would be nice to see how it goes as a summit admin table, then potentially move it into core ui. The grid uses only the free version of @mui/x-data-grid and that provides the column resizing, sticky headers, and the columns panel. |


ref: https://app.clickup.com/t/9014802374/86bcbg72u
UI CHANGES: