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

C2LC-430: Add keyboard shortcut for the share button #229

Open
wants to merge 2 commits into
base: develop-0.9
Choose a base branch
from

Conversation

chosww
Copy link
Contributor

@chosww chosww commented Jul 29, 2021

See C2LC-430 for details.

@@ -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);
Copy link
Contributor

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.

Copy link
Contributor Author

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"?

Copy link
Contributor

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?

Copy link
Contributor Author

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.

Copy link
Contributor

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.

@the-t-in-rtf
Copy link
Contributor

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.

@the-t-in-rtf
Copy link
Contributor

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.

@sbates-idrc sbates-idrc linked an issue Jun 3, 2024 that may be closed by this pull request
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.

Add a keyboard shortcut for share (copy link)
2 participants