You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
The following accounts have interacted with this PR and/or linked issues. I will continue to update these lists as activity occurs. You can also manually ask me to refresh this list by adding the props-bot label.
If you're merging code through a pull request on GitHub, copy and paste the following into the bottom of the merge commit message.
I have a few more points regarding the Tracks UI that I'd like to discuss.
The Apply button in the Edit Tracks section feels redundant. Since each control already uses an onChange handler, changes are applied immediately, making the button unnecessary and potentially misleading.
In addition to reapplying existing values, the Apply button also sets default values when no input is provided. (I'd consider it to be a surprising behavior)
I think instead of language scoping the label, it's best to keep it as Track, as this is what Chrome displays for Tracks with empty labels. And instead of doing this on button press, I'd suggest adding these defaults while destructuring the data. (No surprises, the user knows the default values beforehand)
I believe it's best to discard the Apply button for these reasons. I also propose introducing a Back button to go to the previous component where all the tracks are listed.
Ref.
Currently, it's possible to save tracks with empty labels simply by leaving the label blank and clicking outside the popover. In Firefox, these tracks are displayed without any label, which could be confusing. We might want to consider either preventing tracks without labels from being rendered on the front-end or showing a warning if a label is missing.
Ref.
P.S. I plan to address these points as follow-ups, depending on their feasibility.
The Apply button in the Edit Tracks section feels redundant. Since each control already uses an onChange handler, changes are applied immediately, making the button unnecessary and potentially misleading.
Having an 'Apply' button is generally better for accessibility and UX. It's better to keep it.
Currently, it's possible to save tracks with empty labels simply by leaving the label blank and clicking outside the popover.
This is a standard behavior for some popover forms to prevent content loss. We could refactor the track editor and keep the editing state internal, and only call onChange when the "Apply" button is pressed.
It would be helpful to understand the rationale behind introducing the default values logic. As far as I can tell, the <track> element has no required attributes.
Let's merge this, and feel free to follow up on some of these points in a new PR.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What?
Closes #37537
This PR adds an option to mark a particular track as the default track for the
video
block.Why?
Setting a track as default ensures it's the one automatically selected for playback, providing a consistent user experience.
How?
This is done by setting the
default
property of the selected track totrue
.Testing Instructions
video
block.Testing Instructions for Keyboard
Same.
Screencast
PR-70227.720p.mov