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

Playlist block #50664

Draft
wants to merge 30 commits into
base: trunk
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
30 commits
Select commit Hold shift + click to select a range
8b44789
Basic playlist block
carolinan May 11, 2023
4198e21
try to make some accessibility improvements
carolinan May 12, 2023
ac17285
Park the PHP file until work can continue
carolinan May 12, 2023
1fcbf71
Update index.php
carolinan May 12, 2023
8aed3d3
Update index.php, try to solve merge conflicts
carolinan May 15, 2023
14e1fa5
Remove the style variation
carolinan May 15, 2023
92a3c65
Remove the unused save, add escaping, update css
carolinan May 16, 2023
59bb48f
Update edit.js
carolinan May 16, 2023
4ba31d9
Update edit.js
carolinan May 16, 2023
1e94427
Update edit.js
carolinan May 16, 2023
00d6970
Merge branch 'trunk' into try/playlist2
carolinan May 16, 2023
ca834be
fix CS issues
carolinan May 17, 2023
cce2cc5
Fix two issues with the upload option.
carolinan May 17, 2023
54cc037
Disable uploading and selecting multiple files in the replacement flow.
carolinan May 19, 2023
381650a
Update the placeholder instructions
carolinan May 19, 2023
ff810d2
Merge branch 'trunk' into try/playlist2
carolinan May 19, 2023
dab0e24
Correct a translators comment.
carolinan May 21, 2023
04a8368
Hide tracklist options if the tracklist itself is toggled off
carolinan May 21, 2023
19fc308
Merge branch 'trunk' into try/playlist2
carolinan Jul 11, 2023
7358614
Merge branch 'trunk' into try/playlist2
carolinan Jan 8, 2024
8bb139e
Merge branch 'trunk' into try/playlist2
carolinan Jan 25, 2024
38eaeed
Merge branch 'trunk' into try/playlist2
carolinan Feb 14, 2024
d9ff601
Merge branch 'trunk' into try/playlist2
carolinan Jul 23, 2024
b59aba1
Try to fix CS issues, update to apiVersion 3
carolinan Jul 23, 2024
86b992d
Add since
carolinan Jul 23, 2024
441a72d
Add color block supports
carolinan Jul 23, 2024
1181836
Merge branch 'trunk' into try/playlist2
carolinan Oct 22, 2024
3cf80ae
Add __next40pxDefaultSize and __nextHasNoMarginBottom to various cont…
carolinan Oct 22, 2024
862c4f1
Use the option for the experimental blocks.
carolinan Oct 22, 2024
880db38
WIP: Use the interactivity API.
carolinan Oct 23, 2024
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
9 changes: 9 additions & 0 deletions docs/reference-guides/core-blocks.md
Original file line number Diff line number Diff line change
Expand Up @@ -543,6 +543,15 @@ Show a block pattern. ([Source](https://github.com/WordPress/gutenberg/tree/trun
- **Supports:** interactivity (clientNavigation), ~~html~~, ~~inserter~~, ~~renaming~~
- **Attributes:** slug

## Playlist

Embed a simple playlist. ([Source](https://github.com/WordPress/gutenberg/tree/trunk/packages/block-library/src/playlist))

- **Name:** core/playlist
- **Category:** media
- **Supports:** align, anchor, color (background, gradients, link, text), spacing (margin, padding)
- **Attributes:** artists, ids, images, order, tracklist, tracknumbers, type

## Author

Display post author details such as name, avatar, and bio. ([Source](https://github.com/WordPress/gutenberg/tree/trunk/packages/block-library/src/post-author))
Expand Down
2 changes: 2 additions & 0 deletions lib/blocks.php
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ function gutenberg_reregister_core_block_types() {
'more',
'nextpage',
'paragraph',
'playlist',
'preformatted',
'pullquote',
'quote',
Expand Down Expand Up @@ -88,6 +89,7 @@ function gutenberg_reregister_core_block_types() {
'post-author.php' => 'core/post-author',
'post-author-name.php' => 'core/post-author-name',
'post-author-biography.php' => 'core/post-author-biography',
'playlist.php' => 'core/playlist',
'post-comment.php' => 'core/post-comment',
'post-comments-count.php' => 'core/post-comments-count',
'post-comments-form.php' => 'core/post-comments-form',
Expand Down
1 change: 1 addition & 0 deletions packages/block-library/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@
"./file/view": "./build-module/file/view.js",
"./image/view": "./build-module/image/view.js",
"./navigation/view": "./build-module/navigation/view.js",
"./playlist/view": "./build-module/playlist/view.js",
"./query/view": "./build-module/query/view.js",
"./search/view": "./build-module/search/view.js"
},
Expand Down
5 changes: 5 additions & 0 deletions packages/block-library/src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,7 @@ import * as pattern from './pattern';
import * as pageList from './page-list';
import * as pageListItem from './page-list-item';
import * as paragraph from './paragraph';
import * as playlist from './playlist';
import * as postAuthor from './post-author';
import * as postAuthorName from './post-author-name';
import * as postAuthorBiography from './post-author-biography';
Expand Down Expand Up @@ -239,6 +240,10 @@ const getAllBlocks = () => {
blocks.push( formSubmissionNotification );
}

if ( window?.__experimentalEnableBlockExperiments ) {
blocks.push( playlist );
}

// When in a WordPress context, conditionally
// add the classic block and TinyMCE editor
// under any of the following conditions:
Expand Down
70 changes: 70 additions & 0 deletions packages/block-library/src/playlist/block.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,70 @@
{
"$schema": "https://schemas.wp.org/trunk/block.json",
"apiVersion": 3,
"name": "core/playlist",
"title": "Playlist",
"category": "media",
"description": "Embed a simple playlist.",
"keywords": [ "music", "sound" ],
"textdomain": "default",
"attributes": {
"ids": {
"type": "array"
},
"type": {
"type": "string",
"default": "audio"
},
"order": {
"type": "string",
"default": "ASC"
},
"tracklist": {
"type": "boolean",
"default": true
},
"tracknumbers": {
"type": "boolean",
"default": true
},
"images": {
"type": "boolean",
"default": true
},
"artists": {
"type": "boolean",
"default": true
}
},
"supports": {
"anchor": true,
"align": true,
"color": {
"gradients": true,
"link": true,
"__experimentalDefaultControls": {
"background": true,
"text": true
}
},
"__experimentalBorder": {
"color": true,
"radius": true,
"style": true,
"width": true,
"__experimentalDefaultControls": {
"color": true,
"radius": true,
"style": true,
"width": true
}
},
"interactivity": true,
"spacing": {
"margin": true,
"padding": true
}
},
"editorStyle": "wp-block-playlist-editor",
"style": "wp-block-playlist"
}
Loading
Loading