-
Notifications
You must be signed in to change notification settings - Fork 290
ui/schedules: migrate schedule components from FlatList to CompList #4316
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Conversation
… use CompList and enhance mobile responsiveness
…p for enhanced rule management
…pListItem components
…tItemNav for improved rendering
…emText for improved rendering
…t for improved rendering
…improved rendering
…mproved rendering
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR migrates the schedule-related UI components from FlatList to CompList to support upcoming MUI 6 changes. Key changes include replacing FlatList with CompList across various user and schedule list components, updating the associated item rendering patterns, and adapting the list item components to the new CompListItem* interfaces.
Reviewed Changes
Copilot reviewed 13 out of 13 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| web/src/app/users/UserSessionList.tsx | Replaced FlatList with CompList and updated list item usage. |
| web/src/app/users/UserOnCallAssignmentList.tsx | Updated list component from FlatList to CompListItemNav for navigation. |
| web/src/app/users/UserNotificationRuleList.tsx | Transitioned to CompList with CompListItemText for notification rules. |
| web/src/app/users/UserList.tsx | Migrated from FlatList to CompList with CompListItemNav for user list items. |
| web/src/app/users/UserContactMethodList.tsx | Updated list rendering from FlatList to CompList with CompListItemText. |
| web/src/app/users/UserCalendarSubscriptionList.tsx | Modified list structure using CompList and corresponding item components. |
| web/src/app/schedules/on-call-notifications/ScheduleOnCallNotificationsList.tsx | Switched to CompList with updated item mapping and action handling. |
| web/src/app/schedules/ScheduleShiftList.tsx | Replaced FlatList with CompList; updated day and shift renderings. |
| web/src/app/schedules/ScheduleRuleList.tsx | Converted from FlatList to CompList with CompListItemNav/Text items. |
| web/src/app/schedules/ScheduleOverrideList.jsx | Migrated schedule override list from FlatList to CompList with proper item mapping. |
| web/src/app/schedules/ScheduleList.tsx | Updated schedule list to use CompList and CompListItemNav components. |
| web/src/app/schedules/ScheduleAssignedToList.tsx | Changed from FlatList to CompList with CompListItemNav items. |
| web/src/app/lists/CompListItems.tsx | Updated item components to support optional title, icon spacing, and a newTab prop. |
Comments suppressed due to low confidence (1)
web/src/app/schedules/ScheduleShiftList.tsx:261
- Consider adding a unique key attribute to each shift item in the list to ensure that React can correctly reconcile list updates.
result.push(<CompListItemText title={s.user?.name || ''} subText={getShiftDetails(s, day)} icon={<UserAvatar userID={s.userID} />} />)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR migrates schedule and user list components from the deprecated FlatList component to the new CompList component as part of the MUI 6 prerequisite work. The key changes include:
- Replacing all instances of FlatList with CompList in user and schedule related files.
- Updating list item rendering to use CompListItemText or CompListItemNav for improved consistency.
- Adjusting prop names (e.g., from headerNote to note) to align with the new component’s API.
Reviewed Changes
Copilot reviewed 13 out of 13 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| web/src/app/users/UserSessionList.tsx | Migrated FlatList to CompList with corresponding item mapping. |
| web/src/app/users/UserOnCallAssignmentList.tsx | Replaced FlatList with CompList using navigation items. |
| web/src/app/users/UserNotificationRuleList.tsx | Updated list rendering to CompList with item actions. |
| web/src/app/users/UserList.tsx | Switched list component to CompList using navigation items. |
| web/src/app/users/UserContactMethodList.tsx | Changed list component to CompList and adjusted item props. |
| web/src/app/users/UserCalendarSubscriptionList.tsx | Transitioned from FlatList to CompList for calendar subscriptions. |
| web/src/app/schedules/on-call-notifications/ScheduleOnCallNotificationsList.tsx | Migrated the notification list to CompList with updated actions. |
| web/src/app/schedules/ScheduleShiftList.tsx | Replaced FlatList with CompList and updated item key generation. |
| web/src/app/schedules/ScheduleRuleList.tsx | Updated list rendering logic using CompList and navigation items. |
| web/src/app/schedules/ScheduleOverrideList.jsx | Switched list component to CompList with proper mapping. |
| web/src/app/schedules/ScheduleList.tsx | Migrated schedule listing from FlatList to CompList. |
| web/src/app/schedules/ScheduleAssignedToList.tsx | Changed list component from FlatList to CompList for assigned items. |
| web/src/app/lists/CompListItems.tsx | Enhanced list item definitions with new properties (newTab, alwaysShowIcon). |
|
This pull request has been automatically marked as stale because it has not had recent activity. Thank you for your contributions. |
Description:
Transitions from FlatList to CompList for schedule components
Part of the MUI 6 prereq. work
Out of Scope: