-
Notifications
You must be signed in to change notification settings - Fork 78
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
feature/drag-and-drop schedules #1089
base: main
Are you sure you want to change the base?
Conversation
previously, the copy button would copy the selected schedule instead of the schedule it was linked to.
That is the case now because of the RDS migration. All duplicate schedule names have been mangled. Looks pretty good, and well-detailed PR description as well. I'll try to look at this soon. |
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.
Drag icon is not visible in light mode
Summary
Drag-And-Drop
Bug Fixes
Misc
Note
Previously, a list of
scheduleNames
was passed down as a prop to theSelectSchedulePopover
component. For implementing reordering via a sortable dnd list, eachscheduleName
must be mapped to a unique ID because we can't assume allscheduleNames
are unique yet.To address this:
AppStore.ts
saved schedule arrayAppStore
is recalculated accordingly.Important: The local mapping is not fully recreated after every reordering action. Instead, only the swapped elements are updated. The local mapping is only recreated during a complete component re-render. If we were to fully recreate the mapping on every reorder, it would disrupt:
Test Plan
Remember Me
checked, Try various combinations of schedule actions (create new schedules, delete some, reorder some, rename some, etc), reload the page, load unsaved changes and make sure the schedule state is the samehttps://dev.api.antalmanac.com/trpc/websoc
Issues
Closes #1054