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
How to set up and validate locally
- Create a task on an issue
- Add some checkboxes to the task description
- Toggle those boxes
Related to #372890 (closed)