Skip to content

Enable interactive checklists within Task descriptions

What does this MR do and why?

Make checkboxes in task descriptions work.

Listens for change event on the description, gets markdown position from sourcepos attribute on the checkbox, then updates description (the entire text).

Only disables the current checkbox while loading, rather than all of them. Maybe this could cause problems if clicking lots of them fast. For non-graphql updates there is currently an update_task field, which skips spam check and some other things. Maybe we need to add that to graphql.

Caveats / Risks

Could causes issues like Forms with task lists can be overwritten when e... (gitlab-foss#19745 - closed) or No feedback when checking on checklist if poten... (gitlab-foss#29483 - closed) or spam false positives 😬

Should be fewer issues with overwrites after Work Item editing conflict resolution (#362967 - closed), not sure what we should do about the spam_check

Also issue/race condition if multiple people check different checkboxes at the same time

Screenshots or screen recordings

check

How to set up and validate locally

  1. Create a task on an issue
  2. Add some checkboxes to the task description
  3. Toggle those boxes

Related to #372890 (closed)

Edited by Simon Knox

Merge request reports

Loading