-
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Open
Labels
good first issueGood for newcomersGood for newcomersno-issue-activityNo issue activityNo issue activityrefactorRefactoring tasksRefactoring tasksui/uxissue related and being worked with the figma file of the Admin UIissue related and being worked with the figma file of the Admin UI
Description
Problem Statement
The following files implement DataGrid features inline (search/sort/pagination/loading), causing duplicated logic and inconsistent UX.
src/screens/EventVolunteers/Requests/Requests.tsx
src/screens/EventVolunteers/VolunteerGroups/VolunteerGroups.tsx
src/screens/EventVolunteers/Volunteers/Volunteers.tsx
src/screens/FundCampaignPledge/FundCampaignPledge.tsx
Proposed Solution
-
Refactor the files to use the shared
DataGridWrappercomponent. -
Create a linter to prevent new code reverting to the unapproved way.
- This command was used to identify files:
rg -n --glob 'src/screens/**' -e '@mui/x-data-grid' -e '<DataGrid\b' | cut -d: -f1 | sort -u - The linter must run as a lint staged check. Look at the
.huskydirectory for details. - It must also be part of our Pull Request GitHub action file
.github/workflows/pull-request.ymlas a job that is a prerequisite to thePre-Test-Checks-Passjob.
- This command was used to identify files:
Implementation Plan
Example Starter Code
import { DataGridWrapper } from "src/shared-components/DataGridWrapper/DataGridWrapper";
<DataGridWrapper
rows={rows}
columns={columns}
searchConfig={{ enabled: true, fields: ["name","email"] }}
paginationConfig={{ enabled: true, defaultPageSize: 25, pageSizeOptions: [10,25,50,100] }}
/>Learning Resources
Files to Modify
- src/screens/UserPortal/Volunteer/UpcomingEvents/UpcomingEvents.tsx
Implementation Approach
- Replace inline DataGrid with DataGridWrapper.
- Move search/sort/pagination state into wrapper props.
- Update tests for search/pagination.
Dependencies
Acceptance Criteria
- Uses DataGridWrapper exclusively
- Search/pagination parity with prior behavior
- Keyboard navigation/a11y intact
Effort Estimate
- Analysis: 0.5h | Implementation: 1.5h | Testing: 0.5h | Total: ~2.5h
Testing Requirements
- Search filters visible rows
- Pagination page/size updates model
Metadata
Metadata
Assignees
Labels
good first issueGood for newcomersGood for newcomersno-issue-activityNo issue activityNo issue activityrefactorRefactoring tasksRefactoring tasksui/uxissue related and being worked with the figma file of the Admin UIissue related and being worked with the figma file of the Admin UI
Type
Projects
Status
Backlog
Status
Backlog