Skip to content
Merged
Show file tree
Hide file tree
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 0 additions & 2 deletions docs/reference-guides/core-blocks/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -633,7 +633,6 @@ Show a block pattern.
Embed a simple playlist.

- **Name:** [core/playlist](https://developer.wordpress.org/block-editor/reference-guides/core-blocks/core-blocks-media/core-block-playlist/)
- **Experimental:** true
- **Category:** [media](https://developer.wordpress.org/block-editor/reference-guides/core-blocks/core-blocks-media/)
- **Allowed Blocks:** core/playlist-track
- **Supports:** align, anchor, color (background, gradients, link, text), interactivity, spacing (margin, padding), typography (fontSize)
Expand All @@ -644,7 +643,6 @@ Embed a simple playlist.
Playlist track.

- **Name:** [core/playlist-track](https://developer.wordpress.org/block-editor/reference-guides/core-blocks/core-blocks-media/core-block-playlist-track/)
- **Experimental:** true
- **Category:** [media](https://developer.wordpress.org/block-editor/reference-guides/core-blocks/core-blocks-media/)
- **Parent:** core/playlist
- **Supports:** interactivity (clientNavigation), ~~html~~, ~~reusable~~
Expand Down
1 change: 1 addition & 0 deletions packages/block-library/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@

### Enhancements

- Make the Playlist and Playlist Track blocks stable ([#80203](https://github.com/WordPress/gutenberg/pull/80203)).

Copy link
Copy Markdown
Contributor

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.

- Use the emphasis font-weight token for UI emphasis ([#80093](https://github.com/WordPress/gutenberg/pull/80093)).
- Widen React peer dependency ranges to `^18 || ^19` to support both React 18 and React 19 environments ([#80024](https://github.com/WordPress/gutenberg/pull/80024)).

Expand Down
4 changes: 2 additions & 2 deletions packages/block-library/src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -197,6 +197,8 @@ const getAllBlocks = () => {
pageList,
pageListItem,
pattern,
playlist,
playlistTrack,
preformatted,
pullquote,
reusableBlock,
Expand Down Expand Up @@ -285,8 +287,6 @@ const getAllBlocks = () => {
blocks.push( tabs );
blocks.push( tabPanel );
blocks.push( tabPanels );
blocks.push( playlist );
blocks.push( playlistTrack );
}

blocks.push( classic );
Expand Down
2 changes: 0 additions & 2 deletions packages/block-library/src/playlist-track/README.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
# Playlist track

<!-- START TOKEN(Autogenerated block API docs) -->
<div class="callout callout-warning">This block is <strong>experimental</strong> and may change or be removed without notice.</div>

Playlist track.

- **Name:** `core/playlist-track`
Expand Down
1 change: 0 additions & 1 deletion packages/block-library/src/playlist-track/block.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
{
"$schema": "https://schemas.wp.org/trunk/block.json",
"apiVersion": 3,
"__experimental": true,
"name": "core/playlist-track",
"title": "Playlist track",
"category": "media",
Expand Down
2 changes: 0 additions & 2 deletions packages/block-library/src/playlist/README.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
# Playlist

<!-- START TOKEN(Autogenerated block API docs) -->
<div class="callout callout-warning">This block is <strong>experimental</strong> and may change or be removed without notice.</div>

Embed a simple playlist.

- **Name:** `core/playlist`
Expand Down
1 change: 0 additions & 1 deletion packages/block-library/src/playlist/block.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
{
"$schema": "https://schemas.wp.org/trunk/block.json",
"apiVersion": 3,
"__experimental": true,
"name": "core/playlist",
"title": "Playlist",
"category": "media",
Expand Down
1 change: 1 addition & 0 deletions test/integration/fixtures/blocks/core__playlist-track.html
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 test/integration/fixtures/blocks/core__playlist-track.json
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 test/integration/fixtures/blocks/core__playlist-track.parsed.json
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": []
}
]
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"} /-->
8 changes: 8 additions & 0 deletions test/integration/fixtures/blocks/core__playlist.html
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 -->
35 changes: 35 additions & 0 deletions test/integration/fixtures/blocks/core__playlist.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
[
{
"name": "core/playlist",
"isValid": true,
"attributes": {
"type": "audio",
"order": "asc",
"showTracklist": true,
"showImages": true,
"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 test/integration/fixtures/blocks/core__playlist.parsed.json
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"
]
}
]
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 -->
Loading