Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: focus after marking last subtask done (#2795) #2831

Merged
merged 1 commit into from
Nov 16, 2023
Merged

fix: focus after marking last subtask done (#2795) #2831

merged 1 commit into from
Nov 16, 2023

Conversation

miqh
Copy link
Contributor

@miqh miqh commented Oct 25, 2023

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.

demo1

Issues Resolved

#2795

Check List

  • New functionality includes testing. (N/A)
  • New functionality has been documented in the README if applicable. (N/A)

@johannesjo
Copy link
Owner

Thank you very much! I have a look tomorrow. Sorry for the delay. I was out of town for a couple of weeks... :)

@johannesjo
Copy link
Owner

Thank you very much! It's absolutely great that you also added e2e tests. Much appreciated!!

About the niggle:
Maybe we can open up a new issue for this? Ideally I'd think that the previous or next main task or one of its sub tasks should be focused. Maybe there is some way to check if the current task is a parent and to never focus its sub tasks when it is marked as done?

@johannesjo johannesjo merged commit af6e5e3 into johannesjo:master Nov 16, 2023
6 checks passed
@miqh
Copy link
Contributor Author

miqh commented Nov 18, 2023

@johannesjo, you're welcome. 👍

It's been a while since I originally looked at the code to prepare this fix, so I'm not able to advise on feasibility off the top of my head.

However, it'd only seem reasonable (and again, I express this subjectively) for the navigation focus to move to the next available task, or task group, if a currently focused task group is marked as done, instead of the first subtask of the latter.

@miqh miqh deleted the fix/last-subtask-done-focus branch November 18, 2023 05:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants