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

feat: #3268 CTRL/CMD + ENTER to Save Changes on Card Description #3774

Conversation

Ben-Ro
Copy link
Contributor

@Ben-Ro Ben-Ro commented Apr 30, 2022

CTRL/CMD + ENTER to Save Changes on Card Description
fixes #3268

Signed-off-by: ben [email protected]

Summary

Allows saving and leaving the Card Description Editor via CTRL/CMD + ENTER. It's the same shortcut as with Twitter, Trello, Github and lot's of other Webapps

TODO

  • ...

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
    Haven't found any documentation of Keyboard Shortcuts, if there is any place to add this shortcut just let me know :)

Copy link
Member

@juliusknorr juliusknorr left a comment

Choose a reason for hiding this comment

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

Thanks a lot for the contribution. I've added a small suggestion to avoid the timeout inline, otherwise this looks good to me 👍

@@ -175,8 +176,33 @@ export default {
}
this.descriptionEditing = true
this.description = this.card.description

// Has to start after the Editor is fully loaded. This shouldn't take longer than 1/4 second
setTimeout(() => {
Copy link
Member

Choose a reason for hiding this comment

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

To avoid the setTimeout you could also register this on a callback of the initialized event that the VueEasyMDE component emits

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Thanks for the feedback, i just added a method that's called via @initialized. The Code inside the function is exactly the same as in the previous version :)

@juliusknorr juliusknorr force-pushed the CTRL/CMD_+_ENTER_to_Save_Changes_on_Card_Description branch from fbd0e9e to 9342d8a Compare July 26, 2022 15:57
@juliusknorr juliusknorr force-pushed the CTRL/CMD_+_ENTER_to_Save_Changes_on_Card_Description branch from 9342d8a to ec25077 Compare August 9, 2022 05:41
@juliusknorr juliusknorr force-pushed the CTRL/CMD_+_ENTER_to_Save_Changes_on_Card_Description branch from ec25077 to 3af54d7 Compare October 19, 2022 19:02
@juliusknorr juliusknorr merged commit 60ee9f7 into nextcloud:master Oct 19, 2022
@juliusknorr
Copy link
Member

Thanks a lot for your pull request and I'm very sorry for taking so long to merge.

@SethFalco
Copy link

I'm using Deck 1.8.3 but it seems that CTRL + ENTER doesn't do what is described in this PR. 🤔

Can someone confirm if they have the same issue or if this broke at some point?

@Ben-Ro
Copy link
Contributor Author

Ben-Ro commented Feb 14, 2023

I'm using Deck 1.8.3 but it seems that CTRL + ENTER doesn't do what is described in this PR. 🤔

Can someone confirm if they have the same issue or if this broke at some point?

Hey, which OS and Browser are you usign? If you're on a mac the shortcut would be CMD + ENTER :)

@SethFalco
Copy link

which OS and Browser are you usign

I'm on Debian 11 (Linux), worth noting I use this same shortcut everywhere else (including to post this comment) and it works fine. 😭

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

Successfully merging this pull request may close these issues.

CTRL + ENTER to Save Changes on Card Description
3 participants