Added hotkeys for priority, delete and favorite on the TaskDetailView
#3400
Labels
No Label
area/internal-code
changes requested
confirmed
dependencies
duplicate
good first issue
help wanted
hosting
invalid
kind/bug
kind/feature
question
wontfix
No Milestone
No project
No Assignees
4 Participants
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: vikunja/frontend#3400
Loading…
Reference in New Issue
No description provided.
Delete Branch "primeapple/frontend:add-hotkeys-for-priority-and-delete"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
I finally implemented some of the features from https://community.vikunja.io/t/more-hotkeys-in-the-ui/1096/9
It's my first PR here, tell me what you think!
Hi primeapple!
Thank you for creating a PR!
I've deployed the changes of this PR on a preview environment under this URL: https://3400-add-hotkeys-for-priority-and-del--vikunja-frontend-preview.netlify.app
You can use this url to view the changes live and test them out.
You will need to manually connect this to an api running somehwere. The easiest to use is https://try.vikunja.io/.
Have a nice day!
@ -406,6 +407,7 @@
@click="toggleFavorite"
variant="secondary"
:icon="task.isFavorite ? 'star' : ['far', 'star']"
v-shortcut="'s'"
The
s
is for star, sincef
is already used forfiles
I don't like
s
for files that much.Didn't check, but would
a
for attachments still be free? I don't think that too many users use that shortcut (?).a
is used for assignees.How about using
u
(upload)I honestly don't care what the hotkeys are. Since Vikunja supports imports from other services, I would just take their hotkeys.
But for now, maybe let's just implement it. I'd rather have bad hotkeys than no hotkeys.
The future would be something like having a "classic" hotkey layout, a "Todoist" inspired one and a custom one.
Are you fine with this?
@ -416,6 +418,7 @@
icon="trash-alt"
:shadow="false"
class="is-danger is-outlined has-no-border"
v-shortcut="'x'"
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.
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.
@primeapple I talked with @konrad about this. After some consideration we decided on using:
shift
+delete
in generalshift
+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
ord
.Could you write the reasoning behind your thoughts? As @konrad said before:
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.
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)
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.
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
andCtrl
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.
@ -894,7 +894,10 @@
"color": "Die Farbe dieser Aufgabe ändern",
"move": "Move this task to another project",
"reminder": "Erinnerungen für diese Aufgabe verwalten",
"description": "Aufgabenbeschreibung bearbeiten"
Translations (aka other languages than English) should happen on Crowdin.
Regarding translation [DE]:
Ich habe das Gefühl, dass diese Labels hier alle recht sperrig formuliert sind. Hat nichts mit deiner Übersetzung zu tun, denn du hast ja offensichtlich nur den Stil übertragen auf die neuen Übersetzungen. Bsp:
Die Farbe dieser Aufgabe ändern
könnte entwederAufgabenfarbe ändern
sein. Oder sogar nurFarbe ändern
, denn der Kontext im Dokument ist ja gegeben (?). Bin mir hier tatsächlich auch aus Accessability-Gründen unsicher, ob man hier den Kontext brauchen würde.Mach mal in Crowdin ne Discussion auf, hier gehört das nicht hin :)
I changed "Diese Aufgabe löschen" zu "Aufgabe löschen". The other stuff I won't touch in this PR :D
What I meant by this is that you need to adjust this PR and remove any changes in this file. Because all translation changes other than English are coming from Crowdin. Best would be to use an interactive rebase.
After this branch has merged and Crowdin has synced we can then translate the string there.
I see now.
Thanks for explaining!
I removed the changes from the german translation and forcepushed the branch! :)
Discussion: https://crowdin.com/project/vikunja/discussions/9
@ -322,6 +322,7 @@
@click="setFieldActive('priority')"
variant="secondary"
icon="exclamation"
v-shortcut="'p'"
Not important for this small PR, but a general reminder, that we talked about at some other places before:
These shortcuts really should be imported from a central place. That would also be the first step for possible user-customized shortcuts in the future.
d0d1b88f6e
to920532f8fe
@ -143,0 +151,4 @@
{
title: 'keyboardShortcuts.task.favorite',
keys: ['s'],
},
Please format this using tabs so that it's consistent with the rest of the document (why didn't the linter catch it?)
The problem here is, that the.editorconfig
actually wants 2 spaces indentation for.json
files.As for the reason why the Linter doesn't catch this:The
lint
task inpackage.json
only runs for.vue,.js,.ts
files, not forjson
ones.I wonder why you haven't set up prettier? Or even better rome (unsure if it works with
vue
files, tho).Fixed it :)
We have a PR which got kind of stale: #930
Rome looks interesting though!
LGTM
Is there anything we are waiting for, before merging? ;-)
Thanks again!