-
Notifications
You must be signed in to change notification settings - Fork 897
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 to titles #5857
Add keyboard shortcuts to titles #5857
Conversation
24b233d
to
0d3882e
Compare
Another good catch; I wasn't testing with a video that had a captions option. Just fixed the issue and added logic preventing label modification if the Shaka localization key does not exist. Also note that this specific Captions label will be the only one with another parenthetical present. This is fine IMO. |
ad59178
to
6202ff7
Compare
…has no matching value
6202ff7
to
7c379e2
Compare
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.
Pressing c
doesnt enable/disable captions
Added localization of shortcuts & multi-key shortcuts and caught a dangling instance of the wrong constant name for |
Question: Navigating to the History tab and Settings tab also got shortcuts. Is there a reason those weren't added? |
@efb4f5ff-1298-471a-8973-3d47447115dc I specifically added the shortcuts with corresponding button labels. The closest equivalent to those would be the corresponding side nav options, which I suppose would work. I can add those as well. |
b934703
to
6f8d212
Compare
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.
Tested video player, sidebar, top nav button labels, refresh button
Only on MacOS though
This pull request has conflicts, please resolve those before we can evaluate the pull request. |
correct |
…at/add-shortcut-labels
…ube into feat/add-shortcut-labels
Conflicts have been resolved. A maintainer will review the pull request shortly. |
8410df1
to
304fa82
Compare
84deb9e
to
cb7f395
Compare
cb7f395
to
532fcc7
Compare
* Update title for custom FreeTube button labels with keyboard shortcuts * Add keyboard shortcut to unmodified Shaka control labels * Replace in-code use of available shortcuts with the corresponding constants * Add explanatory comments * Fix captions constant name * Prevent creating new shortcut localization if Shaka localization key has no matching value * Add util functions to localize special keys * Replace more video player shortcut usage in code with corresponding constants * Add labels for History and Settings app shortcuts, and update variable naming * Display 'Option' instead of 'Alt' for Mac users * Use Mac icons in keyboard shortcuts for Macs * Update Mac arrow icon choice * Update KeyboardShortcuts constant organization in preparation for keyboard shorcut modal * Adjust nameSpan._textContent to be set to same value as aria-label * Add code comment explaining shakaControlKeysToShortcuts * Move changes from deleted Popular.js to Popular.vue
* Update title for custom FreeTube button labels with keyboard shortcuts * Add keyboard shortcut to unmodified Shaka control labels * Replace in-code use of available shortcuts with the corresponding constants * Add explanatory comments * Fix captions constant name * Prevent creating new shortcut localization if Shaka localization key has no matching value * Add util functions to localize special keys * Replace more video player shortcut usage in code with corresponding constants * Add labels for History and Settings app shortcuts, and update variable naming * Display 'Option' instead of 'Alt' for Mac users * Use Mac icons in keyboard shortcuts for Macs * Update Mac arrow icon choice * Update KeyboardShortcuts constant organization in preparation for keyboard shorcut modal * Adjust nameSpan._textContent to be set to same value as aria-label * Add code comment explaining shakaControlKeysToShortcuts * Move changes from deleted Popular.js to Popular.vue
* Update title for custom FreeTube button labels with keyboard shortcuts * Add keyboard shortcut to unmodified Shaka control labels * Replace in-code use of available shortcuts with the corresponding constants * Add explanatory comments * Fix captions constant name * Prevent creating new shortcut localization if Shaka localization key has no matching value * Add util functions to localize special keys * Replace more video player shortcut usage in code with corresponding constants * Add labels for History and Settings app shortcuts, and update variable naming * Display 'Option' instead of 'Alt' for Mac users * Use Mac icons in keyboard shortcuts for Macs * Update Mac arrow icon choice * Update KeyboardShortcuts constant organization in preparation for keyboard shorcut modal * Adjust nameSpan._textContent to be set to same value as aria-label * Add code comment explaining shakaControlKeysToShortcuts * Move changes from deleted Popular.js to Popular.vue
Add keyboard shortcuts to titles
Pull Request Type
Related issue
closes #1587
Description
Mute (m)
Screenshots
Testing
Full screen (f)
/Exit full screen (f)
). See the official list of shortcuts for reference.Desktop
Additional context
The addition of the new constants should help make enhancements like #251 easier in the future.