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
Save current image from the gallery view by pressing 's', 'd', or 'Enter' #6724
Save current image from the gallery view by pressing 's', 'd', or 'Enter' #6724
Conversation
Hi @pelya, thanks for your contribution. I spoke with our design team and we would be happy with this change if we modified it to be "cmd + s" (on macOS, else "ctrl + s") shortcut, rather than the three keys you have now. Would you be interested in making that change? |
52ce24a
to
ef67a98
Compare
I've changed key shortcut to Ctrl-S |
@@ -211,10 +213,16 @@ export function Lightbox({ | |||
onNext(event); | |||
break; | |||
|
|||
case 's': | |||
if (isMacOS ? event.metaKey : event.ctrlKey) { |
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.
do you mind using the isCmdOrCtrl
utility function we have?
Thanks! One small comment, and do you mind signing the CLA? That's required for outside contributions. |
I've signed CLA with my Github account. The CI script won't update the
checkbox, I probably need to make another push request.
I'll switch my code to use isCmdOrCtrl function in a few days. Feel free
to push my commit as-is meanwhile, there are like ten other places where
this function should be used, it would make sense to create a separate
commit to refactor the rest of the codebase.
…On Wed, 20 Dec 2023, 17:58 trevor-signal, ***@***.***> wrote:
I've changed key shortcut to Ctrl-S
Thanks! One small comment, and do you mind signing the CLA? That's
required for outside contributions.
—
Reply to this email directly, view it on GitHub
<#6724 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AABF5QCQND3TL2WP4DQHY4LYKMDLNAVCNFSM6AAAAABAZRAU42VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTQNRUG4ZTINBWGI>
.
You are receiving this because you were mentioned.Message ID:
***@***.***>
|
Thanks, I've updated it and merged into our private repo. This will be released early next year! Thanks 👍 |
First time contributor checklist:
Contributor checklist:
main
branchyarn ready
run passes successfully (more about tests here)Description
This commit will allow to save images from a gallery view by pressing Enter, 's', or 'd' keys.
To test: