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

Add keyboard shortcuts for sending replies #606

Closed
eloquence opened this issue Nov 6, 2019 · 4 comments · Fixed by #683
Closed

Add keyboard shortcuts for sending replies #606

eloquence opened this issue Nov 6, 2019 · 4 comments · Fixed by #683

Comments

@eloquence
Copy link
Member

We've agreed that we don't want [Enter] to send a reply, to avoid accidental replies to sources when a journalist is composing a longer response. Instead, a user should be able to send a reply as follows:

  • By clicking on the airplane (already supported)
  • By pressing [Ctrl] + [Enter] (commonly used in email applications)
  • By pressing [Tab] so the airplane is in focus, then pressing [Space] or [Enter].

It is up to the implementer how to organize the PR(s), but this issue should only be resolved once both keyboard methods for sending a reply have been implemented.

@eloquence
Copy link
Member Author

Discussed at UX meeting today; we agreed to the following:

  1. While this is the intended behavior for now, we want to manage expectations for the pilot that behavior like this may change, and be responsive to user feedback. E.g., if journalists typically type short responses, [Enter] to send may be a better default behavior.

  2. Because the [Ctrl] + [Enter] behavior is less discoverable and more platform-specific, our first priority is to get the tab selectability of controls (not limited to the "Send" button) right. If for whatever reasons implementing the [Ctrl] + [Enter] shortcut turns out to be tricky to do, it can wait til after the beta.

@eloquence eloquence added this to Near Term - SD Workstation in SecureDrop Team Board Dec 19, 2019
@kushaldas
Copy link
Contributor

Because the [Ctrl] + [Enter] behavior is less discoverable and more platform-specific, our first priority is to get the tab selectability of controls (not limited to the "Send" button) right

Do we have any document in the UX side with numbered selection via TAB for the UI? @ninavizz

@ntoll
Copy link
Contributor

ntoll commented Jan 6, 2020

So, I've been looking into this. In order to use TAB we'll need to define / set some sort of TAB order (it works just like the way you do it on the web). The various widgets which can have focus all have a setTabOrder method to make this work. Keyboard shortcuts are easy to implement via the QShortcut class.

I notice we've not used either the setTabOrder method nor QShortcut in the client yet. Ergo, I'm going to implement something with what I believe are "first stab" values for things like tab order.

@sssoleileraaa
Copy link
Contributor

I've been trained by Slack to think [Ctrl] + [Enter] adds a line break so now I never know if [Enter] or [Ctrl] + [Enter] will send a message in my email/messaging apps. I think the best way to make it easy to not use the mouse is to [Tab] to Send button then press [Enter].

SecureDrop Team Board automation moved this from Near Term - SD Workstation to Done Jan 7, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
No open projects
Development

Successfully merging a pull request may close this issue.

4 participants