Closed Bug 1772339 Opened 2 years ago Closed 2 years ago

Hover states for PiP playback controls

Categories

(Toolkit :: Picture-in-Picture, task, P2)

task

Tracking

()

RESOLVED FIXED
105 Branch
Tracking Status
firefox105 --- fixed

People

(Reporter: asafko, Assigned: janvi01)

References

(Blocks 1 open bug)

Details

Attachments

(9 files)

User Story
As a user, I want to know that PiP playback controls are clickable with a mouse and what keyword shortcuts I can use instead of clicking them.

Acceptance Criteria

  1. Hover states are displayed upon hovering over the currently available controls in PiP.
  2. Hover state text includes a brief description of the control action.

Close button
macOS: Close (⌘W)
Windows and Linux: Close (Ctrl+W) - made the change here since Linux/Windows have different shortcuts display standards.

Video Play / Pause button
Pause (Spacebar)
Play (Spacebar)
The hover state changes according to the button state.

Subtitles button
Subtitles

Volume on/ off
macOS
Mute (⌘↓)
Unmute (⌘↑)

Windows and Linux
Mute (Ctrl+↓)
Unmute (Ctrl+↑) - made the change here since Linux/Windows have different shortcuts display standards.

UnPiP button
Back to tab


This is just a reminder for the future PiP controls hover states
Fullscreen
Fullscreen (double click)

Seek forward
Forward (→)

Seek backward
Backward (←)

Attached image close hover.png
Attached image play hover.png
Priority: -- → P2
Blocks: 1772335
Assignee: nobody → janvibajo1
Status: NEW → ASSIGNED

Hi team,

Quick summary of my thoughts after reviewing the comments and a few more sources:

  1. System (macOS) conventions and our internal guidelines for menu items suggest using capitalized letters in shortcuts.
    I think it's appropriate in the menus, however, with PiP we are not dealing with a menu and shortcuts in the exact same way.

  2. When we use hover states with shortcuts in Firefox, we go for sentence case, no pluses, and parentheses, e.g. "Display the progress of ongoing downloads (⌘J)"

  3. System macOS applications use the following convention for hover states (a combination of sentence case, capitalized letters in shortcuts, and - as a separator instead of parentheses), e.g. "Play full screen - ↑⌘F"

I'm going to need info Jules on this, but I feel there's a strong case to either:

  1. Use sentence case and treat text in hover states as one sentence, e.g.: "Mute (ctrl↓)" - only the first letter is capitalized:
    Mute (ctrl↓)
    Unmute (⌘↑)
    Forward (→)
    Fullscreen (double-click)
    Play (space bar)

or

  1. Use sentence case and treat the shortcut part as a sentence separate from the description of the button:
    Mute (Ctrl↓)
    Unmute (⌘↑)
    Forward (→)
    Fullscreen (Double-click)
    Play (Space bar)

Please see attached files for mentioned Firefox and macOS system examples.

Flags: needinfo?(jules)
Attached image macos hover state.png

Hey Ania,

Thanks for sharing your research and proposed approaches.

I did some research on guidelines around displaying keyboard shortcuts that may inform you on making a decision here.

I ran into a pretty good argument around capitalization:
"...the letter key in the shortcut (if there is a letter) is always presented as a capital, even when the Shift key isn’t used... When entering a keyboard shortcut, you’re not typing a letter, you’re pressing a set of physical keys on the keyboard in front of you. The symbols on the letter keys are capitals, so that’s the appropriate way to identify those keys."
https://leancrew.com/all-this/2017/11/modifier-key-order/

I also figured out why modifier keys (e.g. Control, Command, Shift, Win) are capitalized. Modifiers have a specific role, and are different from other keys, so it makes sense they're treated as a proper noun. This Wikipedia article https://en.wikipedia.org/wiki/Modifier_key (although not a reliable source, this article does a good job summarizing and listing common modifiers) lists common modifiers.

With all of that in mind, I would:

  1. Leave single letters capitalized
  2. Capitalize only modifier keys
  3. Like the rest of Firefox, continue using parenthesis instead of a "-" (when I saw the screenshot that had "Play - Space Bar" I myself was really confused as to what those words meant all together due to them all being capitalized and only divided up by the separator)

This would produce the following:

Mute (Ctrl↓)
Unmute (⌘↑)
Forward (→)
Fullscreen (double-click)
Play (space bar)

Flags: needinfo?(jules)

I have some more feedback - I hope it's not too late!

I would capitalize any time a key's proper name is used. Example: Tab, Page Up, Enter, Escape, F1, etc. I know I recommended capitalizing modifiers, but it dawned on me that these too are all unique keys.

Whenever a key is described in plain text (tabulator key, down arrow key) I wouldn't capitalize it anymore since it is no longer their proper name / a proper noun.

I know the latter won't be really happening in this feature since you are going for the actual key names, but I wanted to explain the strategy around capitalization.

https://developer.mozilla.org/en-US/docs/Web/API/UI_Events/Keyboard_event_key_values

Jules, thank you so much for looking into this and doing the research, I'm really glad we'll be going for this nuanced approach.
One last question - so "Space Bar" is a proper name, right? Hence we will capitalize it in a hover state:

Here's our final state if that's correct:

Close button
macOS: Close (⌘W)
Windows and Linux: Close (CtrlW)

Video Play / Pause button
Pause (Spacebar)
Play (Spacebar)
The hover state changes according to the button state.

Subtitles button
Subtitles

Volume on/ off
macOS
Mute (⌘↓)
Unmute (⌘↑)

Windows and Linux
Mute (Ctrl↓)
Unmute (Ctrl↑)

UnPiP button
Back to tab


This is just a reminder for the future PiP controls hover states
Fullscreen
Fullscreen (double click)

Seek forward
Forward (→)

Seek backward
Backward (←)

Flags: needinfo?(jules)

Hey Ania!

Based on what we discussed, the final states you listed look good to me.

I was wondering why you added the plus in this version. The previous version you listed didn't include it. As you mentioned above, the existing Firefox pattern of displaying shortcuts doesn't include the plus. Any reasoning behind the plus?

The "Space Bar" spelling is an interesting one. I did a ton of reading around that, and I have run into these three variations:

Space bar
Spacebar
Space Bar

I think as long as we capitalize the beginning, either spelling would be OK. FWIW, in MDN I see both "Space Bar" and "Spacebar" spellings.

Flags: needinfo?(jules)

Jules, very sorry about this, the "+" is the unfortunate copy-paste. Fixed it, and updated the first comment.

I feel like "Spacebar" looks nicer in the context of a hover (one less capitalization), so we're going to stick to it.

I'm going to compile all of this wealth of knowledge into a google doc as it's definitely something useful for desktop PMs. Please let me know, if it's helpful share in the Fx design systems too.

Hey Ania, don't be sorry! Just wanted to gather some context around that plus :-)

"Spacebar" definitely makes things easier on the capitalization front - if you're cool with it, that's cool! Brent could probably give some opinion around it too, if he already hasn't.

I think this is a great guide to compile into a small guideline. I don't see this becoming longer than a 1-pager.

We can absolutely host this in our docs, and you could link your PM docs to our docs if you'd like. Let me know!

Pushed by nbaumgardner@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/0e60cc940997 Hover states for PiP playback controls r=kpatenio,niklas,flod

The patch is still being worked on by the original assignee.

Assignee: nobody → janvibajo1
Status: NEW → ASSIGNED
Flags: needinfo?(mconley)
Flags: needinfo?(janvibajo1)
Pushed by nbaumgardner@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/ef068477da50 Hover states for PiP playback controls r=kpatenio,niklas,flod
Status: ASSIGNED → RESOLVED
Closed: 2 years ago
Resolution: --- → FIXED
Target Milestone: --- → 105 Branch
Regressions: 1783002
Blocks: 1766197
Duplicate of this bug: 1634694
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: