Skip to content

[BB-8204] fix: Error and progress handling for checklists.

Fox Piacenti requested to merge fox/detect-collapsed into master

This Merge Request refactors the components on the checklist page, improving the handling of state so that the relevant components can track needed updates.

Supporting information

  • Jira ticket: url
  • GitLab issue: url

Discussions

Link to any public discussions about this PR or the design/architecture. Otherwise omit this.

Dependencies

None or link it here.

Visual changes

Screencast_from_02-13-2024_05_11_19_PM

Testing instructions

Step by step procedure

  1. Check out this branch
  2. make
  3. make run.frontend
  4. Visit https://localhost:3000/

Author notes and concerns

This MR not only refactors the components a bit, but makes a notable change: The checklist task endpoint now returns all tasks in a flat manner, rather than serializing a 'children' field on the tasks. This means the consumer of the API must do a bit more work to assemble the result that they want, as the structure isn't prescribed, but it comes with a few strong advantages:

  1. The number of queries is considerably reduced, as no separate query needs to be made per task in order to find the children.
  2. It makes it much more semantically clear where updates to the task should go. We do not send updates to a child task to a sub-path on the API from their parent. They still go to under the checklist's task API endpoint.
  3. As a side corollary for 2, Providence's autodiscovery for API endpoints is able to construct the correct endpoint without further intervention.
  4. As another corollary for 3, there's no longer a need to create completely new lists in Providence in order to keep track of subtasks. This problem was preventing parent components from reasonably subscribing to task updates under subtasks. By keeping them all within the same registered list, all updates can be tracked by the parent as desired.

This MR also includes a revised Single component, which will need to be backported to Providence to fix caching issues.

Merge request reports