These changes provide UI feedback when dropping a course. A spinnner overlay is added to the course being dropped while the drop request is in flight, and the store removes the course from the list upon success.
This replaces #201 with an event listener approach instead of passing callback props through a deep component hierarchy.
There's a companion PR for lib.interfaces that turns the enrollment store into an event emitter. (I chose to emit the events from the enrollment store instead of the course itself so the library store wouldn't have to add listeners to every course.)
The key changes here are:
The addition of an EnrollmentDropListener component that wraps the Enrollment card to listen for drop events.
The addition of drop listeners and corresponding cleanup to Store
These changes provide UI feedback when dropping a course. A spinnner overlay is added to the course being dropped while the drop request is in flight, and the store removes the course from the list upon success.
This replaces #201 with an event listener approach instead of passing callback props through a deep component hierarchy.
There's a companion PR for lib.interfaces that turns the enrollment store into an event emitter. (I chose to emit the events from the enrollment store instead of the course itself so the library store wouldn't have to add listeners to every course.)
The key changes here are: