fix: focus after marking last subtask done (#2795) #2831
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
Hello there.
These changes should help resolve how the application focuses the first task of a task list if the last subtask of another task is marked as done via the tick button. The resulting behaviour should put it in line with how the focus travels when resolving the subtask using a keyboard shortcut instead.
I've also added an E2E test to cover this particular scenario. I'm not all too familiar with how this works with Nightwatch, but I gave it my best shot.
As an aside, there's another usability niggle (opinionated) I've noticed, but I don't have any good ideas for how to improve it.
If one marks a task with subtasks as done, then the focus doesn't move to the next sibling task in the same list. Underneath the hood, the application tries to shift the focus to the first subtask. However, because of how that entire task will end up in the completed pile, the focus disappears altogether, creating some disorientation.
I think the above is exacerbated by how the default behaviour of keyboard scrolling down a task list will automatically move into subtask items from parent task items. As long as this latter behaviour is required, I can't see an easy intervention.
In any case, happy to amend whatever.
Issues Resolved
#2795
Check List