Added hotkeys for priority, delete and favorite on the TaskDetailView #3400

Merged
konrad merged 5 commits from primeapple/frontend:add-hotkeys-for-priority-and-delete into main 2023-05-10 09:14:08 +00:00
2 changed files with 2 additions and 2 deletions
Showing only changes of commit 30b7d0f3ed - Show all commits

View File

@ -146,7 +146,7 @@ export const KEYBOARD_SHORTCUTS : ShortcutGroup[] = [
},
{
title: 'keyboardShortcuts.task.delete',
keys: ['x'],
keys: ['shift', 'delete'],
},
{
title: 'keyboardShortcuts.task.favorite',

View File

@ -418,7 +418,7 @@
icon="trash-alt"
:shadow="false"
class="is-danger is-outlined has-no-border"
v-shortcut="'x'"
v-shortcut="'Shift+Delete'"

x is eXterminate... Just kidding, thats the hotkey that is used for deletion of a single char in vim.

`x` is eXterminate... Just kidding, thats the hotkey that is used for deletion of a single char in vim.

How about meta + backspace instead?
I would use two keys by intend here, so that there has to be a bit more intend by the user in order to delete a task.

How about `meta` + `backspace` instead? I would use two keys by intend here, so that there has to be a bit more intend by the user in order to delete a task.

I'd really avoid using modifier keys in the browser. It often interferes with browser specific behaviour.

Are you fine with this explanation or do you really want me to change it? :)

I'd really avoid using modifier keys in the browser. It often interferes with browser specific behaviour. Are you fine with this explanation or do you really want me to change it? :)

I think using a single key here is fine since there's a modal requiring a confirmation when deleting a task anyway.

I think using a single key here is fine since there's a modal requiring a confirmation when deleting a task anyway.

@primeapple I talked with @konrad about this. After some consideration we decided on using:

  • shift + delete in general
  • shift + backspace additionally for apple devices (if I'm not mistaken we have a detection helper somewhere)
@primeapple I talked with @konrad about this. After some consideration we decided on using: - `shift` + `delete` in general - `shift` + `backspace` additionally for apple devices (if I'm not mistaken we have a detection helper somewhere)

Thanks for the comment.

I see that this is your repo and I'm just a contributor. Because of that I won't argue to much and accept it. But please please consider the following thoughts:

  • Delete is quite unergonomic to reach compared to the other hotkeys that all rely on a letter. Backspace is not perfect, but would be fine. Why shift as a modifier, tho? Why not CTRL?

  • Why would you differentiate Delete and Backspace based on the OS of the computer?

There are keyboards that don't have the delete key easily reachable (it's on a different layer). The Backspace is almost always there. The x is always there.

As a user I don't want to use obscure hotkeys that are not supported anywhere else. Todoist uses Backspace + CTRL, that's also the one used in Emacs.
Vim uses x or d.

Could you write the reasoning behind your thoughts? As @konrad said before:

I think using a single key here is fine since there's a modal requiring a confirmation when deleting a task anyway.

Thanks for the comment. I see that this is your repo and I'm just a contributor. Because of that I won't argue to much and accept it. But please please consider the following thoughts: - Delete is quite unergonomic to reach compared to the other hotkeys that all rely on a letter. Backspace is not perfect, but would be fine. Why shift as a modifier, tho? Why not `CTRL`? - Why would you differentiate Delete and Backspace based on the OS of the computer? There are keyboards that don't have the delete key easily reachable (it's on a different layer). The Backspace is almost always there. The `x` is always there. As a user I don't want to use obscure hotkeys that are not supported anywhere else. Todoist uses `Backspace` + `CTRL`, that's also the one used in Emacs. Vim uses `x` or `d`. Could you write the reasoning behind your thoughts? As @konrad said before: > I think using a single key here is fine since there's a modal requiring a confirmation when deleting a task anyway.

The problem with keyboard shortcuts is they are hard to change later because once we introduce them, people start to use them and after some time they're in their muscle memory.

Why would you differentiate Delete and Backspace based on the OS of the computer?

I think we should, because people are used to using different keys on different OSes. For example, creating a new folder in Finder on MacOS uses a different shortcut than creating a new folder in MS Explorer.
That's for another PR though. (Todoist does something similar)

Why shift as a modifier, tho? Why not CTRL?

Mostly because shift is not used by the OS already and really unlikely to conflict with something else. Todoist uses shift delete for windows and cmd delete on macos.


To move this PR forward, let's use shift + delete for this and introduce shift + backspace (or something different) for macos in a later PR.

The problem with keyboard shortcuts is they are hard to change later because once we introduce them, people start to use them and after some time they're in their muscle memory. > Why would you differentiate Delete and Backspace based on the OS of the computer? I think we should, because people are used to using different keys on different OSes. For example, creating a new folder in Finder on MacOS uses a different shortcut than creating a new folder in MS Explorer. That's for another PR though. (Todoist [does something similar](https://todoist.com/help/articles/keyboard-shortcuts)) > Why shift as a modifier, tho? Why not CTRL? Mostly because shift is not used by the OS already and really unlikely to conflict with something else. Todoist uses shift delete for windows and cmd delete on macos. --- To move this PR forward, let's use shift + delete for this and introduce shift + backspace (or something different) for macos in a later PR.

I think we should, because people are used to using different keys on different OSes. For example, creating a new folder in Finder on MacOS uses a different shortcut than creating a new folder in MS Explorer.

People are not used to that. They will just try to avoid OSes with other keymaps, that's part of the reasons Apples Eco system is so locking in.

I gave away my mac just because I hated switching between Cmd and Ctrl

However, I changed it. It works, but yeah... I'll not use this hotkey, I'm faster with clicking it, honestly. Maybe if we at least could avoid the confirmation dialog, that would be a start 😄

Let's see that we get customizable shortcuts going.

> I think we should, because people are used to using different keys on different OSes. For example, creating a new folder in Finder on MacOS uses a different shortcut than creating a new folder in MS Explorer. People are not used to that. They will just try to avoid OSes with other keymaps, that's part of the reasons Apples Eco system is so locking in. I gave away my mac just because I hated switching between `Cmd` and `Ctrl` However, I changed it. It works, but yeah... I'll not use this hotkey, I'm faster with clicking it, honestly. Maybe if we at least could avoid the confirmation dialog, that would be a start 😄 Let's see that we get customizable shortcuts going.
>
{{ $t('task.detail.actions.delete') }}
</x-button>