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

Keyboard shortcuts #3758

Merged
merged 2 commits into from
Dec 7, 2023
Merged

Conversation

oneWaveAdrian
Copy link
Contributor

@oneWaveAdrian oneWaveAdrian commented Apr 27, 2022

Signed-off-by: Adrian Missy [email protected]

Summary

Updated current status with changes from @juliushaertl

Follow up

  • Figure out a proper way to change values of the card that require input (due date, label, assignment)
    • Could be an overlay
    • Could be a modal (as this PR proposed)
    • Could just open the sidebar/modal and focus the given element

Checklist

  • Code is properly formatted
  • Sign-off message is added to all commits
  • Tests (unit, integration, api and/or acceptance) are included
  • Documentation (manuals or wiki) has been updated or is not required

@oneWaveAdrian
Copy link
Contributor Author

@juliushaertl I realized that a newly created card gets an order value of 999. This prevents the shortcut modals from being displayed correctly. I countered it for now by displaying the modal in the screen center. This is not ideal. Is there a specific reason why 999 is set for a new card other than easily placing it at the end of a stack? Is there no dynamic way of placing it at the end of the stack?

@oneWaveAdrian
Copy link
Contributor Author

@juliushaertl In regards to settings I don't know how you guys would want a dynamic implementation. I got the feeling you want to keep the amount of settings low. Therefore I marked it as optional. If dynamic key definition is not required this is ready to merge. Otherwise please advise on best practices for creating the settings dialog.

@oneWaveAdrian oneWaveAdrian marked this pull request as ready for review April 29, 2022 22:45
@oneWaveAdrian oneWaveAdrian changed the title WIP: feat: #46 add shortcut function feat: #46 add shortcut function Apr 29, 2022
@oneWaveAdrian
Copy link
Contributor Author

Kindly requesting review of this PR.

@oneWaveAdrian
Copy link
Contributor Author

@juliushaertl I would really need this feature myself - when do you think a review can start?

@oneWaveAdrian
Copy link
Contributor Author

Does anybody have time to review this in the near future? @stefan-niedermann @juliushaertl? I would really like to see this in the next release as there is an urgent need within my team for it. Thanks a bunch! Unfortunately I can not change the status to review needed and the only way to get anybody's attention is to guess via comments who might be responsible/able to look at it, which is a little frustrating. So sorry if I approached the wrong guys, it's just hard to understand how the desired workflow is.

@oneWaveAdrian
Copy link
Contributor Author

As this drags on I will resolve conflicts after a successful review. Don't want to keep applying changes for another two weeks...

@oneWaveAdrian
Copy link
Contributor Author

It's been almost a month since I submitted this PR - what is the typical time to expect a review/feedback around here @stefan-niedermann @juliushaertl? I am sure you have lots to do, a rough timeframe is perfectly fine by me. Maybe this is something that needs to be mentioned in the readme as well to reduce the amount of requests to you?

@DrFriedParts
Copy link

@stefan-niedermann @juliushaertl @oneWaveAdrian My company could potentially sponsor this if that helps move this PR forward. Is there some kind of intake procedure for sponsorship you could point me to?

@oneWaveAdrian

This comment was marked as off-topic.

@oneWaveAdrian
Copy link
Contributor Author

@juliushaertl is this ever going to be reviewed? It saddens me that I put quite some work into this and it is basically ignored, absolutely no feedback from the team on a solution of a requested topic.

@oneWaveAdrian
Copy link
Contributor Author

Bumping after almost another month of inactivity. @juliushaertl would you please take a look at this? I'm not giving up on this one, too much work has gone into it.😡

@juliusknorr
Copy link
Member

Hi @oneWaveAdrian I'm very sorry for the long silence here. I highly appreciate your contribution and I've not forgotten about this, just my GitHub notification backlog is quite large. I've scheduled some time for this week to give it an in depth review.

I realized that a newly created card gets an order value of 999. This prevents the shortcut modals from being displayed correctly. I countered it for now by displaying the modal in the screen center. This is not ideal. Is there a specific reason why 999 is set for a new card other than easily placing it at the end of a stack? Is there no dynamic way of placing it at the end of the stack?

Yes, it is mainly about putting the card at the end of the list. I guess we could also apply the correct order value on card creation by taking the max value of order and increasing that by 1 in the backend.

dynamic key preset definitions in settings to enable custom shortcut definition

We usually aim for having good defaults instead of highly customisable settings, so I'd agree that this is not necessary. From the shortcut overview this definitely looks like a sane choice of shortcuts.

required>
required
@focus="$store.dispatch('toggleShortcutLock', true)"
@blur="$store.dispatch('toggleShortcutLock', false)">
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It'd be good if we can use vuex store helper mapActions to run the actions.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@luka-nextcloud Can you explain the benefit you see in using the mapper in this scenario? I do not see it as only one action is used, therefore resulting in more code than calling it individually.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Using the store directly in the template is generally not considered good style I believe

src/components/cards/ShortCutWidgets.vue Outdated Show resolved Hide resolved
src/components/cards/ShortCutWidgets.vue Outdated Show resolved Hide resolved
@oneWaveAdrian
Copy link
Contributor Author

@luka-nextcloud @juliushaertl what's the status on this PR? I didn't get any answers to my questions - can we merge this one as well?

@juliusknorr juliusknorr changed the title feat: #46 add shortcut function Keyboard shortcuts Oct 29, 2022
@oneWaveAdrian
Copy link
Contributor Author

@luka-nextcloud @juliushaertl what's the status on this PR? I didn't get any answers to my questions - can we merge this one as well?

@juliushaertl ...?

@juliusknorr
Copy link
Member

@oneWaveAdrian Sorry for the late replies. Currently @marcelklehr and I are catching up on all the open pull requests and we lined this up for review. I'll get to that hopefully during this week. Could you maybe rebase your changes already to the latest master branch to get the conflicts resolved?

@juliusknorr
Copy link
Member

Just one thing before getting into the review, from an accessibility perspective single key shortcuts would be problematic. Therefore at least turning it off should be supported:

A global option to disable keyboard shortcuts was added to the accessibility settings. Since it heavily depends on the screenreader and tools that you use if Ctrl and/or Alt or other things are okay to use or not and maintaining a more detailed list is too much effort, we went for a global on/off switch. Apps can use this public javascript API call to determine whether the user used the opt-out: OCP.Accessibility.disableKeyboardShortcuts(). If that is the case, no additional shortcuts shall be registered by any app. Only space to toggle checkboxes and enter to submit the currently active buttons/links are okay: nextcloud/server#34081

README.md Outdated Show resolved Hide resolved
@marcelklehr
Copy link
Member

I think it would be beneficial to use something like https://github.com/fgr-araujo/vue-shortkey especially to avoid hitting shortcuts in input elements.
The mail app uses an event bus to avoid having to pass props around for this:
https://github.com/nextcloud/mail/blob/c36f8f597e2c390a102061279b752db58875edac/src/components/Mailbox.vue#L183
https://github.com/nextcloud/mail/blob/c36f8f597e2c390a102061279b752db58875edac/src/components/MailboxThread.vue#L129

@shoetten
Copy link
Contributor

shoetten commented Dec 1, 2022

I think it would be beneficial to use something like https://github.com/fgr-araujo/vue-shortkey especially to avoid hitting shortcuts in input elements.

I understand your point, but i would highly recommend against yet another (almost) unmaintained dependency with lacking vue3 support. It will be a huge pain to upgrade deck to vue3 as is.. just my 2cents.

@marcelklehr
Copy link
Member

marcelklehr commented Dec 1, 2022

Hey @shoetten

Glad you're still active on this and sorry for the long wait! Oops, I thought, you were the OP 🙈

yet another (almost) unmaintained dependency with lacking vue3 support

Mh, that's a good point. Let's avoid adding a new dependency then. Do you think using an event bus (maybe even https://www.npmjs.com/package/@nextcloud/event-bus) would be useful?

@oneWaveAdrian
Copy link
Contributor Author

Am still active in this as well @marcelklehr, just waiting for consensus to get started, before I spend precious time developing, just so I can wait another 8mos for feedback so my code can be deprecated before it was even reviewed...

@marcelklehr
Copy link
Member

just so I can wait another 8mos for feedback so my code can be deprecated before it was even reviewed...

I know it must be frustrating. I'm sorry you had to wait so long. We're trying to get better with timely reviews and encouraging community contributions. ♥️

@oneWaveAdrian
Copy link
Contributor Author

Resolved Conflicts (not too easy after a year) – anything else that needs to be done here or can we get this thing merged?

@oneWaveAdrian
Copy link
Contributor Author

oneWaveAdrian commented Apr 28, 2023

Anybody? @marcelklehr @juliushaertl

For the record I'm not even using Nextcloud anymore - just want to get it done for the community and not have wasted my time...

@juliusknorr

This comment was marked as outdated.

oneWaveAdrian and others added 2 commits December 7, 2023 15:58
Implement keyboard shortcuts for the board view and individual cards

Signed-off-by: Adrian Missy <[email protected]>
Signed-off-by: Julius Härtl <[email protected]>
They can be readded once we have a proper design for it to make sure
auto focus is working and those are nicely fitting the UI

Signed-off-by: Julius Härtl <[email protected]>
README.md Outdated Show resolved Hide resolved
@juliusknorr juliusknorr merged commit 5cc7313 into nextcloud:main Dec 7, 2023
24 checks passed
@juliusknorr
Copy link
Member

/backport to stable28

@shoetten
Copy link
Contributor

shoetten commented Dec 7, 2023

Yes! Thanks to @oneWaveAdrian for the groundwork! The next release of deck is shaping out to be an awesome one.

@juliusknorr
Copy link
Member

Definitely. Thanks a ton @oneWaveAdrian and I'm really sorry to have taken so long to pick this up and get merged. Looking much forward to use that myself 🎉

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

Keyboard shortcuts
7 participants