Skip to content

Fix todo count going from 99+ down to 98

Lukas Eipert requested to merge 387873-todo-decrement-fix into master

What does this MR do and why?

Move event handler from component to count manager

So we have all the todo toggle logic in one single place. We also teach it to accept diffs and total counts.

Fix todo count going from 99+ down to 98

The helper function, mainly used in plan's functionality actually send the full count by:

  1. parsing the current count from the DOM, this turned 99+ into 99
  2. adding whatever diff was provided
  3. sending the full count

Given that the user count manager is aware of the current todo count, we can actually skip the first two steps and just send the calculated diff.

Changelog: fixed

MR acceptance checklist

Please evaluate this MR against the MR acceptance checklist. It helps you analyze changes to reduce risks in quality, performance, reliability, security, and maintainability.

Screenshots or screen recordings

Before After
Screen_Recording_2024-04-18_at_00.25.49 Screen_Recording_2024-04-18_at_00.24.48

How to set up and validate locally

Numbered steps to set up and validate the change are strongly suggested.

  1. Have more than 99+ todos
  2. Mark a todo in an issue or MR done. It should stay 99+ and/or go down to 99, if you had exactly 100 todos

Related to #387873 (closed)

Edited by Lukas Eipert

Merge request reports

Loading