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

feat: Adds a transient button component #8629

Draft
wants to merge 6 commits into
base: main
Choose a base branch
from

Conversation

mister-ben
Copy link
Contributor

@mister-ben mister-ben commented Mar 5, 2024

Work in progress...

Description

Adds a TransientButton component for the types of button that are shown on top of the video briefly during playback and reappear when there is user activity. e.g. Unmute buttons, skip intro... Aim is to be a generic button type to be extended.
Optionally takes focus when shown

Specific Changes proposed

Adds TransientButton class and styles.
Examples of use at https://deploy-preview-8629--videojs-preview.netlify.app/sandbox/transient-button.html

Open questions

  • Should a button take focus when it is first shown? Accessibility / convenience
  • Need to consider tab order as the buttons (as used in the demo) are after the control bar in the DOM but above it visually.
  • Prevent buttons showing before playback?

Copy link

codecov bot commented Mar 5, 2024

Codecov Report

Attention: Patch coverage is 7.14286% with 26 lines in your changes are missing coverage. Please review.

Project coverage is 82.43%. Comparing base (b59a89b) to head (798b130).

Files Patch % Lines
src/js/transient-button.js 7.14% 26 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #8629      +/-   ##
==========================================
- Coverage   82.71%   82.43%   -0.28%     
==========================================
  Files         113      114       +1     
  Lines        7636     7664      +28     
  Branches     1835     1836       +1     
==========================================
+ Hits         6316     6318       +2     
- Misses       1320     1346      +26     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

src/js/transient-button.js Outdated Show resolved Hide resolved
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.

None yet

2 participants