-
Notifications
You must be signed in to change notification settings - Fork 20
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
C2LC-430: Add keyboard shortcut for the share button #229
base: develop-0.9
Are you sure you want to change the base?
Conversation
@@ -1006,6 +1009,11 @@ export class App extends React.Component<AppProps, AppState> { | |||
this.setState({keyBindingsEnabled: keyBindingsEnabled}); | |||
} | |||
|
|||
handleShareButtonShortcut = () => { | |||
const currentUrl = document.location.href; | |||
return navigator.clipboard.writeText(currentUrl); |
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.
Does this mean there's no onscreen or announced feedback? It seems like there should be.
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.
Didn't we say that the shortcut will just copy the url to the clipboard without the feedback message? And communicate more clearly with the name used in grid key for the switches, like "copy the current url"?
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 like letting people know that they've actually succeeded in hitting the key combination. It doesn't have to be visual feedback, though. Maybe this is a good use case for a preview announcement?
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 agree that a preview(maybe feedback you mean?) announcement can make this clear.
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.
Yes, I'm still getting them straight in my head, I guess in this case I did mean feedback.
I left a comment here on the code but wasn't able to test the work in the time I have, as the preview deployment failed. |
I performed QA against a copy of the branch checked out locally and confirmed that it works with FF, Chrome, and Safari. I tested both keyboard input schemes. |
See C2LC-430 for details.