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
Added 'Delete' as a shortcut key for deleting the selected gist #417
Conversation
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 | |
There was a problem hiding this comment.
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'?
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
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
.
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@hackjutsu Sure! done.
Thanks for the contribution! @GabrielNicolasAvellaneda |
@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!