Page MenuHomePhabricator

Show keyboard shortcuts for Reply/Cancel in tooltips
Closed, ResolvedPublic

Description

This task is about making it easier for people to discover the keyboard shortcuts for canceling and publishing a comment with the Reply Tool.

Desired behavior

Case 1

  1. Open the Reply Tool
  2. Position your cursor above the Reply button
  3. ✅Notice a tooltip appears with the following: "Reply "

Case 2

  1. Open the Reply Tool
  2. Position your cursor above the Cancel button/link
  3. ✅Notice a tooltip appears with the following: "Cancel "

Done

  • Behavior described in "Desired behavior" is implemented

Event Timeline

Esanders renamed this task from Implement keyboard shortcuts on hover to Show keyboard shortcuts for Reply/Cancel in tooltips.Oct 7 2020, 5:35 PM
  1. ✅Notice a tooltip appears with the following: "Reply "

[…]

  1. ✅Notice a tooltip appears with the following: "Cancel "

Just to make sure: our interfaces don’t usually show glyphs in such tooltips, so the tooltip texts will be Cmd+Enter/Ctrl+Enter and Esc respectively, won’t they?

Just to make sure: our interfaces don’t usually show glyphs in such tooltips, so the tooltip texts will be Cmd+Enter/Ctrl+Enter and Esc respectively, won’t they?

The glyphs are only used on macOS, on Linux/Windows the tooltips will indeed be just text.

We already have code for generating platform-specific keyboard shortcut labels, but it is in VisualEditor. If we wait until we are using VE for source mode, we won't have to duplicate all that code.

Today we talked about the consideration @Esanders raised, and for this narrow use case it is alright to duplicate the code to implement what this task is asking for.

Change 642915 had a related patch set uploaded (by Esanders; owner: Esanders):
[mediawiki/extensions/DiscussionTools@master] Show keyboard shortcuts in button tooltips

https://gerrit.wikimedia.org/r/642915

Change 642915 merged by jenkins-bot:
[mediawiki/extensions/DiscussionTools@master] Show keyboard shortcuts in button tooltips

https://gerrit.wikimedia.org/r/642915