Repository navigation
Make the Playlist blocks stable #80203
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
Merged
Merged
Changes from all commits
Commits
Show all changes
5 commits
Select commit
Hold shift + click to select a range
ea4b117
Make playlist blocks stable
scruffian 2ee6cdc
Add playlist block fixtures
jeryj f21936e
Merge branch 'trunk' into issue-80186-v1
jeryj 91377ac
Update to include showPlayButtonArtwork
jeryj 9f6f539
Update playlist block docs
jeryj File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
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
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
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
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
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
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
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1 @@ | ||
| <!-- wp:core/playlist-track {"id":123,"src":"https://example.com/audio.mp3","album":"Example album","artist":"Example creator","image":"https://example.com/track-image.jpg","imageAlt":"Track image","length":"3:21","title":"Sample track"} /--> |
18 changes: 18 additions & 0 deletions
18
test/integration/fixtures/blocks/core__playlist-track.json
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,18 @@ | ||
| [ | ||
| { | ||
| "name": "core/playlist-track", | ||
| "isValid": true, | ||
| "attributes": { | ||
| "id": 123, | ||
| "src": "https://example.com/audio.mp3", | ||
| "type": "audio", | ||
| "album": "Example album", | ||
| "artist": "Example creator", | ||
| "image": "https://example.com/track-image.jpg", | ||
| "imageAlt": "Track image", | ||
| "length": "3:21", | ||
| "title": "Sample track" | ||
| }, | ||
| "innerBlocks": [] | ||
| } | ||
| ] |
18 changes: 18 additions & 0 deletions
18
test/integration/fixtures/blocks/core__playlist-track.parsed.json
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,18 @@ | ||
| [ | ||
| { | ||
| "blockName": "core/playlist-track", | ||
| "attrs": { | ||
| "id": 123, | ||
| "src": "https://example.com/audio.mp3", | ||
| "album": "Example album", | ||
| "artist": "Example creator", | ||
| "image": "https://example.com/track-image.jpg", | ||
| "imageAlt": "Track image", | ||
| "length": "3:21", | ||
| "title": "Sample track" | ||
| }, | ||
| "innerBlocks": [], | ||
| "innerHTML": "", | ||
| "innerContent": [] | ||
| } | ||
| ] |
1 change: 1 addition & 0 deletions
1
test/integration/fixtures/blocks/core__playlist-track.serialized.html
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1 @@ | ||
| <!-- wp:playlist-track {"id":123,"src":"https://example.com/audio.mp3","album":"Example album","artist":"Example creator","image":"https://example.com/track-image.jpg","imageAlt":"Track image","length":"3:21","title":"Sample track"} /--> |
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,8 @@ | ||
| <!-- wp:core/playlist {"caption":"Sample playlist"} --> | ||
| <figure class="wp-block-playlist"> | ||
| <ol class="wp-block-playlist__tracklist wp-block-playlist__tracklist-show-numbers"> | ||
| <!-- wp:core/playlist-track {"id":123,"src":"https://example.com/audio.mp3","album":"Example album","artist":"Example creator","image":"https://example.com/track-image.jpg","imageAlt":"Track image","length":"3:21","title":"Sample track"} /--> | ||
| </ol> | ||
| <figcaption class="wp-element-caption">Sample playlist</figcaption> | ||
| </figure> | ||
| <!-- /wp:core/playlist --> |
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,36 @@ | ||
| [ | ||
| { | ||
| "name": "core/playlist", | ||
| "isValid": true, | ||
| "attributes": { | ||
| "type": "audio", | ||
| "order": "asc", | ||
| "showTracklist": true, | ||
| "showImages": true, | ||
| "showPlayButtonArtwork": false, | ||
| "showArtists": true, | ||
| "showNumbers": true, | ||
| "showTrackLength": true, | ||
| "waveformStyle": "bars", | ||
| "caption": "Sample playlist" | ||
| }, | ||
| "innerBlocks": [ | ||
| { | ||
| "name": "core/playlist-track", | ||
| "isValid": true, | ||
| "attributes": { | ||
| "id": 123, | ||
| "src": "https://example.com/audio.mp3", | ||
| "type": "audio", | ||
| "album": "Example album", | ||
| "artist": "Example creator", | ||
| "image": "https://example.com/track-image.jpg", | ||
| "imageAlt": "Track image", | ||
| "length": "3:21", | ||
| "title": "Sample track" | ||
| }, | ||
| "innerBlocks": [] | ||
| } | ||
| ] | ||
| } | ||
| ] |
32 changes: 32 additions & 0 deletions
32
test/integration/fixtures/blocks/core__playlist.parsed.json
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,32 @@ | ||
| [ | ||
| { | ||
| "blockName": "core/playlist", | ||
| "attrs": { | ||
| "caption": "Sample playlist" | ||
| }, | ||
| "innerBlocks": [ | ||
| { | ||
| "blockName": "core/playlist-track", | ||
| "attrs": { | ||
| "id": 123, | ||
| "src": "https://example.com/audio.mp3", | ||
| "album": "Example album", | ||
| "artist": "Example creator", | ||
| "image": "https://example.com/track-image.jpg", | ||
| "imageAlt": "Track image", | ||
| "length": "3:21", | ||
| "title": "Sample track" | ||
| }, | ||
| "innerBlocks": [], | ||
| "innerHTML": "", | ||
| "innerContent": [] | ||
| } | ||
| ], | ||
| "innerHTML": "\n<figure class=\"wp-block-playlist\">\n\t<ol class=\"wp-block-playlist__tracklist wp-block-playlist__tracklist-show-numbers\">\n\t\t\n\t</ol>\n\t<figcaption class=\"wp-element-caption\">Sample playlist</figcaption>\n</figure>\n", | ||
| "innerContent": [ | ||
| "\n<figure class=\"wp-block-playlist\">\n\t<ol class=\"wp-block-playlist__tracklist wp-block-playlist__tracklist-show-numbers\">\n\t\t", | ||
| null, | ||
| "\n\t</ol>\n\t<figcaption class=\"wp-element-caption\">Sample playlist</figcaption>\n</figure>\n" | ||
| ] | ||
| } | ||
| ] |
3 changes: 3 additions & 0 deletions
3
test/integration/fixtures/blocks/core__playlist.serialized.html
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,3 @@ | ||
| <!-- wp:playlist {"caption":"Sample playlist"} --> | ||
| <figure class="wp-block-playlist"><ol class="wp-block-playlist__tracklist wp-block-playlist__tracklist-show-numbers"><!-- wp:playlist-track {"id":123,"src":"https://example.com/audio.mp3","album":"Example album","artist":"Example creator","image":"https://example.com/track-image.jpg","imageAlt":"Track image","length":"3:21","title":"Sample track"} /--></ol><figcaption class="wp-element-caption">Sample playlist</figcaption></figure> | ||
| <!-- /wp:playlist --> |
Oops, something went wrong.
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.
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.
I updated this to match the format of the other entries.