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

Added 'Delete' as a shortcut key for deleting the selected gist #417

Conversation

GabrielNicolasAvellaneda
Copy link
Contributor

@hackjutsu Adding Del key as shortcut comes in handy when you want to quickly cleanup your gists. The code on app/index.js could be refactored to remove duplication from older code, but I want to start easy for now. I will push some code refactoring later in another commit if you allow me to do this. I also have more improvements to commit. Hope this helps. ;)
When you have some time can you please take a look at this. Thanks!

README.md Outdated
@@ -44,6 +44,7 @@
| :------------: |:-------------: |:-----:|
| New Snippet | `Cmd/Ctrl + N` | Create a snippet |
| Edit Snippet | `Cmd/Ctrl + E` | Edit a snippet |
| Delete Snippet | `Del` | Delete selected snippet |
Copy link
Owner

@hackjutsu hackjutsu Apr 30, 2020

Choose a reason for hiding this comment

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

Use Cmd/Ctrl + Del instead to avoid the users accidentally deleting the gist by hitting 'del'?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@hackjutsu Thought about this but because we have a confirmation modal after hitting the 'Del' key that requires a mouse click on the "Delete" button to actually do this action I think is enough for the user to not make a mistake. Also just 'Del' seems more natural to me. What do you think?

Copy link
Owner

Choose a reason for hiding this comment

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

I still prefer Cmd/Ctrl + Del which is consistent with other shortcuts, meanwhile providing flexibility for users to overwrite it in .leptonrc.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@hackjutsu Sounds good. I've updated the shortcut to Cmd/Ctrl + Del. Thanks for your feedback.

Copy link
Owner

@hackjutsu hackjutsu May 8, 2020

Choose a reason for hiding this comment

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

Could you help update this readme as well? Thanks! @GabrielNicolasAvellaneda

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@hackjutsu Sure! done.

@hackjutsu
Copy link
Owner

Thanks for the contribution! @GabrielNicolasAvellaneda

@hackjutsu hackjutsu merged commit 0e6d750 into hackjutsu:master May 9, 2020
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.

None yet

2 participants