Add playlist track length setting#78954
Conversation
The show-track-length toggle moved to its own PR (#78954), so remove the showTrackLength attribute, its Tracklist toggle, the tracklist-length-is-hidden class wiring (edit + save), and the corresponding style rule. The track length itself is unchanged. Docs regenerated. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
|
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 If you're merging code through a pull request on GitHub, copy and paste the following into the bottom of the merge commit message. To understand the WordPress project's expectations around crediting contributors, please review the Contributor Attribution page in the Core Handbook. |
jeryj
left a comment
There was a problem hiding this comment.
This follows existing conventions, and works as described. I tested both options (with and without time shown).
Hiding the time on the frontend works well too. Using display: none on the wrapper should remove the length from being announced by the screen reader as well.
What?
Extracted from #75060.
Adds a
showTrackLengthsetting to the Playlist block so track lengths can be hidden in the tracklist.Why?
This extracts the independent track length visibility change from the larger playlist waveform work so it can be reviewed separately.
How?
The PR adds a
showTrackLengthboolean attribute, exposes it in the Playlist settings panel, applies hidden-length classes in editor and saved markup, and adds CSS to hide.wp-block-playlist-track__lengthwhen disabled.Testing Instructions
Testing Instructions for Keyboard
Screenshots or screencast
Use of AI Tools
This PR was prepared with assistance from OpenAI Codex. I reviewed the diff and am responsible for the changes.