diff --git a/assets/stylesheets/_z-index.scss b/assets/stylesheets/_z-index.scss index b8f00482e84af7..705a7c3c972511 100644 --- a/assets/stylesheets/_z-index.scss +++ b/assets/stylesheets/_z-index.scss @@ -27,6 +27,7 @@ $z-layers: ( ".edit-post-header": 30, ".block-library-button__inline-link .editor-url-input__suggestions": 6, // URL suggestions for button block above sibling inserter ".block-library-image__resize-handlers": 1, // Resize handlers above sibling inserter + ".wp-block-cover__inner-container": 1, // InnerBlocks area inside cover image block ".wp-block-cover.has-background-dim::before": 1, // Overlay area inside block cover need to be higher than the video background. ".wp-block-cover__video-background": 0, // Video background inside cover block. diff --git a/packages/block-library/src/cover/editor.scss b/packages/block-library/src/cover/editor.scss index 00d3fed4c8fcab..6e84c3a4837eb3 100644 --- a/packages/block-library/src/cover/editor.scss +++ b/packages/block-library/src/cover/editor.scss @@ -9,12 +9,28 @@ color: inherit; } + &.has-right-content .editor-rich-text__inline-toolbar, &.has-left-content .editor-rich-text__inline-toolbar { - justify-content: flex-start; + display: inline-block; } - &.has-right-content .editor-rich-text__inline-toolbar { - justify-content: flex-end; + .editor-block-list__layout { + width: 100%; + } + + .editor-block-list__block { + color: $light-gray-100; + } + + // wp-block-cover class is used just to increase selector specificity + .wp-block-cover__inner-container { + // avoid text align inherit from cover image align. + text-align: left; + } + + .wp-block-cover__inner-container > .editor-inner-blocks > .editor-block-list__layout { + margin-left: 0; + margin-right: 0; } &.components-placeholder { diff --git a/packages/block-library/src/cover/index.js b/packages/block-library/src/cover/index.js index 3ad3e1c8546e74..d8fba7eb6e7cb6 100644 --- a/packages/block-library/src/cover/index.js +++ b/packages/block-library/src/cover/index.js @@ -1,6 +1,7 @@ /** * External dependencies */ +import { omit } from 'lodash'; import classnames from 'classnames'; /** @@ -18,9 +19,9 @@ import { } from '@wordpress/components'; import { compose } from '@wordpress/compose'; import { - AlignmentToolbar, BlockControls, BlockIcon, + InnerBlocks, InspectorControls, MediaPlaceholder, MediaUpload, @@ -39,18 +40,9 @@ import { __ } from '@wordpress/i18n'; import icon from './icon'; const blockAttributes = { - title: { - type: 'string', - source: 'html', - selector: 'p', - }, url: { type: 'string', }, - contentAlign: { - type: 'string', - default: 'center', - }, id: { type: 'number', }, @@ -82,6 +74,14 @@ export const name = 'core/cover'; const ALLOWED_MEDIA_TYPES = [ 'image', 'video' ]; const IMAGE_BACKGROUND_TYPE = 'image'; const VIDEO_BACKGROUND_TYPE = 'video'; +const INNER_BLOCKS_TEMPLATE = [ + [ 'core/paragraph', { + align: 'center', + fontSize: 'large', + placeholder: __( 'Write title…' ), + } ], +]; +const INNER_BLOCKS_ALLOWED_BLOCKS = [ 'core/button', 'core/heading', 'core/paragraph' ]; export const settings = { title: __( 'Cover' ), @@ -100,13 +100,6 @@ export const settings = { transforms: { from: [ - { - type: 'block', - blocks: [ 'core/heading' ], - transform: ( { content } ) => ( - createBlock( 'core/cover', { title: content } ) - ), - }, { type: 'block', blocks: [ 'core/image' ], @@ -134,13 +127,6 @@ export const settings = { }, ], to: [ - { - type: 'block', - blocks: [ 'core/heading' ], - transform: ( { title } ) => ( - createBlock( 'core/heading', { content: title } ) - ), - }, { type: 'block', blocks: [ 'core/image' ], @@ -178,15 +164,13 @@ export const settings = { withColors( { overlayColor: 'background-color' } ), withNotices, ] )( - ( { attributes, setAttributes, isSelected, className, noticeOperations, noticeUI, overlayColor, setOverlayColor } ) => { + ( { attributes, setAttributes, className, noticeOperations, noticeUI, overlayColor, setOverlayColor } ) => { const { backgroundType, - contentAlign, dimRatio, focalPoint, hasParallax, id, - title, url, } = attributes; const onSelectMedia = ( media ) => { @@ -222,7 +206,6 @@ export const settings = { }; const toggleParallax = () => setAttributes( { hasParallax: ! hasParallax } ); const setDimRatio = ( ratio ) => setAttributes( { dimRatio: ratio } ); - const setTitle = ( newTitle ) => setAttributes( { title: newTitle } ); const style = { ...( @@ -242,12 +225,6 @@ export const settings = { { !! url && ( - { - setAttributes( { contentAlign: nextAlign } ); - } } - /> ; - const label = hasTitle ? ( - - ) : __( 'Cover' ); + const placeholderIcon = ; + const label = __( 'Cover' ); return ( @@ -344,7 +313,6 @@ export const settings = { const classes = classnames( className, - contentAlign !== 'center' && `has-${ contentAlign }-content`, dimRatioToClass( dimRatio ), { 'has-background-dim': dimRatio !== 0, @@ -369,16 +337,12 @@ export const settings = { src={ url } /> ) } - { ( ! RichText.isEmpty( title ) || isSelected ) && ( - + - ) } + ); @@ -388,13 +352,11 @@ export const settings = { save( { attributes } ) { const { backgroundType, - contentAlign, customOverlayColor, dimRatio, focalPoint, hasParallax, overlayColor, - title, url, } = attributes; const overlayColorClass = getColorClassName( 'background-color', overlayColor ); @@ -414,7 +376,6 @@ export const settings = { { 'has-background-dim': dimRatio !== 0, 'has-parallax': hasParallax, - [ `has-${ contentAlign }-content` ]: contentAlign !== 'center', }, ); @@ -427,9 +388,9 @@ export const settings = { loop src={ url } /> ) } - { ! RichText.isEmpty( title ) && ( - - ) } +
+ +
); }, @@ -437,6 +398,98 @@ export const settings = { deprecated: [ { attributes: { ...blockAttributes, + title: { + type: 'string', + source: 'html', + selector: 'p', + }, + contentAlign: { + type: 'string', + default: 'center', + }, + }, + + supports: { + align: true, + }, + + save( { attributes } ) { + const { + backgroundType, + contentAlign, + customOverlayColor, + dimRatio, + focalPoint, + hasParallax, + overlayColor, + title, + url, + } = attributes; + const overlayColorClass = getColorClassName( 'background-color', overlayColor ); + const style = backgroundType === IMAGE_BACKGROUND_TYPE ? + backgroundImageStyles( url ) : + {}; + if ( ! overlayColorClass ) { + style.backgroundColor = customOverlayColor; + } + if ( focalPoint && ! hasParallax ) { + style.backgroundPosition = `${ focalPoint.x * 100 }% ${ focalPoint.y * 100 }%`; + } + + const classes = classnames( + dimRatioToClass( dimRatio ), + overlayColorClass, + { + 'has-background-dim': dimRatio !== 0, + 'has-parallax': hasParallax, + [ `has-${ contentAlign }-content` ]: contentAlign !== 'center', + }, + ); + + return ( +
+ { VIDEO_BACKGROUND_TYPE === backgroundType && url && (
+ ); + }, + + migrate( attributes ) { + return [ + omit( attributes, [ 'title', 'contentAlign' ] ), + [ + createBlock( + 'core/paragraph', + { + content: attributes.title, + align: attributes.contentAlign, + fontSize: 'large', + placeholder: __( 'Write title…' ), + } + ), + ], + ]; + }, + }, { + attributes: { + ...blockAttributes, + title: { + type: 'string', + source: 'html', + selector: 'p', + }, + contentAlign: { + type: 'string', + default: 'center', + }, align: { type: 'string', }, @@ -485,6 +538,10 @@ export const settings = { source: 'html', selector: 'h2', }, + contentAlign: { + type: 'string', + default: 'center', + }, }, save( { attributes } ) { diff --git a/packages/block-library/src/cover/style.scss b/packages/block-library/src/cover/style.scss index 5e35c6d8ff809d..c11243504016aa 100644 --- a/packages/block-library/src/cover/style.scss +++ b/packages/block-library/src/cover/style.scss @@ -110,6 +110,23 @@ &.alignright { display: flex; } + + .wp-block-cover__inner-container { + width: calc(100% - 70px); + z-index: z-index(".wp-block-cover__inner-container"); + color: $light-gray-100; + } + + p, + h1, + h2, + h3, + h4, + h5, + h6, + .wp-block-subhead { + color: inherit; + } } .wp-block-cover__video-background { diff --git a/post-content.php b/post-content.php index fd59ab75ad1b82..8a0d5a878b5ec6 100644 --- a/post-content.php +++ b/post-content.php @@ -6,8 +6,10 @@ */ ?> - -

+ +
+

+
diff --git a/test/integration/full-content/fixtures/core__cover.html b/test/integration/full-content/fixtures/core__cover.html index ae26d922c2644c..a95fdd0d43f788 100644 --- a/test/integration/full-content/fixtures/core__cover.html +++ b/test/integration/full-content/fixtures/core__cover.html @@ -1,5 +1,14 @@ - -
-

Guten Berg!

+ +
+
+ +

+ Guten Berg! +

+ +
- + diff --git a/test/integration/full-content/fixtures/core__cover.json b/test/integration/full-content/fixtures/core__cover.json index dea09d92c11c87..8dfaaf80485a88 100644 --- a/test/integration/full-content/fixtures/core__cover.json +++ b/test/integration/full-content/fixtures/core__cover.json @@ -4,14 +4,27 @@ "name": "core/cover", "isValid": true, "attributes": { - "title": "Guten Berg!", "url": "https://cldup.com/uuUqE_dXzy.jpg", - "contentAlign": "center", "hasParallax": false, "dimRatio": 40, "backgroundType": "image" }, - "innerBlocks": [], - "originalContent": "
\n

Guten Berg!

\n
" + "innerBlocks": [ + { + "clientId": "_clientId_0", + "name": "core/paragraph", + "isValid": true, + "attributes": { + "content": "\n\t\t\tGuten Berg!\n\t\t", + "align": "center", + "dropCap": false, + "placeholder": "Write title…", + "fontSize": "large" + }, + "innerBlocks": [], + "originalContent": "

\n\t\t\tGuten Berg!\n\t\t

" + } + ], + "originalContent": "\n\t
\n\t\t\n\t
\n
" } ] diff --git a/test/integration/full-content/fixtures/core__cover.parsed.json b/test/integration/full-content/fixtures/core__cover.parsed.json index 14f37b617067b4..116012372ec345 100644 --- a/test/integration/full-content/fixtures/core__cover.parsed.json +++ b/test/integration/full-content/fixtures/core__cover.parsed.json @@ -5,10 +5,26 @@ "url": "https://cldup.com/uuUqE_dXzy.jpg", "dimRatio": 40 }, - "innerBlocks": [], - "innerHTML": "\n
\n

Guten Berg!

\n
\n", + "innerBlocks": [ + { + "blockName": "core/paragraph", + "attrs": { + "align": "center", + "placeholder": "Write title…", + "fontSize": "large" + }, + "innerBlocks": [], + "innerHTML": "\n\t\t

\n\t\t\tGuten Berg!\n\t\t

\n\t\t", + "innerContent": [ + "\n\t\t

\n\t\t\tGuten Berg!\n\t\t

\n\t\t" + ] + } + ], + "innerHTML": "\n\n\t
\n\t\t\n\t
\n\n", "innerContent": [ - "\n
\n

Guten Berg!

\n
\n" + "\n\n\t
\n\t\t", + null, + "\n\t
\n\n" ] }, { diff --git a/test/integration/full-content/fixtures/core__cover.serialized.html b/test/integration/full-content/fixtures/core__cover.serialized.html index a6d795bb561757..306a5a740160a4 100644 --- a/test/integration/full-content/fixtures/core__cover.serialized.html +++ b/test/integration/full-content/fixtures/core__cover.serialized.html @@ -1,3 +1,7 @@ -

Guten Berg!

+
+

+ Guten Berg! +

+
diff --git a/test/integration/full-content/fixtures/core__cover__video-overlay.html b/test/integration/full-content/fixtures/core__cover__video-overlay.html index 2a3530954f29b9..1eb26c9730be69 100644 --- a/test/integration/full-content/fixtures/core__cover__video-overlay.html +++ b/test/integration/full-content/fixtures/core__cover__video-overlay.html @@ -1,6 +1,22 @@ -
- -

Guten Berg!

+
+ +
+ +

+ Guten Berg! +

+ +
diff --git a/test/integration/full-content/fixtures/core__cover__video-overlay.json b/test/integration/full-content/fixtures/core__cover__video-overlay.json index 08f0de4eb4c15f..36298998345e8a 100644 --- a/test/integration/full-content/fixtures/core__cover__video-overlay.json +++ b/test/integration/full-content/fixtures/core__cover__video-overlay.json @@ -4,15 +4,28 @@ "name": "core/cover", "isValid": true, "attributes": { - "title": "Guten Berg!", "url": "data:video/mp4;base64,AAAAHGZ0eXBpc29tAAACAGlzb21pc28ybXA0MQAAAAhmcmVlAAAC721kYXQhEAUgpBv/wAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA3pwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAcCEQBSCkG//AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA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AAAABAAAAAgAABAAAAAAcc3RzYwAAAAAAAAABAAAAAQAAAAIAAAABAAAAHHN0c3oAAAAAAAAAAAAAAAIAAAFzAAABdAAAABRzdGNvAAAAAAAAAAEAAAAsAAAAYnVkdGEAAABabWV0YQAAAAAAAAAhaGRscgAAAAAAAAAAbWRpcmFwcGwAAAAAAAAAAAAAAAAtaWxzdAAAACWpdG9vAAAAHWRhdGEAAAABAAAAAExhdmY1Ni40MC4xMDE=", - "contentAlign": "center", "hasParallax": false, "dimRatio": 10, "customOverlayColor": "#3615d9", "backgroundType": "video" }, - "innerBlocks": [], - "originalContent": "
\n\t\n\t

Guten Berg!

\n
" + "innerBlocks": [ + { + "clientId": "_clientId_0", + "name": "core/paragraph", + "isValid": true, + "attributes": { + "content": "\n\t\t\tGuten Berg!\n\t\t", + "align": "center", + "dropCap": false, + "placeholder": "Write title…", + "fontSize": "large" + }, + "innerBlocks": [], + "originalContent": "

\n\t\t\tGuten Berg!\n\t\t

" + } + ], + "originalContent": "\n\t\n\t\n\t
\n\t\t\n\t
\n
" } ] diff --git a/test/integration/full-content/fixtures/core__cover__video-overlay.parsed.json b/test/integration/full-content/fixtures/core__cover__video-overlay.parsed.json index a2a3ccc94a7136..4b72e0d4148e7e 100644 --- a/test/integration/full-content/fixtures/core__cover__video-overlay.parsed.json +++ b/test/integration/full-content/fixtures/core__cover__video-overlay.parsed.json @@ -7,10 +7,26 @@ "customOverlayColor": "#3615d9", "backgroundType": "video" }, - "innerBlocks": [], - "innerHTML": "\n
\n\t\n\t

Guten Berg!

\n
\n", + "innerBlocks": [ + { + "blockName": "core/paragraph", + "attrs": { + "align": "center", + "placeholder": "Write title…", + "fontSize": "large" + }, + "innerBlocks": [], + "innerHTML": "\n\t\t

\n\t\t\tGuten Berg!\n\t\t

\n\t\t", + "innerContent": [ + "\n\t\t

\n\t\t\tGuten Berg!\n\t\t

\n\t\t" + ] + } + ], + "innerHTML": "\n\n\t\n\t\n\t
\n\t\t\n\t
\n\n", "innerContent": [ - "\n
\n\t\n\t

Guten Berg!

\n
\n" + "\n\n\t\n\t\n\t
\n\t\t", + null, + "\n\t
\n\n" ] }, { diff --git a/test/integration/full-content/fixtures/core__cover__video-overlay.serialized.html b/test/integration/full-content/fixtures/core__cover__video-overlay.serialized.html index 14786a0f0d1897..831388b0182b87 100644 --- a/test/integration/full-content/fixtures/core__cover__video-overlay.serialized.html +++ b/test/integration/full-content/fixtures/core__cover__video-overlay.serialized.html @@ -1,3 +1,7 @@ -

Guten Berg!

+
+

+ Guten Berg! +

+
diff --git a/test/integration/full-content/fixtures/core__cover__video.html b/test/integration/full-content/fixtures/core__cover__video.html index 0ab2fd73ccdf81..eb50abcb28cf36 100644 --- a/test/integration/full-content/fixtures/core__cover__video.html +++ b/test/integration/full-content/fixtures/core__cover__video.html @@ -1,6 +1,21 @@ -
- -

Guten Berg!

+
+ +
+ +

+ Guten Berg! +

+ +
diff --git a/test/integration/full-content/fixtures/core__cover__video.json b/test/integration/full-content/fixtures/core__cover__video.json index 1fa4d25d66cdaa..4c05b5f2f0c1f2 100644 --- a/test/integration/full-content/fixtures/core__cover__video.json +++ b/test/integration/full-content/fixtures/core__cover__video.json @@ -4,14 +4,27 @@ "name": "core/cover", "isValid": true, "attributes": { - "title": "Guten Berg!", "url": "data:video/mp4;base64,AAAAHGZ0eXBpc29tAAACAGlzb21pc28ybXA0MQAAAAhmcmVlAAAC721kYXQhEAUgpBv/wAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA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AAAIG1kaGQAAAAAAAAAAAAAAAAAAKxEAAAIAFXEAAAAAAAtaGRscgAAAAAAAAAAc291bgAAAAAAAAAAAAAAAFNvdW5kSGFuZGxlcgAAAAEPbWluZgAAABBzbWhkAAAAAAAAAAAAAAAkZGluZgAAABxkcmVmAAAAAAAAAAEAAAAMdXJsIAAAAAEAAADTc3RibAAAAGdzdHNkAAAAAAAAAAEAAABXbXA0YQAAAAAAAAABAAAAAAAAAAAAAgAQAAAAAKxEAAAAAAAzZXNkcwAAAAADgICAIgACAASAgIAUQBUAAAAAAfQAAAHz+QWAgIACEhAGgICAAQIAAAAYc3R0cwAAAAAAAAABAAAAAgAABAAAAAAcc3RzYwAAAAAAAAABAAAAAQAAAAIAAAABAAAAHHN0c3oAAAAAAAAAAAAAAAIAAAFzAAABdAAAABRzdGNvAAAAAAAAAAEAAAAsAAAAYnVkdGEAAABabWV0YQAAAAAAAAAhaGRscgAAAAAAAAAAbWRpcmFwcGwAAAAAAAAAAAAAAAAtaWxzdAAAACWpdG9vAAAAHWRhdGEAAAABAAAAAExhdmY1Ni40MC4xMDE=", - "contentAlign": "center", "hasParallax": false, "dimRatio": 40, "backgroundType": "video" }, - "innerBlocks": [], - "originalContent": "
\n\t\n\t

Guten Berg!

\n
" + "innerBlocks": [ + { + "clientId": "_clientId_0", + "name": "core/paragraph", + "isValid": true, + "attributes": { + "content": "\n\t\t\tGuten Berg!\n\t\t", + "align": "center", + "dropCap": false, + "placeholder": "Write title…", + "fontSize": "large" + }, + "innerBlocks": [], + "originalContent": "

\n\t\t\tGuten Berg!\n\t\t

" + } + ], + "originalContent": "\n\t\n\t\n\t
\n\t\t\n\t
\n
" } ] diff --git a/test/integration/full-content/fixtures/core__cover__video.parsed.json b/test/integration/full-content/fixtures/core__cover__video.parsed.json index a864b5fea344ed..c48b676a2f1c5b 100644 --- a/test/integration/full-content/fixtures/core__cover__video.parsed.json +++ b/test/integration/full-content/fixtures/core__cover__video.parsed.json @@ -6,10 +6,26 @@ "dimRatio": 40, "backgroundType": "video" }, - "innerBlocks": [], - "innerHTML": "\n
\n\t\n\t

Guten Berg!

\n
\n", + "innerBlocks": [ + { + "blockName": "core/paragraph", + "attrs": { + "align": "center", + "placeholder": "Write title…", + "fontSize": "large" + }, + "innerBlocks": [], + "innerHTML": "\n\t\t

\n\t\t\tGuten Berg!\n\t\t

\n\t\t", + "innerContent": [ + "\n\t\t

\n\t\t\tGuten Berg!\n\t\t

\n\t\t" + ] + } + ], + "innerHTML": "\n\n\t\n\t\n\t
\n\t\t\n\t
\n\n", "innerContent": [ - "\n
\n\t\n\t

Guten Berg!

\n
\n" + "\n\n\t\n\t\n\t
\n\t\t", + null, + "\n\t
\n\n" ] }, { diff --git a/test/integration/full-content/fixtures/core__cover__video.serialized.html b/test/integration/full-content/fixtures/core__cover__video.serialized.html index 03398311e20f6b..5f23cddf2fa1c1 100644 --- a/test/integration/full-content/fixtures/core__cover__video.serialized.html +++ b/test/integration/full-content/fixtures/core__cover__video.serialized.html @@ -1,3 +1,7 @@ -

Guten Berg!

+
+

+ Guten Berg! +

+