From a49dc60178c86a738cefc5fc2119cba22b59e85e Mon Sep 17 00:00:00 2001 From: Vadim Nicolai Date: Sat, 3 Aug 2019 17:23:10 +0300 Subject: [PATCH 01/54] Added social links. --- packages/block-library/src/index.js | 5 +- .../block-library/src/social-links/block.json | 10 ++ .../block-library/src/social-links/edit.js | 125 ++++++++++++++++++ .../block-library/src/social-links/icon.js | 8 ++ .../block-library/src/social-links/index.js | 33 +++++ .../block-library/src/social-links/save.js | 23 ++++ .../social-link/PlaceholderIcon.js | 6 + .../src/social-links/social-link/block.json | 9 ++ .../src/social-links/social-link/edit.js | 59 +++++++++ .../src/social-links/social-link/icon.js | 8 ++ .../src/social-links/social-link/index.js | 31 +++++ .../src/social-links/social-link/save.js | 22 +++ .../block-library/src/social-links/utils.js | 16 +++ 13 files changed, 354 insertions(+), 1 deletion(-) create mode 100644 packages/block-library/src/social-links/block.json create mode 100644 packages/block-library/src/social-links/edit.js create mode 100644 packages/block-library/src/social-links/icon.js create mode 100644 packages/block-library/src/social-links/index.js create mode 100644 packages/block-library/src/social-links/save.js create mode 100644 packages/block-library/src/social-links/social-link/PlaceholderIcon.js create mode 100644 packages/block-library/src/social-links/social-link/block.json create mode 100644 packages/block-library/src/social-links/social-link/edit.js create mode 100644 packages/block-library/src/social-links/social-link/icon.js create mode 100644 packages/block-library/src/social-links/social-link/index.js create mode 100644 packages/block-library/src/social-links/social-link/save.js create mode 100644 packages/block-library/src/social-links/utils.js diff --git a/packages/block-library/src/index.js b/packages/block-library/src/index.js index 67d460b4b4b404..ca21fcbc1c272e 100644 --- a/packages/block-library/src/index.js +++ b/packages/block-library/src/index.js @@ -59,8 +59,9 @@ import * as textColumns from './text-columns'; import * as verse from './verse'; import * as video from './video'; import * as tagCloud from './tag-cloud'; - import * as classic from './classic'; +import * as socialLinks from './social-links'; +import * as socialLink from './social-links/social-link'; /** * Function to register an individual block. @@ -130,6 +131,8 @@ export const registerCoreBlocks = () => { search, separator, reusableBlock, + socialLinks, + socialLink, spacer, subhead, table, diff --git a/packages/block-library/src/social-links/block.json b/packages/block-library/src/social-links/block.json new file mode 100644 index 00000000000000..a9b1b7e3add7e9 --- /dev/null +++ b/packages/block-library/src/social-links/block.json @@ -0,0 +1,10 @@ +{ + "name": "core/social-links", + "category": "widgets", + "attributes": { + "columns": { + "type": "number", + "default": 2 + } + } +} diff --git a/packages/block-library/src/social-links/edit.js b/packages/block-library/src/social-links/edit.js new file mode 100644 index 00000000000000..a965638c9530cc --- /dev/null +++ b/packages/block-library/src/social-links/edit.js @@ -0,0 +1,125 @@ +/** + * External dependencies + */ +import classnames from 'classnames'; + +/** + * WordPress dependencies + */ +import { __ } from '@wordpress/i18n'; +import { compose } from '@wordpress/compose'; +import { + PanelBody, + RangeControl, + IconButton, +} from '@wordpress/components'; +import { createBlock } from '@wordpress/blocks'; +import { Fragment } from '@wordpress/element'; +import { + InspectorControls, + InnerBlocks, + BlockControls, + BlockVerticalAlignmentToolbar, +} from '@wordpress/block-editor'; +import { withSelect, withDispatch } from '@wordpress/data'; + +/** + * Internal dependencies + */ +import { getColumnsTemplate } from './utils'; + +/** + * Allowed blocks constant is passed to InnerBlocks precisely as specified here. + * The contents of the array should never change. + * The array should contain the name of each block that is allowed. + * In columns block, the only block we allow is 'core/column'. + * + * @constant + * @type {string[]} +*/ +const ALLOWED_BLOCKS = [ 'core/social-link' ]; + +export const SocialLinksEdit = function( { attributes, setAttributes, className, updateAlignment, addLink } ) { + const { columns, verticalAlignment } = attributes; + + const classes = classnames( className, `has-${ columns }-columns`, { + [ `are-vertically-aligned-${ verticalAlignment }` ]: verticalAlignment, + } ); + + const onChange = ( alignment ) => { + // Update all the (immediate) child Column Blocks + updateAlignment( alignment ); + }; + + return ( + + + + { + setAttributes( { + columns: nextColumns, + } ); + } } + min={ 1 } + max={ 6 } + /> + + + + + + +
+ + +
+ + { __( 'Add link' ) } + +
+
+
+ ); +}; + +const DEFAULT_EMPTY_ARRAY = []; + +export default compose( + withSelect( ( select, { clientId } ) => { + const { getBlocksByClientId } = select( 'core/block-editor' ); + const [ block ] = getBlocksByClientId( clientId ); + + return { + childLinks: block ? block.innerBlocks : DEFAULT_EMPTY_ARRAY, + }; + } ), + withDispatch( ( dispatch, ownProps, registry ) => ( { + addLink() { + const { clientId } = ownProps; + const { replaceInnerBlocks } = dispatch( 'core/block-editor' ); + const { getBlocks } = registry.select( 'core/block-editor' ); + + let innerBlocks = getBlocks( clientId ); + innerBlocks = [ + ...innerBlocks, + createBlock( 'core/social-link', { verticalAlignment: 'top' } ), + ]; + + replaceInnerBlocks( clientId, innerBlocks, false ); + }, + } ) + ), +)( SocialLinksEdit ); diff --git a/packages/block-library/src/social-links/icon.js b/packages/block-library/src/social-links/icon.js new file mode 100644 index 00000000000000..f45aba71242c40 --- /dev/null +++ b/packages/block-library/src/social-links/icon.js @@ -0,0 +1,8 @@ +/** + * WordPress dependencies + */ +import { G, Path, SVG } from '@wordpress/components'; + +export default ( + +); diff --git a/packages/block-library/src/social-links/index.js b/packages/block-library/src/social-links/index.js new file mode 100644 index 00000000000000..58ad039aad2650 --- /dev/null +++ b/packages/block-library/src/social-links/index.js @@ -0,0 +1,33 @@ +/** + * WordPress dependencies + */ +import { __, _x } from '@wordpress/i18n'; + +/** + * Internal dependencies + */ +import edit from './edit'; +import icon from './icon'; +import metadata from './block.json'; +import save from './save'; + +const { name } = metadata; + +export { metadata, name }; + +export const settings = { + title: __( 'Social links' ), + icon, + description: __( 'Add a block that displays content in multiple columns, then add whatever content blocks you’d like.' ), + styles: [ + { name: 'regular', label: _x( 'Regular', 'block style' ), isDefault: true }, + { name: 'filled', label: __( 'Filled' ) }, + ], + supports: { + align: [ 'wide', 'full' ], + html: false, + }, + edit, + save, +}; + diff --git a/packages/block-library/src/social-links/save.js b/packages/block-library/src/social-links/save.js new file mode 100644 index 00000000000000..851a4270f7a4d6 --- /dev/null +++ b/packages/block-library/src/social-links/save.js @@ -0,0 +1,23 @@ +/** + * External dependencies + */ +import classnames from 'classnames'; + +/** + * WordPress dependencies + */ +import { InnerBlocks } from '@wordpress/block-editor'; + +export default function save( { attributes } ) { + const { columns, verticalAlignment } = attributes; + + const wrapperClasses = classnames( `has-${ columns }-columns`, { + [ `are-vertically-aligned-${ verticalAlignment }` ]: verticalAlignment, + } ); + + return ( +
+ +
+ ); +} diff --git a/packages/block-library/src/social-links/social-link/PlaceholderIcon.js b/packages/block-library/src/social-links/social-link/PlaceholderIcon.js new file mode 100644 index 00000000000000..abd932271d6eb4 --- /dev/null +++ b/packages/block-library/src/social-links/social-link/PlaceholderIcon.js @@ -0,0 +1,6 @@ +/** + * WordPress dependencies + */ +import { Path, SVG } from '@wordpress/components'; + +export default ; diff --git a/packages/block-library/src/social-links/social-link/block.json b/packages/block-library/src/social-links/social-link/block.json new file mode 100644 index 00000000000000..0b686c7657064d --- /dev/null +++ b/packages/block-library/src/social-links/social-link/block.json @@ -0,0 +1,9 @@ +{ + "name": "core/social-link", + "category": "widgets", + "attributes": { + "url": { + "type": "string" + } + } +} diff --git a/packages/block-library/src/social-links/social-link/edit.js b/packages/block-library/src/social-links/social-link/edit.js new file mode 100644 index 00000000000000..3a94dc5b2a0b34 --- /dev/null +++ b/packages/block-library/src/social-links/social-link/edit.js @@ -0,0 +1,59 @@ +/** + * WordPress dependencies + */ +import { __ } from '@wordpress/i18n'; +import { Fragment } from '@wordpress/element'; +import { withDispatch } from '@wordpress/data'; +import { compose } from '@wordpress/compose'; + +/** + * Internal dependencies + */ + +const SocialLinkEdit = ( { attributes, setUrl, isSelected } ) => { + const { url } = attributes; + + const getDashiconsIconName = () => { + const isFacebook = url.includes( 'fb.com' ) || url.includes( 'facebook.com' ); + + if ( isFacebook ) { + return 'facebook'; + } + }; + + const dashiconsIconName = getDashiconsIconName(); + + return ( + +
+ + { + isSelected && ( +
+ setUrl( event.target.value ) } + placeholder={ __( 'example.com/username' ) } + /> +
+ ) + } + + { ! isSelected && url } + + ); +}; + +export default compose( + withDispatch( ( _, ownProps ) => { + return { + setUrl( url ) { + const { setAttributes } = ownProps; + + setAttributes( { url } ); + }, + }; + } ) +)( SocialLinkEdit ); + diff --git a/packages/block-library/src/social-links/social-link/icon.js b/packages/block-library/src/social-links/social-link/icon.js new file mode 100644 index 00000000000000..080d796121d01a --- /dev/null +++ b/packages/block-library/src/social-links/social-link/icon.js @@ -0,0 +1,8 @@ +/** + * WordPress dependencies + */ +import { Path, SVG } from '@wordpress/components'; + +export default ( + +); diff --git a/packages/block-library/src/social-links/social-link/index.js b/packages/block-library/src/social-links/social-link/index.js new file mode 100644 index 00000000000000..02f206e3c94ef5 --- /dev/null +++ b/packages/block-library/src/social-links/social-link/index.js @@ -0,0 +1,31 @@ +/** + * WordPress dependencies + */ +import { __ } from '@wordpress/i18n'; + +/** + * Internal dependencies + */ +import edit from './edit'; +import icon from './icon'; +import metadata from './block.json'; +import save from './save'; + +const { name } = metadata; + +export { metadata, name }; + +export const settings = { + title: __( 'Social links' ), + parent: [ 'core/social-links' ], + icon, + description: __( 'Display a row of icons of your social media accounts.' ), + supports: { + inserter: false, + reusable: false, + html: false, + }, + edit, + save, +}; + diff --git a/packages/block-library/src/social-links/social-link/save.js b/packages/block-library/src/social-links/social-link/save.js new file mode 100644 index 00000000000000..9e8ea1ac4a3b32 --- /dev/null +++ b/packages/block-library/src/social-links/social-link/save.js @@ -0,0 +1,22 @@ +/** + * External dependencies + */ +import classnames from 'classnames'; + +/** + * WordPress dependencies + */ +import { InnerBlocks } from '@wordpress/block-editor'; + +export default function save( { attributes } ) { + const { verticalAlignment } = attributes; + const wrapperClasses = classnames( { + [ `is-vertically-aligned-${ verticalAlignment }` ]: verticalAlignment, + } ); + + return ( +
+ +
+ ); +} diff --git a/packages/block-library/src/social-links/utils.js b/packages/block-library/src/social-links/utils.js new file mode 100644 index 00000000000000..df8c54dd9b6e03 --- /dev/null +++ b/packages/block-library/src/social-links/utils.js @@ -0,0 +1,16 @@ +/** + * External dependencies + */ +import memoize from 'memize'; +import { times } from 'lodash'; + +/** + * Returns the layouts configuration for a given number of columns. + * + * @param {number} columns Number of columns. + * + * @return {Object[]} Columns layout configuration. + */ +export const getColumnsTemplate = memoize( ( links ) => { + return times( links, () => [ 'core/social-link' ] ); +} ); From 3d330caa38fc1ca201bf9587db46d2b92bde9cfe Mon Sep 17 00:00:00 2001 From: Vadim Nicolai Date: Mon, 5 Aug 2019 22:38:07 +0300 Subject: [PATCH 02/54] Applied changes suggested by Marcus Kazmierczak. --- .../block-library/src/social-links/block.json | 7 +- .../block-library/src/social-links/edit.js | 112 ++++-------------- .../block-library/src/social-links/icon.js | 8 -- .../block-library/src/social-links/index.js | 6 +- .../block-library/src/social-links/save.js | 15 +-- .../src/social-links/social-link/block.json | 4 + .../src/social-links/social-link/edit.js | 55 ++------- .../src/social-links/social-link/icon.js | 8 -- .../src/social-links/social-link/index.js | 7 +- .../src/social-links/social-link/save.js | 17 +-- .../block-library/src/social-links/utils.js | 16 --- 11 files changed, 53 insertions(+), 202 deletions(-) delete mode 100644 packages/block-library/src/social-links/icon.js delete mode 100644 packages/block-library/src/social-links/social-link/icon.js delete mode 100644 packages/block-library/src/social-links/utils.js diff --git a/packages/block-library/src/social-links/block.json b/packages/block-library/src/social-links/block.json index a9b1b7e3add7e9..3019a7f5c3b397 100644 --- a/packages/block-library/src/social-links/block.json +++ b/packages/block-library/src/social-links/block.json @@ -1,10 +1,5 @@ { "name": "core/social-links", "category": "widgets", - "attributes": { - "columns": { - "type": "number", - "default": 2 - } - } + "attributes": {} } diff --git a/packages/block-library/src/social-links/edit.js b/packages/block-library/src/social-links/edit.js index a965638c9530cc..287c50b602fa2c 100644 --- a/packages/block-library/src/social-links/edit.js +++ b/packages/block-library/src/social-links/edit.js @@ -1,32 +1,21 @@ -/** - * External dependencies - */ -import classnames from 'classnames'; - /** * WordPress dependencies */ import { __ } from '@wordpress/i18n'; -import { compose } from '@wordpress/compose'; import { - PanelBody, - RangeControl, IconButton, } from '@wordpress/components'; import { createBlock } from '@wordpress/blocks'; -import { Fragment } from '@wordpress/element'; import { - InspectorControls, + AlignmentToolbar, InnerBlocks, BlockControls, - BlockVerticalAlignmentToolbar, } from '@wordpress/block-editor'; -import { withSelect, withDispatch } from '@wordpress/data'; +import { dispatch } from '@wordpress/data'; /** * Internal dependencies */ -import { getColumnsTemplate } from './utils'; /** * Allowed blocks constant is passed to InnerBlocks precisely as specified here. @@ -39,87 +28,34 @@ import { getColumnsTemplate } from './utils'; */ const ALLOWED_BLOCKS = [ 'core/social-link' ]; -export const SocialLinksEdit = function( { attributes, setAttributes, className, updateAlignment, addLink } ) { - const { columns, verticalAlignment } = attributes; - - const classes = classnames( className, `has-${ columns }-columns`, { - [ `are-vertically-aligned-${ verticalAlignment }` ]: verticalAlignment, - } ); - - const onChange = ( alignment ) => { - // Update all the (immediate) child Column Blocks - updateAlignment( alignment ); - }; - +export const SocialLinksEdit = function( { align, setAttributes, className, clientId } ) { return ( - - - - { - setAttributes( { - columns: nextColumns, - } ); - } } - min={ 1 } - max={ 6 } - /> - - + <> - setAttributes( { align: nextAlign } ) } /> - -
+
- -
- - { __( 'Add link' ) } - -
+ allowedBlocks={ ALLOWED_BLOCKS } + renderAppender={ () => ( + { + const newLink = createBlock( 'core/social-link' ); + dispatch( 'core/block-editor' ).insertBlock( newLink, undefined, clientId ); + } } > + { __( 'Add link' ) } + + ) } + />
- + ); }; -const DEFAULT_EMPTY_ARRAY = []; - -export default compose( - withSelect( ( select, { clientId } ) => { - const { getBlocksByClientId } = select( 'core/block-editor' ); - const [ block ] = getBlocksByClientId( clientId ); - - return { - childLinks: block ? block.innerBlocks : DEFAULT_EMPTY_ARRAY, - }; - } ), - withDispatch( ( dispatch, ownProps, registry ) => ( { - addLink() { - const { clientId } = ownProps; - const { replaceInnerBlocks } = dispatch( 'core/block-editor' ); - const { getBlocks } = registry.select( 'core/block-editor' ); - - let innerBlocks = getBlocks( clientId ); - innerBlocks = [ - ...innerBlocks, - createBlock( 'core/social-link', { verticalAlignment: 'top' } ), - ]; - - replaceInnerBlocks( clientId, innerBlocks, false ); - }, - } ) - ), -)( SocialLinksEdit ); +export default SocialLinksEdit; diff --git a/packages/block-library/src/social-links/icon.js b/packages/block-library/src/social-links/icon.js deleted file mode 100644 index f45aba71242c40..00000000000000 --- a/packages/block-library/src/social-links/icon.js +++ /dev/null @@ -1,8 +0,0 @@ -/** - * WordPress dependencies - */ -import { G, Path, SVG } from '@wordpress/components'; - -export default ( - -); diff --git a/packages/block-library/src/social-links/index.js b/packages/block-library/src/social-links/index.js index 58ad039aad2650..a6bd5549d33477 100644 --- a/packages/block-library/src/social-links/index.js +++ b/packages/block-library/src/social-links/index.js @@ -7,7 +7,6 @@ import { __, _x } from '@wordpress/i18n'; * Internal dependencies */ import edit from './edit'; -import icon from './icon'; import metadata from './block.json'; import save from './save'; @@ -17,8 +16,8 @@ export { metadata, name }; export const settings = { title: __( 'Social links' ), - icon, - description: __( 'Add a block that displays content in multiple columns, then add whatever content blocks you’d like.' ), + icon: 'share', + description: __( 'Create a block of links to your social media or external sites' ), styles: [ { name: 'regular', label: _x( 'Regular', 'block style' ), isDefault: true }, { name: 'filled', label: __( 'Filled' ) }, @@ -30,4 +29,3 @@ export const settings = { edit, save, }; - diff --git a/packages/block-library/src/social-links/save.js b/packages/block-library/src/social-links/save.js index 851a4270f7a4d6..a4853bf3b97f7d 100644 --- a/packages/block-library/src/social-links/save.js +++ b/packages/block-library/src/social-links/save.js @@ -1,22 +1,11 @@ -/** - * External dependencies - */ -import classnames from 'classnames'; - /** * WordPress dependencies */ import { InnerBlocks } from '@wordpress/block-editor'; -export default function save( { attributes } ) { - const { columns, verticalAlignment } = attributes; - - const wrapperClasses = classnames( `has-${ columns }-columns`, { - [ `are-vertically-aligned-${ verticalAlignment }` ]: verticalAlignment, - } ); - +export default function save( { className, align } ) { return ( -
+
); diff --git a/packages/block-library/src/social-links/social-link/block.json b/packages/block-library/src/social-links/social-link/block.json index 0b686c7657064d..4738b1a97b0e33 100644 --- a/packages/block-library/src/social-links/social-link/block.json +++ b/packages/block-library/src/social-links/social-link/block.json @@ -4,6 +4,10 @@ "attributes": { "url": { "type": "string" + }, + "icon": { + "type": "string", + "default": "share" } } } diff --git a/packages/block-library/src/social-links/social-link/edit.js b/packages/block-library/src/social-links/social-link/edit.js index 3a94dc5b2a0b34..b664aac92a9055 100644 --- a/packages/block-library/src/social-links/social-link/edit.js +++ b/packages/block-library/src/social-links/social-link/edit.js @@ -1,59 +1,30 @@ /** * WordPress dependencies */ -import { __ } from '@wordpress/i18n'; -import { Fragment } from '@wordpress/element'; -import { withDispatch } from '@wordpress/data'; -import { compose } from '@wordpress/compose'; +import { URLInput } from '@wordpress/block-editor'; /** * Internal dependencies */ -const SocialLinkEdit = ( { attributes, setUrl, isSelected } ) => { - const { url } = attributes; - - const getDashiconsIconName = () => { - const isFacebook = url.includes( 'fb.com' ) || url.includes( 'facebook.com' ); - - if ( isFacebook ) { - return 'facebook'; - } - }; - - const dashiconsIconName = getDashiconsIconName(); +const SocialLinkEdit = ( { attributes, setAttributes, className, isSelected } ) => { + const { icon, url } = attributes; return ( - -
- + <> + + { icon } Icon + { isSelected && ( -
- setUrl( event.target.value ) } - placeholder={ __( 'example.com/username' ) } - /> -
+ setAttributes( { url: value } ) } + /> ) } - - { ! isSelected && url } - + ); }; -export default compose( - withDispatch( ( _, ownProps ) => { - return { - setUrl( url ) { - const { setAttributes } = ownProps; - - setAttributes( { url } ); - }, - }; - } ) -)( SocialLinkEdit ); - +export default SocialLinkEdit; diff --git a/packages/block-library/src/social-links/social-link/icon.js b/packages/block-library/src/social-links/social-link/icon.js deleted file mode 100644 index 080d796121d01a..00000000000000 --- a/packages/block-library/src/social-links/social-link/icon.js +++ /dev/null @@ -1,8 +0,0 @@ -/** - * WordPress dependencies - */ -import { Path, SVG } from '@wordpress/components'; - -export default ( - -); diff --git a/packages/block-library/src/social-links/social-link/index.js b/packages/block-library/src/social-links/social-link/index.js index 02f206e3c94ef5..6e411af0753e59 100644 --- a/packages/block-library/src/social-links/social-link/index.js +++ b/packages/block-library/src/social-links/social-link/index.js @@ -7,7 +7,6 @@ import { __ } from '@wordpress/i18n'; * Internal dependencies */ import edit from './edit'; -import icon from './icon'; import metadata from './block.json'; import save from './save'; @@ -16,10 +15,10 @@ const { name } = metadata; export { metadata, name }; export const settings = { - title: __( 'Social links' ), + title: __( 'Social link' ), parent: [ 'core/social-links' ], - icon, - description: __( 'Display a row of icons of your social media accounts.' ), + icon: 'share', + description: __( 'A social media or external link.' ), supports: { inserter: false, reusable: false, diff --git a/packages/block-library/src/social-links/social-link/save.js b/packages/block-library/src/social-links/social-link/save.js index 9e8ea1ac4a3b32..9961203c90b17b 100644 --- a/packages/block-library/src/social-links/social-link/save.js +++ b/packages/block-library/src/social-links/social-link/save.js @@ -1,22 +1,13 @@ -/** - * External dependencies - */ -import classnames from 'classnames'; - /** * WordPress dependencies */ -import { InnerBlocks } from '@wordpress/block-editor'; -export default function save( { attributes } ) { - const { verticalAlignment } = attributes; - const wrapperClasses = classnames( { - [ `is-vertically-aligned-${ verticalAlignment }` ]: verticalAlignment, - } ); +export default function save( { attributes, className } ) { + const { icon, url } = attributes; return ( -
- + ); } diff --git a/packages/block-library/src/social-links/utils.js b/packages/block-library/src/social-links/utils.js deleted file mode 100644 index df8c54dd9b6e03..00000000000000 --- a/packages/block-library/src/social-links/utils.js +++ /dev/null @@ -1,16 +0,0 @@ -/** - * External dependencies - */ -import memoize from 'memize'; -import { times } from 'lodash'; - -/** - * Returns the layouts configuration for a given number of columns. - * - * @param {number} columns Number of columns. - * - * @return {Object[]} Columns layout configuration. - */ -export const getColumnsTemplate = memoize( ( links ) => { - return times( links, () => [ 'core/social-link' ] ); -} ); From 6e6f3f12cc348f72cff55f4038ba404019220db2 Mon Sep 17 00:00:00 2001 From: Marcus Kazmierczak Date: Tue, 6 Aug 2019 12:52:18 -0700 Subject: [PATCH 03/54] Add social list of icons, SVGs in stylsheets Initially add SVG as background images to get UX down. We probably will want to use real SVGs if possible to give more control over the color, fill, stroke, etc... Add listing of icons and associated matching domain/text. Automatically check if URL entered matches and select icon. --- packages/block-library/src/editor.scss | 1 + .../src/social-links/editor.scss | 5 + .../src/social-links/social-link/edit.js | 32 ++- .../src/social-links/social-link/save.js | 12 +- .../src/social-links/social-list.js | 65 +++++ .../block-library/src/social-links/style.scss | 222 ++++++++++++++++++ packages/block-library/src/style.scss | 1 + 7 files changed, 330 insertions(+), 8 deletions(-) create mode 100644 packages/block-library/src/social-links/editor.scss create mode 100644 packages/block-library/src/social-links/social-list.js create mode 100644 packages/block-library/src/social-links/style.scss diff --git a/packages/block-library/src/editor.scss b/packages/block-library/src/editor.scss index 7e8652b23a3bf2..06f9ca4f0e22ed 100644 --- a/packages/block-library/src/editor.scss +++ b/packages/block-library/src/editor.scss @@ -28,6 +28,7 @@ @import "./rss/editor.scss"; @import "./search/editor.scss"; @import "./shortcode/editor.scss"; +@import "./social-links/editor.scss"; @import "./spacer/editor.scss"; @import "./subhead/editor.scss"; @import "./table/editor.scss"; diff --git a/packages/block-library/src/social-links/editor.scss b/packages/block-library/src/social-links/editor.scss new file mode 100644 index 00000000000000..eb635df7ac8423 --- /dev/null +++ b/packages/block-library/src/social-links/editor.scss @@ -0,0 +1,5 @@ + +.wp-block-social-links div.editor-url-input { + display: inline-block; + margin-left: 8px; +} diff --git a/packages/block-library/src/social-links/social-link/edit.js b/packages/block-library/src/social-links/social-link/edit.js index b664aac92a9055..1f62a01b11277b 100644 --- a/packages/block-library/src/social-links/social-link/edit.js +++ b/packages/block-library/src/social-links/social-link/edit.js @@ -1,3 +1,8 @@ +/** + * External dependencies + */ +import classNames from 'classnames'; + /** * WordPress dependencies */ @@ -6,20 +11,37 @@ import { URLInput } from '@wordpress/block-editor'; /** * Internal dependencies */ +import socialList from '../social-list'; + +// Receives an URL and tries to match to return an icon. +const getIconByURL = ( url ) => { + const sites = Object.keys( socialList ); + for ( const site of sites ) { + for ( const match of socialList[ site ] ) { + if ( url.includes( match ) ) { + return site; + } + } + } + // default icon + return 'share'; +}; -const SocialLinkEdit = ( { attributes, setAttributes, className, isSelected } ) => { +const SocialLinkEdit = ( { attributes, setAttributes, isSelected } ) => { const { icon, url } = attributes; + const classes = classNames( 'wp-social-icon', `wp-social-icon-${ icon }` ); return ( <> - - { icon } Icon - + { isSelected && ( setAttributes( { url: value } ) } + onChange={ ( value ) => { + const newIcon = getIconByURL( value ); + setAttributes( { url: value, icon: newIcon } ); + } } /> ) } diff --git a/packages/block-library/src/social-links/social-link/save.js b/packages/block-library/src/social-links/social-link/save.js index 9961203c90b17b..01bdebd61d6c0e 100644 --- a/packages/block-library/src/social-links/social-link/save.js +++ b/packages/block-library/src/social-links/social-link/save.js @@ -1,13 +1,19 @@ +/** + * External dependencies + */ +import classNames from 'classnames'; + /** * WordPress dependencies */ export default function save( { attributes, className } ) { const { icon, url } = attributes; + const classes = classNames( 'wp-social-icon', `wp-social-icon-${ icon }` ); return ( - + + + ); } diff --git a/packages/block-library/src/social-links/social-list.js b/packages/block-library/src/social-links/social-list.js new file mode 100644 index 00000000000000..6744d50ba007f2 --- /dev/null +++ b/packages/block-library/src/social-links/social-list.js @@ -0,0 +1,65 @@ + +const socialList = { + share: [], + fivehundredpx: [ '500px.com' ], + amazon: [ + 'amazon.com', + 'amazon.cn', + 'amazon.in', + 'amazon.fr', + 'amazon.de', + 'amazon.it', + 'amazon.nl', + 'amazon.es', + 'amazon.co', + 'amazon.ca', + ], + apple: [ + 'apple.com', + 'itunes.com', + ], + bandcamp: [ 'bandcamp.com' ], + behance: [ 'behance.net' ], + chain: [], + codepen: [ 'codepen.io' ], + deviantart: [ 'deviantart.com' ], + digg: [ 'digg.com' ], + dribbble: [ 'dribbble.com' ], + dropbox: [ 'dropbox.com' ], + etsy: [ 'etsy.com' ], + facebook: [ + 'facebook.com', + 'fb.me', + ], + feed: [ 'feed', 'rss.xml', 'atom.xml' ], + flickr: [ 'flickr.com' ], + foursquare: [ 'foursquare.com' ], + goodreads: [ 'goodreads.com' ], + google: [ 'google.com' ], + github: [ 'github.com', 'github.io' ], + instagram: [ 'instagram.com' ], + lastfm: [ 'last.fm' ], + linkedin: [ 'linkedin.com' ], + mail: [ 'mailto:' ], + meetup: [ 'meetup.com' ], + medium: [ 'medium.com' ], + pinterest: [ 'pinterest.com' ], + pocket: [ 'getpocket.com' ], + reddit: [ 'reddit.com' ], + skype: [ 'skype.com' ], + slideshare: [ 'slideshare.net' ], + snapchat: [ 'snapshot.com' ], + soundcloud: [ 'soundcloud.com' ], + spotify: [ 'spotify.com' ], + stumbleupon: [ 'stumbleupon.com' ], + tumblr: [ 'tumblr.com' ], + twitch: [ 'twitch.tv' ], + twitter: [ 'twitter.com' ], + vimeo: [ 'vimeo.com' ], + vk: [ 'vk.com' ], + wordpress: [ 'wordpress.org', 'wordpress.com' ], + yelp: [ 'yelp.com' ], + youtube: [ 'youtube.com' ], +}; + +export default socialList; diff --git a/packages/block-library/src/social-links/style.scss b/packages/block-library/src/social-links/style.scss new file mode 100644 index 00000000000000..678815318d5cc3 --- /dev/null +++ b/packages/block-library/src/social-links/style.scss @@ -0,0 +1,222 @@ + +.wp-social-icon { + display: inline-block; + width: 24px; + height: 24px; + background-repeat: no-repeat; +} + +.wp-social-icon-share { + /* stylelint-disable-next-line function-url-quotes */ + background: url('data:image/svg+xml;utf8,'); +} + +.wp-social-icon-500px { + /* stylelint-disable-next-line function-url-quotes */ + background: url(' '); +} + +.wp-social-icon-amazon { + /* stylelint-disable-next-line function-url-quotes */ + background: url('data:image/svg+xml;utf8, '); +} + +.wp-social-icon-apple { + /* stylelint-disable-next-line function-url-quotes */ + background: url('data:image/svg+xml;utf8, '); +} + +.wp-social-icon-bandcamp { + /* stylelint-disable-next-line function-url-quotes */ + background: url('data:image/svg+xml;utf8, '); +} + +.wp-social-icon-behance { + /* stylelint-disable-next-line function-url-quotes */ + background: url('data:image/svg+xml;utf8, '); +} + +.wp-social-icon-chain { + /* stylelint-disable-next-line function-url-quotes */ + background: url('data:image/svg+xml;utf8, '); +} + +.wp-social-icon-codepen { + /* stylelint-disable-next-line function-url-quotes */ + background: url('data:image/svg+xml;utf8, '); +} + +.wp-social-icon-deviantart { + /* stylelint-disable-next-line function-url-quotes */ + background: url('data:image/svg+xml;utf8, '); +} + +.wp-social-icon-digg { + /* stylelint-disable-next-line function-url-quotes */ + background: url('data:image/svg+xml;utf8, '); +} + +.wp-social-icon-dribbble { + /* stylelint-disable-next-line function-url-quotes */ + background: url('data:image/svg+xml;utf8, '); +} + +.wp-social-icon-dropbox { + /* stylelint-disable-next-line function-url-quotes */ + background: url('data:image/svg+xml;utf8, '); +} + +.wp-social-icon-etsy { + /* stylelint-disable-next-line function-url-quotes */ + background: url('data:image/svg+xml;utf8, '); +} + +.wp-social-icon-facebook { + /* stylelint-disable-next-line function-url-quotes */ + background: url('data:image/svg+xml;utf8, '); +} + +.wp-social-icon-feed { + /* stylelint-disable-next-line function-url-quotes */ + background: url('data:image/svg+xml;utf8, '); +} + +.wp-social-icon-flickr { + /* stylelint-disable-next-line function-url-quotes */ + background: url('data:image/svg+xml;utf8, '); +} + +.wp-social-icon-foursquare { + /* stylelint-disable-next-line function-url-quotes */ + background: url('data:image/svg+xml;utf8, '); +} + +.wp-social-icon-goodreads { + /* stylelint-disable-next-line function-url-quotes */ + background: url('data:image/svg+xml;utf8, '); +} + +.wp-social-icon-google { + /* stylelint-disable-next-line function-url-quotes */ + background: url('data:image/svg+xml;utf8, '); +} + +.wp-social-icon-github { + /* stylelint-disable-next-line function-url-quotes */ + background: url('data:image/svg+xml;utf8, '); +} + +.wp-social-icon-instagram { + /* stylelint-disable-next-line function-url-quotes */ + background: url('data:image/svg+xml;utf8, '); +} + +.wp-social-icon-lastfm { + /* stylelint-disable-next-line function-url-quotes */ + background: url('data:image/svg+xml;utf8, '); +} + +.wp-social-icon-linkedin { + /* stylelint-disable-next-line function-url-quotes */ + background: url('data:image/svg+xml;utf8, '); +} + +.wp-social-icon-mail { + /* stylelint-disable-next-line function-url-quotes */ + background: url('data:image/svg+xml;utf8, '); +} + +.wp-social-icon-meetup { + /* stylelint-disable-next-line function-url-quotes */ + background: url('data:image/svg+xml;utf8, '); +} + +.wp-social-icon-medium { + /* stylelint-disable-next-line function-url-quotes */ + background: url('data:image/svg+xml;utf8, '); +} + +.wp-social-icon-pinterest { + /* stylelint-disable-next-line function-url-quotes */ + background: url('data:image/svg+xml;utf8, '); +} + +.wp-social-icon-pocket { + /* stylelint-disable-next-line function-url-quotes */ + background: url('data:image/svg+xml;utf8, '); +} + +.wp-social-icon-reddit { + /* stylelint-disable-next-line function-url-quotes */ + background: url('data:image/svg+xml;utf8, '); +} + +.wp-social-icon-skype { + /* stylelint-disable-next-line function-url-quotes */ + background: url('data:image/svg+xml;utf8, '); +} + +.wp-social-icon-slideshare { + /* stylelint-disable-next-line function-url-quotes */ + background: url('data:image/svg+xml;utf8, '); +} + +.wp-social-icon-snapchat { + /* stylelint-disable-next-line function-url-quotes */ + background: url('data:image/svg+xml;utf8, '); +} + +.wp-social-icon-soundcloud { + /* stylelint-disable-next-line function-url-quotes */ + background: url('data:image/svg+xml;utf8, '); +} + +.wp-social-icon-spotify { + /* stylelint-disable-next-line function-url-quotes */ + background: url('data:image/svg+xml;utf8, '); +} + +.wp-social-icon-stumbleupon { + /* stylelint-disable-next-line function-url-quotes */ + background: url('data:image/svg+xml;utf8, '); +} + +.wp-social-icon-tumblr { + /* stylelint-disable-next-line function-url-quotes */ + background: url('data:image/svg+xml;utf8, '); +} + +.wp-social-icon-twitch { + /* stylelint-disable-next-line function-url-quotes */ + background: url('data:image/svg+xml;utf8, '); +} + +.wp-social-icon-twitter { + /* stylelint-disable-next-line function-url-quotes */ + background: url('data:image/svg+xml;utf8, '); +} + +.wp-social-icon-vimeo { + /* stylelint-disable-next-line function-url-quotes */ + background: url('data:image/svg+xml;utf8, '); +} + +.wp-social-icon-vk { + /* stylelint-disable-next-line function-url-quotes */ + background: url('data:image/svg+xml;utf8, '); +} + +.wp-social-icon-wordpress { + /* stylelint-disable-next-line function-url-quotes */ + background: url('data:image/svg+xml;utf8, '); +} + +.wp-social-icon-yelp { + /* stylelint-disable-next-line function-url-quotes */ + background: url('data:image/svg+xml;utf8, '); +} + +.wp-social-icon-youtube { + /* stylelint-disable-next-line function-url-quotes */ + background: url('data:image/svg+xml;utf8, '); +} diff --git a/packages/block-library/src/style.scss b/packages/block-library/src/style.scss index fd78fcc3b18d11..433ef8cb3aa2f3 100644 --- a/packages/block-library/src/style.scss +++ b/packages/block-library/src/style.scss @@ -17,6 +17,7 @@ @import "./rss/style.scss"; @import "./search/style.scss"; @import "./separator/style.scss"; +@import "./social-links/style.scss"; @import "./spacer/style.scss"; @import "./subhead/style.scss"; @import "./table/style.scss"; From f629002d528cfe728fd95a1e84f3d060ebe75b0a Mon Sep 17 00:00:00 2001 From: Marcus Kazmierczak Date: Mon, 12 Aug 2019 11:40:07 -0700 Subject: [PATCH 04/54] Add fixture files --- .../fixtures/blocks/core__social-link.html | 3 ++ .../fixtures/blocks/core__social-link.json | 13 +++++++ .../blocks/core__social-link.parsed.json | 23 ++++++++++++ .../blocks/core__social-link.serialized.html | 3 ++ .../fixtures/blocks/core__social-links.html | 5 +++ .../fixtures/blocks/core__social-links.json | 22 ++++++++++++ .../blocks/core__social-links.parsed.json | 35 +++++++++++++++++++ .../blocks/core__social-links.serialized.html | 5 +++ 8 files changed, 109 insertions(+) create mode 100644 packages/e2e-tests/fixtures/blocks/core__social-link.html create mode 100644 packages/e2e-tests/fixtures/blocks/core__social-link.json create mode 100644 packages/e2e-tests/fixtures/blocks/core__social-link.parsed.json create mode 100644 packages/e2e-tests/fixtures/blocks/core__social-link.serialized.html create mode 100644 packages/e2e-tests/fixtures/blocks/core__social-links.html create mode 100644 packages/e2e-tests/fixtures/blocks/core__social-links.json create mode 100644 packages/e2e-tests/fixtures/blocks/core__social-links.parsed.json create mode 100644 packages/e2e-tests/fixtures/blocks/core__social-links.serialized.html diff --git a/packages/e2e-tests/fixtures/blocks/core__social-link.html b/packages/e2e-tests/fixtures/blocks/core__social-link.html new file mode 100644 index 00000000000000..eb3bacd65d5c40 --- /dev/null +++ b/packages/e2e-tests/fixtures/blocks/core__social-link.html @@ -0,0 +1,3 @@ + + + diff --git a/packages/e2e-tests/fixtures/blocks/core__social-link.json b/packages/e2e-tests/fixtures/blocks/core__social-link.json new file mode 100644 index 00000000000000..d1fab5b3457314 --- /dev/null +++ b/packages/e2e-tests/fixtures/blocks/core__social-link.json @@ -0,0 +1,13 @@ +[ + { + "clientId": "_clientId_0", + "name": "core/social-link", + "isValid": true, + "attributes": { + "url": "https://mastodon.social/marcuskaz", + "icon": "mastodon" + }, + "innerBlocks": [], + "originalContent": "" + } +] diff --git a/packages/e2e-tests/fixtures/blocks/core__social-link.parsed.json b/packages/e2e-tests/fixtures/blocks/core__social-link.parsed.json new file mode 100644 index 00000000000000..6bc05d391e9d03 --- /dev/null +++ b/packages/e2e-tests/fixtures/blocks/core__social-link.parsed.json @@ -0,0 +1,23 @@ +[ + { + "blockName": "core/social-link", + "attrs": { + "url": "https://mastodon.social/marcuskaz", + "icon": "mastodon" + }, + "innerBlocks": [], + "innerHTML": "\n\n", + "innerContent": [ + "\n\n" + ] + }, + { + "blockName": null, + "attrs": {}, + "innerBlocks": [], + "innerHTML": "\n", + "innerContent": [ + "\n" + ] + } +] diff --git a/packages/e2e-tests/fixtures/blocks/core__social-link.serialized.html b/packages/e2e-tests/fixtures/blocks/core__social-link.serialized.html new file mode 100644 index 00000000000000..eb3bacd65d5c40 --- /dev/null +++ b/packages/e2e-tests/fixtures/blocks/core__social-link.serialized.html @@ -0,0 +1,3 @@ + + + diff --git a/packages/e2e-tests/fixtures/blocks/core__social-links.html b/packages/e2e-tests/fixtures/blocks/core__social-links.html new file mode 100644 index 00000000000000..43681ccb29ed49 --- /dev/null +++ b/packages/e2e-tests/fixtures/blocks/core__social-links.html @@ -0,0 +1,5 @@ + + + diff --git a/packages/e2e-tests/fixtures/blocks/core__social-links.json b/packages/e2e-tests/fixtures/blocks/core__social-links.json new file mode 100644 index 00000000000000..27336115e674bb --- /dev/null +++ b/packages/e2e-tests/fixtures/blocks/core__social-links.json @@ -0,0 +1,22 @@ +[ + { + "clientId": "_clientId_0", + "name": "core/social-links", + "isValid": true, + "attributes": {}, + "innerBlocks": [ + { + "clientId": "_clientId_0", + "name": "core/social-link", + "isValid": true, + "attributes": { + "url": "https://mastodon.social/marcuskaz", + "icon": "mastodon" + }, + "innerBlocks": [], + "originalContent": "" + } + ], + "originalContent": "
" + } +] diff --git a/packages/e2e-tests/fixtures/blocks/core__social-links.parsed.json b/packages/e2e-tests/fixtures/blocks/core__social-links.parsed.json new file mode 100644 index 00000000000000..38fbf3b494acc7 --- /dev/null +++ b/packages/e2e-tests/fixtures/blocks/core__social-links.parsed.json @@ -0,0 +1,35 @@ +[ + { + "blockName": "core/social-links", + "attrs": {}, + "innerBlocks": [ + { + "blockName": "core/social-link", + "attrs": { + "url": "https://mastodon.social/marcuskaz", + "icon": "mastodon" + }, + "innerBlocks": [], + "innerHTML": "\n\n", + "innerContent": [ + "\n\n" + ] + } + ], + "innerHTML": "\n
\n", + "innerContent": [ + "\n
", + null, + "
\n" + ] + }, + { + "blockName": null, + "attrs": {}, + "innerBlocks": [], + "innerHTML": "\n", + "innerContent": [ + "\n" + ] + } +] diff --git a/packages/e2e-tests/fixtures/blocks/core__social-links.serialized.html b/packages/e2e-tests/fixtures/blocks/core__social-links.serialized.html new file mode 100644 index 00000000000000..43681ccb29ed49 --- /dev/null +++ b/packages/e2e-tests/fixtures/blocks/core__social-links.serialized.html @@ -0,0 +1,5 @@ + + + From 1e9ffbc4abd42c46fec1493120383ace44dc9f3b Mon Sep 17 00:00:00 2001 From: Marcus Kazmierczak Date: Mon, 12 Aug 2019 11:54:55 -0700 Subject: [PATCH 05/54] Alignment cleanup --- .../block-library/src/social-links/edit.js | 12 +-- .../block-library/src/social-links/index.js | 10 +-- .../block-library/src/social-links/save.js | 4 +- .../social-link/PlaceholderIcon.js | 6 -- .../src/social-links/social-list.js | 1 + .../block-library/src/social-links/style.scss | 89 ++++++++++--------- 6 files changed, 53 insertions(+), 69 deletions(-) delete mode 100644 packages/block-library/src/social-links/social-link/PlaceholderIcon.js diff --git a/packages/block-library/src/social-links/edit.js b/packages/block-library/src/social-links/edit.js index 287c50b602fa2c..1c251080d1bc11 100644 --- a/packages/block-library/src/social-links/edit.js +++ b/packages/block-library/src/social-links/edit.js @@ -7,9 +7,7 @@ import { } from '@wordpress/components'; import { createBlock } from '@wordpress/blocks'; import { - AlignmentToolbar, InnerBlocks, - BlockControls, } from '@wordpress/block-editor'; import { dispatch } from '@wordpress/data'; @@ -28,16 +26,10 @@ import { dispatch } from '@wordpress/data'; */ const ALLOWED_BLOCKS = [ 'core/social-link' ]; -export const SocialLinksEdit = function( { align, setAttributes, className, clientId } ) { +export const SocialLinksEdit = function( { className, clientId } ) { return ( <> - - setAttributes( { align: nextAlign } ) } - /> - -
+
( diff --git a/packages/block-library/src/social-links/index.js b/packages/block-library/src/social-links/index.js index a6bd5549d33477..575e0d81403219 100644 --- a/packages/block-library/src/social-links/index.js +++ b/packages/block-library/src/social-links/index.js @@ -1,7 +1,7 @@ /** * WordPress dependencies */ -import { __, _x } from '@wordpress/i18n'; +import { __ } from '@wordpress/i18n'; /** * Internal dependencies @@ -18,14 +18,6 @@ export const settings = { title: __( 'Social links' ), icon: 'share', description: __( 'Create a block of links to your social media or external sites' ), - styles: [ - { name: 'regular', label: _x( 'Regular', 'block style' ), isDefault: true }, - { name: 'filled', label: __( 'Filled' ) }, - ], - supports: { - align: [ 'wide', 'full' ], - html: false, - }, edit, save, }; diff --git a/packages/block-library/src/social-links/save.js b/packages/block-library/src/social-links/save.js index a4853bf3b97f7d..24fc40b2cfbdf0 100644 --- a/packages/block-library/src/social-links/save.js +++ b/packages/block-library/src/social-links/save.js @@ -3,9 +3,9 @@ */ import { InnerBlocks } from '@wordpress/block-editor'; -export default function save( { className, align } ) { +export default function save( { className } ) { return ( -
+
); diff --git a/packages/block-library/src/social-links/social-link/PlaceholderIcon.js b/packages/block-library/src/social-links/social-link/PlaceholderIcon.js deleted file mode 100644 index abd932271d6eb4..00000000000000 --- a/packages/block-library/src/social-links/social-link/PlaceholderIcon.js +++ /dev/null @@ -1,6 +0,0 @@ -/** - * WordPress dependencies - */ -import { Path, SVG } from '@wordpress/components'; - -export default ; diff --git a/packages/block-library/src/social-links/social-list.js b/packages/block-library/src/social-links/social-list.js index 6744d50ba007f2..3d61fbf891478b 100644 --- a/packages/block-library/src/social-links/social-list.js +++ b/packages/block-library/src/social-links/social-list.js @@ -41,6 +41,7 @@ const socialList = { lastfm: [ 'last.fm' ], linkedin: [ 'linkedin.com' ], mail: [ 'mailto:' ], + mastodon: [ 'mastodon' ], meetup: [ 'meetup.com' ], medium: [ 'medium.com' ], pinterest: [ 'pinterest.com' ], diff --git a/packages/block-library/src/social-links/style.scss b/packages/block-library/src/social-links/style.scss index 678815318d5cc3..0f314349865acb 100644 --- a/packages/block-library/src/social-links/style.scss +++ b/packages/block-library/src/social-links/style.scss @@ -13,210 +13,215 @@ .wp-social-icon-500px { /* stylelint-disable-next-line function-url-quotes */ - background: url(' '); + background: url(''); } .wp-social-icon-amazon { /* stylelint-disable-next-line function-url-quotes */ - background: url('data:image/svg+xml;utf8, '); + background: url('data:image/svg+xml;utf8,'); } .wp-social-icon-apple { /* stylelint-disable-next-line function-url-quotes */ - background: url('data:image/svg+xml;utf8, '); + background: url('data:image/svg+xml;utf8,'); } .wp-social-icon-bandcamp { /* stylelint-disable-next-line function-url-quotes */ - background: url('data:image/svg+xml;utf8, '); + background: url('data:image/svg+xml;utf8,'); } .wp-social-icon-behance { /* stylelint-disable-next-line function-url-quotes */ - background: url('data:image/svg+xml;utf8, '); + background: url('data:image/svg+xml;utf8,'); } .wp-social-icon-chain { /* stylelint-disable-next-line function-url-quotes */ - background: url('data:image/svg+xml;utf8, '); + background: url('data:image/svg+xml;utf8,'); } .wp-social-icon-codepen { /* stylelint-disable-next-line function-url-quotes */ - background: url('data:image/svg+xml;utf8, '); + background: url('data:image/svg+xml;utf8,'); } .wp-social-icon-deviantart { /* stylelint-disable-next-line function-url-quotes */ - background: url('data:image/svg+xml;utf8, '); + background: url('data:image/svg+xml;utf8,'); } .wp-social-icon-digg { /* stylelint-disable-next-line function-url-quotes */ - background: url('data:image/svg+xml;utf8, '); + background: url('data:image/svg+xml;utf8,'); } .wp-social-icon-dribbble { /* stylelint-disable-next-line function-url-quotes */ - background: url('data:image/svg+xml;utf8, '); + background: url('data:image/svg+xml;utf8,'); } .wp-social-icon-dropbox { /* stylelint-disable-next-line function-url-quotes */ - background: url('data:image/svg+xml;utf8, '); + background: url('data:image/svg+xml;utf8,'); } .wp-social-icon-etsy { /* stylelint-disable-next-line function-url-quotes */ - background: url('data:image/svg+xml;utf8, '); + background: url('data:image/svg+xml;utf8,'); } .wp-social-icon-facebook { /* stylelint-disable-next-line function-url-quotes */ - background: url('data:image/svg+xml;utf8, '); + background: url('data:image/svg+xml;utf8,'); } .wp-social-icon-feed { /* stylelint-disable-next-line function-url-quotes */ - background: url('data:image/svg+xml;utf8, '); + background: url('data:image/svg+xml;utf8,'); } .wp-social-icon-flickr { /* stylelint-disable-next-line function-url-quotes */ - background: url('data:image/svg+xml;utf8, '); + background: url('data:image/svg+xml;utf8,'); } .wp-social-icon-foursquare { /* stylelint-disable-next-line function-url-quotes */ - background: url('data:image/svg+xml;utf8, '); + background: url('data:image/svg+xml;utf8,'); } .wp-social-icon-goodreads { /* stylelint-disable-next-line function-url-quotes */ - background: url('data:image/svg+xml;utf8, '); + background: url('data:image/svg+xml;utf8,'); } .wp-social-icon-google { /* stylelint-disable-next-line function-url-quotes */ - background: url('data:image/svg+xml;utf8, '); + background: url('data:image/svg+xml;utf8,'); } .wp-social-icon-github { /* stylelint-disable-next-line function-url-quotes */ - background: url('data:image/svg+xml;utf8, '); + background: url('data:image/svg+xml;utf8,'); } .wp-social-icon-instagram { /* stylelint-disable-next-line function-url-quotes */ - background: url('data:image/svg+xml;utf8, '); + background: url('data:image/svg+xml;utf8,'); } .wp-social-icon-lastfm { /* stylelint-disable-next-line function-url-quotes */ - background: url('data:image/svg+xml;utf8, '); + background: url('data:image/svg+xml;utf8,'); } .wp-social-icon-linkedin { /* stylelint-disable-next-line function-url-quotes */ - background: url('data:image/svg+xml;utf8, '); + background: url('data:image/svg+xml;utf8,'); } .wp-social-icon-mail { /* stylelint-disable-next-line function-url-quotes */ - background: url('data:image/svg+xml;utf8, '); + background: url('data:image/svg+xml;utf8,'); +} + +.wp-social-icon-mastodon { + /* stylelint-disable-next-line function-url-quotes */ + background: url('data:image/svg+xml;utf8,'); } .wp-social-icon-meetup { /* stylelint-disable-next-line function-url-quotes */ - background: url('data:image/svg+xml;utf8, '); + background: url('data:image/svg+xml;utf8,'); } .wp-social-icon-medium { /* stylelint-disable-next-line function-url-quotes */ - background: url('data:image/svg+xml;utf8, '); + background: url('data:image/svg+xml;utf8,'); } .wp-social-icon-pinterest { /* stylelint-disable-next-line function-url-quotes */ - background: url('data:image/svg+xml;utf8, '); + background: url('data:image/svg+xml;utf8,'); } .wp-social-icon-pocket { /* stylelint-disable-next-line function-url-quotes */ - background: url('data:image/svg+xml;utf8, '); + background: url('data:image/svg+xml;utf8,'); } .wp-social-icon-reddit { /* stylelint-disable-next-line function-url-quotes */ - background: url('data:image/svg+xml;utf8, '); + background: url('data:image/svg+xml;utf8,'); } .wp-social-icon-skype { /* stylelint-disable-next-line function-url-quotes */ - background: url('data:image/svg+xml;utf8, '); + background: url('data:image/svg+xml;utf8,'); } .wp-social-icon-slideshare { /* stylelint-disable-next-line function-url-quotes */ - background: url('data:image/svg+xml;utf8, '); + background: url('data:image/svg+xml;utf8,'); } .wp-social-icon-snapchat { /* stylelint-disable-next-line function-url-quotes */ - background: url('data:image/svg+xml;utf8, '); + background: url('data:image/svg+xml;utf8,'); } .wp-social-icon-soundcloud { /* stylelint-disable-next-line function-url-quotes */ - background: url('data:image/svg+xml;utf8, '); + background: url('data:image/svg+xml;utf8,'); } .wp-social-icon-spotify { /* stylelint-disable-next-line function-url-quotes */ - background: url('data:image/svg+xml;utf8, '); + background: url('data:image/svg+xml;utf8,'); } .wp-social-icon-stumbleupon { /* stylelint-disable-next-line function-url-quotes */ - background: url('data:image/svg+xml;utf8, '); + background: url('data:image/svg+xml;utf8,'); } .wp-social-icon-tumblr { /* stylelint-disable-next-line function-url-quotes */ - background: url('data:image/svg+xml;utf8, '); + background: url('data:image/svg+xml;utf8,'); } .wp-social-icon-twitch { /* stylelint-disable-next-line function-url-quotes */ - background: url('data:image/svg+xml;utf8, '); + background: url('data:image/svg+xml;utf8,'); } .wp-social-icon-twitter { /* stylelint-disable-next-line function-url-quotes */ - background: url('data:image/svg+xml;utf8, '); + background: url('data:image/svg+xml;utf8,'); } .wp-social-icon-vimeo { /* stylelint-disable-next-line function-url-quotes */ - background: url('data:image/svg+xml;utf8, '); + background: url('data:image/svg+xml;utf8,'); } .wp-social-icon-vk { /* stylelint-disable-next-line function-url-quotes */ - background: url('data:image/svg+xml;utf8, '); + background: url('data:image/svg+xml;utf8,'); } .wp-social-icon-wordpress { /* stylelint-disable-next-line function-url-quotes */ - background: url('data:image/svg+xml;utf8, '); + background: url('data:image/svg+xml;utf8,'); } .wp-social-icon-yelp { /* stylelint-disable-next-line function-url-quotes */ - background: url('data:image/svg+xml;utf8, '); + background: url('data:image/svg+xml;utf8,'); } .wp-social-icon-youtube { /* stylelint-disable-next-line function-url-quotes */ - background: url('data:image/svg+xml;utf8, '); + background: url('data:image/svg+xml;utf8,'); } From a28813ba3347e325debf567603dc98f01c8e2340 Mon Sep 17 00:00:00 2001 From: Marcus Kazmierczak Date: Mon, 12 Aug 2019 13:39:44 -0700 Subject: [PATCH 06/54] Add icon picker, to pick icon --- .../src/social-links/editor.scss | 14 +++++++++ .../src/social-links/social-link/edit.js | 30 +++++++++++++++--- .../social-links/social-link/icon-picker.js | 31 +++++++++++++++++++ 3 files changed, 70 insertions(+), 5 deletions(-) create mode 100644 packages/block-library/src/social-links/social-link/icon-picker.js diff --git a/packages/block-library/src/social-links/editor.scss b/packages/block-library/src/social-links/editor.scss index eb635df7ac8423..aa1d31332868fe 100644 --- a/packages/block-library/src/social-links/editor.scss +++ b/packages/block-library/src/social-links/editor.scss @@ -3,3 +3,17 @@ display: inline-block; margin-left: 8px; } + +.wp-block-social-link__icon-picker-dropdown { + display: inline-block; + width: 24px; +} + +.wp-block-social-link__icon-picker { + padding: 16px; + z-index: 10; + + .wp-social-icon { + margin: 8px; + } +} diff --git a/packages/block-library/src/social-links/social-link/edit.js b/packages/block-library/src/social-links/social-link/edit.js index 1f62a01b11277b..52d56e53e883f4 100644 --- a/packages/block-library/src/social-links/social-link/edit.js +++ b/packages/block-library/src/social-links/social-link/edit.js @@ -7,11 +7,15 @@ import classNames from 'classnames'; * WordPress dependencies */ import { URLInput } from '@wordpress/block-editor'; - +import { + Button, + Dropdown, +} from '@wordpress/components'; /** * Internal dependencies */ import socialList from '../social-list'; +import IconPicker from './icon-picker'; // Receives an URL and tries to match to return an icon. const getIconByURL = ( url ) => { @@ -23,8 +27,7 @@ const getIconByURL = ( url ) => { } } } - // default icon - return 'share'; + return null; }; const SocialLinkEdit = ( { attributes, setAttributes, isSelected } ) => { @@ -33,13 +36,30 @@ const SocialLinkEdit = ( { attributes, setAttributes, isSelected } ) => { const classes = classNames( 'wp-social-icon', `wp-social-icon-${ icon }` ); return ( <> - + ( + + ) } + renderContent={ () => ( + setAttributes( { icon: value } ) } + /> + ) } + /> { isSelected && ( { - const newIcon = getIconByURL( value ); + const iconByURL = getIconByURL( value ); + const newIcon = ( iconByURL ) ? iconByURL : icon; setAttributes( { url: value, icon: newIcon } ); } } /> diff --git a/packages/block-library/src/social-links/social-link/icon-picker.js b/packages/block-library/src/social-links/social-link/icon-picker.js new file mode 100644 index 00000000000000..225a311d1c45d3 --- /dev/null +++ b/packages/block-library/src/social-links/social-link/icon-picker.js @@ -0,0 +1,31 @@ +/** + * External dependencies + */ +import classNames from 'classnames'; + +/** + * WordPress dependencies + */ +import { Button } from '@wordpress/components'; + +const IconPicker = ( { icons, onClick } ) => { + return ( +
+ { + icons.map( ( icon ) => { + const classes = classNames( 'wp-social-icon', `wp-social-icon-${ icon }` ); + return ( + + ); + } ) + } +
+ ); +}; + +export default IconPicker; From 9e112c2ebacb88d98daaf8b47ba7f7e532de393e Mon Sep 17 00:00:00 2001 From: Marcus Kazmierczak Date: Tue, 13 Aug 2019 10:16:48 -0700 Subject: [PATCH 07/54] Move attributes to block.json --- packages/block-library/src/social-links/block.json | 1 + packages/block-library/src/social-links/social-link/block.json | 2 ++ packages/block-library/src/social-links/social-link/index.js | 2 -- 3 files changed, 3 insertions(+), 2 deletions(-) diff --git a/packages/block-library/src/social-links/block.json b/packages/block-library/src/social-links/block.json index 3019a7f5c3b397..6d25baacb1a857 100644 --- a/packages/block-library/src/social-links/block.json +++ b/packages/block-library/src/social-links/block.json @@ -1,5 +1,6 @@ { "name": "core/social-links", "category": "widgets", + "icon": "share", "attributes": {} } diff --git a/packages/block-library/src/social-links/social-link/block.json b/packages/block-library/src/social-links/social-link/block.json index 4738b1a97b0e33..a2a383fa832207 100644 --- a/packages/block-library/src/social-links/social-link/block.json +++ b/packages/block-library/src/social-links/social-link/block.json @@ -1,6 +1,8 @@ { "name": "core/social-link", "category": "widgets", + "parent": [ "core/social-links" ], + "icon": "share", "attributes": { "url": { "type": "string" diff --git a/packages/block-library/src/social-links/social-link/index.js b/packages/block-library/src/social-links/social-link/index.js index 6e411af0753e59..feb2a53ae78283 100644 --- a/packages/block-library/src/social-links/social-link/index.js +++ b/packages/block-library/src/social-links/social-link/index.js @@ -16,8 +16,6 @@ export { metadata, name }; export const settings = { title: __( 'Social link' ), - parent: [ 'core/social-links' ], - icon: 'share', description: __( 'A social media or external link.' ), supports: { inserter: false, From 7abaaa4442942b64752d5bc50a174ae139d90aa4 Mon Sep 17 00:00:00 2001 From: Marcus Kazmierczak Date: Wed, 14 Aug 2019 13:43:28 -0700 Subject: [PATCH 08/54] Move singular social-link to top-level --- packages/block-library/src/index.js | 2 +- .../block-library/src/{social-links => }/social-link/block.json | 0 .../block-library/src/{social-links => }/social-link/edit.js | 2 +- .../src/{social-links => }/social-link/icon-picker.js | 0 .../block-library/src/{social-links => }/social-link/index.js | 0 .../block-library/src/{social-links => }/social-link/save.js | 0 .../src/{social-links => social-link}/social-list.js | 0 7 files changed, 2 insertions(+), 2 deletions(-) rename packages/block-library/src/{social-links => }/social-link/block.json (100%) rename packages/block-library/src/{social-links => }/social-link/edit.js (97%) rename packages/block-library/src/{social-links => }/social-link/icon-picker.js (100%) rename packages/block-library/src/{social-links => }/social-link/index.js (100%) rename packages/block-library/src/{social-links => }/social-link/save.js (100%) rename packages/block-library/src/{social-links => social-link}/social-list.js (100%) diff --git a/packages/block-library/src/index.js b/packages/block-library/src/index.js index ca21fcbc1c272e..bd4d7b95f08973 100644 --- a/packages/block-library/src/index.js +++ b/packages/block-library/src/index.js @@ -61,7 +61,7 @@ import * as video from './video'; import * as tagCloud from './tag-cloud'; import * as classic from './classic'; import * as socialLinks from './social-links'; -import * as socialLink from './social-links/social-link'; +import * as socialLink from './social-link'; /** * Function to register an individual block. diff --git a/packages/block-library/src/social-links/social-link/block.json b/packages/block-library/src/social-link/block.json similarity index 100% rename from packages/block-library/src/social-links/social-link/block.json rename to packages/block-library/src/social-link/block.json diff --git a/packages/block-library/src/social-links/social-link/edit.js b/packages/block-library/src/social-link/edit.js similarity index 97% rename from packages/block-library/src/social-links/social-link/edit.js rename to packages/block-library/src/social-link/edit.js index 52d56e53e883f4..2f4b88fd16556f 100644 --- a/packages/block-library/src/social-links/social-link/edit.js +++ b/packages/block-library/src/social-link/edit.js @@ -14,7 +14,7 @@ import { /** * Internal dependencies */ -import socialList from '../social-list'; +import socialList from './social-list'; import IconPicker from './icon-picker'; // Receives an URL and tries to match to return an icon. diff --git a/packages/block-library/src/social-links/social-link/icon-picker.js b/packages/block-library/src/social-link/icon-picker.js similarity index 100% rename from packages/block-library/src/social-links/social-link/icon-picker.js rename to packages/block-library/src/social-link/icon-picker.js diff --git a/packages/block-library/src/social-links/social-link/index.js b/packages/block-library/src/social-link/index.js similarity index 100% rename from packages/block-library/src/social-links/social-link/index.js rename to packages/block-library/src/social-link/index.js diff --git a/packages/block-library/src/social-links/social-link/save.js b/packages/block-library/src/social-link/save.js similarity index 100% rename from packages/block-library/src/social-links/social-link/save.js rename to packages/block-library/src/social-link/save.js diff --git a/packages/block-library/src/social-links/social-list.js b/packages/block-library/src/social-link/social-list.js similarity index 100% rename from packages/block-library/src/social-links/social-list.js rename to packages/block-library/src/social-link/social-list.js From 0ec6188a2640a2bf0a647eccd63e6388957f6382 Mon Sep 17 00:00:00 2001 From: Marcus Kazmierczak Date: Wed, 14 Aug 2019 13:50:29 -0700 Subject: [PATCH 09/54] Pass parameter, dont use data-icon I went done the wrong path, and took far too long to realize it. --- packages/block-library/src/social-link/icon-picker.js | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/packages/block-library/src/social-link/icon-picker.js b/packages/block-library/src/social-link/icon-picker.js index 225a311d1c45d3..27e423e7a78914 100644 --- a/packages/block-library/src/social-link/icon-picker.js +++ b/packages/block-library/src/social-link/icon-picker.js @@ -18,8 +18,7 @@ const IconPicker = ( { icons, onClick } ) => { ); } ) From 6e7bce479325133e9e79320273609e89f198021c Mon Sep 17 00:00:00 2001 From: Marcus Kazmierczak Date: Wed, 14 Aug 2019 14:09:08 -0700 Subject: [PATCH 10/54] Move social-link CSS to own scss --- packages/block-library/src/editor.scss | 1 + packages/block-library/src/social-link/editor.scss | 13 +++++++++++++ packages/block-library/src/social-links/editor.scss | 13 ------------- 3 files changed, 14 insertions(+), 13 deletions(-) create mode 100644 packages/block-library/src/social-link/editor.scss diff --git a/packages/block-library/src/editor.scss b/packages/block-library/src/editor.scss index 06f9ca4f0e22ed..5c40e56925d8fb 100644 --- a/packages/block-library/src/editor.scss +++ b/packages/block-library/src/editor.scss @@ -28,6 +28,7 @@ @import "./rss/editor.scss"; @import "./search/editor.scss"; @import "./shortcode/editor.scss"; +@import "./social-link/editor.scss"; @import "./social-links/editor.scss"; @import "./spacer/editor.scss"; @import "./subhead/editor.scss"; diff --git a/packages/block-library/src/social-link/editor.scss b/packages/block-library/src/social-link/editor.scss new file mode 100644 index 00000000000000..ac154f971c395f --- /dev/null +++ b/packages/block-library/src/social-link/editor.scss @@ -0,0 +1,13 @@ +.wp-block-social-link__icon-picker-dropdown { + display: inline-block; + width: 24px; +} + +.wp-block-social-link__icon-picker { + padding: 16px; + z-index: 10; + + .wp-social-icon { + margin: 8px; + } +} diff --git a/packages/block-library/src/social-links/editor.scss b/packages/block-library/src/social-links/editor.scss index aa1d31332868fe..f828404e76d653 100644 --- a/packages/block-library/src/social-links/editor.scss +++ b/packages/block-library/src/social-links/editor.scss @@ -4,16 +4,3 @@ margin-left: 8px; } -.wp-block-social-link__icon-picker-dropdown { - display: inline-block; - width: 24px; -} - -.wp-block-social-link__icon-picker { - padding: 16px; - z-index: 10; - - .wp-social-icon { - margin: 8px; - } -} From 5b806af5ff434e52f4e11e38dc525c50b103c2a9 Mon Sep 17 00:00:00 2001 From: Marcus Kazmierczak Date: Wed, 14 Aug 2019 14:47:27 -0700 Subject: [PATCH 11/54] Switch inner-blocks to flex to inline --- packages/block-library/src/social-links/editor.scss | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/packages/block-library/src/social-links/editor.scss b/packages/block-library/src/social-links/editor.scss index f828404e76d653..8e0b58d516575f 100644 --- a/packages/block-library/src/social-links/editor.scss +++ b/packages/block-library/src/social-links/editor.scss @@ -4,3 +4,8 @@ margin-left: 8px; } +.wp-block-social-links .editor-block-list__layout, +.wp-block-social-links .editor-block-list__layout { + display: flex; + justify-content: flex-start; +} From 2993877e4f863d9be93fdf4db7e4b2b4a86350e4 Mon Sep 17 00:00:00 2001 From: Marcus Kazmierczak Date: Fri, 16 Aug 2019 08:21:13 -0700 Subject: [PATCH 12/54] Add social inks to block transforms e2e tests --- packages/e2e-tests/fixtures/block-transforms.js | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/packages/e2e-tests/fixtures/block-transforms.js b/packages/e2e-tests/fixtures/block-transforms.js index 3dd876b460a998..6caeb6a23f8909 100644 --- a/packages/e2e-tests/fixtures/block-transforms.js +++ b/packages/e2e-tests/fixtures/block-transforms.js @@ -404,6 +404,18 @@ export const EXPECTED_TRANSFORMS = { 'Group', ], }, + 'core__social-link': { + originalBlock: 'Social link', + availableTransforms: [ + 'Group', + ], + }, + 'core__social-links': { + originalBlock: 'Social links', + availableTransforms: [ + 'Group', + ], + }, core__spacer: { originalBlock: 'Spacer', availableTransforms: [ From a8e2e30affaef5227c366ca189998f7742224204 Mon Sep 17 00:00:00 2001 From: Marcus Kazmierczak Date: Wed, 21 Aug 2019 21:00:40 -0700 Subject: [PATCH 13/54] Show icons when block inserted, click to select Removes switching icon based on URL typed because someone is selecting the icon first. This makes it harder to change an icon after the fact, will require delete and insert. --- .../block-library/src/social-link/block.json | 3 +- .../block-library/src/social-link/edit.js | 69 ++++++++----------- 2 files changed, 28 insertions(+), 44 deletions(-) diff --git a/packages/block-library/src/social-link/block.json b/packages/block-library/src/social-link/block.json index a2a383fa832207..64fa5f84478e5e 100644 --- a/packages/block-library/src/social-link/block.json +++ b/packages/block-library/src/social-link/block.json @@ -8,8 +8,7 @@ "type": "string" }, "icon": { - "type": "string", - "default": "share" + "type": "string" } } } diff --git a/packages/block-library/src/social-link/edit.js b/packages/block-library/src/social-link/edit.js index 2f4b88fd16556f..9b691524059ee6 100644 --- a/packages/block-library/src/social-link/edit.js +++ b/packages/block-library/src/social-link/edit.js @@ -11,59 +11,44 @@ import { Button, Dropdown, } from '@wordpress/components'; + /** * Internal dependencies */ import socialList from './social-list'; import IconPicker from './icon-picker'; -// Receives an URL and tries to match to return an icon. -const getIconByURL = ( url ) => { - const sites = Object.keys( socialList ); - for ( const site of sites ) { - for ( const match of socialList[ site ] ) { - if ( url.includes( match ) ) { - return site; - } - } - } - return null; -}; - -const SocialLinkEdit = ( { attributes, setAttributes, isSelected } ) => { +const SocialLinkEdit = ( { attributes, setAttributes } ) => { const { icon, url } = attributes; const classes = classNames( 'wp-social-icon', `wp-social-icon-${ icon }` ); return ( <> - ( - - ) } - renderContent={ () => ( - setAttributes( { icon: value } ) } - /> - ) } - /> - { - isSelected && ( - { - const iconByURL = getIconByURL( value ); - const newIcon = ( iconByURL ) ? iconByURL : icon; - setAttributes( { url: value, icon: newIcon } ); - } } - /> - ) + { icon && ( + ( + + ) } + renderContent={ () => ( + setAttributes( { url: value } ) } + disableSuggestions={ true } + /> + ) } + /> ) + } + { ! icon && + setAttributes( { icon: value } ) } + /> } ); From ed81c2363aa4759d9d6abbfd0a688bf075b95f04 Mon Sep 17 00:00:00 2001 From: Marcus Kazmierczak Date: Wed, 21 Aug 2019 21:14:59 -0700 Subject: [PATCH 14/54] Improve inserting slightly - Remove text link, just use icon button (+) - Start with template, so you dont have to click (+) after inserting block, you immediately select the icon --- packages/block-library/src/social-links/edit.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/packages/block-library/src/social-links/edit.js b/packages/block-library/src/social-links/edit.js index 1c251080d1bc11..98f7e8910fb5d1 100644 --- a/packages/block-library/src/social-links/edit.js +++ b/packages/block-library/src/social-links/edit.js @@ -23,8 +23,9 @@ import { dispatch } from '@wordpress/data'; * * @constant * @type {string[]} -*/ + */ const ALLOWED_BLOCKS = [ 'core/social-link' ]; +const TEMPLATE = [ [ 'core/social-link' ] ]; export const SocialLinksEdit = function( { className, clientId } ) { return ( @@ -32,6 +33,7 @@ export const SocialLinksEdit = function( { className, clientId } ) {
( - { __( 'Add link' ) } ) } /> From 37fa3ff8d51224b11ab40e510e812335fa43b83b Mon Sep 17 00:00:00 2001 From: Marcus Kazmierczak Date: Wed, 21 Aug 2019 21:36:59 -0700 Subject: [PATCH 15/54] Display URLInput Popover on insert Switches URLInput field to Popover so it can be controlled to display on insert. This allows the user to know they have to fill in the URL for the icon and removes an extra click on initial insert to set. --- .../block-library/src/social-link/edit.js | 40 +++++++++---------- 1 file changed, 20 insertions(+), 20 deletions(-) diff --git a/packages/block-library/src/social-link/edit.js b/packages/block-library/src/social-link/edit.js index 9b691524059ee6..e399d71af2cee0 100644 --- a/packages/block-library/src/social-link/edit.js +++ b/packages/block-library/src/social-link/edit.js @@ -7,9 +7,10 @@ import classNames from 'classnames'; * WordPress dependencies */ import { URLInput } from '@wordpress/block-editor'; +import { useState } from '@wordpress/element'; import { Button, - Dropdown, + Popover, } from '@wordpress/components'; /** @@ -18,32 +19,31 @@ import { import socialList from './social-list'; import IconPicker from './icon-picker'; -const SocialLinkEdit = ( { attributes, setAttributes } ) => { +const SocialLinkEdit = ( { attributes, setAttributes, isSelected } ) => { const { icon, url } = attributes; + const [ showURLPopover, setPopover ] = useState( true ); const classes = classNames( 'wp-social-icon', `wp-social-icon-${ icon }` ); return ( <> { icon && ( - ( - + + ) } { ! icon && Date: Thu, 22 Aug 2019 10:56:14 +0200 Subject: [PATCH 16/54] Make progress towards minimal UI. - This removes margins, paddings, and lots of UI from child blocks. It also adds comments that we should look at refactoring this away in a separate PR that makes it a prop on a parent container. - This tweaks the layout a little bit, so frontend and backend match, and adds a circle around the social icons. --- .../src/social-links/editor.scss | 50 +++++++- .../block-library/src/social-links/style.scss | 109 ++++++++++-------- 2 files changed, 108 insertions(+), 51 deletions(-) diff --git a/packages/block-library/src/social-links/editor.scss b/packages/block-library/src/social-links/editor.scss index 8e0b58d516575f..62d07899042ea5 100644 --- a/packages/block-library/src/social-links/editor.scss +++ b/packages/block-library/src/social-links/editor.scss @@ -4,8 +4,56 @@ margin-left: 8px; } -.wp-block-social-links .editor-block-list__layout, .wp-block-social-links .editor-block-list__layout { display: flex; justify-content: flex-start; } + +// Reduce the paddings, margins, and UI of inner-blocks. +// @todo: eventually we may add a feature that lets a parent container absorb the block UI of a child block. +// When that happens, leverage that instead of the following overrides. +.wp-block-social-links { + // 1. Reset margins on immediate innerblocks container. + > .block-editor-inner-blocks > .block-editor-block-list__layout { + margin-left: 0; + margin-right: 0; + } + + // 2. Remove paddings on subsequent immediate children. + > .block-editor-inner-blocks > .block-editor-block-list__layout > .wp-block { + width: auto; + padding-left: 0; + padding-right: 0; + } + + // 3. Remove margins on subsequent Edit container. + > .block-editor-inner-blocks > .block-editor-block-list__layout > .wp-block > .block-editor-block-list__block-edit { + margin-left: 0; + margin-right: 0; + } + + // 4. Hide the block outlines. + > .block-editor-inner-blocks > .block-editor-block-list__layout > .wp-block > .block-editor-block-list__block-edit::before { + content: none; + } + + // 5. Remove vertical margins on subsequent block container. + > .block-editor-inner-blocks > .block-editor-block-list__layout > .wp-block > .block-editor-block-list__block-edit > [data-block] { + margin-top: 0; + margin-bottom: 0; + } + + // Hide the breadcrumb. + // Hide the mover. + .block-editor-block-list__breadcrumb, + .block-editor-block-mover.block-editor-block-mover { // Needs specificity. + display: none; + } +} + + +// Polish the Appender. +// @todo: this should be the actual appender, and open the block library filtered to show only social icon child blocks. +.wp-block-social-links .block-list-appender { + margin: 0; +} diff --git a/packages/block-library/src/social-links/style.scss b/packages/block-library/src/social-links/style.scss index 0f314349865acb..b12394d297d086 100644 --- a/packages/block-library/src/social-links/style.scss +++ b/packages/block-library/src/social-links/style.scss @@ -1,227 +1,236 @@ - -.wp-social-icon { - display: inline-block; - width: 24px; - height: 24px; - background-repeat: no-repeat; +.wp-block-social-links { + display: flex; + justify-content: flex-start; + + .wp-social-icon { + display: block; + width: 36px; + height: 36px; + border-radius: 36px; // This makes it pill-shaped instead of oval, in cases where the image fed is not perfectly sized. + background-color: $light-gray-500; + background-size: 24px 24px; + background-position: center center; + background-repeat: no-repeat; + margin-right: $grid-size; + } } .wp-social-icon-share { /* stylelint-disable-next-line function-url-quotes */ - background: url('data:image/svg+xml;utf8,'); + background-image: url('data:image/svg+xml;utf8,'); } .wp-social-icon-500px { /* stylelint-disable-next-line function-url-quotes */ - background: url(''); + background-image: url(''); } .wp-social-icon-amazon { /* stylelint-disable-next-line function-url-quotes */ - background: url('data:image/svg+xml;utf8,'); + background-image: url('data:image/svg+xml;utf8,'); } .wp-social-icon-apple { /* stylelint-disable-next-line function-url-quotes */ - background: url('data:image/svg+xml;utf8,'); + background-image: url('data:image/svg+xml;utf8,'); } .wp-social-icon-bandcamp { /* stylelint-disable-next-line function-url-quotes */ - background: url('data:image/svg+xml;utf8,'); + background-image: url('data:image/svg+xml;utf8,'); } .wp-social-icon-behance { /* stylelint-disable-next-line function-url-quotes */ - background: url('data:image/svg+xml;utf8,'); + background-image: url('data:image/svg+xml;utf8,'); } .wp-social-icon-chain { /* stylelint-disable-next-line function-url-quotes */ - background: url('data:image/svg+xml;utf8,'); + background-image: url('data:image/svg+xml;utf8,'); } .wp-social-icon-codepen { /* stylelint-disable-next-line function-url-quotes */ - background: url('data:image/svg+xml;utf8,'); + background-image: url('data:image/svg+xml;utf8,'); } .wp-social-icon-deviantart { /* stylelint-disable-next-line function-url-quotes */ - background: url('data:image/svg+xml;utf8,'); + background-image: url('data:image/svg+xml;utf8,'); } .wp-social-icon-digg { /* stylelint-disable-next-line function-url-quotes */ - background: url('data:image/svg+xml;utf8,'); + background-image: url('data:image/svg+xml;utf8,'); } .wp-social-icon-dribbble { /* stylelint-disable-next-line function-url-quotes */ - background: url('data:image/svg+xml;utf8,'); + background-image: url('data:image/svg+xml;utf8,'); } .wp-social-icon-dropbox { /* stylelint-disable-next-line function-url-quotes */ - background: url('data:image/svg+xml;utf8,'); + background-image: url('data:image/svg+xml;utf8,'); } .wp-social-icon-etsy { /* stylelint-disable-next-line function-url-quotes */ - background: url('data:image/svg+xml;utf8,'); + background-image: url('data:image/svg+xml;utf8,'); } .wp-social-icon-facebook { /* stylelint-disable-next-line function-url-quotes */ - background: url('data:image/svg+xml;utf8,'); + background-image: url('data:image/svg+xml;utf8,'); } .wp-social-icon-feed { /* stylelint-disable-next-line function-url-quotes */ - background: url('data:image/svg+xml;utf8,'); + background-image: url('data:image/svg+xml;utf8,'); } .wp-social-icon-flickr { /* stylelint-disable-next-line function-url-quotes */ - background: url('data:image/svg+xml;utf8,'); + background-image: url('data:image/svg+xml;utf8,'); } .wp-social-icon-foursquare { /* stylelint-disable-next-line function-url-quotes */ - background: url('data:image/svg+xml;utf8,'); + background-image: url('data:image/svg+xml;utf8,'); } .wp-social-icon-goodreads { /* stylelint-disable-next-line function-url-quotes */ - background: url('data:image/svg+xml;utf8,'); + background-image: url('data:image/svg+xml;utf8,'); } .wp-social-icon-google { /* stylelint-disable-next-line function-url-quotes */ - background: url('data:image/svg+xml;utf8,'); + background-image: url('data:image/svg+xml;utf8,'); } .wp-social-icon-github { /* stylelint-disable-next-line function-url-quotes */ - background: url('data:image/svg+xml;utf8,'); + background-image: url('data:image/svg+xml;utf8,'); } .wp-social-icon-instagram { /* stylelint-disable-next-line function-url-quotes */ - background: url('data:image/svg+xml;utf8,'); + background-image: url('data:image/svg+xml;utf8,'); } .wp-social-icon-lastfm { /* stylelint-disable-next-line function-url-quotes */ - background: url('data:image/svg+xml;utf8,'); + background-image: url('data:image/svg+xml;utf8,'); } .wp-social-icon-linkedin { /* stylelint-disable-next-line function-url-quotes */ - background: url('data:image/svg+xml;utf8,'); + background-image: url('data:image/svg+xml;utf8,'); } .wp-social-icon-mail { /* stylelint-disable-next-line function-url-quotes */ - background: url('data:image/svg+xml;utf8,'); + background-image: url('data:image/svg+xml;utf8,'); } .wp-social-icon-mastodon { /* stylelint-disable-next-line function-url-quotes */ - background: url('data:image/svg+xml;utf8,'); + background-image: url('data:image/svg+xml;utf8,'); } .wp-social-icon-meetup { /* stylelint-disable-next-line function-url-quotes */ - background: url('data:image/svg+xml;utf8,'); + background-image: url('data:image/svg+xml;utf8,'); } .wp-social-icon-medium { /* stylelint-disable-next-line function-url-quotes */ - background: url('data:image/svg+xml;utf8,'); + background-image: url('data:image/svg+xml;utf8,'); } .wp-social-icon-pinterest { /* stylelint-disable-next-line function-url-quotes */ - background: url('data:image/svg+xml;utf8,'); + background-image: url('data:image/svg+xml;utf8,'); } .wp-social-icon-pocket { /* stylelint-disable-next-line function-url-quotes */ - background: url('data:image/svg+xml;utf8,'); + background-image: url('data:image/svg+xml;utf8,'); } .wp-social-icon-reddit { /* stylelint-disable-next-line function-url-quotes */ - background: url('data:image/svg+xml;utf8,'); + background-image: url('data:image/svg+xml;utf8,'); } .wp-social-icon-skype { /* stylelint-disable-next-line function-url-quotes */ - background: url('data:image/svg+xml;utf8,'); + background-image: url('data:image/svg+xml;utf8,'); } .wp-social-icon-slideshare { /* stylelint-disable-next-line function-url-quotes */ - background: url('data:image/svg+xml;utf8,'); + background-image: url('data:image/svg+xml;utf8,'); } .wp-social-icon-snapchat { /* stylelint-disable-next-line function-url-quotes */ - background: url('data:image/svg+xml;utf8,'); + background-image: url('data:image/svg+xml;utf8,'); } .wp-social-icon-soundcloud { /* stylelint-disable-next-line function-url-quotes */ - background: url('data:image/svg+xml;utf8,'); + background-image: url('data:image/svg+xml;utf8,'); } .wp-social-icon-spotify { /* stylelint-disable-next-line function-url-quotes */ - background: url('data:image/svg+xml;utf8,'); + background-image: url('data:image/svg+xml;utf8,'); } .wp-social-icon-stumbleupon { /* stylelint-disable-next-line function-url-quotes */ - background: url('data:image/svg+xml;utf8,'); + background-image: url('data:image/svg+xml;utf8,'); } .wp-social-icon-tumblr { /* stylelint-disable-next-line function-url-quotes */ - background: url('data:image/svg+xml;utf8,'); + background-image: url('data:image/svg+xml;utf8,'); } .wp-social-icon-twitch { /* stylelint-disable-next-line function-url-quotes */ - background: url('data:image/svg+xml;utf8,'); + background-image: url('data:image/svg+xml;utf8,'); } .wp-social-icon-twitter { /* stylelint-disable-next-line function-url-quotes */ - background: url('data:image/svg+xml;utf8,'); + background-image: url('data:image/svg+xml;utf8,'); } .wp-social-icon-vimeo { /* stylelint-disable-next-line function-url-quotes */ - background: url('data:image/svg+xml;utf8,'); + background-image: url('data:image/svg+xml;utf8,'); } .wp-social-icon-vk { /* stylelint-disable-next-line function-url-quotes */ - background: url('data:image/svg+xml;utf8,'); + background-image: url('data:image/svg+xml;utf8,'); } .wp-social-icon-wordpress { /* stylelint-disable-next-line function-url-quotes */ - background: url('data:image/svg+xml;utf8,'); + background-image: url('data:image/svg+xml;utf8,'); } .wp-social-icon-yelp { /* stylelint-disable-next-line function-url-quotes */ - background: url('data:image/svg+xml;utf8,'); + background-image: url('data:image/svg+xml;utf8,'); } .wp-social-icon-youtube { /* stylelint-disable-next-line function-url-quotes */ - background: url('data:image/svg+xml;utf8,'); + background-image: url('data:image/svg+xml;utf8,'); } From 91fe987bdb3ab20cf9a1a7b40b4ac8befd2c2fd5 Mon Sep 17 00:00:00 2001 From: Marcus Kazmierczak Date: Thu, 22 Aug 2019 20:50:45 -0700 Subject: [PATCH 17/54] Refactor Social Links to create individual blocks Creates individual blocks for each social site. This uses the standard InnerBlocks appender and display to show icon/site to select. Not only does this use a standard widget, it benefits by getting search capabilities. Modeled after the embed include, however each of the sites are not a "public" block shown in the inserter, but only seen when using the Social Links block. There would be confusion using the inserter with two entries for example adding a link to Twitter vs. embedding a Tweet --- packages/block-library/src/editor.scss | 1 - packages/block-library/src/index.js | 2 +- .../block-library/src/social-link/block.json | 14 --- .../block-library/src/social-link/edit.js | 48 ++++---- .../block-library/src/social-link/editor.scss | 13 --- .../src/social-link/icon-picker.js | 30 ----- .../block-library/src/social-link/index.js | 36 ++++-- .../src/social-link/social-list.js | 104 ++++++++---------- .../block-library/src/social-links/edit.js | 43 +++----- .../block-library/src/social-links/style.scss | 22 ++-- 10 files changed, 116 insertions(+), 197 deletions(-) delete mode 100644 packages/block-library/src/social-link/block.json delete mode 100644 packages/block-library/src/social-link/editor.scss delete mode 100644 packages/block-library/src/social-link/icon-picker.js diff --git a/packages/block-library/src/editor.scss b/packages/block-library/src/editor.scss index 5c40e56925d8fb..06f9ca4f0e22ed 100644 --- a/packages/block-library/src/editor.scss +++ b/packages/block-library/src/editor.scss @@ -28,7 +28,6 @@ @import "./rss/editor.scss"; @import "./search/editor.scss"; @import "./shortcode/editor.scss"; -@import "./social-link/editor.scss"; @import "./social-links/editor.scss"; @import "./spacer/editor.scss"; @import "./subhead/editor.scss"; diff --git a/packages/block-library/src/index.js b/packages/block-library/src/index.js index bd4d7b95f08973..bcb177db239efb 100644 --- a/packages/block-library/src/index.js +++ b/packages/block-library/src/index.js @@ -132,7 +132,7 @@ export const registerCoreBlocks = () => { separator, reusableBlock, socialLinks, - socialLink, + ...socialLink.sites, spacer, subhead, table, diff --git a/packages/block-library/src/social-link/block.json b/packages/block-library/src/social-link/block.json deleted file mode 100644 index 64fa5f84478e5e..00000000000000 --- a/packages/block-library/src/social-link/block.json +++ /dev/null @@ -1,14 +0,0 @@ -{ - "name": "core/social-link", - "category": "widgets", - "parent": [ "core/social-links" ], - "icon": "share", - "attributes": { - "url": { - "type": "string" - }, - "icon": { - "type": "string" - } - } -} diff --git a/packages/block-library/src/social-link/edit.js b/packages/block-library/src/social-link/edit.js index e399d71af2cee0..0f438b268b57f5 100644 --- a/packages/block-library/src/social-link/edit.js +++ b/packages/block-library/src/social-link/edit.js @@ -16,40 +16,32 @@ import { /** * Internal dependencies */ -import socialList from './social-list'; -import IconPicker from './icon-picker'; -const SocialLinkEdit = ( { attributes, setAttributes, isSelected } ) => { - const { icon, url } = attributes; +const SocialLinkEdit = ( { className, attributes, setAttributes, isSelected } ) => { + const { url } = attributes; const [ showURLPopover, setPopover ] = useState( true ); + // can we read the block settings somehow to get icon? + const icon = className.replace( 'wp-block-social-link-', '' ); const classes = classNames( 'wp-social-icon', `wp-social-icon-${ icon }` ); return ( <> - { icon && ( - - ) } - { ! icon && - setAttributes( { icon: value } ) } - /> - } + ); }; diff --git a/packages/block-library/src/social-link/editor.scss b/packages/block-library/src/social-link/editor.scss deleted file mode 100644 index ac154f971c395f..00000000000000 --- a/packages/block-library/src/social-link/editor.scss +++ /dev/null @@ -1,13 +0,0 @@ -.wp-block-social-link__icon-picker-dropdown { - display: inline-block; - width: 24px; -} - -.wp-block-social-link__icon-picker { - padding: 16px; - z-index: 10; - - .wp-social-icon { - margin: 8px; - } -} diff --git a/packages/block-library/src/social-link/icon-picker.js b/packages/block-library/src/social-link/icon-picker.js deleted file mode 100644 index 27e423e7a78914..00000000000000 --- a/packages/block-library/src/social-link/icon-picker.js +++ /dev/null @@ -1,30 +0,0 @@ -/** - * External dependencies - */ -import classNames from 'classnames'; - -/** - * WordPress dependencies - */ -import { Button } from '@wordpress/components'; - -const IconPicker = ( { icons, onClick } ) => { - return ( -
- { - icons.map( ( icon ) => { - const classes = classNames( 'wp-social-icon', `wp-social-icon-${ icon }` ); - return ( - - ); - } ) - } -
- ); -}; - -export default IconPicker; diff --git a/packages/block-library/src/social-link/index.js b/packages/block-library/src/social-link/index.js index feb2a53ae78283..ede32e0315b2d9 100644 --- a/packages/block-library/src/social-link/index.js +++ b/packages/block-library/src/social-link/index.js @@ -7,22 +7,40 @@ import { __ } from '@wordpress/i18n'; * Internal dependencies */ import edit from './edit'; -import metadata from './block.json'; import save from './save'; +import socialList from './social-list'; -const { name } = metadata; - -export { metadata, name }; - -export const settings = { - title: __( 'Social link' ), - description: __( 'A social media or external link.' ), +const commonAttribs = { + category: 'widgets', + parent: [ 'core/social-links' ], supports: { - inserter: false, reusable: false, html: false, }, + attributes: { + url: { + type: 'string', + }, + icon: { + type: 'string', + }, + }, edit, save, }; +// Create individual blocks out of each site in social-list.js +// TODO: solve icon issue +export const sites = Object.keys( socialList ).map( + ( site ) => { + return { + name: 'core/social-link-' + site, + settings: { + title: socialList[ site ], + icon: 'share', + description: __( 'Link to ' + socialList[ site ] ), + ...commonAttribs, + }, + }; + } +); diff --git a/packages/block-library/src/social-link/social-list.js b/packages/block-library/src/social-link/social-list.js index 3d61fbf891478b..aa8a64a13a2a2b 100644 --- a/packages/block-library/src/social-link/social-list.js +++ b/packages/block-library/src/social-link/social-list.js @@ -1,66 +1,48 @@ const socialList = { - share: [], - fivehundredpx: [ '500px.com' ], - amazon: [ - 'amazon.com', - 'amazon.cn', - 'amazon.in', - 'amazon.fr', - 'amazon.de', - 'amazon.it', - 'amazon.nl', - 'amazon.es', - 'amazon.co', - 'amazon.ca', - ], - apple: [ - 'apple.com', - 'itunes.com', - ], - bandcamp: [ 'bandcamp.com' ], - behance: [ 'behance.net' ], - chain: [], - codepen: [ 'codepen.io' ], - deviantart: [ 'deviantart.com' ], - digg: [ 'digg.com' ], - dribbble: [ 'dribbble.com' ], - dropbox: [ 'dropbox.com' ], - etsy: [ 'etsy.com' ], - facebook: [ - 'facebook.com', - 'fb.me', - ], - feed: [ 'feed', 'rss.xml', 'atom.xml' ], - flickr: [ 'flickr.com' ], - foursquare: [ 'foursquare.com' ], - goodreads: [ 'goodreads.com' ], - google: [ 'google.com' ], - github: [ 'github.com', 'github.io' ], - instagram: [ 'instagram.com' ], - lastfm: [ 'last.fm' ], - linkedin: [ 'linkedin.com' ], - mail: [ 'mailto:' ], - mastodon: [ 'mastodon' ], - meetup: [ 'meetup.com' ], - medium: [ 'medium.com' ], - pinterest: [ 'pinterest.com' ], - pocket: [ 'getpocket.com' ], - reddit: [ 'reddit.com' ], - skype: [ 'skype.com' ], - slideshare: [ 'slideshare.net' ], - snapchat: [ 'snapshot.com' ], - soundcloud: [ 'soundcloud.com' ], - spotify: [ 'spotify.com' ], - stumbleupon: [ 'stumbleupon.com' ], - tumblr: [ 'tumblr.com' ], - twitch: [ 'twitch.tv' ], - twitter: [ 'twitter.com' ], - vimeo: [ 'vimeo.com' ], - vk: [ 'vk.com' ], - wordpress: [ 'wordpress.org', 'wordpress.com' ], - yelp: [ 'yelp.com' ], - youtube: [ 'youtube.com' ], + fivehundredpx: '500px', + amazon: 'Amazon', + apple: 'Apple', + bandcamp: 'Bandcamp', + behance: 'Behance', + chain: 'Link', + codepen: 'CodePen', + deviantart: 'DeviantArt', + digg: 'Digg', + dribbble: 'Dribbble', + dropbox: 'Dropbox', + etsy: 'Etsy', + facebook: 'Facebook', + feed: 'RSS Feed', + flickr: 'Flickr', + foursquare: 'Foursquare', + goodreads: 'Goodreads', + google: 'Google', + github: 'Github', + instagram: 'Instagram', + lastfm: 'Last.fm', + linkedin: 'Linkedin', + mail: 'E-mail', + mastodon: 'Mastodon', + meetup: 'Meetup', + medium: 'Medium', + pinterest: 'Pinterest', + pocket: 'Pocket', + reddit: 'Reddit', + skype: 'Skype', + slideshare: 'Slideshare', + snapchat: 'Snapshot', + soundcloud: 'Soundcloud', + spotify: 'Spotify', + stumbleupon: 'Stumbleupon', + tumblr: 'Tumblr', + twitch: 'Twitch', + twitter: 'Twitter', + vimeo: 'Vimeo', + vk: 'VK', + wordpress: 'WordPress', + yelp: 'Yelp', + youtube: 'YouTube', }; export default socialList; diff --git a/packages/block-library/src/social-links/edit.js b/packages/block-library/src/social-links/edit.js index 98f7e8910fb5d1..d06d5be31c0461 100644 --- a/packages/block-library/src/social-links/edit.js +++ b/packages/block-library/src/social-links/edit.js @@ -1,50 +1,35 @@ /** * WordPress dependencies */ -import { __ } from '@wordpress/i18n'; -import { - IconButton, -} from '@wordpress/components'; -import { createBlock } from '@wordpress/blocks'; + import { InnerBlocks, } from '@wordpress/block-editor'; -import { dispatch } from '@wordpress/data'; /** * Internal dependencies */ +import socialList from '../social-link/social-list'; -/** - * Allowed blocks constant is passed to InnerBlocks precisely as specified here. - * The contents of the array should never change. - * The array should contain the name of each block that is allowed. - * In columns block, the only block we allow is 'core/column'. - * - * @constant - * @type {string[]} - */ -const ALLOWED_BLOCKS = [ 'core/social-link' ]; -const TEMPLATE = [ [ 'core/social-link' ] ]; +const ALLOWED_BLOCKS = Object.keys( socialList ).map( ( site ) => { + return 'core/social-link-' + site; +} ); + +// Template contains the links that show when start +const TEMPLATE = [ + // [ 'core/social-link-mastodon' ], + [ 'core/social-link-twitter' ], + // [ 'core/social-link-wordpress' ], +]; -export const SocialLinksEdit = function( { className, clientId } ) { +export const SocialLinksEdit = function( { className } ) { return ( <>
( - { - const newLink = createBlock( 'core/social-link' ); - dispatch( 'core/block-editor' ).insertBlock( newLink, undefined, clientId ); - } } > - - ) } />
diff --git a/packages/block-library/src/social-links/style.scss b/packages/block-library/src/social-links/style.scss index b12394d297d086..8515255c20593d 100644 --- a/packages/block-library/src/social-links/style.scss +++ b/packages/block-library/src/social-links/style.scss @@ -1,18 +1,18 @@ .wp-block-social-links { display: flex; justify-content: flex-start; +} - .wp-social-icon { - display: block; - width: 36px; - height: 36px; - border-radius: 36px; // This makes it pill-shaped instead of oval, in cases where the image fed is not perfectly sized. - background-color: $light-gray-500; - background-size: 24px 24px; - background-position: center center; - background-repeat: no-repeat; - margin-right: $grid-size; - } +.wp-social-icon { + display: block; + width: 36px; + height: 36px; + border-radius: 36px; // This makes it pill-shaped instead of oval, in cases where the image fed is not perfectly sized. + background-color: $light-gray-500; + background-size: 24px 24px; + background-position: center center; + background-repeat: no-repeat; + margin-right: $grid-size; } .wp-social-icon-share { From 3e31b4a2e10fe9d30a3f22021c8dad14c1651553 Mon Sep 17 00:00:00 2001 From: Marcus Kazmierczak Date: Thu, 22 Aug 2019 21:52:35 -0700 Subject: [PATCH 18/54] Add is-incomplete class for empty URL - Adds wp-social-icon__is-incomplete class to social icon block if the URL is not set. - Checks for URL on save and does not include icon if not set --- packages/block-library/src/editor.scss | 1 + packages/block-library/src/social-link/edit.js | 2 +- packages/block-library/src/social-link/editor.scss | 4 ++++ packages/block-library/src/social-link/save.js | 6 +++++- 4 files changed, 11 insertions(+), 2 deletions(-) create mode 100644 packages/block-library/src/social-link/editor.scss diff --git a/packages/block-library/src/editor.scss b/packages/block-library/src/editor.scss index 06f9ca4f0e22ed..5c40e56925d8fb 100644 --- a/packages/block-library/src/editor.scss +++ b/packages/block-library/src/editor.scss @@ -28,6 +28,7 @@ @import "./rss/editor.scss"; @import "./search/editor.scss"; @import "./shortcode/editor.scss"; +@import "./social-link/editor.scss"; @import "./social-links/editor.scss"; @import "./spacer/editor.scss"; @import "./subhead/editor.scss"; diff --git a/packages/block-library/src/social-link/edit.js b/packages/block-library/src/social-link/edit.js index 0f438b268b57f5..797f77c4d08de1 100644 --- a/packages/block-library/src/social-link/edit.js +++ b/packages/block-library/src/social-link/edit.js @@ -23,7 +23,7 @@ const SocialLinkEdit = ( { className, attributes, setAttributes, isSelected } ) // can we read the block settings somehow to get icon? const icon = className.replace( 'wp-block-social-link-', '' ); - const classes = classNames( 'wp-social-icon', `wp-social-icon-${ icon }` ); + const classes = classNames( 'wp-social-icon', `wp-social-icon-${ icon }`, { 'wp-social-icon__is-incomplete': ( url ) ? false : true } ); return ( <> - + ); }; diff --git a/packages/block-library/src/social-link/icons/amazon.js b/packages/block-library/src/social-link/icons/amazon.js new file mode 100644 index 00000000000000..4b40a03e53be29 --- /dev/null +++ b/packages/block-library/src/social-link/icons/amazon.js @@ -0,0 +1,14 @@ +/** + * WordPress dependencies + */ + +import { + Path, + SVG, +} from '@wordpress/components'; + +export const amazonIcon = ( ) => ( + + + +); diff --git a/packages/block-library/src/social-link/icons/apple.js b/packages/block-library/src/social-link/icons/apple.js new file mode 100644 index 00000000000000..62e44e3bc4499a --- /dev/null +++ b/packages/block-library/src/social-link/icons/apple.js @@ -0,0 +1,14 @@ +/** + * WordPress dependencies + */ + +import { + Path, + SVG, +} from '@wordpress/components'; + +export const appleIcon = ( ) => ( + + + +); diff --git a/packages/block-library/src/social-link/icons/bandcamp.js b/packages/block-library/src/social-link/icons/bandcamp.js new file mode 100644 index 00000000000000..e86f60e6b5d760 --- /dev/null +++ b/packages/block-library/src/social-link/icons/bandcamp.js @@ -0,0 +1,14 @@ +/** + * WordPress dependencies + */ + +import { + Path, + SVG, +} from '@wordpress/components'; + +export const bandcampIcon = ( ) => ( + + + +); diff --git a/packages/block-library/src/social-link/icons/behance.js b/packages/block-library/src/social-link/icons/behance.js new file mode 100644 index 00000000000000..5d556db5fa78ec --- /dev/null +++ b/packages/block-library/src/social-link/icons/behance.js @@ -0,0 +1,14 @@ +/** + * WordPress dependencies + */ + +import { + Path, + SVG, +} from '@wordpress/components'; + +export const behanceIcon = ( ) => ( + + + +); diff --git a/packages/block-library/src/social-link/icons/chain.js b/packages/block-library/src/social-link/icons/chain.js new file mode 100644 index 00000000000000..0c229dd1a01524 --- /dev/null +++ b/packages/block-library/src/social-link/icons/chain.js @@ -0,0 +1,14 @@ +/** + * WordPress dependencies + */ + +import { + Path, + SVG, +} from '@wordpress/components'; + +export const chainIcon = ( ) => ( + + + +); diff --git a/packages/block-library/src/social-link/icons/codepen.js b/packages/block-library/src/social-link/icons/codepen.js new file mode 100644 index 00000000000000..7e0b2775e089d4 --- /dev/null +++ b/packages/block-library/src/social-link/icons/codepen.js @@ -0,0 +1,14 @@ +/** + * WordPress dependencies + */ + +import { + Path, + SVG, +} from '@wordpress/components'; + +export const codepenIcon = ( ) => ( + + + +); diff --git a/packages/block-library/src/social-link/icons/deviantart.js b/packages/block-library/src/social-link/icons/deviantart.js new file mode 100644 index 00000000000000..dfc7b190fe5a1d --- /dev/null +++ b/packages/block-library/src/social-link/icons/deviantart.js @@ -0,0 +1,14 @@ +/** + * WordPress dependencies + */ + +import { + Path, + SVG, +} from '@wordpress/components'; + +export const deviantartIcon = ( ) => ( + + + +); diff --git a/packages/block-library/src/social-link/icons/digg.js b/packages/block-library/src/social-link/icons/digg.js new file mode 100644 index 00000000000000..82a795c5e1a28b --- /dev/null +++ b/packages/block-library/src/social-link/icons/digg.js @@ -0,0 +1,14 @@ +/** + * WordPress dependencies + */ + +import { + Path, + SVG, +} from '@wordpress/components'; + +export const diggIcon = ( ) => ( + + + +); diff --git a/packages/block-library/src/social-link/icons/dribbble.js b/packages/block-library/src/social-link/icons/dribbble.js new file mode 100644 index 00000000000000..81c10ef40dbb58 --- /dev/null +++ b/packages/block-library/src/social-link/icons/dribbble.js @@ -0,0 +1,14 @@ +/** + * WordPress dependencies + */ + +import { + Path, + SVG, +} from '@wordpress/components'; + +export const dribbbleIcon = ( ) => ( + + + +); diff --git a/packages/block-library/src/social-link/icons/dropbox.js b/packages/block-library/src/social-link/icons/dropbox.js new file mode 100644 index 00000000000000..c77510dc925aef --- /dev/null +++ b/packages/block-library/src/social-link/icons/dropbox.js @@ -0,0 +1,14 @@ +/** + * WordPress dependencies + */ + +import { + Path, + SVG, +} from '@wordpress/components'; + +export const dropboxIcon = ( ) => ( + + + +); diff --git a/packages/block-library/src/social-link/icons/etsy.js b/packages/block-library/src/social-link/icons/etsy.js new file mode 100644 index 00000000000000..ba51162191f23f --- /dev/null +++ b/packages/block-library/src/social-link/icons/etsy.js @@ -0,0 +1,14 @@ +/** + * WordPress dependencies + */ + +import { + Path, + SVG, +} from '@wordpress/components'; + +export const etsyIcon = ( ) => ( + + + +); diff --git a/packages/block-library/src/social-link/icons/facebook.js b/packages/block-library/src/social-link/icons/facebook.js new file mode 100644 index 00000000000000..31005c5f79b5d7 --- /dev/null +++ b/packages/block-library/src/social-link/icons/facebook.js @@ -0,0 +1,14 @@ +/** + * WordPress dependencies + */ + +import { + Path, + SVG, +} from '@wordpress/components'; + +export const facebookIcon = ( ) => ( + + + +); diff --git a/packages/block-library/src/social-link/icons/feed.js b/packages/block-library/src/social-link/icons/feed.js new file mode 100644 index 00000000000000..129d997a632033 --- /dev/null +++ b/packages/block-library/src/social-link/icons/feed.js @@ -0,0 +1,14 @@ +/** + * WordPress dependencies + */ + +import { + Path, + SVG, +} from '@wordpress/components'; + +export const feedIcon = ( ) => ( + + + +); diff --git a/packages/block-library/src/social-link/icons/fivehundredpx.js b/packages/block-library/src/social-link/icons/fivehundredpx.js new file mode 100644 index 00000000000000..2c25f3c4ef82a8 --- /dev/null +++ b/packages/block-library/src/social-link/icons/fivehundredpx.js @@ -0,0 +1,14 @@ +/** + * WordPress dependencies + */ + +import { + Path, + SVG, +} from '@wordpress/components'; + +export const fivehundredpxIcon = ( ) => ( + + + +); diff --git a/packages/block-library/src/social-link/icons/flickr.js b/packages/block-library/src/social-link/icons/flickr.js new file mode 100644 index 00000000000000..0639524287f28e --- /dev/null +++ b/packages/block-library/src/social-link/icons/flickr.js @@ -0,0 +1,14 @@ +/** + * WordPress dependencies + */ + +import { + Path, + SVG, +} from '@wordpress/components'; + +export const flickrIcon = ( ) => ( + + + +); diff --git a/packages/block-library/src/social-link/icons/foursquare.js b/packages/block-library/src/social-link/icons/foursquare.js new file mode 100644 index 00000000000000..3193e8a1b0c896 --- /dev/null +++ b/packages/block-library/src/social-link/icons/foursquare.js @@ -0,0 +1,14 @@ +/** + * WordPress dependencies + */ + +import { + Path, + SVG, +} from '@wordpress/components'; + +export const foursquareIcon = ( ) => ( + + + +); diff --git a/packages/block-library/src/social-link/icons/github.js b/packages/block-library/src/social-link/icons/github.js new file mode 100644 index 00000000000000..d1ec13117cd294 --- /dev/null +++ b/packages/block-library/src/social-link/icons/github.js @@ -0,0 +1,14 @@ +/** + * WordPress dependencies + */ + +import { + Path, + SVG, +} from '@wordpress/components'; + +export const githubIcon = ( ) => ( + + + +); diff --git a/packages/block-library/src/social-link/icons/goodreads.js b/packages/block-library/src/social-link/icons/goodreads.js new file mode 100644 index 00000000000000..7d10042a997ebd --- /dev/null +++ b/packages/block-library/src/social-link/icons/goodreads.js @@ -0,0 +1,14 @@ +/** + * WordPress dependencies + */ + +import { + Path, + SVG, +} from '@wordpress/components'; + +export const goodreadsIcon = ( ) => ( + + + +); diff --git a/packages/block-library/src/social-link/icons/google.js b/packages/block-library/src/social-link/icons/google.js new file mode 100644 index 00000000000000..bb2dd0185ce437 --- /dev/null +++ b/packages/block-library/src/social-link/icons/google.js @@ -0,0 +1,14 @@ +/** + * WordPress dependencies + */ + +import { + Path, + SVG, +} from '@wordpress/components'; + +export const googleIcon = ( ) => ( + + + +); diff --git a/packages/block-library/src/social-link/icons/index.js b/packages/block-library/src/social-link/icons/index.js new file mode 100644 index 00000000000000..fa222264c26c03 --- /dev/null +++ b/packages/block-library/src/social-link/icons/index.js @@ -0,0 +1,44 @@ + +export * from './amazon'; +export * from './apple'; +export * from './bandcamp'; +export * from './behance'; +export * from './chain'; +export * from './codepen'; +export * from './deviantart'; +export * from './digg'; +export * from './dribbble'; +export * from './dropbox'; +export * from './etsy'; +export * from './facebook'; +export * from './feed'; +export * from './fivehundredpx'; +export * from './flickr'; +export * from './foursquare'; +export * from './goodreads'; +export * from './google'; +export * from './github'; +export * from './instagram'; +export * from './lastfm'; +export * from './linkedin'; +export * from './mail'; +export * from './mastodon'; +export * from './meetup'; +export * from './medium'; +export * from './pinterest'; +export * from './pocket'; +export * from './reddit'; +export * from './skype'; +export * from './slideshare'; +export * from './snapchat'; +export * from './soundcloud'; +export * from './spotify'; +export * from './stumbleupon'; +export * from './tumblr'; +export * from './twitch'; +export * from './twitter'; +export * from './vimeo'; +export * from './vk'; +export * from './wordpress'; +export * from './yelp'; +export * from './youtube'; diff --git a/packages/block-library/src/social-link/icons/instagram.js b/packages/block-library/src/social-link/icons/instagram.js new file mode 100644 index 00000000000000..af2c6679e87655 --- /dev/null +++ b/packages/block-library/src/social-link/icons/instagram.js @@ -0,0 +1,14 @@ +/** + * WordPress dependencies + */ + +import { + Path, + SVG, +} from '@wordpress/components'; + +export const instagramIcon = ( ) => ( + + + +); diff --git a/packages/block-library/src/social-link/icons/lastfm.js b/packages/block-library/src/social-link/icons/lastfm.js new file mode 100644 index 00000000000000..3786aa54a63171 --- /dev/null +++ b/packages/block-library/src/social-link/icons/lastfm.js @@ -0,0 +1,14 @@ +/** + * WordPress dependencies + */ + +import { + Path, + SVG, +} from '@wordpress/components'; + +export const lastfmIcon = ( ) => ( + + + +); diff --git a/packages/block-library/src/social-link/icons/linkedin.js b/packages/block-library/src/social-link/icons/linkedin.js new file mode 100644 index 00000000000000..30a809c208a866 --- /dev/null +++ b/packages/block-library/src/social-link/icons/linkedin.js @@ -0,0 +1,14 @@ +/** + * WordPress dependencies + */ + +import { + Path, + SVG, +} from '@wordpress/components'; + +export const linkedinIcon = ( ) => ( + + + +); diff --git a/packages/block-library/src/social-link/icons/list.txt b/packages/block-library/src/social-link/icons/list.txt new file mode 100644 index 00000000000000..d4e2d511c45f62 --- /dev/null +++ b/packages/block-library/src/social-link/icons/list.txt @@ -0,0 +1,42 @@ +amazon +apple +bandcamp +behance +chain +codepen +deviantart +digg +dribbble +dropbox +etsy +facebook +feed +flickr +foursquare +goodreads +google +github +instagram +lastfm +linkedin +mail +mastodon +meetup +medium +pinterest +pocket +reddit +skype +slideshare +snapchat +soundcloud +spotify +stumbleupon +tumblr +twitch +twitter +vimeo +vk +wordpress +yelp +youtube diff --git a/packages/block-library/src/social-link/icons/mail.js b/packages/block-library/src/social-link/icons/mail.js new file mode 100644 index 00000000000000..823ff38e781ec6 --- /dev/null +++ b/packages/block-library/src/social-link/icons/mail.js @@ -0,0 +1,14 @@ +/** + * WordPress dependencies + */ + +import { + Path, + SVG, +} from '@wordpress/components'; + +export const mailIcon = ( ) => ( + + + +); diff --git a/packages/block-library/src/social-link/icons/mastodon.js b/packages/block-library/src/social-link/icons/mastodon.js new file mode 100644 index 00000000000000..cc283e39a184ea --- /dev/null +++ b/packages/block-library/src/social-link/icons/mastodon.js @@ -0,0 +1,14 @@ +/** + * WordPress dependencies + */ + +import { + Path, + SVG, +} from '@wordpress/components'; + +export const mastodonIcon = ( ) => ( + + + +); diff --git a/packages/block-library/src/social-link/icons/medium.js b/packages/block-library/src/social-link/icons/medium.js new file mode 100644 index 00000000000000..52634fd5018f56 --- /dev/null +++ b/packages/block-library/src/social-link/icons/medium.js @@ -0,0 +1,14 @@ +/** + * WordPress dependencies + */ + +import { + Path, + SVG, +} from '@wordpress/components'; + +export const mediumIcon = ( ) => ( + + + +); diff --git a/packages/block-library/src/social-link/icons/meetup.js b/packages/block-library/src/social-link/icons/meetup.js new file mode 100644 index 00000000000000..67e7f08f47dd05 --- /dev/null +++ b/packages/block-library/src/social-link/icons/meetup.js @@ -0,0 +1,14 @@ +/** + * WordPress dependencies + */ + +import { + Path, + SVG, +} from '@wordpress/components'; + +export const meetupIcon = ( ) => ( + + + +); diff --git a/packages/block-library/src/social-link/icons/pinterest.js b/packages/block-library/src/social-link/icons/pinterest.js new file mode 100644 index 00000000000000..b7692634a096e6 --- /dev/null +++ b/packages/block-library/src/social-link/icons/pinterest.js @@ -0,0 +1,14 @@ +/** + * WordPress dependencies + */ + +import { + Path, + SVG, +} from '@wordpress/components'; + +export const pinterestIcon = ( ) => ( + + + +); diff --git a/packages/block-library/src/social-link/icons/pocket.js b/packages/block-library/src/social-link/icons/pocket.js new file mode 100644 index 00000000000000..72feb30be2d26a --- /dev/null +++ b/packages/block-library/src/social-link/icons/pocket.js @@ -0,0 +1,14 @@ +/** + * WordPress dependencies + */ + +import { + Path, + SVG, +} from '@wordpress/components'; + +export const pocketIcon = ( ) => ( + + + +); diff --git a/packages/block-library/src/social-link/icons/reddit.js b/packages/block-library/src/social-link/icons/reddit.js new file mode 100644 index 00000000000000..c676435eeaa2f4 --- /dev/null +++ b/packages/block-library/src/social-link/icons/reddit.js @@ -0,0 +1,14 @@ +/** + * WordPress dependencies + */ + +import { + Path, + SVG, +} from '@wordpress/components'; + +export const redditIcon = ( ) => ( + + + +); diff --git a/packages/block-library/src/social-link/icons/skype.js b/packages/block-library/src/social-link/icons/skype.js new file mode 100644 index 00000000000000..2357c18a51c2cf --- /dev/null +++ b/packages/block-library/src/social-link/icons/skype.js @@ -0,0 +1,14 @@ +/** + * WordPress dependencies + */ + +import { + Path, + SVG, +} from '@wordpress/components'; + +export const skypeIcon = ( ) => ( + + + +); diff --git a/packages/block-library/src/social-link/icons/slideshare.js b/packages/block-library/src/social-link/icons/slideshare.js new file mode 100644 index 00000000000000..453cc8d898c057 --- /dev/null +++ b/packages/block-library/src/social-link/icons/slideshare.js @@ -0,0 +1,14 @@ +/** + * WordPress dependencies + */ + +import { + Path, + SVG, +} from '@wordpress/components'; + +export const slideshareIcon = ( ) => ( + + + +); diff --git a/packages/block-library/src/social-link/icons/snapchat.js b/packages/block-library/src/social-link/icons/snapchat.js new file mode 100644 index 00000000000000..46f4ac6ba7ae97 --- /dev/null +++ b/packages/block-library/src/social-link/icons/snapchat.js @@ -0,0 +1,14 @@ +/** + * WordPress dependencies + */ + +import { + Path, + SVG, +} from '@wordpress/components'; + +export const snapchatIcon = ( ) => ( + + + +); diff --git a/packages/block-library/src/social-link/icons/soundcloud.js b/packages/block-library/src/social-link/icons/soundcloud.js new file mode 100644 index 00000000000000..7987f1a13d71f6 --- /dev/null +++ b/packages/block-library/src/social-link/icons/soundcloud.js @@ -0,0 +1,14 @@ +/** + * WordPress dependencies + */ + +import { + Path, + SVG, +} from '@wordpress/components'; + +export const soundcloudIcon = ( ) => ( + + + +); diff --git a/packages/block-library/src/social-link/icons/spotify.js b/packages/block-library/src/social-link/icons/spotify.js new file mode 100644 index 00000000000000..62d6cef47c755f --- /dev/null +++ b/packages/block-library/src/social-link/icons/spotify.js @@ -0,0 +1,14 @@ +/** + * WordPress dependencies + */ + +import { + Path, + SVG, +} from '@wordpress/components'; + +export const spotifyIcon = ( ) => ( + + + +); diff --git a/packages/block-library/src/social-link/icons/stumbleupon.js b/packages/block-library/src/social-link/icons/stumbleupon.js new file mode 100644 index 00000000000000..4b2e1e5f4b1945 --- /dev/null +++ b/packages/block-library/src/social-link/icons/stumbleupon.js @@ -0,0 +1,14 @@ +/** + * WordPress dependencies + */ + +import { + Path, + SVG, +} from '@wordpress/components'; + +export const stumbleuponIcon = ( ) => ( + + + +); diff --git a/packages/block-library/src/social-link/icons/tumblr.js b/packages/block-library/src/social-link/icons/tumblr.js new file mode 100644 index 00000000000000..bcdc292c181cc6 --- /dev/null +++ b/packages/block-library/src/social-link/icons/tumblr.js @@ -0,0 +1,14 @@ +/** + * WordPress dependencies + */ + +import { + Path, + SVG, +} from '@wordpress/components'; + +export const tumblrIcon = ( ) => ( + + + +); diff --git a/packages/block-library/src/social-link/icons/twitch.js b/packages/block-library/src/social-link/icons/twitch.js new file mode 100644 index 00000000000000..8450f3799490b5 --- /dev/null +++ b/packages/block-library/src/social-link/icons/twitch.js @@ -0,0 +1,14 @@ +/** + * WordPress dependencies + */ + +import { + Path, + SVG, +} from '@wordpress/components'; + +export const twitchIcon = ( ) => ( + + + +); diff --git a/packages/block-library/src/social-link/icons/twitter.js b/packages/block-library/src/social-link/icons/twitter.js new file mode 100644 index 00000000000000..e060ddf09f0fd1 --- /dev/null +++ b/packages/block-library/src/social-link/icons/twitter.js @@ -0,0 +1,14 @@ +/** + * WordPress dependencies + */ + +import { + Path, + SVG, +} from '@wordpress/components'; + +export const twitterIcon = ( ) => ( + + + +); diff --git a/packages/block-library/src/social-link/icons/vimeo.js b/packages/block-library/src/social-link/icons/vimeo.js new file mode 100644 index 00000000000000..915c6eef24758f --- /dev/null +++ b/packages/block-library/src/social-link/icons/vimeo.js @@ -0,0 +1,14 @@ +/** + * WordPress dependencies + */ + +import { + Path, + SVG, +} from '@wordpress/components'; + +export const vimeoIcon = ( ) => ( + + + +); diff --git a/packages/block-library/src/social-link/icons/vk.js b/packages/block-library/src/social-link/icons/vk.js new file mode 100644 index 00000000000000..484b82b54b7c98 --- /dev/null +++ b/packages/block-library/src/social-link/icons/vk.js @@ -0,0 +1,14 @@ +/** + * WordPress dependencies + */ + +import { + Path, + SVG, +} from '@wordpress/components'; + +export const vkIcon = ( ) => ( + + + +); diff --git a/packages/block-library/src/social-link/icons/wordpress.js b/packages/block-library/src/social-link/icons/wordpress.js new file mode 100644 index 00000000000000..95cfce3ce19656 --- /dev/null +++ b/packages/block-library/src/social-link/icons/wordpress.js @@ -0,0 +1,14 @@ +/** + * WordPress dependencies + */ + +import { + Path, + SVG, +} from '@wordpress/components'; + +export const wordpressIcon = ( ) => ( + + + +); diff --git a/packages/block-library/src/social-link/icons/yelp.js b/packages/block-library/src/social-link/icons/yelp.js new file mode 100644 index 00000000000000..24c9c129316c87 --- /dev/null +++ b/packages/block-library/src/social-link/icons/yelp.js @@ -0,0 +1,14 @@ +/** + * WordPress dependencies + */ + +import { + Path, + SVG, +} from '@wordpress/components'; + +export const yelpIcon = ( ) => ( + + + +); diff --git a/packages/block-library/src/social-link/icons/youtube.js b/packages/block-library/src/social-link/icons/youtube.js new file mode 100644 index 00000000000000..67d332af213102 --- /dev/null +++ b/packages/block-library/src/social-link/icons/youtube.js @@ -0,0 +1,14 @@ +/** + * WordPress dependencies + */ + +import { + Path, + SVG, +} from '@wordpress/components'; + +export const youtubeIcon = ( ) => ( + + + +); diff --git a/packages/block-library/src/social-link/index.js b/packages/block-library/src/social-link/index.js index daeca948877db0..fbc1d9666dd6a6 100644 --- a/packages/block-library/src/social-link/index.js +++ b/packages/block-library/src/social-link/index.js @@ -34,12 +34,13 @@ const commonAttribs = { // TODO: solve icon issue export const sites = Object.keys( socialList ).map( ( site ) => { + const siteParams = socialList[ site ]; return { name: 'core/social-link-' + site, settings: { - title: socialList[ site ], - icon: 'share', - description: __( 'Link to ' + socialList[ site ] ), + title: siteParams.name, + icon: siteParams.icon, + description: __( 'Link to ' + siteParams.name ), ...commonAttribs, }, }; diff --git a/packages/block-library/src/social-link/social-list.js b/packages/block-library/src/social-link/social-list.js index aa8a64a13a2a2b..3cc165487781c4 100644 --- a/packages/block-library/src/social-link/social-list.js +++ b/packages/block-library/src/social-link/social-list.js @@ -1,48 +1,225 @@ +/** + * Internal dependencies + */ +import { + amazonIcon, + appleIcon, + bandcampIcon, + behanceIcon, + chainIcon, + codepenIcon, + deviantartIcon, + diggIcon, + dribbbleIcon, + dropboxIcon, + etsyIcon, + facebookIcon, + feedIcon, + fivehundredpxIcon, + flickrIcon, + foursquareIcon, + goodreadsIcon, + googleIcon, + githubIcon, + instagramIcon, + lastfmIcon, + linkedinIcon, + mailIcon, + mastodonIcon, + meetupIcon, + mediumIcon, + pinterestIcon, + pocketIcon, + redditIcon, + skypeIcon, + slideshareIcon, + snapchatIcon, + soundcloudIcon, + spotifyIcon, + stumbleuponIcon, + tumblrIcon, + twitchIcon, + twitterIcon, + vimeoIcon, + vkIcon, + wordpressIcon, + yelpIcon, + youtubeIcon, +} from './icons'; const socialList = { - fivehundredpx: '500px', - amazon: 'Amazon', - apple: 'Apple', - bandcamp: 'Bandcamp', - behance: 'Behance', - chain: 'Link', - codepen: 'CodePen', - deviantart: 'DeviantArt', - digg: 'Digg', - dribbble: 'Dribbble', - dropbox: 'Dropbox', - etsy: 'Etsy', - facebook: 'Facebook', - feed: 'RSS Feed', - flickr: 'Flickr', - foursquare: 'Foursquare', - goodreads: 'Goodreads', - google: 'Google', - github: 'Github', - instagram: 'Instagram', - lastfm: 'Last.fm', - linkedin: 'Linkedin', - mail: 'E-mail', - mastodon: 'Mastodon', - meetup: 'Meetup', - medium: 'Medium', - pinterest: 'Pinterest', - pocket: 'Pocket', - reddit: 'Reddit', - skype: 'Skype', - slideshare: 'Slideshare', - snapchat: 'Snapshot', - soundcloud: 'Soundcloud', - spotify: 'Spotify', - stumbleupon: 'Stumbleupon', - tumblr: 'Tumblr', - twitch: 'Twitch', - twitter: 'Twitter', - vimeo: 'Vimeo', - vk: 'VK', - wordpress: 'WordPress', - yelp: 'Yelp', - youtube: 'YouTube', + fivehundredpx: { + name: '500px', + icon: fivehundredpxIcon, + }, + amazon: { + name: 'Amazon', + icon: amazonIcon, + }, + apple: { + name: 'Apple', + icon: appleIcon, + }, + bandcamp: { + name: 'Bandcamp', + icon: bandcampIcon, + }, + behance: { + name: 'Behance', + icon: behanceIcon, + }, + chain: { + name: 'Link', + icon: chainIcon, + }, + codepen: { + name: 'CodePen', + icon: codepenIcon, + }, + deviantart: { + name: 'DeviantArt', + icon: deviantartIcon, + }, + digg: { + name: 'Digg', + icon: diggIcon, + }, + dribbble: { + name: 'Dribbble', + icon: dribbbleIcon, + }, + dropbox: { + name: 'Dropbox', + icon: dropboxIcon, + }, + etsy: { + name: 'Etsy', + icon: etsyIcon, + }, + facebook: { + name: 'Facebook', + icon: facebookIcon, + }, + feed: { + name: 'RSS Feed', + icon: feedIcon, + }, + flickr: { + name: 'Flickr', + icon: flickrIcon, + }, + foursquare: { + name: 'Foursquare', + icon: foursquareIcon, + }, + goodreads: { + name: 'Goodreads', + icon: goodreadsIcon, + }, + google: { + name: 'Google', + icon: googleIcon, + }, + github: { + name: 'Github', + icon: githubIcon, + }, + instagram: { + name: 'Instagram', + icon: instagramIcon, + }, + lastfm: { + name: 'Last.fm', + icon: lastfmIcon, + }, + linkedin: { + name: 'Linkedin', + icon: linkedinIcon, + }, + mail: { + name: 'E-mail', + icon: mailIcon, + }, + mastodon: { + name: 'Mastodon', + icon: mastodonIcon, + }, + meetup: { + name: 'Meetup', + icon: meetupIcon, + }, + medium: { + name: 'Medium', + icon: mediumIcon, + }, + pinterest: { + name: 'Pinterest', + icon: pinterestIcon, + }, + pocket: { + name: 'Pocket', + icon: pocketIcon, + }, + reddit: { + name: 'Reddit', + icon: redditIcon, + }, + skype: { + name: 'Skype', + icon: skypeIcon, + }, + slideshare: { + name: 'Slideshare', + icon: slideshareIcon, + }, + snapchat: { + name: 'Snapshot', + icon: snapchatIcon, + }, + soundcloud: { + name: 'Soundcloud', + icon: soundcloudIcon, + }, + spotify: { + name: 'Spotify', + icon: spotifyIcon, + }, + stumbleupon: { + name: 'Stumbleupon', + icon: stumbleuponIcon, + }, + tumblr: { + name: 'Tumblr', + icon: tumblrIcon, + }, + twitch: { + name: 'Twitch', + icon: twitchIcon, + }, + twitter: { + name: 'Twitter', + icon: twitterIcon, + }, + vimeo: { + name: 'Vimeo', + icon: vimeoIcon, + }, + vk: { + name: 'VK', + icon: vkIcon, + }, + wordpress: { + name: 'WordPress', + icon: wordpressIcon, + }, + yelp: { + name: 'Yelp', + icon: yelpIcon, + }, + youtube: { + name: 'YouTube', + icon: youtubeIcon, + }, }; export default socialList; From 8fa8775720b958082a47e28b2e873ac542857b0d Mon Sep 17 00:00:00 2001 From: Marcus Kazmierczak Date: Fri, 23 Aug 2019 13:50:16 -0700 Subject: [PATCH 23/54] Clean up - standardize on social-link naming, fix CSS - use icon attribute set as default in register --- .../block-library/src/social-link/edit.js | 11 +-- .../block-library/src/social-link/editor.scss | 2 +- .../block-library/src/social-link/index.js | 18 ++-- .../block-library/src/social-links/style.scss | 90 +++++++++---------- 4 files changed, 58 insertions(+), 63 deletions(-) diff --git a/packages/block-library/src/social-link/edit.js b/packages/block-library/src/social-link/edit.js index 77b0c2264148a1..4e27ac76ebe6de 100644 --- a/packages/block-library/src/social-link/edit.js +++ b/packages/block-library/src/social-link/edit.js @@ -17,15 +17,10 @@ import { * Internal dependencies */ -const SocialLinkEdit = ( { className, attributes, setAttributes, isSelected } ) => { - const { url } = attributes; +const SocialLinkEdit = ( { attributes, setAttributes, isSelected } ) => { + const { url, icon } = attributes; const [ showURLPopover, setPopover ] = useState( true ); - - // can we read the block settings somehow to get icon? - const icon = className.replace( 'wp-block-social-link-', '' ); - setAttributes( { icon } ); - - const classes = classNames( 'wp-social-icon', `wp-social-icon-${ icon }`, { 'wp-social-icon__is-incomplete': ( url ) ? false : true } ); + const classes = classNames( 'wp-social-link', `wp-social-link-${ icon }`, { 'wp-social-link__is-incomplete': ( url ) ? false : true } ); return ( ); From 27988e3089e381ba2b76896135650f457ed787f0 Mon Sep 17 00:00:00 2001 From: Marcus Kazmierczak Date: Tue, 27 Aug 2019 16:43:23 -0700 Subject: [PATCH 31/54] Update and fix tests, get to green - Add tests for individual social link blocks - Generate fixtures - Add block transforms (Group) - PHP has lint rules too --- .../block-library/src/social-link/index.php | 30 +-- .../e2e-tests/fixtures/block-transforms.js | 208 +++++++++++++++++- .../blocks/core__social-link-amazon.html | 3 + .../blocks/core__social-link-amazon.json | 13 ++ .../core__social-link-amazon.parsed.json | 22 ++ .../core__social-link-amazon.serialized.html | 3 + .../blocks/core__social-link-bandcamp.html | 3 + .../blocks/core__social-link-bandcamp.json | 13 ++ .../core__social-link-bandcamp.parsed.json | 22 ++ ...core__social-link-bandcamp.serialized.html | 3 + .../blocks/core__social-link-behance.html | 3 + .../blocks/core__social-link-behance.json | 13 ++ .../core__social-link-behance.parsed.json | 22 ++ .../core__social-link-behance.serialized.html | 3 + .../blocks/core__social-link-chain.html | 3 + .../blocks/core__social-link-chain.json | 13 ++ .../core__social-link-chain.parsed.json | 22 ++ .../core__social-link-chain.serialized.html | 3 + .../blocks/core__social-link-codepen.html | 3 + .../blocks/core__social-link-codepen.json | 13 ++ .../core__social-link-codepen.parsed.json | 22 ++ .../core__social-link-codepen.serialized.html | 3 + .../blocks/core__social-link-deviantart.html | 3 + .../blocks/core__social-link-deviantart.json | 13 ++ .../core__social-link-deviantart.parsed.json | 22 ++ ...re__social-link-deviantart.serialized.html | 3 + .../blocks/core__social-link-dribbble.html | 3 + .../blocks/core__social-link-dribbble.json | 13 ++ .../core__social-link-dribbble.parsed.json | 22 ++ ...core__social-link-dribbble.serialized.html | 3 + .../blocks/core__social-link-etsy.html | 3 + .../blocks/core__social-link-etsy.json | 13 ++ .../blocks/core__social-link-etsy.parsed.json | 22 ++ .../core__social-link-etsy.serialized.html | 3 + .../blocks/core__social-link-facebook.html | 3 + .../blocks/core__social-link-facebook.json | 13 ++ .../core__social-link-facebook.parsed.json | 22 ++ ...core__social-link-facebook.serialized.html | 3 + .../blocks/core__social-link-feed.html | 3 + .../blocks/core__social-link-feed.json | 13 ++ .../blocks/core__social-link-feed.parsed.json | 22 ++ .../core__social-link-feed.serialized.html | 3 + .../core__social-link-fivehundredpx.html | 3 + .../core__social-link-fivehundredpx.json | 13 ++ ...ore__social-link-fivehundredpx.parsed.json | 22 ++ ..._social-link-fivehundredpx.serialized.html | 3 + .../blocks/core__social-link-flickr.html | 3 + .../blocks/core__social-link-flickr.json | 13 ++ .../core__social-link-flickr.parsed.json | 22 ++ .../core__social-link-flickr.serialized.html | 3 + .../blocks/core__social-link-foursquare.html | 3 + .../blocks/core__social-link-foursquare.json | 13 ++ .../core__social-link-foursquare.parsed.json | 22 ++ ...re__social-link-foursquare.serialized.html | 3 + .../blocks/core__social-link-github.html | 3 + .../blocks/core__social-link-github.json | 13 ++ .../core__social-link-github.parsed.json | 22 ++ .../core__social-link-github.serialized.html | 3 + .../blocks/core__social-link-goodreads.html | 3 + .../blocks/core__social-link-goodreads.json | 13 ++ .../core__social-link-goodreads.parsed.json | 22 ++ ...ore__social-link-goodreads.serialized.html | 3 + .../blocks/core__social-link-instagram.html | 3 + .../blocks/core__social-link-instagram.json | 13 ++ .../core__social-link-instagram.parsed.json | 22 ++ ...ore__social-link-instagram.serialized.html | 3 + .../blocks/core__social-link-lastfm.html | 3 + .../blocks/core__social-link-lastfm.json | 13 ++ .../core__social-link-lastfm.parsed.json | 22 ++ .../core__social-link-lastfm.serialized.html | 3 + .../blocks/core__social-link-linkedin.html | 3 + .../blocks/core__social-link-linkedin.json | 13 ++ .../core__social-link-linkedin.parsed.json | 22 ++ ...core__social-link-linkedin.serialized.html | 3 + .../blocks/core__social-link-mail.html | 3 + .../blocks/core__social-link-mail.json | 13 ++ .../blocks/core__social-link-mail.parsed.json | 22 ++ .../core__social-link-mail.serialized.html | 3 + .../blocks/core__social-link-mastodon.html | 3 + .../blocks/core__social-link-mastodon.json | 13 ++ .../core__social-link-mastodon.parsed.json | 22 ++ ...core__social-link-mastodon.serialized.html | 3 + .../blocks/core__social-link-medium.html | 3 + .../blocks/core__social-link-medium.json | 13 ++ .../core__social-link-medium.parsed.json | 22 ++ .../core__social-link-medium.serialized.html | 3 + .../blocks/core__social-link-pinterest.html | 3 + .../blocks/core__social-link-pinterest.json | 13 ++ .../core__social-link-pinterest.parsed.json | 22 ++ ...ore__social-link-pinterest.serialized.html | 3 + .../blocks/core__social-link-pocket.html | 3 + .../blocks/core__social-link-pocket.json | 13 ++ .../core__social-link-pocket.parsed.json | 22 ++ .../core__social-link-pocket.serialized.html | 3 + .../blocks/core__social-link-reddit.html | 3 + .../blocks/core__social-link-reddit.json | 13 ++ .../core__social-link-reddit.parsed.json | 22 ++ .../core__social-link-reddit.serialized.html | 3 + .../blocks/core__social-link-skype.html | 3 + .../blocks/core__social-link-skype.json | 13 ++ .../core__social-link-skype.parsed.json | 22 ++ .../core__social-link-skype.serialized.html | 3 + .../blocks/core__social-link-snapchat.html | 3 + .../blocks/core__social-link-snapchat.json | 13 ++ .../core__social-link-snapchat.parsed.json | 22 ++ ...core__social-link-snapchat.serialized.html | 3 + .../blocks/core__social-link-soundcloud.html | 3 + .../blocks/core__social-link-soundcloud.json | 13 ++ .../core__social-link-soundcloud.parsed.json | 22 ++ ...re__social-link-soundcloud.serialized.html | 3 + .../blocks/core__social-link-spotify.html | 3 + .../blocks/core__social-link-spotify.json | 13 ++ .../core__social-link-spotify.parsed.json | 22 ++ .../core__social-link-spotify.serialized.html | 3 + .../blocks/core__social-link-tumblr.html | 3 + .../blocks/core__social-link-tumblr.json | 13 ++ .../core__social-link-tumblr.parsed.json | 22 ++ .../core__social-link-tumblr.serialized.html | 3 + .../blocks/core__social-link-twitch.html | 3 + .../blocks/core__social-link-twitch.json | 13 ++ .../core__social-link-twitch.parsed.json | 22 ++ .../core__social-link-twitch.serialized.html | 3 + .../blocks/core__social-link-twitter.html | 3 + .../blocks/core__social-link-twitter.json | 13 ++ .../core__social-link-twitter.parsed.json | 22 ++ .../core__social-link-twitter.serialized.html | 3 + .../blocks/core__social-link-vimeo.html | 3 + .../blocks/core__social-link-vimeo.json | 13 ++ .../core__social-link-vimeo.parsed.json | 22 ++ .../core__social-link-vimeo.serialized.html | 3 + .../fixtures/blocks/core__social-link-vk.html | 3 + .../fixtures/blocks/core__social-link-vk.json | 13 ++ .../blocks/core__social-link-vk.parsed.json | 22 ++ .../core__social-link-vk.serialized.html | 3 + .../blocks/core__social-link-wordpress.html | 3 + .../blocks/core__social-link-wordpress.json | 13 ++ .../core__social-link-wordpress.parsed.json | 22 ++ ...ore__social-link-wordpress.serialized.html | 3 + .../blocks/core__social-link-youtube.html | 3 + .../blocks/core__social-link-youtube.json | 13 ++ .../core__social-link-youtube.parsed.json | 22 ++ .../core__social-link-youtube.serialized.html | 3 + .../fixtures/blocks/core__social-link.html | 3 - .../fixtures/blocks/core__social-link.json | 13 -- .../blocks/core__social-link.parsed.json | 23 -- .../blocks/core__social-link.serialized.html | 3 - .../fixtures/blocks/core__social-links.html | 6 +- .../fixtures/blocks/core__social-links.json | 10 +- .../blocks/core__social-links.parsed.json | 15 +- .../blocks/core__social-links.serialized.html | 6 +- 150 files changed, 1675 insertions(+), 77 deletions(-) create mode 100644 packages/e2e-tests/fixtures/blocks/core__social-link-amazon.html create mode 100644 packages/e2e-tests/fixtures/blocks/core__social-link-amazon.json create mode 100644 packages/e2e-tests/fixtures/blocks/core__social-link-amazon.parsed.json create mode 100644 packages/e2e-tests/fixtures/blocks/core__social-link-amazon.serialized.html create mode 100644 packages/e2e-tests/fixtures/blocks/core__social-link-bandcamp.html create mode 100644 packages/e2e-tests/fixtures/blocks/core__social-link-bandcamp.json create mode 100644 packages/e2e-tests/fixtures/blocks/core__social-link-bandcamp.parsed.json create mode 100644 packages/e2e-tests/fixtures/blocks/core__social-link-bandcamp.serialized.html create mode 100644 packages/e2e-tests/fixtures/blocks/core__social-link-behance.html create mode 100644 packages/e2e-tests/fixtures/blocks/core__social-link-behance.json create mode 100644 packages/e2e-tests/fixtures/blocks/core__social-link-behance.parsed.json create mode 100644 packages/e2e-tests/fixtures/blocks/core__social-link-behance.serialized.html create mode 100644 packages/e2e-tests/fixtures/blocks/core__social-link-chain.html create mode 100644 packages/e2e-tests/fixtures/blocks/core__social-link-chain.json create mode 100644 packages/e2e-tests/fixtures/blocks/core__social-link-chain.parsed.json create mode 100644 packages/e2e-tests/fixtures/blocks/core__social-link-chain.serialized.html create mode 100644 packages/e2e-tests/fixtures/blocks/core__social-link-codepen.html create mode 100644 packages/e2e-tests/fixtures/blocks/core__social-link-codepen.json create mode 100644 packages/e2e-tests/fixtures/blocks/core__social-link-codepen.parsed.json create mode 100644 packages/e2e-tests/fixtures/blocks/core__social-link-codepen.serialized.html create mode 100644 packages/e2e-tests/fixtures/blocks/core__social-link-deviantart.html create mode 100644 packages/e2e-tests/fixtures/blocks/core__social-link-deviantart.json create mode 100644 packages/e2e-tests/fixtures/blocks/core__social-link-deviantart.parsed.json create mode 100644 packages/e2e-tests/fixtures/blocks/core__social-link-deviantart.serialized.html create mode 100644 packages/e2e-tests/fixtures/blocks/core__social-link-dribbble.html create mode 100644 packages/e2e-tests/fixtures/blocks/core__social-link-dribbble.json create mode 100644 packages/e2e-tests/fixtures/blocks/core__social-link-dribbble.parsed.json create mode 100644 packages/e2e-tests/fixtures/blocks/core__social-link-dribbble.serialized.html create mode 100644 packages/e2e-tests/fixtures/blocks/core__social-link-etsy.html create mode 100644 packages/e2e-tests/fixtures/blocks/core__social-link-etsy.json create mode 100644 packages/e2e-tests/fixtures/blocks/core__social-link-etsy.parsed.json create mode 100644 packages/e2e-tests/fixtures/blocks/core__social-link-etsy.serialized.html create mode 100644 packages/e2e-tests/fixtures/blocks/core__social-link-facebook.html create mode 100644 packages/e2e-tests/fixtures/blocks/core__social-link-facebook.json create mode 100644 packages/e2e-tests/fixtures/blocks/core__social-link-facebook.parsed.json create mode 100644 packages/e2e-tests/fixtures/blocks/core__social-link-facebook.serialized.html create mode 100644 packages/e2e-tests/fixtures/blocks/core__social-link-feed.html create mode 100644 packages/e2e-tests/fixtures/blocks/core__social-link-feed.json create mode 100644 packages/e2e-tests/fixtures/blocks/core__social-link-feed.parsed.json create mode 100644 packages/e2e-tests/fixtures/blocks/core__social-link-feed.serialized.html create mode 100644 packages/e2e-tests/fixtures/blocks/core__social-link-fivehundredpx.html create mode 100644 packages/e2e-tests/fixtures/blocks/core__social-link-fivehundredpx.json create mode 100644 packages/e2e-tests/fixtures/blocks/core__social-link-fivehundredpx.parsed.json create mode 100644 packages/e2e-tests/fixtures/blocks/core__social-link-fivehundredpx.serialized.html create mode 100644 packages/e2e-tests/fixtures/blocks/core__social-link-flickr.html create mode 100644 packages/e2e-tests/fixtures/blocks/core__social-link-flickr.json create mode 100644 packages/e2e-tests/fixtures/blocks/core__social-link-flickr.parsed.json create mode 100644 packages/e2e-tests/fixtures/blocks/core__social-link-flickr.serialized.html create mode 100644 packages/e2e-tests/fixtures/blocks/core__social-link-foursquare.html create mode 100644 packages/e2e-tests/fixtures/blocks/core__social-link-foursquare.json create mode 100644 packages/e2e-tests/fixtures/blocks/core__social-link-foursquare.parsed.json create mode 100644 packages/e2e-tests/fixtures/blocks/core__social-link-foursquare.serialized.html create mode 100644 packages/e2e-tests/fixtures/blocks/core__social-link-github.html create mode 100644 packages/e2e-tests/fixtures/blocks/core__social-link-github.json create mode 100644 packages/e2e-tests/fixtures/blocks/core__social-link-github.parsed.json create mode 100644 packages/e2e-tests/fixtures/blocks/core__social-link-github.serialized.html create mode 100644 packages/e2e-tests/fixtures/blocks/core__social-link-goodreads.html create mode 100644 packages/e2e-tests/fixtures/blocks/core__social-link-goodreads.json create mode 100644 packages/e2e-tests/fixtures/blocks/core__social-link-goodreads.parsed.json create mode 100644 packages/e2e-tests/fixtures/blocks/core__social-link-goodreads.serialized.html create mode 100644 packages/e2e-tests/fixtures/blocks/core__social-link-instagram.html create mode 100644 packages/e2e-tests/fixtures/blocks/core__social-link-instagram.json create mode 100644 packages/e2e-tests/fixtures/blocks/core__social-link-instagram.parsed.json create mode 100644 packages/e2e-tests/fixtures/blocks/core__social-link-instagram.serialized.html create mode 100644 packages/e2e-tests/fixtures/blocks/core__social-link-lastfm.html create mode 100644 packages/e2e-tests/fixtures/blocks/core__social-link-lastfm.json create mode 100644 packages/e2e-tests/fixtures/blocks/core__social-link-lastfm.parsed.json create mode 100644 packages/e2e-tests/fixtures/blocks/core__social-link-lastfm.serialized.html create mode 100644 packages/e2e-tests/fixtures/blocks/core__social-link-linkedin.html create mode 100644 packages/e2e-tests/fixtures/blocks/core__social-link-linkedin.json create mode 100644 packages/e2e-tests/fixtures/blocks/core__social-link-linkedin.parsed.json create mode 100644 packages/e2e-tests/fixtures/blocks/core__social-link-linkedin.serialized.html create mode 100644 packages/e2e-tests/fixtures/blocks/core__social-link-mail.html create mode 100644 packages/e2e-tests/fixtures/blocks/core__social-link-mail.json create mode 100644 packages/e2e-tests/fixtures/blocks/core__social-link-mail.parsed.json create mode 100644 packages/e2e-tests/fixtures/blocks/core__social-link-mail.serialized.html create mode 100644 packages/e2e-tests/fixtures/blocks/core__social-link-mastodon.html create mode 100644 packages/e2e-tests/fixtures/blocks/core__social-link-mastodon.json create mode 100644 packages/e2e-tests/fixtures/blocks/core__social-link-mastodon.parsed.json create mode 100644 packages/e2e-tests/fixtures/blocks/core__social-link-mastodon.serialized.html create mode 100644 packages/e2e-tests/fixtures/blocks/core__social-link-medium.html create mode 100644 packages/e2e-tests/fixtures/blocks/core__social-link-medium.json create mode 100644 packages/e2e-tests/fixtures/blocks/core__social-link-medium.parsed.json create mode 100644 packages/e2e-tests/fixtures/blocks/core__social-link-medium.serialized.html create mode 100644 packages/e2e-tests/fixtures/blocks/core__social-link-pinterest.html create mode 100644 packages/e2e-tests/fixtures/blocks/core__social-link-pinterest.json create mode 100644 packages/e2e-tests/fixtures/blocks/core__social-link-pinterest.parsed.json create mode 100644 packages/e2e-tests/fixtures/blocks/core__social-link-pinterest.serialized.html create mode 100644 packages/e2e-tests/fixtures/blocks/core__social-link-pocket.html create mode 100644 packages/e2e-tests/fixtures/blocks/core__social-link-pocket.json create mode 100644 packages/e2e-tests/fixtures/blocks/core__social-link-pocket.parsed.json create mode 100644 packages/e2e-tests/fixtures/blocks/core__social-link-pocket.serialized.html create mode 100644 packages/e2e-tests/fixtures/blocks/core__social-link-reddit.html create mode 100644 packages/e2e-tests/fixtures/blocks/core__social-link-reddit.json create mode 100644 packages/e2e-tests/fixtures/blocks/core__social-link-reddit.parsed.json create mode 100644 packages/e2e-tests/fixtures/blocks/core__social-link-reddit.serialized.html create mode 100644 packages/e2e-tests/fixtures/blocks/core__social-link-skype.html create mode 100644 packages/e2e-tests/fixtures/blocks/core__social-link-skype.json create mode 100644 packages/e2e-tests/fixtures/blocks/core__social-link-skype.parsed.json create mode 100644 packages/e2e-tests/fixtures/blocks/core__social-link-skype.serialized.html create mode 100644 packages/e2e-tests/fixtures/blocks/core__social-link-snapchat.html create mode 100644 packages/e2e-tests/fixtures/blocks/core__social-link-snapchat.json create mode 100644 packages/e2e-tests/fixtures/blocks/core__social-link-snapchat.parsed.json create mode 100644 packages/e2e-tests/fixtures/blocks/core__social-link-snapchat.serialized.html create mode 100644 packages/e2e-tests/fixtures/blocks/core__social-link-soundcloud.html create mode 100644 packages/e2e-tests/fixtures/blocks/core__social-link-soundcloud.json create mode 100644 packages/e2e-tests/fixtures/blocks/core__social-link-soundcloud.parsed.json create mode 100644 packages/e2e-tests/fixtures/blocks/core__social-link-soundcloud.serialized.html create mode 100644 packages/e2e-tests/fixtures/blocks/core__social-link-spotify.html create mode 100644 packages/e2e-tests/fixtures/blocks/core__social-link-spotify.json create mode 100644 packages/e2e-tests/fixtures/blocks/core__social-link-spotify.parsed.json create mode 100644 packages/e2e-tests/fixtures/blocks/core__social-link-spotify.serialized.html create mode 100644 packages/e2e-tests/fixtures/blocks/core__social-link-tumblr.html create mode 100644 packages/e2e-tests/fixtures/blocks/core__social-link-tumblr.json create mode 100644 packages/e2e-tests/fixtures/blocks/core__social-link-tumblr.parsed.json create mode 100644 packages/e2e-tests/fixtures/blocks/core__social-link-tumblr.serialized.html create mode 100644 packages/e2e-tests/fixtures/blocks/core__social-link-twitch.html create mode 100644 packages/e2e-tests/fixtures/blocks/core__social-link-twitch.json create mode 100644 packages/e2e-tests/fixtures/blocks/core__social-link-twitch.parsed.json create mode 100644 packages/e2e-tests/fixtures/blocks/core__social-link-twitch.serialized.html create mode 100644 packages/e2e-tests/fixtures/blocks/core__social-link-twitter.html create mode 100644 packages/e2e-tests/fixtures/blocks/core__social-link-twitter.json create mode 100644 packages/e2e-tests/fixtures/blocks/core__social-link-twitter.parsed.json create mode 100644 packages/e2e-tests/fixtures/blocks/core__social-link-twitter.serialized.html create mode 100644 packages/e2e-tests/fixtures/blocks/core__social-link-vimeo.html create mode 100644 packages/e2e-tests/fixtures/blocks/core__social-link-vimeo.json create mode 100644 packages/e2e-tests/fixtures/blocks/core__social-link-vimeo.parsed.json create mode 100644 packages/e2e-tests/fixtures/blocks/core__social-link-vimeo.serialized.html create mode 100644 packages/e2e-tests/fixtures/blocks/core__social-link-vk.html create mode 100644 packages/e2e-tests/fixtures/blocks/core__social-link-vk.json create mode 100644 packages/e2e-tests/fixtures/blocks/core__social-link-vk.parsed.json create mode 100644 packages/e2e-tests/fixtures/blocks/core__social-link-vk.serialized.html create mode 100644 packages/e2e-tests/fixtures/blocks/core__social-link-wordpress.html create mode 100644 packages/e2e-tests/fixtures/blocks/core__social-link-wordpress.json create mode 100644 packages/e2e-tests/fixtures/blocks/core__social-link-wordpress.parsed.json create mode 100644 packages/e2e-tests/fixtures/blocks/core__social-link-wordpress.serialized.html create mode 100644 packages/e2e-tests/fixtures/blocks/core__social-link-youtube.html create mode 100644 packages/e2e-tests/fixtures/blocks/core__social-link-youtube.json create mode 100644 packages/e2e-tests/fixtures/blocks/core__social-link-youtube.parsed.json create mode 100644 packages/e2e-tests/fixtures/blocks/core__social-link-youtube.serialized.html delete mode 100644 packages/e2e-tests/fixtures/blocks/core__social-link.html delete mode 100644 packages/e2e-tests/fixtures/blocks/core__social-link.json delete mode 100644 packages/e2e-tests/fixtures/blocks/core__social-link.parsed.json delete mode 100644 packages/e2e-tests/fixtures/blocks/core__social-link.serialized.html diff --git a/packages/block-library/src/social-link/index.php b/packages/block-library/src/social-link/index.php index 46454107e79a42..07642fa4919f4e 100644 --- a/packages/block-library/src/social-link/index.php +++ b/packages/block-library/src/social-link/index.php @@ -13,12 +13,12 @@ * @return string Rendered HTML of the referenced block. */ function render_core_social_link( $attributes ) { - $site = ( isset( $attributes[ 'site' ] ) ) ? $attributes['site'] : 'Icon'; - $url = ( isset( $attributes[ 'url' ] ) ) ? $attributes['url'] : false; - - // Don't render a link if there is no URL set + $site = ( isset( $attributes['site'] ) ) ? $attributes['site'] : 'Icon'; + $url = ( isset( $attributes['url'] ) ) ? $attributes['url'] : false; + + // Don't render a link if there is no URL set. if ( ! $url ) { - return ""; + return ''; } $icon = core_social_link_get_icon( $site ); @@ -29,7 +29,8 @@ function render_core_social_link( $attributes ) { * Registers the `core/social-link` blocks. */ function register_block_core_social_link() { - $sites = array( 'amazon', + $sites = array( + 'amazon', 'apple', 'bandcamp', 'behance', @@ -78,12 +79,12 @@ function register_block_core_social_link() { register_block_type( 'core/social-link-' . $site, array( - 'attributes' => array( - 'url' => array( + 'attributes' => array( + 'url' => array( 'type' => 'string', ), 'site' => array( - 'type' => 'string', + 'type' => 'string', 'default' => $site, ), ), @@ -104,7 +105,7 @@ function register_block_core_social_link() { */ function core_social_link_get_icon( $site ) { switch ( $site ) { - + case 'fivehundredpx': return ''; @@ -113,7 +114,7 @@ function core_social_link_get_icon( $site ) { case 'apple': return ''; - + case 'bandcamp': return ''; @@ -224,16 +225,17 @@ function core_social_link_get_icon( $site ) { case 'vk': return ''; - + + // phpcs:disable WordPress.WP.CapitalPDangit.Misspelled case 'wordpress': return ''; - + case 'yelp': return ''; case 'youtube': return ''; - + case 'share': default: return ''; diff --git a/packages/e2e-tests/fixtures/block-transforms.js b/packages/e2e-tests/fixtures/block-transforms.js index 6caeb6a23f8909..e76d3897a912a1 100644 --- a/packages/e2e-tests/fixtures/block-transforms.js +++ b/packages/e2e-tests/fixtures/block-transforms.js @@ -404,11 +404,215 @@ export const EXPECTED_TRANSFORMS = { 'Group', ], }, - 'core__social-link': { - originalBlock: 'Social link', + 'core__social-link-amazon': { availableTransforms: [ 'Group', ], + originalBlock: 'Amazon', + }, + 'core__social-link-bandcamp': { + availableTransforms: [ + 'Group', + ], + originalBlock: 'Bandcamp', + }, + 'core__social-link-behance': { + availableTransforms: [ + 'Group', + ], + originalBlock: 'Behance', + }, + 'core__social-link-chain': { + availableTransforms: [ + 'Group', + ], + originalBlock: 'Link', + }, + 'core__social-link-codepen': { + availableTransforms: [ + 'Group', + ], + originalBlock: 'CodePen', + }, + 'core__social-link-deviantart': { + availableTransforms: [ + 'Group', + ], + originalBlock: 'DeviantArt', + }, + 'core__social-link-dribbble': { + availableTransforms: [ + 'Group', + ], + originalBlock: 'Dribbble', + }, + 'core__social-link-etsy': { + availableTransforms: [ + 'Group', + ], + originalBlock: 'Etsy', + }, + 'core__social-link-facebook': { + availableTransforms: [ + 'Group', + ], + originalBlock: 'Facebook', + }, + 'core__social-link-feed': { + availableTransforms: [ + 'Group', + ], + originalBlock: 'RSS Feed', + }, + 'core__social-link-fivehundredpx': { + availableTransforms: [ + 'Group', + ], + originalBlock: '500px', + }, + 'core__social-link-flickr': { + availableTransforms: [ + 'Group', + ], + originalBlock: 'Flickr', + }, + 'core__social-link-foursquare': { + availableTransforms: [ + 'Group', + ], + originalBlock: 'Foursquare', + }, + 'core__social-link-github': { + availableTransforms: [ + 'Group', + ], + originalBlock: 'Github', + }, + 'core__social-link-goodreads': { + availableTransforms: [ + 'Group', + ], + originalBlock: 'Goodreads', + }, + 'core__social-link-instagram': { + availableTransforms: [ + 'Group', + ], + originalBlock: 'Instagram', + }, + 'core__social-link-lastfm': { + availableTransforms: [ + 'Group', + ], + originalBlock: 'Last.fm', + }, + 'core__social-link-linkedin': { + availableTransforms: [ + 'Group', + ], + originalBlock: 'Linkedin', + }, + 'core__social-link-mail': { + availableTransforms: [ + 'Group', + ], + originalBlock: 'E-mail', + }, + 'core__social-link-mastodon': { + availableTransforms: [ + 'Group', + ], + originalBlock: 'Mastodon', + }, + 'core__social-link-medium': { + availableTransforms: [ + 'Group', + ], + originalBlock: 'Medium', + }, + 'core__social-link-pinterest': { + availableTransforms: [ + 'Group', + ], + originalBlock: 'Pinterest', + }, + 'core__social-link-pocket': { + availableTransforms: [ + 'Group', + ], + originalBlock: 'Pocket', + }, + 'core__social-link-reddit': { + availableTransforms: [ + 'Group', + ], + originalBlock: 'Reddit', + }, + 'core__social-link-skype': { + availableTransforms: [ + 'Group', + ], + originalBlock: 'Skype', + }, + 'core__social-link-snapchat': { + availableTransforms: [ + 'Group', + ], + originalBlock: 'Snapshot', + }, + 'core__social-link-soundcloud': { + availableTransforms: [ + 'Group', + ], + originalBlock: 'Soundcloud', + }, + 'core__social-link-spotify': { + availableTransforms: [ + 'Group', + ], + originalBlock: 'Spotify', + }, + 'core__social-link-tumblr': { + availableTransforms: [ + 'Group', + ], + originalBlock: 'Tumblr', + }, + 'core__social-link-twitch': { + availableTransforms: [ + 'Group', + ], + originalBlock: 'Twitch', + }, + 'core__social-link-twitter': { + availableTransforms: [ + 'Group', + ], + originalBlock: 'Twitter', + }, + 'core__social-link-vimeo': { + availableTransforms: [ + 'Group', + ], + originalBlock: 'Vimeo', + }, + 'core__social-link-vk': { + availableTransforms: [ + 'Group', + ], + originalBlock: 'VK', + }, + 'core__social-link-wordpress': { + availableTransforms: [ + 'Group', + ], + originalBlock: 'WordPress', + }, + 'core__social-link-youtube': { + availableTransforms: [ + 'Group', + ], + originalBlock: 'YouTube', }, 'core__social-links': { originalBlock: 'Social links', diff --git a/packages/e2e-tests/fixtures/blocks/core__social-link-amazon.html b/packages/e2e-tests/fixtures/blocks/core__social-link-amazon.html new file mode 100644 index 00000000000000..2b25bda03be16f --- /dev/null +++ b/packages/e2e-tests/fixtures/blocks/core__social-link-amazon.html @@ -0,0 +1,3 @@ + + + diff --git a/packages/e2e-tests/fixtures/blocks/core__social-link-amazon.json b/packages/e2e-tests/fixtures/blocks/core__social-link-amazon.json new file mode 100644 index 00000000000000..11e7cfc040fcc5 --- /dev/null +++ b/packages/e2e-tests/fixtures/blocks/core__social-link-amazon.json @@ -0,0 +1,13 @@ +[ + { + "clientId": "_clientId_0", + "name": "core/social-link-amazon", + "isValid": true, + "attributes": { + "url": "https://example.com/", + "site": "amazon" + }, + "innerBlocks": [], + "originalContent": "" + } +] diff --git a/packages/e2e-tests/fixtures/blocks/core__social-link-amazon.parsed.json b/packages/e2e-tests/fixtures/blocks/core__social-link-amazon.parsed.json new file mode 100644 index 00000000000000..51d99feed2ece5 --- /dev/null +++ b/packages/e2e-tests/fixtures/blocks/core__social-link-amazon.parsed.json @@ -0,0 +1,22 @@ +[ + { + "blockName": "core/social-link-amazon", + "attrs": { + "url": "https://example.com/" + }, + "innerBlocks": [], + "innerHTML": "\n\n", + "innerContent": [ + "\n\n" + ] + }, + { + "blockName": null, + "attrs": {}, + "innerBlocks": [], + "innerHTML": "\n", + "innerContent": [ + "\n" + ] + } +] diff --git a/packages/e2e-tests/fixtures/blocks/core__social-link-amazon.serialized.html b/packages/e2e-tests/fixtures/blocks/core__social-link-amazon.serialized.html new file mode 100644 index 00000000000000..2b25bda03be16f --- /dev/null +++ b/packages/e2e-tests/fixtures/blocks/core__social-link-amazon.serialized.html @@ -0,0 +1,3 @@ + + + diff --git a/packages/e2e-tests/fixtures/blocks/core__social-link-bandcamp.html b/packages/e2e-tests/fixtures/blocks/core__social-link-bandcamp.html new file mode 100644 index 00000000000000..5d558294087f39 --- /dev/null +++ b/packages/e2e-tests/fixtures/blocks/core__social-link-bandcamp.html @@ -0,0 +1,3 @@ + + + diff --git a/packages/e2e-tests/fixtures/blocks/core__social-link-bandcamp.json b/packages/e2e-tests/fixtures/blocks/core__social-link-bandcamp.json new file mode 100644 index 00000000000000..57e4aa337f84f0 --- /dev/null +++ b/packages/e2e-tests/fixtures/blocks/core__social-link-bandcamp.json @@ -0,0 +1,13 @@ +[ + { + "clientId": "_clientId_0", + "name": "core/social-link-bandcamp", + "isValid": true, + "attributes": { + "url": "https://example.com/", + "site": "bandcamp" + }, + "innerBlocks": [], + "originalContent": "" + } +] diff --git a/packages/e2e-tests/fixtures/blocks/core__social-link-bandcamp.parsed.json b/packages/e2e-tests/fixtures/blocks/core__social-link-bandcamp.parsed.json new file mode 100644 index 00000000000000..17147babe859cc --- /dev/null +++ b/packages/e2e-tests/fixtures/blocks/core__social-link-bandcamp.parsed.json @@ -0,0 +1,22 @@ +[ + { + "blockName": "core/social-link-bandcamp", + "attrs": { + "url": "https://example.com/" + }, + "innerBlocks": [], + "innerHTML": "\n\n", + "innerContent": [ + "\n\n" + ] + }, + { + "blockName": null, + "attrs": {}, + "innerBlocks": [], + "innerHTML": "\n", + "innerContent": [ + "\n" + ] + } +] diff --git a/packages/e2e-tests/fixtures/blocks/core__social-link-bandcamp.serialized.html b/packages/e2e-tests/fixtures/blocks/core__social-link-bandcamp.serialized.html new file mode 100644 index 00000000000000..5d558294087f39 --- /dev/null +++ b/packages/e2e-tests/fixtures/blocks/core__social-link-bandcamp.serialized.html @@ -0,0 +1,3 @@ + + + diff --git a/packages/e2e-tests/fixtures/blocks/core__social-link-behance.html b/packages/e2e-tests/fixtures/blocks/core__social-link-behance.html new file mode 100644 index 00000000000000..fd4146770dd4b7 --- /dev/null +++ b/packages/e2e-tests/fixtures/blocks/core__social-link-behance.html @@ -0,0 +1,3 @@ + + + diff --git a/packages/e2e-tests/fixtures/blocks/core__social-link-behance.json b/packages/e2e-tests/fixtures/blocks/core__social-link-behance.json new file mode 100644 index 00000000000000..ed82e95b856128 --- /dev/null +++ b/packages/e2e-tests/fixtures/blocks/core__social-link-behance.json @@ -0,0 +1,13 @@ +[ + { + "clientId": "_clientId_0", + "name": "core/social-link-behance", + "isValid": true, + "attributes": { + "url": "https://example.com/", + "site": "behance" + }, + "innerBlocks": [], + "originalContent": "" + } +] diff --git a/packages/e2e-tests/fixtures/blocks/core__social-link-behance.parsed.json b/packages/e2e-tests/fixtures/blocks/core__social-link-behance.parsed.json new file mode 100644 index 00000000000000..87e810a8dbb056 --- /dev/null +++ b/packages/e2e-tests/fixtures/blocks/core__social-link-behance.parsed.json @@ -0,0 +1,22 @@ +[ + { + "blockName": "core/social-link-behance", + "attrs": { + "url": "https://example.com/" + }, + "innerBlocks": [], + "innerHTML": "\n\n", + "innerContent": [ + "\n\n" + ] + }, + { + "blockName": null, + "attrs": {}, + "innerBlocks": [], + "innerHTML": "\n", + "innerContent": [ + "\n" + ] + } +] diff --git a/packages/e2e-tests/fixtures/blocks/core__social-link-behance.serialized.html b/packages/e2e-tests/fixtures/blocks/core__social-link-behance.serialized.html new file mode 100644 index 00000000000000..fd4146770dd4b7 --- /dev/null +++ b/packages/e2e-tests/fixtures/blocks/core__social-link-behance.serialized.html @@ -0,0 +1,3 @@ + + + diff --git a/packages/e2e-tests/fixtures/blocks/core__social-link-chain.html b/packages/e2e-tests/fixtures/blocks/core__social-link-chain.html new file mode 100644 index 00000000000000..26b5f83d0e9d35 --- /dev/null +++ b/packages/e2e-tests/fixtures/blocks/core__social-link-chain.html @@ -0,0 +1,3 @@ + + + diff --git a/packages/e2e-tests/fixtures/blocks/core__social-link-chain.json b/packages/e2e-tests/fixtures/blocks/core__social-link-chain.json new file mode 100644 index 00000000000000..b2ab8f8c717420 --- /dev/null +++ b/packages/e2e-tests/fixtures/blocks/core__social-link-chain.json @@ -0,0 +1,13 @@ +[ + { + "clientId": "_clientId_0", + "name": "core/social-link-chain", + "isValid": true, + "attributes": { + "url": "https://example.com/", + "site": "chain" + }, + "innerBlocks": [], + "originalContent": "" + } +] diff --git a/packages/e2e-tests/fixtures/blocks/core__social-link-chain.parsed.json b/packages/e2e-tests/fixtures/blocks/core__social-link-chain.parsed.json new file mode 100644 index 00000000000000..8ae41c8afad568 --- /dev/null +++ b/packages/e2e-tests/fixtures/blocks/core__social-link-chain.parsed.json @@ -0,0 +1,22 @@ +[ + { + "blockName": "core/social-link-chain", + "attrs": { + "url": "https://example.com/" + }, + "innerBlocks": [], + "innerHTML": "\n\n", + "innerContent": [ + "\n\n" + ] + }, + { + "blockName": null, + "attrs": {}, + "innerBlocks": [], + "innerHTML": "\n", + "innerContent": [ + "\n" + ] + } +] diff --git a/packages/e2e-tests/fixtures/blocks/core__social-link-chain.serialized.html b/packages/e2e-tests/fixtures/blocks/core__social-link-chain.serialized.html new file mode 100644 index 00000000000000..26b5f83d0e9d35 --- /dev/null +++ b/packages/e2e-tests/fixtures/blocks/core__social-link-chain.serialized.html @@ -0,0 +1,3 @@ + + + diff --git a/packages/e2e-tests/fixtures/blocks/core__social-link-codepen.html b/packages/e2e-tests/fixtures/blocks/core__social-link-codepen.html new file mode 100644 index 00000000000000..486a866622c6b3 --- /dev/null +++ b/packages/e2e-tests/fixtures/blocks/core__social-link-codepen.html @@ -0,0 +1,3 @@ + + + diff --git a/packages/e2e-tests/fixtures/blocks/core__social-link-codepen.json b/packages/e2e-tests/fixtures/blocks/core__social-link-codepen.json new file mode 100644 index 00000000000000..48b03dcc8001e9 --- /dev/null +++ b/packages/e2e-tests/fixtures/blocks/core__social-link-codepen.json @@ -0,0 +1,13 @@ +[ + { + "clientId": "_clientId_0", + "name": "core/social-link-codepen", + "isValid": true, + "attributes": { + "url": "https://example.com/", + "site": "codepen" + }, + "innerBlocks": [], + "originalContent": "" + } +] diff --git a/packages/e2e-tests/fixtures/blocks/core__social-link-codepen.parsed.json b/packages/e2e-tests/fixtures/blocks/core__social-link-codepen.parsed.json new file mode 100644 index 00000000000000..aeb1f09b9d33ea --- /dev/null +++ b/packages/e2e-tests/fixtures/blocks/core__social-link-codepen.parsed.json @@ -0,0 +1,22 @@ +[ + { + "blockName": "core/social-link-codepen", + "attrs": { + "url": "https://example.com/" + }, + "innerBlocks": [], + "innerHTML": "\n\n", + "innerContent": [ + "\n\n" + ] + }, + { + "blockName": null, + "attrs": {}, + "innerBlocks": [], + "innerHTML": "\n", + "innerContent": [ + "\n" + ] + } +] diff --git a/packages/e2e-tests/fixtures/blocks/core__social-link-codepen.serialized.html b/packages/e2e-tests/fixtures/blocks/core__social-link-codepen.serialized.html new file mode 100644 index 00000000000000..486a866622c6b3 --- /dev/null +++ b/packages/e2e-tests/fixtures/blocks/core__social-link-codepen.serialized.html @@ -0,0 +1,3 @@ + + + diff --git a/packages/e2e-tests/fixtures/blocks/core__social-link-deviantart.html b/packages/e2e-tests/fixtures/blocks/core__social-link-deviantart.html new file mode 100644 index 00000000000000..43b48bfd336615 --- /dev/null +++ b/packages/e2e-tests/fixtures/blocks/core__social-link-deviantart.html @@ -0,0 +1,3 @@ + + + diff --git a/packages/e2e-tests/fixtures/blocks/core__social-link-deviantart.json b/packages/e2e-tests/fixtures/blocks/core__social-link-deviantart.json new file mode 100644 index 00000000000000..f399a0a1b336ed --- /dev/null +++ b/packages/e2e-tests/fixtures/blocks/core__social-link-deviantart.json @@ -0,0 +1,13 @@ +[ + { + "clientId": "_clientId_0", + "name": "core/social-link-deviantart", + "isValid": true, + "attributes": { + "url": "https://example.com/", + "site": "deviantart" + }, + "innerBlocks": [], + "originalContent": "" + } +] diff --git a/packages/e2e-tests/fixtures/blocks/core__social-link-deviantart.parsed.json b/packages/e2e-tests/fixtures/blocks/core__social-link-deviantart.parsed.json new file mode 100644 index 00000000000000..22096e6f33afe8 --- /dev/null +++ b/packages/e2e-tests/fixtures/blocks/core__social-link-deviantart.parsed.json @@ -0,0 +1,22 @@ +[ + { + "blockName": "core/social-link-deviantart", + "attrs": { + "url": "https://example.com/" + }, + "innerBlocks": [], + "innerHTML": "\n\n", + "innerContent": [ + "\n\n" + ] + }, + { + "blockName": null, + "attrs": {}, + "innerBlocks": [], + "innerHTML": "\n", + "innerContent": [ + "\n" + ] + } +] diff --git a/packages/e2e-tests/fixtures/blocks/core__social-link-deviantart.serialized.html b/packages/e2e-tests/fixtures/blocks/core__social-link-deviantart.serialized.html new file mode 100644 index 00000000000000..43b48bfd336615 --- /dev/null +++ b/packages/e2e-tests/fixtures/blocks/core__social-link-deviantart.serialized.html @@ -0,0 +1,3 @@ + + + diff --git a/packages/e2e-tests/fixtures/blocks/core__social-link-dribbble.html b/packages/e2e-tests/fixtures/blocks/core__social-link-dribbble.html new file mode 100644 index 00000000000000..c7041380336eb5 --- /dev/null +++ b/packages/e2e-tests/fixtures/blocks/core__social-link-dribbble.html @@ -0,0 +1,3 @@ + + + diff --git a/packages/e2e-tests/fixtures/blocks/core__social-link-dribbble.json b/packages/e2e-tests/fixtures/blocks/core__social-link-dribbble.json new file mode 100644 index 00000000000000..53d68ac88eb9e9 --- /dev/null +++ b/packages/e2e-tests/fixtures/blocks/core__social-link-dribbble.json @@ -0,0 +1,13 @@ +[ + { + "clientId": "_clientId_0", + "name": "core/social-link-dribbble", + "isValid": true, + "attributes": { + "url": "https://example.com/", + "site": "dribbble" + }, + "innerBlocks": [], + "originalContent": "" + } +] diff --git a/packages/e2e-tests/fixtures/blocks/core__social-link-dribbble.parsed.json b/packages/e2e-tests/fixtures/blocks/core__social-link-dribbble.parsed.json new file mode 100644 index 00000000000000..3a78df0c4550a0 --- /dev/null +++ b/packages/e2e-tests/fixtures/blocks/core__social-link-dribbble.parsed.json @@ -0,0 +1,22 @@ +[ + { + "blockName": "core/social-link-dribbble", + "attrs": { + "url": "https://example.com/" + }, + "innerBlocks": [], + "innerHTML": "\n\n", + "innerContent": [ + "\n\n" + ] + }, + { + "blockName": null, + "attrs": {}, + "innerBlocks": [], + "innerHTML": "\n", + "innerContent": [ + "\n" + ] + } +] diff --git a/packages/e2e-tests/fixtures/blocks/core__social-link-dribbble.serialized.html b/packages/e2e-tests/fixtures/blocks/core__social-link-dribbble.serialized.html new file mode 100644 index 00000000000000..c7041380336eb5 --- /dev/null +++ b/packages/e2e-tests/fixtures/blocks/core__social-link-dribbble.serialized.html @@ -0,0 +1,3 @@ + + + diff --git a/packages/e2e-tests/fixtures/blocks/core__social-link-etsy.html b/packages/e2e-tests/fixtures/blocks/core__social-link-etsy.html new file mode 100644 index 00000000000000..063edb48aaaf5a --- /dev/null +++ b/packages/e2e-tests/fixtures/blocks/core__social-link-etsy.html @@ -0,0 +1,3 @@ + + + diff --git a/packages/e2e-tests/fixtures/blocks/core__social-link-etsy.json b/packages/e2e-tests/fixtures/blocks/core__social-link-etsy.json new file mode 100644 index 00000000000000..486981557cad66 --- /dev/null +++ b/packages/e2e-tests/fixtures/blocks/core__social-link-etsy.json @@ -0,0 +1,13 @@ +[ + { + "clientId": "_clientId_0", + "name": "core/social-link-etsy", + "isValid": true, + "attributes": { + "url": "https://example.com/", + "site": "etsy" + }, + "innerBlocks": [], + "originalContent": "" + } +] diff --git a/packages/e2e-tests/fixtures/blocks/core__social-link-etsy.parsed.json b/packages/e2e-tests/fixtures/blocks/core__social-link-etsy.parsed.json new file mode 100644 index 00000000000000..095ff4114d736a --- /dev/null +++ b/packages/e2e-tests/fixtures/blocks/core__social-link-etsy.parsed.json @@ -0,0 +1,22 @@ +[ + { + "blockName": "core/social-link-etsy", + "attrs": { + "url": "https://example.com/" + }, + "innerBlocks": [], + "innerHTML": "\n\n", + "innerContent": [ + "\n\n" + ] + }, + { + "blockName": null, + "attrs": {}, + "innerBlocks": [], + "innerHTML": "\n", + "innerContent": [ + "\n" + ] + } +] diff --git a/packages/e2e-tests/fixtures/blocks/core__social-link-etsy.serialized.html b/packages/e2e-tests/fixtures/blocks/core__social-link-etsy.serialized.html new file mode 100644 index 00000000000000..063edb48aaaf5a --- /dev/null +++ b/packages/e2e-tests/fixtures/blocks/core__social-link-etsy.serialized.html @@ -0,0 +1,3 @@ + + + diff --git a/packages/e2e-tests/fixtures/blocks/core__social-link-facebook.html b/packages/e2e-tests/fixtures/blocks/core__social-link-facebook.html new file mode 100644 index 00000000000000..50608923285b3a --- /dev/null +++ b/packages/e2e-tests/fixtures/blocks/core__social-link-facebook.html @@ -0,0 +1,3 @@ + + + diff --git a/packages/e2e-tests/fixtures/blocks/core__social-link-facebook.json b/packages/e2e-tests/fixtures/blocks/core__social-link-facebook.json new file mode 100644 index 00000000000000..a9e807ed94030e --- /dev/null +++ b/packages/e2e-tests/fixtures/blocks/core__social-link-facebook.json @@ -0,0 +1,13 @@ +[ + { + "clientId": "_clientId_0", + "name": "core/social-link-facebook", + "isValid": true, + "attributes": { + "url": "https://example.com/", + "site": "facebook" + }, + "innerBlocks": [], + "originalContent": "" + } +] diff --git a/packages/e2e-tests/fixtures/blocks/core__social-link-facebook.parsed.json b/packages/e2e-tests/fixtures/blocks/core__social-link-facebook.parsed.json new file mode 100644 index 00000000000000..94dd87257310b9 --- /dev/null +++ b/packages/e2e-tests/fixtures/blocks/core__social-link-facebook.parsed.json @@ -0,0 +1,22 @@ +[ + { + "blockName": "core/social-link-facebook", + "attrs": { + "url": "https://example.com/" + }, + "innerBlocks": [], + "innerHTML": "\n\n", + "innerContent": [ + "\n\n" + ] + }, + { + "blockName": null, + "attrs": {}, + "innerBlocks": [], + "innerHTML": "\n", + "innerContent": [ + "\n" + ] + } +] diff --git a/packages/e2e-tests/fixtures/blocks/core__social-link-facebook.serialized.html b/packages/e2e-tests/fixtures/blocks/core__social-link-facebook.serialized.html new file mode 100644 index 00000000000000..50608923285b3a --- /dev/null +++ b/packages/e2e-tests/fixtures/blocks/core__social-link-facebook.serialized.html @@ -0,0 +1,3 @@ + + + diff --git a/packages/e2e-tests/fixtures/blocks/core__social-link-feed.html b/packages/e2e-tests/fixtures/blocks/core__social-link-feed.html new file mode 100644 index 00000000000000..5bb47130ca5a0a --- /dev/null +++ b/packages/e2e-tests/fixtures/blocks/core__social-link-feed.html @@ -0,0 +1,3 @@ + + + diff --git a/packages/e2e-tests/fixtures/blocks/core__social-link-feed.json b/packages/e2e-tests/fixtures/blocks/core__social-link-feed.json new file mode 100644 index 00000000000000..fccc3df11c2e27 --- /dev/null +++ b/packages/e2e-tests/fixtures/blocks/core__social-link-feed.json @@ -0,0 +1,13 @@ +[ + { + "clientId": "_clientId_0", + "name": "core/social-link-feed", + "isValid": true, + "attributes": { + "url": "https://example.com/", + "site": "feed" + }, + "innerBlocks": [], + "originalContent": "" + } +] diff --git a/packages/e2e-tests/fixtures/blocks/core__social-link-feed.parsed.json b/packages/e2e-tests/fixtures/blocks/core__social-link-feed.parsed.json new file mode 100644 index 00000000000000..c104a8e78c2794 --- /dev/null +++ b/packages/e2e-tests/fixtures/blocks/core__social-link-feed.parsed.json @@ -0,0 +1,22 @@ +[ + { + "blockName": "core/social-link-feed", + "attrs": { + "url": "https://example.com/" + }, + "innerBlocks": [], + "innerHTML": "\n\n", + "innerContent": [ + "\n\n" + ] + }, + { + "blockName": null, + "attrs": {}, + "innerBlocks": [], + "innerHTML": "\n", + "innerContent": [ + "\n" + ] + } +] diff --git a/packages/e2e-tests/fixtures/blocks/core__social-link-feed.serialized.html b/packages/e2e-tests/fixtures/blocks/core__social-link-feed.serialized.html new file mode 100644 index 00000000000000..5bb47130ca5a0a --- /dev/null +++ b/packages/e2e-tests/fixtures/blocks/core__social-link-feed.serialized.html @@ -0,0 +1,3 @@ + + + diff --git a/packages/e2e-tests/fixtures/blocks/core__social-link-fivehundredpx.html b/packages/e2e-tests/fixtures/blocks/core__social-link-fivehundredpx.html new file mode 100644 index 00000000000000..afcdf3976c66e8 --- /dev/null +++ b/packages/e2e-tests/fixtures/blocks/core__social-link-fivehundredpx.html @@ -0,0 +1,3 @@ + + + diff --git a/packages/e2e-tests/fixtures/blocks/core__social-link-fivehundredpx.json b/packages/e2e-tests/fixtures/blocks/core__social-link-fivehundredpx.json new file mode 100644 index 00000000000000..c677ee39834f93 --- /dev/null +++ b/packages/e2e-tests/fixtures/blocks/core__social-link-fivehundredpx.json @@ -0,0 +1,13 @@ +[ + { + "clientId": "_clientId_0", + "name": "core/social-link-fivehundredpx", + "isValid": true, + "attributes": { + "url": "https://example.com/", + "site": "fivehundredpx" + }, + "innerBlocks": [], + "originalContent": "" + } +] diff --git a/packages/e2e-tests/fixtures/blocks/core__social-link-fivehundredpx.parsed.json b/packages/e2e-tests/fixtures/blocks/core__social-link-fivehundredpx.parsed.json new file mode 100644 index 00000000000000..b080e87ece4925 --- /dev/null +++ b/packages/e2e-tests/fixtures/blocks/core__social-link-fivehundredpx.parsed.json @@ -0,0 +1,22 @@ +[ + { + "blockName": "core/social-link-fivehundredpx", + "attrs": { + "url": "https://example.com/" + }, + "innerBlocks": [], + "innerHTML": "\n\n", + "innerContent": [ + "\n\n" + ] + }, + { + "blockName": null, + "attrs": {}, + "innerBlocks": [], + "innerHTML": "\n", + "innerContent": [ + "\n" + ] + } +] diff --git a/packages/e2e-tests/fixtures/blocks/core__social-link-fivehundredpx.serialized.html b/packages/e2e-tests/fixtures/blocks/core__social-link-fivehundredpx.serialized.html new file mode 100644 index 00000000000000..afcdf3976c66e8 --- /dev/null +++ b/packages/e2e-tests/fixtures/blocks/core__social-link-fivehundredpx.serialized.html @@ -0,0 +1,3 @@ + + + diff --git a/packages/e2e-tests/fixtures/blocks/core__social-link-flickr.html b/packages/e2e-tests/fixtures/blocks/core__social-link-flickr.html new file mode 100644 index 00000000000000..30cce7aa92e936 --- /dev/null +++ b/packages/e2e-tests/fixtures/blocks/core__social-link-flickr.html @@ -0,0 +1,3 @@ + + + diff --git a/packages/e2e-tests/fixtures/blocks/core__social-link-flickr.json b/packages/e2e-tests/fixtures/blocks/core__social-link-flickr.json new file mode 100644 index 00000000000000..f565d40cd9e06d --- /dev/null +++ b/packages/e2e-tests/fixtures/blocks/core__social-link-flickr.json @@ -0,0 +1,13 @@ +[ + { + "clientId": "_clientId_0", + "name": "core/social-link-flickr", + "isValid": true, + "attributes": { + "url": "https://example.com/", + "site": "flickr" + }, + "innerBlocks": [], + "originalContent": "" + } +] diff --git a/packages/e2e-tests/fixtures/blocks/core__social-link-flickr.parsed.json b/packages/e2e-tests/fixtures/blocks/core__social-link-flickr.parsed.json new file mode 100644 index 00000000000000..aee44d7afeabf8 --- /dev/null +++ b/packages/e2e-tests/fixtures/blocks/core__social-link-flickr.parsed.json @@ -0,0 +1,22 @@ +[ + { + "blockName": "core/social-link-flickr", + "attrs": { + "url": "https://example.com/" + }, + "innerBlocks": [], + "innerHTML": "\n\n", + "innerContent": [ + "\n\n" + ] + }, + { + "blockName": null, + "attrs": {}, + "innerBlocks": [], + "innerHTML": "\n", + "innerContent": [ + "\n" + ] + } +] diff --git a/packages/e2e-tests/fixtures/blocks/core__social-link-flickr.serialized.html b/packages/e2e-tests/fixtures/blocks/core__social-link-flickr.serialized.html new file mode 100644 index 00000000000000..30cce7aa92e936 --- /dev/null +++ b/packages/e2e-tests/fixtures/blocks/core__social-link-flickr.serialized.html @@ -0,0 +1,3 @@ + + + diff --git a/packages/e2e-tests/fixtures/blocks/core__social-link-foursquare.html b/packages/e2e-tests/fixtures/blocks/core__social-link-foursquare.html new file mode 100644 index 00000000000000..5a0fb7eae8afeb --- /dev/null +++ b/packages/e2e-tests/fixtures/blocks/core__social-link-foursquare.html @@ -0,0 +1,3 @@ + + + diff --git a/packages/e2e-tests/fixtures/blocks/core__social-link-foursquare.json b/packages/e2e-tests/fixtures/blocks/core__social-link-foursquare.json new file mode 100644 index 00000000000000..a8bc34a2b98fd2 --- /dev/null +++ b/packages/e2e-tests/fixtures/blocks/core__social-link-foursquare.json @@ -0,0 +1,13 @@ +[ + { + "clientId": "_clientId_0", + "name": "core/social-link-foursquare", + "isValid": true, + "attributes": { + "url": "https://example.com/", + "site": "foursquare" + }, + "innerBlocks": [], + "originalContent": "" + } +] diff --git a/packages/e2e-tests/fixtures/blocks/core__social-link-foursquare.parsed.json b/packages/e2e-tests/fixtures/blocks/core__social-link-foursquare.parsed.json new file mode 100644 index 00000000000000..9d30170ed8d147 --- /dev/null +++ b/packages/e2e-tests/fixtures/blocks/core__social-link-foursquare.parsed.json @@ -0,0 +1,22 @@ +[ + { + "blockName": "core/social-link-foursquare", + "attrs": { + "url": "https://example.com/" + }, + "innerBlocks": [], + "innerHTML": "\n\n", + "innerContent": [ + "\n\n" + ] + }, + { + "blockName": null, + "attrs": {}, + "innerBlocks": [], + "innerHTML": "\n", + "innerContent": [ + "\n" + ] + } +] diff --git a/packages/e2e-tests/fixtures/blocks/core__social-link-foursquare.serialized.html b/packages/e2e-tests/fixtures/blocks/core__social-link-foursquare.serialized.html new file mode 100644 index 00000000000000..5a0fb7eae8afeb --- /dev/null +++ b/packages/e2e-tests/fixtures/blocks/core__social-link-foursquare.serialized.html @@ -0,0 +1,3 @@ + + + diff --git a/packages/e2e-tests/fixtures/blocks/core__social-link-github.html b/packages/e2e-tests/fixtures/blocks/core__social-link-github.html new file mode 100644 index 00000000000000..ad7a6e59430898 --- /dev/null +++ b/packages/e2e-tests/fixtures/blocks/core__social-link-github.html @@ -0,0 +1,3 @@ + + + diff --git a/packages/e2e-tests/fixtures/blocks/core__social-link-github.json b/packages/e2e-tests/fixtures/blocks/core__social-link-github.json new file mode 100644 index 00000000000000..ba6ca06289d399 --- /dev/null +++ b/packages/e2e-tests/fixtures/blocks/core__social-link-github.json @@ -0,0 +1,13 @@ +[ + { + "clientId": "_clientId_0", + "name": "core/social-link-github", + "isValid": true, + "attributes": { + "url": "https://example.com/", + "site": "github" + }, + "innerBlocks": [], + "originalContent": "" + } +] diff --git a/packages/e2e-tests/fixtures/blocks/core__social-link-github.parsed.json b/packages/e2e-tests/fixtures/blocks/core__social-link-github.parsed.json new file mode 100644 index 00000000000000..05fceb5b3c7633 --- /dev/null +++ b/packages/e2e-tests/fixtures/blocks/core__social-link-github.parsed.json @@ -0,0 +1,22 @@ +[ + { + "blockName": "core/social-link-github", + "attrs": { + "url": "https://example.com/" + }, + "innerBlocks": [], + "innerHTML": "\n\n", + "innerContent": [ + "\n\n" + ] + }, + { + "blockName": null, + "attrs": {}, + "innerBlocks": [], + "innerHTML": "\n", + "innerContent": [ + "\n" + ] + } +] diff --git a/packages/e2e-tests/fixtures/blocks/core__social-link-github.serialized.html b/packages/e2e-tests/fixtures/blocks/core__social-link-github.serialized.html new file mode 100644 index 00000000000000..ad7a6e59430898 --- /dev/null +++ b/packages/e2e-tests/fixtures/blocks/core__social-link-github.serialized.html @@ -0,0 +1,3 @@ + + + diff --git a/packages/e2e-tests/fixtures/blocks/core__social-link-goodreads.html b/packages/e2e-tests/fixtures/blocks/core__social-link-goodreads.html new file mode 100644 index 00000000000000..2efb90d34e2425 --- /dev/null +++ b/packages/e2e-tests/fixtures/blocks/core__social-link-goodreads.html @@ -0,0 +1,3 @@ + + + diff --git a/packages/e2e-tests/fixtures/blocks/core__social-link-goodreads.json b/packages/e2e-tests/fixtures/blocks/core__social-link-goodreads.json new file mode 100644 index 00000000000000..52295e89ea6b9f --- /dev/null +++ b/packages/e2e-tests/fixtures/blocks/core__social-link-goodreads.json @@ -0,0 +1,13 @@ +[ + { + "clientId": "_clientId_0", + "name": "core/social-link-goodreads", + "isValid": true, + "attributes": { + "url": "https://example.com/", + "site": "goodreads" + }, + "innerBlocks": [], + "originalContent": "" + } +] diff --git a/packages/e2e-tests/fixtures/blocks/core__social-link-goodreads.parsed.json b/packages/e2e-tests/fixtures/blocks/core__social-link-goodreads.parsed.json new file mode 100644 index 00000000000000..01d093114f9be6 --- /dev/null +++ b/packages/e2e-tests/fixtures/blocks/core__social-link-goodreads.parsed.json @@ -0,0 +1,22 @@ +[ + { + "blockName": "core/social-link-goodreads", + "attrs": { + "url": "https://example.com/" + }, + "innerBlocks": [], + "innerHTML": "\n\n", + "innerContent": [ + "\n\n" + ] + }, + { + "blockName": null, + "attrs": {}, + "innerBlocks": [], + "innerHTML": "\n", + "innerContent": [ + "\n" + ] + } +] diff --git a/packages/e2e-tests/fixtures/blocks/core__social-link-goodreads.serialized.html b/packages/e2e-tests/fixtures/blocks/core__social-link-goodreads.serialized.html new file mode 100644 index 00000000000000..2efb90d34e2425 --- /dev/null +++ b/packages/e2e-tests/fixtures/blocks/core__social-link-goodreads.serialized.html @@ -0,0 +1,3 @@ + + + diff --git a/packages/e2e-tests/fixtures/blocks/core__social-link-instagram.html b/packages/e2e-tests/fixtures/blocks/core__social-link-instagram.html new file mode 100644 index 00000000000000..5e94045ddbef79 --- /dev/null +++ b/packages/e2e-tests/fixtures/blocks/core__social-link-instagram.html @@ -0,0 +1,3 @@ + + + diff --git a/packages/e2e-tests/fixtures/blocks/core__social-link-instagram.json b/packages/e2e-tests/fixtures/blocks/core__social-link-instagram.json new file mode 100644 index 00000000000000..3a2159dc2f429b --- /dev/null +++ b/packages/e2e-tests/fixtures/blocks/core__social-link-instagram.json @@ -0,0 +1,13 @@ +[ + { + "clientId": "_clientId_0", + "name": "core/social-link-instagram", + "isValid": true, + "attributes": { + "url": "https://example.com/", + "site": "instagram" + }, + "innerBlocks": [], + "originalContent": "" + } +] diff --git a/packages/e2e-tests/fixtures/blocks/core__social-link-instagram.parsed.json b/packages/e2e-tests/fixtures/blocks/core__social-link-instagram.parsed.json new file mode 100644 index 00000000000000..679fe7b56491c4 --- /dev/null +++ b/packages/e2e-tests/fixtures/blocks/core__social-link-instagram.parsed.json @@ -0,0 +1,22 @@ +[ + { + "blockName": "core/social-link-instagram", + "attrs": { + "url": "https://example.com/" + }, + "innerBlocks": [], + "innerHTML": "\n\n", + "innerContent": [ + "\n\n" + ] + }, + { + "blockName": null, + "attrs": {}, + "innerBlocks": [], + "innerHTML": "\n", + "innerContent": [ + "\n" + ] + } +] diff --git a/packages/e2e-tests/fixtures/blocks/core__social-link-instagram.serialized.html b/packages/e2e-tests/fixtures/blocks/core__social-link-instagram.serialized.html new file mode 100644 index 00000000000000..5e94045ddbef79 --- /dev/null +++ b/packages/e2e-tests/fixtures/blocks/core__social-link-instagram.serialized.html @@ -0,0 +1,3 @@ + + + diff --git a/packages/e2e-tests/fixtures/blocks/core__social-link-lastfm.html b/packages/e2e-tests/fixtures/blocks/core__social-link-lastfm.html new file mode 100644 index 00000000000000..ceef91384db46d --- /dev/null +++ b/packages/e2e-tests/fixtures/blocks/core__social-link-lastfm.html @@ -0,0 +1,3 @@ + + + diff --git a/packages/e2e-tests/fixtures/blocks/core__social-link-lastfm.json b/packages/e2e-tests/fixtures/blocks/core__social-link-lastfm.json new file mode 100644 index 00000000000000..8cdf0f469bbfc8 --- /dev/null +++ b/packages/e2e-tests/fixtures/blocks/core__social-link-lastfm.json @@ -0,0 +1,13 @@ +[ + { + "clientId": "_clientId_0", + "name": "core/social-link-lastfm", + "isValid": true, + "attributes": { + "url": "https://example.com/", + "site": "lastfm" + }, + "innerBlocks": [], + "originalContent": "" + } +] diff --git a/packages/e2e-tests/fixtures/blocks/core__social-link-lastfm.parsed.json b/packages/e2e-tests/fixtures/blocks/core__social-link-lastfm.parsed.json new file mode 100644 index 00000000000000..ca5265b4b41a78 --- /dev/null +++ b/packages/e2e-tests/fixtures/blocks/core__social-link-lastfm.parsed.json @@ -0,0 +1,22 @@ +[ + { + "blockName": "core/social-link-lastfm", + "attrs": { + "url": "https://example.com/" + }, + "innerBlocks": [], + "innerHTML": "\n\n", + "innerContent": [ + "\n\n" + ] + }, + { + "blockName": null, + "attrs": {}, + "innerBlocks": [], + "innerHTML": "\n", + "innerContent": [ + "\n" + ] + } +] diff --git a/packages/e2e-tests/fixtures/blocks/core__social-link-lastfm.serialized.html b/packages/e2e-tests/fixtures/blocks/core__social-link-lastfm.serialized.html new file mode 100644 index 00000000000000..ceef91384db46d --- /dev/null +++ b/packages/e2e-tests/fixtures/blocks/core__social-link-lastfm.serialized.html @@ -0,0 +1,3 @@ + + + diff --git a/packages/e2e-tests/fixtures/blocks/core__social-link-linkedin.html b/packages/e2e-tests/fixtures/blocks/core__social-link-linkedin.html new file mode 100644 index 00000000000000..4a89e94a85d3ba --- /dev/null +++ b/packages/e2e-tests/fixtures/blocks/core__social-link-linkedin.html @@ -0,0 +1,3 @@ + + + diff --git a/packages/e2e-tests/fixtures/blocks/core__social-link-linkedin.json b/packages/e2e-tests/fixtures/blocks/core__social-link-linkedin.json new file mode 100644 index 00000000000000..b5ed7764f8a154 --- /dev/null +++ b/packages/e2e-tests/fixtures/blocks/core__social-link-linkedin.json @@ -0,0 +1,13 @@ +[ + { + "clientId": "_clientId_0", + "name": "core/social-link-linkedin", + "isValid": true, + "attributes": { + "url": "https://example.com/", + "site": "linkedin" + }, + "innerBlocks": [], + "originalContent": "" + } +] diff --git a/packages/e2e-tests/fixtures/blocks/core__social-link-linkedin.parsed.json b/packages/e2e-tests/fixtures/blocks/core__social-link-linkedin.parsed.json new file mode 100644 index 00000000000000..7bf513eac4bf5f --- /dev/null +++ b/packages/e2e-tests/fixtures/blocks/core__social-link-linkedin.parsed.json @@ -0,0 +1,22 @@ +[ + { + "blockName": "core/social-link-linkedin", + "attrs": { + "url": "https://example.com/" + }, + "innerBlocks": [], + "innerHTML": "\n\n", + "innerContent": [ + "\n\n" + ] + }, + { + "blockName": null, + "attrs": {}, + "innerBlocks": [], + "innerHTML": "\n", + "innerContent": [ + "\n" + ] + } +] diff --git a/packages/e2e-tests/fixtures/blocks/core__social-link-linkedin.serialized.html b/packages/e2e-tests/fixtures/blocks/core__social-link-linkedin.serialized.html new file mode 100644 index 00000000000000..4a89e94a85d3ba --- /dev/null +++ b/packages/e2e-tests/fixtures/blocks/core__social-link-linkedin.serialized.html @@ -0,0 +1,3 @@ + + + diff --git a/packages/e2e-tests/fixtures/blocks/core__social-link-mail.html b/packages/e2e-tests/fixtures/blocks/core__social-link-mail.html new file mode 100644 index 00000000000000..aec8e4fe8d65ab --- /dev/null +++ b/packages/e2e-tests/fixtures/blocks/core__social-link-mail.html @@ -0,0 +1,3 @@ + + + diff --git a/packages/e2e-tests/fixtures/blocks/core__social-link-mail.json b/packages/e2e-tests/fixtures/blocks/core__social-link-mail.json new file mode 100644 index 00000000000000..f68344318d8202 --- /dev/null +++ b/packages/e2e-tests/fixtures/blocks/core__social-link-mail.json @@ -0,0 +1,13 @@ +[ + { + "clientId": "_clientId_0", + "name": "core/social-link-mail", + "isValid": true, + "attributes": { + "url": "https://example.com/", + "site": "mail" + }, + "innerBlocks": [], + "originalContent": "" + } +] diff --git a/packages/e2e-tests/fixtures/blocks/core__social-link-mail.parsed.json b/packages/e2e-tests/fixtures/blocks/core__social-link-mail.parsed.json new file mode 100644 index 00000000000000..3ebb3c9b4c27d0 --- /dev/null +++ b/packages/e2e-tests/fixtures/blocks/core__social-link-mail.parsed.json @@ -0,0 +1,22 @@ +[ + { + "blockName": "core/social-link-mail", + "attrs": { + "url": "https://example.com/" + }, + "innerBlocks": [], + "innerHTML": "\n\n", + "innerContent": [ + "\n\n" + ] + }, + { + "blockName": null, + "attrs": {}, + "innerBlocks": [], + "innerHTML": "\n", + "innerContent": [ + "\n" + ] + } +] diff --git a/packages/e2e-tests/fixtures/blocks/core__social-link-mail.serialized.html b/packages/e2e-tests/fixtures/blocks/core__social-link-mail.serialized.html new file mode 100644 index 00000000000000..aec8e4fe8d65ab --- /dev/null +++ b/packages/e2e-tests/fixtures/blocks/core__social-link-mail.serialized.html @@ -0,0 +1,3 @@ + + + diff --git a/packages/e2e-tests/fixtures/blocks/core__social-link-mastodon.html b/packages/e2e-tests/fixtures/blocks/core__social-link-mastodon.html new file mode 100644 index 00000000000000..9ae04174affdbe --- /dev/null +++ b/packages/e2e-tests/fixtures/blocks/core__social-link-mastodon.html @@ -0,0 +1,3 @@ + + + diff --git a/packages/e2e-tests/fixtures/blocks/core__social-link-mastodon.json b/packages/e2e-tests/fixtures/blocks/core__social-link-mastodon.json new file mode 100644 index 00000000000000..e2170c5fc94899 --- /dev/null +++ b/packages/e2e-tests/fixtures/blocks/core__social-link-mastodon.json @@ -0,0 +1,13 @@ +[ + { + "clientId": "_clientId_0", + "name": "core/social-link-mastodon", + "isValid": true, + "attributes": { + "url": "https://example.com/", + "site": "mastodon" + }, + "innerBlocks": [], + "originalContent": "" + } +] diff --git a/packages/e2e-tests/fixtures/blocks/core__social-link-mastodon.parsed.json b/packages/e2e-tests/fixtures/blocks/core__social-link-mastodon.parsed.json new file mode 100644 index 00000000000000..b2c6413458ac1d --- /dev/null +++ b/packages/e2e-tests/fixtures/blocks/core__social-link-mastodon.parsed.json @@ -0,0 +1,22 @@ +[ + { + "blockName": "core/social-link-mastodon", + "attrs": { + "url": "https://example.com/" + }, + "innerBlocks": [], + "innerHTML": "\n\n", + "innerContent": [ + "\n\n" + ] + }, + { + "blockName": null, + "attrs": {}, + "innerBlocks": [], + "innerHTML": "\n", + "innerContent": [ + "\n" + ] + } +] diff --git a/packages/e2e-tests/fixtures/blocks/core__social-link-mastodon.serialized.html b/packages/e2e-tests/fixtures/blocks/core__social-link-mastodon.serialized.html new file mode 100644 index 00000000000000..9ae04174affdbe --- /dev/null +++ b/packages/e2e-tests/fixtures/blocks/core__social-link-mastodon.serialized.html @@ -0,0 +1,3 @@ + + + diff --git a/packages/e2e-tests/fixtures/blocks/core__social-link-medium.html b/packages/e2e-tests/fixtures/blocks/core__social-link-medium.html new file mode 100644 index 00000000000000..7509f90fbabac7 --- /dev/null +++ b/packages/e2e-tests/fixtures/blocks/core__social-link-medium.html @@ -0,0 +1,3 @@ + + + diff --git a/packages/e2e-tests/fixtures/blocks/core__social-link-medium.json b/packages/e2e-tests/fixtures/blocks/core__social-link-medium.json new file mode 100644 index 00000000000000..649b5e59a5ab8f --- /dev/null +++ b/packages/e2e-tests/fixtures/blocks/core__social-link-medium.json @@ -0,0 +1,13 @@ +[ + { + "clientId": "_clientId_0", + "name": "core/social-link-medium", + "isValid": true, + "attributes": { + "url": "https://example.com/", + "site": "medium" + }, + "innerBlocks": [], + "originalContent": "" + } +] diff --git a/packages/e2e-tests/fixtures/blocks/core__social-link-medium.parsed.json b/packages/e2e-tests/fixtures/blocks/core__social-link-medium.parsed.json new file mode 100644 index 00000000000000..28339189648e24 --- /dev/null +++ b/packages/e2e-tests/fixtures/blocks/core__social-link-medium.parsed.json @@ -0,0 +1,22 @@ +[ + { + "blockName": "core/social-link-medium", + "attrs": { + "url": "https://example.com/" + }, + "innerBlocks": [], + "innerHTML": "\n\n", + "innerContent": [ + "\n\n" + ] + }, + { + "blockName": null, + "attrs": {}, + "innerBlocks": [], + "innerHTML": "\n", + "innerContent": [ + "\n" + ] + } +] diff --git a/packages/e2e-tests/fixtures/blocks/core__social-link-medium.serialized.html b/packages/e2e-tests/fixtures/blocks/core__social-link-medium.serialized.html new file mode 100644 index 00000000000000..7509f90fbabac7 --- /dev/null +++ b/packages/e2e-tests/fixtures/blocks/core__social-link-medium.serialized.html @@ -0,0 +1,3 @@ + + + diff --git a/packages/e2e-tests/fixtures/blocks/core__social-link-pinterest.html b/packages/e2e-tests/fixtures/blocks/core__social-link-pinterest.html new file mode 100644 index 00000000000000..70de6c7db96c19 --- /dev/null +++ b/packages/e2e-tests/fixtures/blocks/core__social-link-pinterest.html @@ -0,0 +1,3 @@ + + + diff --git a/packages/e2e-tests/fixtures/blocks/core__social-link-pinterest.json b/packages/e2e-tests/fixtures/blocks/core__social-link-pinterest.json new file mode 100644 index 00000000000000..832d7ea7a706bd --- /dev/null +++ b/packages/e2e-tests/fixtures/blocks/core__social-link-pinterest.json @@ -0,0 +1,13 @@ +[ + { + "clientId": "_clientId_0", + "name": "core/social-link-pinterest", + "isValid": true, + "attributes": { + "url": "https://example.com/", + "site": "pinterest" + }, + "innerBlocks": [], + "originalContent": "" + } +] diff --git a/packages/e2e-tests/fixtures/blocks/core__social-link-pinterest.parsed.json b/packages/e2e-tests/fixtures/blocks/core__social-link-pinterest.parsed.json new file mode 100644 index 00000000000000..50d45331e2c1b4 --- /dev/null +++ b/packages/e2e-tests/fixtures/blocks/core__social-link-pinterest.parsed.json @@ -0,0 +1,22 @@ +[ + { + "blockName": "core/social-link-pinterest", + "attrs": { + "url": "https://example.com/" + }, + "innerBlocks": [], + "innerHTML": "\n\n", + "innerContent": [ + "\n\n" + ] + }, + { + "blockName": null, + "attrs": {}, + "innerBlocks": [], + "innerHTML": "\n", + "innerContent": [ + "\n" + ] + } +] diff --git a/packages/e2e-tests/fixtures/blocks/core__social-link-pinterest.serialized.html b/packages/e2e-tests/fixtures/blocks/core__social-link-pinterest.serialized.html new file mode 100644 index 00000000000000..70de6c7db96c19 --- /dev/null +++ b/packages/e2e-tests/fixtures/blocks/core__social-link-pinterest.serialized.html @@ -0,0 +1,3 @@ + + + diff --git a/packages/e2e-tests/fixtures/blocks/core__social-link-pocket.html b/packages/e2e-tests/fixtures/blocks/core__social-link-pocket.html new file mode 100644 index 00000000000000..0d048b81b1f127 --- /dev/null +++ b/packages/e2e-tests/fixtures/blocks/core__social-link-pocket.html @@ -0,0 +1,3 @@ + + + diff --git a/packages/e2e-tests/fixtures/blocks/core__social-link-pocket.json b/packages/e2e-tests/fixtures/blocks/core__social-link-pocket.json new file mode 100644 index 00000000000000..074fa2154c0912 --- /dev/null +++ b/packages/e2e-tests/fixtures/blocks/core__social-link-pocket.json @@ -0,0 +1,13 @@ +[ + { + "clientId": "_clientId_0", + "name": "core/social-link-pocket", + "isValid": true, + "attributes": { + "url": "https://example.com/", + "site": "pocket" + }, + "innerBlocks": [], + "originalContent": "" + } +] diff --git a/packages/e2e-tests/fixtures/blocks/core__social-link-pocket.parsed.json b/packages/e2e-tests/fixtures/blocks/core__social-link-pocket.parsed.json new file mode 100644 index 00000000000000..3c717f87dbf038 --- /dev/null +++ b/packages/e2e-tests/fixtures/blocks/core__social-link-pocket.parsed.json @@ -0,0 +1,22 @@ +[ + { + "blockName": "core/social-link-pocket", + "attrs": { + "url": "https://example.com/" + }, + "innerBlocks": [], + "innerHTML": "\n\n", + "innerContent": [ + "\n\n" + ] + }, + { + "blockName": null, + "attrs": {}, + "innerBlocks": [], + "innerHTML": "\n", + "innerContent": [ + "\n" + ] + } +] diff --git a/packages/e2e-tests/fixtures/blocks/core__social-link-pocket.serialized.html b/packages/e2e-tests/fixtures/blocks/core__social-link-pocket.serialized.html new file mode 100644 index 00000000000000..0d048b81b1f127 --- /dev/null +++ b/packages/e2e-tests/fixtures/blocks/core__social-link-pocket.serialized.html @@ -0,0 +1,3 @@ + + + diff --git a/packages/e2e-tests/fixtures/blocks/core__social-link-reddit.html b/packages/e2e-tests/fixtures/blocks/core__social-link-reddit.html new file mode 100644 index 00000000000000..3fe18dc549040c --- /dev/null +++ b/packages/e2e-tests/fixtures/blocks/core__social-link-reddit.html @@ -0,0 +1,3 @@ + + + diff --git a/packages/e2e-tests/fixtures/blocks/core__social-link-reddit.json b/packages/e2e-tests/fixtures/blocks/core__social-link-reddit.json new file mode 100644 index 00000000000000..d4018f314f1800 --- /dev/null +++ b/packages/e2e-tests/fixtures/blocks/core__social-link-reddit.json @@ -0,0 +1,13 @@ +[ + { + "clientId": "_clientId_0", + "name": "core/social-link-reddit", + "isValid": true, + "attributes": { + "url": "https://example.com/", + "site": "reddit" + }, + "innerBlocks": [], + "originalContent": "" + } +] diff --git a/packages/e2e-tests/fixtures/blocks/core__social-link-reddit.parsed.json b/packages/e2e-tests/fixtures/blocks/core__social-link-reddit.parsed.json new file mode 100644 index 00000000000000..71d0de5f1b140b --- /dev/null +++ b/packages/e2e-tests/fixtures/blocks/core__social-link-reddit.parsed.json @@ -0,0 +1,22 @@ +[ + { + "blockName": "core/social-link-reddit", + "attrs": { + "url": "https://example.com/" + }, + "innerBlocks": [], + "innerHTML": "\n\n", + "innerContent": [ + "\n\n" + ] + }, + { + "blockName": null, + "attrs": {}, + "innerBlocks": [], + "innerHTML": "\n", + "innerContent": [ + "\n" + ] + } +] diff --git a/packages/e2e-tests/fixtures/blocks/core__social-link-reddit.serialized.html b/packages/e2e-tests/fixtures/blocks/core__social-link-reddit.serialized.html new file mode 100644 index 00000000000000..3fe18dc549040c --- /dev/null +++ b/packages/e2e-tests/fixtures/blocks/core__social-link-reddit.serialized.html @@ -0,0 +1,3 @@ + + + diff --git a/packages/e2e-tests/fixtures/blocks/core__social-link-skype.html b/packages/e2e-tests/fixtures/blocks/core__social-link-skype.html new file mode 100644 index 00000000000000..ad6a81b210c7ed --- /dev/null +++ b/packages/e2e-tests/fixtures/blocks/core__social-link-skype.html @@ -0,0 +1,3 @@ + + + diff --git a/packages/e2e-tests/fixtures/blocks/core__social-link-skype.json b/packages/e2e-tests/fixtures/blocks/core__social-link-skype.json new file mode 100644 index 00000000000000..363cecde53d459 --- /dev/null +++ b/packages/e2e-tests/fixtures/blocks/core__social-link-skype.json @@ -0,0 +1,13 @@ +[ + { + "clientId": "_clientId_0", + "name": "core/social-link-skype", + "isValid": true, + "attributes": { + "url": "https://example.com/", + "site": "skype" + }, + "innerBlocks": [], + "originalContent": "" + } +] diff --git a/packages/e2e-tests/fixtures/blocks/core__social-link-skype.parsed.json b/packages/e2e-tests/fixtures/blocks/core__social-link-skype.parsed.json new file mode 100644 index 00000000000000..db9c0fe307f779 --- /dev/null +++ b/packages/e2e-tests/fixtures/blocks/core__social-link-skype.parsed.json @@ -0,0 +1,22 @@ +[ + { + "blockName": "core/social-link-skype", + "attrs": { + "url": "https://example.com/" + }, + "innerBlocks": [], + "innerHTML": "\n\n", + "innerContent": [ + "\n\n" + ] + }, + { + "blockName": null, + "attrs": {}, + "innerBlocks": [], + "innerHTML": "\n", + "innerContent": [ + "\n" + ] + } +] diff --git a/packages/e2e-tests/fixtures/blocks/core__social-link-skype.serialized.html b/packages/e2e-tests/fixtures/blocks/core__social-link-skype.serialized.html new file mode 100644 index 00000000000000..ad6a81b210c7ed --- /dev/null +++ b/packages/e2e-tests/fixtures/blocks/core__social-link-skype.serialized.html @@ -0,0 +1,3 @@ + + + diff --git a/packages/e2e-tests/fixtures/blocks/core__social-link-snapchat.html b/packages/e2e-tests/fixtures/blocks/core__social-link-snapchat.html new file mode 100644 index 00000000000000..25b2d51ece3a1b --- /dev/null +++ b/packages/e2e-tests/fixtures/blocks/core__social-link-snapchat.html @@ -0,0 +1,3 @@ + + + diff --git a/packages/e2e-tests/fixtures/blocks/core__social-link-snapchat.json b/packages/e2e-tests/fixtures/blocks/core__social-link-snapchat.json new file mode 100644 index 00000000000000..64382a0acd7feb --- /dev/null +++ b/packages/e2e-tests/fixtures/blocks/core__social-link-snapchat.json @@ -0,0 +1,13 @@ +[ + { + "clientId": "_clientId_0", + "name": "core/social-link-snapchat", + "isValid": true, + "attributes": { + "url": "https://example.com/", + "site": "snapchat" + }, + "innerBlocks": [], + "originalContent": "" + } +] diff --git a/packages/e2e-tests/fixtures/blocks/core__social-link-snapchat.parsed.json b/packages/e2e-tests/fixtures/blocks/core__social-link-snapchat.parsed.json new file mode 100644 index 00000000000000..1e121a457fc4a7 --- /dev/null +++ b/packages/e2e-tests/fixtures/blocks/core__social-link-snapchat.parsed.json @@ -0,0 +1,22 @@ +[ + { + "blockName": "core/social-link-snapchat", + "attrs": { + "url": "https://example.com/" + }, + "innerBlocks": [], + "innerHTML": "\n\n", + "innerContent": [ + "\n\n" + ] + }, + { + "blockName": null, + "attrs": {}, + "innerBlocks": [], + "innerHTML": "\n", + "innerContent": [ + "\n" + ] + } +] diff --git a/packages/e2e-tests/fixtures/blocks/core__social-link-snapchat.serialized.html b/packages/e2e-tests/fixtures/blocks/core__social-link-snapchat.serialized.html new file mode 100644 index 00000000000000..25b2d51ece3a1b --- /dev/null +++ b/packages/e2e-tests/fixtures/blocks/core__social-link-snapchat.serialized.html @@ -0,0 +1,3 @@ + + + diff --git a/packages/e2e-tests/fixtures/blocks/core__social-link-soundcloud.html b/packages/e2e-tests/fixtures/blocks/core__social-link-soundcloud.html new file mode 100644 index 00000000000000..259e9e73d72ce5 --- /dev/null +++ b/packages/e2e-tests/fixtures/blocks/core__social-link-soundcloud.html @@ -0,0 +1,3 @@ + + + diff --git a/packages/e2e-tests/fixtures/blocks/core__social-link-soundcloud.json b/packages/e2e-tests/fixtures/blocks/core__social-link-soundcloud.json new file mode 100644 index 00000000000000..f9717e76ab390c --- /dev/null +++ b/packages/e2e-tests/fixtures/blocks/core__social-link-soundcloud.json @@ -0,0 +1,13 @@ +[ + { + "clientId": "_clientId_0", + "name": "core/social-link-soundcloud", + "isValid": true, + "attributes": { + "url": "https://example.com/", + "site": "soundcloud" + }, + "innerBlocks": [], + "originalContent": "" + } +] diff --git a/packages/e2e-tests/fixtures/blocks/core__social-link-soundcloud.parsed.json b/packages/e2e-tests/fixtures/blocks/core__social-link-soundcloud.parsed.json new file mode 100644 index 00000000000000..ef3d0a905b41fe --- /dev/null +++ b/packages/e2e-tests/fixtures/blocks/core__social-link-soundcloud.parsed.json @@ -0,0 +1,22 @@ +[ + { + "blockName": "core/social-link-soundcloud", + "attrs": { + "url": "https://example.com/" + }, + "innerBlocks": [], + "innerHTML": "\n\n", + "innerContent": [ + "\n\n" + ] + }, + { + "blockName": null, + "attrs": {}, + "innerBlocks": [], + "innerHTML": "\n", + "innerContent": [ + "\n" + ] + } +] diff --git a/packages/e2e-tests/fixtures/blocks/core__social-link-soundcloud.serialized.html b/packages/e2e-tests/fixtures/blocks/core__social-link-soundcloud.serialized.html new file mode 100644 index 00000000000000..259e9e73d72ce5 --- /dev/null +++ b/packages/e2e-tests/fixtures/blocks/core__social-link-soundcloud.serialized.html @@ -0,0 +1,3 @@ + + + diff --git a/packages/e2e-tests/fixtures/blocks/core__social-link-spotify.html b/packages/e2e-tests/fixtures/blocks/core__social-link-spotify.html new file mode 100644 index 00000000000000..f9ee8d6e9d6698 --- /dev/null +++ b/packages/e2e-tests/fixtures/blocks/core__social-link-spotify.html @@ -0,0 +1,3 @@ + + + diff --git a/packages/e2e-tests/fixtures/blocks/core__social-link-spotify.json b/packages/e2e-tests/fixtures/blocks/core__social-link-spotify.json new file mode 100644 index 00000000000000..941cb39db08c70 --- /dev/null +++ b/packages/e2e-tests/fixtures/blocks/core__social-link-spotify.json @@ -0,0 +1,13 @@ +[ + { + "clientId": "_clientId_0", + "name": "core/social-link-spotify", + "isValid": true, + "attributes": { + "url": "https://example.com/", + "site": "spotify" + }, + "innerBlocks": [], + "originalContent": "" + } +] diff --git a/packages/e2e-tests/fixtures/blocks/core__social-link-spotify.parsed.json b/packages/e2e-tests/fixtures/blocks/core__social-link-spotify.parsed.json new file mode 100644 index 00000000000000..3a89054176dd30 --- /dev/null +++ b/packages/e2e-tests/fixtures/blocks/core__social-link-spotify.parsed.json @@ -0,0 +1,22 @@ +[ + { + "blockName": "core/social-link-spotify", + "attrs": { + "url": "https://example.com/" + }, + "innerBlocks": [], + "innerHTML": "\n\n", + "innerContent": [ + "\n\n" + ] + }, + { + "blockName": null, + "attrs": {}, + "innerBlocks": [], + "innerHTML": "\n", + "innerContent": [ + "\n" + ] + } +] diff --git a/packages/e2e-tests/fixtures/blocks/core__social-link-spotify.serialized.html b/packages/e2e-tests/fixtures/blocks/core__social-link-spotify.serialized.html new file mode 100644 index 00000000000000..f9ee8d6e9d6698 --- /dev/null +++ b/packages/e2e-tests/fixtures/blocks/core__social-link-spotify.serialized.html @@ -0,0 +1,3 @@ + + + diff --git a/packages/e2e-tests/fixtures/blocks/core__social-link-tumblr.html b/packages/e2e-tests/fixtures/blocks/core__social-link-tumblr.html new file mode 100644 index 00000000000000..c667e5a4d15460 --- /dev/null +++ b/packages/e2e-tests/fixtures/blocks/core__social-link-tumblr.html @@ -0,0 +1,3 @@ + + + diff --git a/packages/e2e-tests/fixtures/blocks/core__social-link-tumblr.json b/packages/e2e-tests/fixtures/blocks/core__social-link-tumblr.json new file mode 100644 index 00000000000000..e1806d1fb08347 --- /dev/null +++ b/packages/e2e-tests/fixtures/blocks/core__social-link-tumblr.json @@ -0,0 +1,13 @@ +[ + { + "clientId": "_clientId_0", + "name": "core/social-link-tumblr", + "isValid": true, + "attributes": { + "url": "https://example.com/", + "site": "tumblr" + }, + "innerBlocks": [], + "originalContent": "" + } +] diff --git a/packages/e2e-tests/fixtures/blocks/core__social-link-tumblr.parsed.json b/packages/e2e-tests/fixtures/blocks/core__social-link-tumblr.parsed.json new file mode 100644 index 00000000000000..b6130a5f613654 --- /dev/null +++ b/packages/e2e-tests/fixtures/blocks/core__social-link-tumblr.parsed.json @@ -0,0 +1,22 @@ +[ + { + "blockName": "core/social-link-tumblr", + "attrs": { + "url": "https://example.com/" + }, + "innerBlocks": [], + "innerHTML": "\n\n", + "innerContent": [ + "\n\n" + ] + }, + { + "blockName": null, + "attrs": {}, + "innerBlocks": [], + "innerHTML": "\n", + "innerContent": [ + "\n" + ] + } +] diff --git a/packages/e2e-tests/fixtures/blocks/core__social-link-tumblr.serialized.html b/packages/e2e-tests/fixtures/blocks/core__social-link-tumblr.serialized.html new file mode 100644 index 00000000000000..c667e5a4d15460 --- /dev/null +++ b/packages/e2e-tests/fixtures/blocks/core__social-link-tumblr.serialized.html @@ -0,0 +1,3 @@ + + + diff --git a/packages/e2e-tests/fixtures/blocks/core__social-link-twitch.html b/packages/e2e-tests/fixtures/blocks/core__social-link-twitch.html new file mode 100644 index 00000000000000..290d4108d7a9c2 --- /dev/null +++ b/packages/e2e-tests/fixtures/blocks/core__social-link-twitch.html @@ -0,0 +1,3 @@ + + + diff --git a/packages/e2e-tests/fixtures/blocks/core__social-link-twitch.json b/packages/e2e-tests/fixtures/blocks/core__social-link-twitch.json new file mode 100644 index 00000000000000..9945e1d3ba9e24 --- /dev/null +++ b/packages/e2e-tests/fixtures/blocks/core__social-link-twitch.json @@ -0,0 +1,13 @@ +[ + { + "clientId": "_clientId_0", + "name": "core/social-link-twitch", + "isValid": true, + "attributes": { + "url": "https://example.com/", + "site": "twitch" + }, + "innerBlocks": [], + "originalContent": "" + } +] diff --git a/packages/e2e-tests/fixtures/blocks/core__social-link-twitch.parsed.json b/packages/e2e-tests/fixtures/blocks/core__social-link-twitch.parsed.json new file mode 100644 index 00000000000000..9cc1686d44bc94 --- /dev/null +++ b/packages/e2e-tests/fixtures/blocks/core__social-link-twitch.parsed.json @@ -0,0 +1,22 @@ +[ + { + "blockName": "core/social-link-twitch", + "attrs": { + "url": "https://example.com/" + }, + "innerBlocks": [], + "innerHTML": "\n\n", + "innerContent": [ + "\n\n" + ] + }, + { + "blockName": null, + "attrs": {}, + "innerBlocks": [], + "innerHTML": "\n", + "innerContent": [ + "\n" + ] + } +] diff --git a/packages/e2e-tests/fixtures/blocks/core__social-link-twitch.serialized.html b/packages/e2e-tests/fixtures/blocks/core__social-link-twitch.serialized.html new file mode 100644 index 00000000000000..290d4108d7a9c2 --- /dev/null +++ b/packages/e2e-tests/fixtures/blocks/core__social-link-twitch.serialized.html @@ -0,0 +1,3 @@ + + + diff --git a/packages/e2e-tests/fixtures/blocks/core__social-link-twitter.html b/packages/e2e-tests/fixtures/blocks/core__social-link-twitter.html new file mode 100644 index 00000000000000..82bec9cd5eaafb --- /dev/null +++ b/packages/e2e-tests/fixtures/blocks/core__social-link-twitter.html @@ -0,0 +1,3 @@ + + + diff --git a/packages/e2e-tests/fixtures/blocks/core__social-link-twitter.json b/packages/e2e-tests/fixtures/blocks/core__social-link-twitter.json new file mode 100644 index 00000000000000..e3441a367f17dd --- /dev/null +++ b/packages/e2e-tests/fixtures/blocks/core__social-link-twitter.json @@ -0,0 +1,13 @@ +[ + { + "clientId": "_clientId_0", + "name": "core/social-link-twitter", + "isValid": true, + "attributes": { + "url": "https://example.com/", + "site": "twitter" + }, + "innerBlocks": [], + "originalContent": "" + } +] diff --git a/packages/e2e-tests/fixtures/blocks/core__social-link-twitter.parsed.json b/packages/e2e-tests/fixtures/blocks/core__social-link-twitter.parsed.json new file mode 100644 index 00000000000000..3fd2b4859aedb7 --- /dev/null +++ b/packages/e2e-tests/fixtures/blocks/core__social-link-twitter.parsed.json @@ -0,0 +1,22 @@ +[ + { + "blockName": "core/social-link-twitter", + "attrs": { + "url": "https://example.com/" + }, + "innerBlocks": [], + "innerHTML": "\n\n", + "innerContent": [ + "\n\n" + ] + }, + { + "blockName": null, + "attrs": {}, + "innerBlocks": [], + "innerHTML": "\n", + "innerContent": [ + "\n" + ] + } +] diff --git a/packages/e2e-tests/fixtures/blocks/core__social-link-twitter.serialized.html b/packages/e2e-tests/fixtures/blocks/core__social-link-twitter.serialized.html new file mode 100644 index 00000000000000..82bec9cd5eaafb --- /dev/null +++ b/packages/e2e-tests/fixtures/blocks/core__social-link-twitter.serialized.html @@ -0,0 +1,3 @@ + + + diff --git a/packages/e2e-tests/fixtures/blocks/core__social-link-vimeo.html b/packages/e2e-tests/fixtures/blocks/core__social-link-vimeo.html new file mode 100644 index 00000000000000..74b52213760f17 --- /dev/null +++ b/packages/e2e-tests/fixtures/blocks/core__social-link-vimeo.html @@ -0,0 +1,3 @@ + + + diff --git a/packages/e2e-tests/fixtures/blocks/core__social-link-vimeo.json b/packages/e2e-tests/fixtures/blocks/core__social-link-vimeo.json new file mode 100644 index 00000000000000..a9c20352ae9814 --- /dev/null +++ b/packages/e2e-tests/fixtures/blocks/core__social-link-vimeo.json @@ -0,0 +1,13 @@ +[ + { + "clientId": "_clientId_0", + "name": "core/social-link-vimeo", + "isValid": true, + "attributes": { + "url": "https://example.com/", + "site": "vimeo" + }, + "innerBlocks": [], + "originalContent": "" + } +] diff --git a/packages/e2e-tests/fixtures/blocks/core__social-link-vimeo.parsed.json b/packages/e2e-tests/fixtures/blocks/core__social-link-vimeo.parsed.json new file mode 100644 index 00000000000000..67f50090cfe8e7 --- /dev/null +++ b/packages/e2e-tests/fixtures/blocks/core__social-link-vimeo.parsed.json @@ -0,0 +1,22 @@ +[ + { + "blockName": "core/social-link-vimeo", + "attrs": { + "url": "https://example.com/" + }, + "innerBlocks": [], + "innerHTML": "\n\n", + "innerContent": [ + "\n\n" + ] + }, + { + "blockName": null, + "attrs": {}, + "innerBlocks": [], + "innerHTML": "\n", + "innerContent": [ + "\n" + ] + } +] diff --git a/packages/e2e-tests/fixtures/blocks/core__social-link-vimeo.serialized.html b/packages/e2e-tests/fixtures/blocks/core__social-link-vimeo.serialized.html new file mode 100644 index 00000000000000..74b52213760f17 --- /dev/null +++ b/packages/e2e-tests/fixtures/blocks/core__social-link-vimeo.serialized.html @@ -0,0 +1,3 @@ + + + diff --git a/packages/e2e-tests/fixtures/blocks/core__social-link-vk.html b/packages/e2e-tests/fixtures/blocks/core__social-link-vk.html new file mode 100644 index 00000000000000..2fa5602dc499a9 --- /dev/null +++ b/packages/e2e-tests/fixtures/blocks/core__social-link-vk.html @@ -0,0 +1,3 @@ + + + diff --git a/packages/e2e-tests/fixtures/blocks/core__social-link-vk.json b/packages/e2e-tests/fixtures/blocks/core__social-link-vk.json new file mode 100644 index 00000000000000..e48a38a285c36b --- /dev/null +++ b/packages/e2e-tests/fixtures/blocks/core__social-link-vk.json @@ -0,0 +1,13 @@ +[ + { + "clientId": "_clientId_0", + "name": "core/social-link-vk", + "isValid": true, + "attributes": { + "url": "https://example.com/", + "site": "vk" + }, + "innerBlocks": [], + "originalContent": "" + } +] diff --git a/packages/e2e-tests/fixtures/blocks/core__social-link-vk.parsed.json b/packages/e2e-tests/fixtures/blocks/core__social-link-vk.parsed.json new file mode 100644 index 00000000000000..41706b316fbfed --- /dev/null +++ b/packages/e2e-tests/fixtures/blocks/core__social-link-vk.parsed.json @@ -0,0 +1,22 @@ +[ + { + "blockName": "core/social-link-vk", + "attrs": { + "url": "https://example.com/" + }, + "innerBlocks": [], + "innerHTML": "\n\n", + "innerContent": [ + "\n\n" + ] + }, + { + "blockName": null, + "attrs": {}, + "innerBlocks": [], + "innerHTML": "\n", + "innerContent": [ + "\n" + ] + } +] diff --git a/packages/e2e-tests/fixtures/blocks/core__social-link-vk.serialized.html b/packages/e2e-tests/fixtures/blocks/core__social-link-vk.serialized.html new file mode 100644 index 00000000000000..2fa5602dc499a9 --- /dev/null +++ b/packages/e2e-tests/fixtures/blocks/core__social-link-vk.serialized.html @@ -0,0 +1,3 @@ + + + diff --git a/packages/e2e-tests/fixtures/blocks/core__social-link-wordpress.html b/packages/e2e-tests/fixtures/blocks/core__social-link-wordpress.html new file mode 100644 index 00000000000000..a2376794cc300b --- /dev/null +++ b/packages/e2e-tests/fixtures/blocks/core__social-link-wordpress.html @@ -0,0 +1,3 @@ + + + diff --git a/packages/e2e-tests/fixtures/blocks/core__social-link-wordpress.json b/packages/e2e-tests/fixtures/blocks/core__social-link-wordpress.json new file mode 100644 index 00000000000000..65d8ae41a711b5 --- /dev/null +++ b/packages/e2e-tests/fixtures/blocks/core__social-link-wordpress.json @@ -0,0 +1,13 @@ +[ + { + "clientId": "_clientId_0", + "name": "core/social-link-wordpress", + "isValid": true, + "attributes": { + "url": "https://example.com/", + "site": "wordpress" + }, + "innerBlocks": [], + "originalContent": "" + } +] diff --git a/packages/e2e-tests/fixtures/blocks/core__social-link-wordpress.parsed.json b/packages/e2e-tests/fixtures/blocks/core__social-link-wordpress.parsed.json new file mode 100644 index 00000000000000..e278fe0a4202a3 --- /dev/null +++ b/packages/e2e-tests/fixtures/blocks/core__social-link-wordpress.parsed.json @@ -0,0 +1,22 @@ +[ + { + "blockName": "core/social-link-wordpress", + "attrs": { + "url": "https://example.com/" + }, + "innerBlocks": [], + "innerHTML": "\n\n", + "innerContent": [ + "\n\n" + ] + }, + { + "blockName": null, + "attrs": {}, + "innerBlocks": [], + "innerHTML": "\n", + "innerContent": [ + "\n" + ] + } +] diff --git a/packages/e2e-tests/fixtures/blocks/core__social-link-wordpress.serialized.html b/packages/e2e-tests/fixtures/blocks/core__social-link-wordpress.serialized.html new file mode 100644 index 00000000000000..a2376794cc300b --- /dev/null +++ b/packages/e2e-tests/fixtures/blocks/core__social-link-wordpress.serialized.html @@ -0,0 +1,3 @@ + + + diff --git a/packages/e2e-tests/fixtures/blocks/core__social-link-youtube.html b/packages/e2e-tests/fixtures/blocks/core__social-link-youtube.html new file mode 100644 index 00000000000000..cfe8238fff6417 --- /dev/null +++ b/packages/e2e-tests/fixtures/blocks/core__social-link-youtube.html @@ -0,0 +1,3 @@ + + + diff --git a/packages/e2e-tests/fixtures/blocks/core__social-link-youtube.json b/packages/e2e-tests/fixtures/blocks/core__social-link-youtube.json new file mode 100644 index 00000000000000..b419ab2ba5b97f --- /dev/null +++ b/packages/e2e-tests/fixtures/blocks/core__social-link-youtube.json @@ -0,0 +1,13 @@ +[ + { + "clientId": "_clientId_0", + "name": "core/social-link-youtube", + "isValid": true, + "attributes": { + "url": "https://example.com/", + "site": "youtube" + }, + "innerBlocks": [], + "originalContent": "" + } +] diff --git a/packages/e2e-tests/fixtures/blocks/core__social-link-youtube.parsed.json b/packages/e2e-tests/fixtures/blocks/core__social-link-youtube.parsed.json new file mode 100644 index 00000000000000..c092b315aeba17 --- /dev/null +++ b/packages/e2e-tests/fixtures/blocks/core__social-link-youtube.parsed.json @@ -0,0 +1,22 @@ +[ + { + "blockName": "core/social-link-youtube", + "attrs": { + "url": "https://example.com/" + }, + "innerBlocks": [], + "innerHTML": "\n\n", + "innerContent": [ + "\n\n" + ] + }, + { + "blockName": null, + "attrs": {}, + "innerBlocks": [], + "innerHTML": "\n", + "innerContent": [ + "\n" + ] + } +] diff --git a/packages/e2e-tests/fixtures/blocks/core__social-link-youtube.serialized.html b/packages/e2e-tests/fixtures/blocks/core__social-link-youtube.serialized.html new file mode 100644 index 00000000000000..cfe8238fff6417 --- /dev/null +++ b/packages/e2e-tests/fixtures/blocks/core__social-link-youtube.serialized.html @@ -0,0 +1,3 @@ + + + diff --git a/packages/e2e-tests/fixtures/blocks/core__social-link.html b/packages/e2e-tests/fixtures/blocks/core__social-link.html deleted file mode 100644 index eb3bacd65d5c40..00000000000000 --- a/packages/e2e-tests/fixtures/blocks/core__social-link.html +++ /dev/null @@ -1,3 +0,0 @@ - - - diff --git a/packages/e2e-tests/fixtures/blocks/core__social-link.json b/packages/e2e-tests/fixtures/blocks/core__social-link.json deleted file mode 100644 index d1fab5b3457314..00000000000000 --- a/packages/e2e-tests/fixtures/blocks/core__social-link.json +++ /dev/null @@ -1,13 +0,0 @@ -[ - { - "clientId": "_clientId_0", - "name": "core/social-link", - "isValid": true, - "attributes": { - "url": "https://mastodon.social/marcuskaz", - "icon": "mastodon" - }, - "innerBlocks": [], - "originalContent": "" - } -] diff --git a/packages/e2e-tests/fixtures/blocks/core__social-link.parsed.json b/packages/e2e-tests/fixtures/blocks/core__social-link.parsed.json deleted file mode 100644 index 6bc05d391e9d03..00000000000000 --- a/packages/e2e-tests/fixtures/blocks/core__social-link.parsed.json +++ /dev/null @@ -1,23 +0,0 @@ -[ - { - "blockName": "core/social-link", - "attrs": { - "url": "https://mastodon.social/marcuskaz", - "icon": "mastodon" - }, - "innerBlocks": [], - "innerHTML": "\n\n", - "innerContent": [ - "\n\n" - ] - }, - { - "blockName": null, - "attrs": {}, - "innerBlocks": [], - "innerHTML": "\n", - "innerContent": [ - "\n" - ] - } -] diff --git a/packages/e2e-tests/fixtures/blocks/core__social-link.serialized.html b/packages/e2e-tests/fixtures/blocks/core__social-link.serialized.html deleted file mode 100644 index eb3bacd65d5c40..00000000000000 --- a/packages/e2e-tests/fixtures/blocks/core__social-link.serialized.html +++ /dev/null @@ -1,3 +0,0 @@ - - - diff --git a/packages/e2e-tests/fixtures/blocks/core__social-links.html b/packages/e2e-tests/fixtures/blocks/core__social-links.html index 43681ccb29ed49..8b4a85da9849d0 100644 --- a/packages/e2e-tests/fixtures/blocks/core__social-links.html +++ b/packages/e2e-tests/fixtures/blocks/core__social-links.html @@ -1,5 +1,5 @@ - + diff --git a/packages/e2e-tests/fixtures/blocks/core__social-links.json b/packages/e2e-tests/fixtures/blocks/core__social-links.json index 27336115e674bb..1e3cfc330310af 100644 --- a/packages/e2e-tests/fixtures/blocks/core__social-links.json +++ b/packages/e2e-tests/fixtures/blocks/core__social-links.json @@ -7,16 +7,16 @@ "innerBlocks": [ { "clientId": "_clientId_0", - "name": "core/social-link", + "name": "core/social-link-mastodon", "isValid": true, "attributes": { - "url": "https://mastodon.social/marcuskaz", - "icon": "mastodon" + "url": "https://mastodon.social/@marcuskaz", + "site": "mastodon" }, "innerBlocks": [], - "originalContent": "" + "originalContent": "" } ], - "originalContent": "
" + "originalContent": "
    " } ] diff --git a/packages/e2e-tests/fixtures/blocks/core__social-links.parsed.json b/packages/e2e-tests/fixtures/blocks/core__social-links.parsed.json index 38fbf3b494acc7..d8c7da158cfb19 100644 --- a/packages/e2e-tests/fixtures/blocks/core__social-links.parsed.json +++ b/packages/e2e-tests/fixtures/blocks/core__social-links.parsed.json @@ -4,23 +4,22 @@ "attrs": {}, "innerBlocks": [ { - "blockName": "core/social-link", + "blockName": "core/social-link-mastodon", "attrs": { - "url": "https://mastodon.social/marcuskaz", - "icon": "mastodon" + "url": "https://mastodon.social/@marcuskaz" }, "innerBlocks": [], - "innerHTML": "\n\n", + "innerHTML": "\n\n", "innerContent": [ - "\n\n" + "\n\n" ] } ], - "innerHTML": "\n
    \n", + "innerHTML": "\n
      \n", "innerContent": [ - "\n
      ", + "\n
        ", null, - "
      \n" + "\n" ] }, { diff --git a/packages/e2e-tests/fixtures/blocks/core__social-links.serialized.html b/packages/e2e-tests/fixtures/blocks/core__social-links.serialized.html index 43681ccb29ed49..8b4a85da9849d0 100644 --- a/packages/e2e-tests/fixtures/blocks/core__social-links.serialized.html +++ b/packages/e2e-tests/fixtures/blocks/core__social-links.serialized.html @@ -1,5 +1,5 @@ - + From 35fe9aa0928ab02e2e0d7850663027d1a850e9c0 Mon Sep 17 00:00:00 2001 From: Joen Asmussen Date: Wed, 28 Aug 2019 10:52:02 +0200 Subject: [PATCH 32/54] Update facebook icon and instagram colors. --- packages/block-library/src/social-link/icons/facebook.js | 2 +- packages/block-library/src/social-links/style.scss | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/packages/block-library/src/social-link/icons/facebook.js b/packages/block-library/src/social-link/icons/facebook.js index a87d90a51aa67c..042922c119190c 100644 --- a/packages/block-library/src/social-link/icons/facebook.js +++ b/packages/block-library/src/social-link/icons/facebook.js @@ -9,6 +9,6 @@ import { export const FacebookIcon = ( ) => ( - + ); diff --git a/packages/block-library/src/social-links/style.scss b/packages/block-library/src/social-links/style.scss index b17569ae045f08..9e6b9895283cfa 100644 --- a/packages/block-library/src/social-links/style.scss +++ b/packages/block-library/src/social-links/style.scss @@ -125,8 +125,8 @@ } .wp-social-link-instagram { - background-color: #f1f1f1; - color: #000; + background-color: #f00075; + color: #fff; } .wp-social-link-lastfm { From 16cd709bb736ddad853adf97b81c4a9e5982e3b6 Mon Sep 17 00:00:00 2001 From: Joen Asmussen Date: Wed, 28 Aug 2019 11:31:21 +0200 Subject: [PATCH 33/54] Polish, add variation, bugfix - This adds explicit widths heights to SVGs, fixing the "giant svg" issue. - It adds colors to the now called "Logos Only" variation - It improves the snapchat style - It adds a pill variation --- .../src/social-link/icons/amazon.js | 2 +- .../src/social-link/icons/apple.js | 2 +- .../src/social-link/icons/bandcamp.js | 2 +- .../src/social-link/icons/behance.js | 2 +- .../src/social-link/icons/chain.js | 2 +- .../src/social-link/icons/codepen.js | 2 +- .../src/social-link/icons/deviantart.js | 2 +- .../src/social-link/icons/digg.js | 2 +- .../src/social-link/icons/dribbble.js | 2 +- .../src/social-link/icons/dropbox.js | 2 +- .../src/social-link/icons/etsy.js | 2 +- .../src/social-link/icons/facebook.js | 2 +- .../src/social-link/icons/feed.js | 2 +- .../src/social-link/icons/fivehundredpx.js | 2 +- .../src/social-link/icons/flickr.js | 2 +- .../src/social-link/icons/foursquare.js | 2 +- .../src/social-link/icons/github.js | 2 +- .../src/social-link/icons/goodreads.js | 2 +- .../src/social-link/icons/google.js | 2 +- .../src/social-link/icons/instagram.js | 2 +- .../src/social-link/icons/lastfm.js | 2 +- .../src/social-link/icons/linkedin.js | 2 +- .../src/social-link/icons/mail.js | 2 +- .../src/social-link/icons/mastodon.js | 2 +- .../src/social-link/icons/medium.js | 2 +- .../src/social-link/icons/meetup.js | 2 +- .../src/social-link/icons/pinterest.js | 2 +- .../src/social-link/icons/pocket.js | 2 +- .../src/social-link/icons/reddit.js | 2 +- .../src/social-link/icons/skype.js | 2 +- .../src/social-link/icons/slideshare.js | 2 +- .../src/social-link/icons/snapchat.js | 2 +- .../src/social-link/icons/soundcloud.js | 2 +- .../src/social-link/icons/spotify.js | 2 +- .../src/social-link/icons/stumbleupon.js | 2 +- .../src/social-link/icons/tumblr.js | 2 +- .../src/social-link/icons/twitch.js | 2 +- .../src/social-link/icons/twitter.js | 2 +- .../src/social-link/icons/vimeo.js | 2 +- .../block-library/src/social-link/icons/vk.js | 2 +- .../src/social-link/icons/wordpress.js | 2 +- .../src/social-link/icons/yelp.js | 2 +- .../src/social-link/icons/youtube.js | 2 +- .../block-library/src/social-link/index.php | 86 ++++---- .../src/social-link/social-list.js | 2 +- .../block-library/src/social-links/index.js | 3 +- .../block-library/src/social-links/style.scss | 192 +++++++++++++++++- 47 files changed, 277 insertions(+), 92 deletions(-) diff --git a/packages/block-library/src/social-link/icons/amazon.js b/packages/block-library/src/social-link/icons/amazon.js index 8d6c3748113844..cf906e4671e033 100644 --- a/packages/block-library/src/social-link/icons/amazon.js +++ b/packages/block-library/src/social-link/icons/amazon.js @@ -8,7 +8,7 @@ import { } from '@wordpress/components'; export const AmazonIcon = ( ) => ( - + ); diff --git a/packages/block-library/src/social-link/icons/apple.js b/packages/block-library/src/social-link/icons/apple.js index a25f6355dc91ea..d9f35e83c259f4 100644 --- a/packages/block-library/src/social-link/icons/apple.js +++ b/packages/block-library/src/social-link/icons/apple.js @@ -8,7 +8,7 @@ import { } from '@wordpress/components'; export const AppleIcon = ( ) => ( - + ); diff --git a/packages/block-library/src/social-link/icons/bandcamp.js b/packages/block-library/src/social-link/icons/bandcamp.js index 44b5319f1171f8..4033d7406b7606 100644 --- a/packages/block-library/src/social-link/icons/bandcamp.js +++ b/packages/block-library/src/social-link/icons/bandcamp.js @@ -8,7 +8,7 @@ import { } from '@wordpress/components'; export const BandcampIcon = ( ) => ( - + ); diff --git a/packages/block-library/src/social-link/icons/behance.js b/packages/block-library/src/social-link/icons/behance.js index 28ba8dcf6aaeb6..2dc0cc5cd81e14 100644 --- a/packages/block-library/src/social-link/icons/behance.js +++ b/packages/block-library/src/social-link/icons/behance.js @@ -8,7 +8,7 @@ import { } from '@wordpress/components'; export const BehanceIcon = ( ) => ( - + ); diff --git a/packages/block-library/src/social-link/icons/chain.js b/packages/block-library/src/social-link/icons/chain.js index 3f463a54d4a7fd..5347ff89f3e163 100644 --- a/packages/block-library/src/social-link/icons/chain.js +++ b/packages/block-library/src/social-link/icons/chain.js @@ -8,7 +8,7 @@ import { } from '@wordpress/components'; export const ChainIcon = ( ) => ( - + ); diff --git a/packages/block-library/src/social-link/icons/codepen.js b/packages/block-library/src/social-link/icons/codepen.js index 9699ba49d89481..0528466f4eb539 100644 --- a/packages/block-library/src/social-link/icons/codepen.js +++ b/packages/block-library/src/social-link/icons/codepen.js @@ -8,7 +8,7 @@ import { } from '@wordpress/components'; export const CodepenIcon = ( ) => ( - + ); diff --git a/packages/block-library/src/social-link/icons/deviantart.js b/packages/block-library/src/social-link/icons/deviantart.js index b23319b001acdb..17b2c25f832fb4 100644 --- a/packages/block-library/src/social-link/icons/deviantart.js +++ b/packages/block-library/src/social-link/icons/deviantart.js @@ -8,7 +8,7 @@ import { } from '@wordpress/components'; export const DeviantartIcon = ( ) => ( - + ); diff --git a/packages/block-library/src/social-link/icons/digg.js b/packages/block-library/src/social-link/icons/digg.js index f35b44d002bb62..22d32289c1b42d 100644 --- a/packages/block-library/src/social-link/icons/digg.js +++ b/packages/block-library/src/social-link/icons/digg.js @@ -8,7 +8,7 @@ import { } from '@wordpress/components'; export const DiggIcon = ( ) => ( - + ); diff --git a/packages/block-library/src/social-link/icons/dribbble.js b/packages/block-library/src/social-link/icons/dribbble.js index 75a8626024d9c4..e1d20d706a600f 100644 --- a/packages/block-library/src/social-link/icons/dribbble.js +++ b/packages/block-library/src/social-link/icons/dribbble.js @@ -8,7 +8,7 @@ import { } from '@wordpress/components'; export const DribbbleIcon = ( ) => ( - + ); diff --git a/packages/block-library/src/social-link/icons/dropbox.js b/packages/block-library/src/social-link/icons/dropbox.js index a22f0696df4033..15eb1224623ed4 100644 --- a/packages/block-library/src/social-link/icons/dropbox.js +++ b/packages/block-library/src/social-link/icons/dropbox.js @@ -8,7 +8,7 @@ import { } from '@wordpress/components'; export const DropboxIcon = ( ) => ( - + ); diff --git a/packages/block-library/src/social-link/icons/etsy.js b/packages/block-library/src/social-link/icons/etsy.js index a8bda9208d068b..73f3cd95ccc1cd 100644 --- a/packages/block-library/src/social-link/icons/etsy.js +++ b/packages/block-library/src/social-link/icons/etsy.js @@ -8,7 +8,7 @@ import { } from '@wordpress/components'; export const EtsyIcon = ( ) => ( - + ); diff --git a/packages/block-library/src/social-link/icons/facebook.js b/packages/block-library/src/social-link/icons/facebook.js index 042922c119190c..13b9111625bbcb 100644 --- a/packages/block-library/src/social-link/icons/facebook.js +++ b/packages/block-library/src/social-link/icons/facebook.js @@ -8,7 +8,7 @@ import { } from '@wordpress/components'; export const FacebookIcon = ( ) => ( - + ); diff --git a/packages/block-library/src/social-link/icons/feed.js b/packages/block-library/src/social-link/icons/feed.js index 8d2fc384feba6d..6386cef02bb2f6 100644 --- a/packages/block-library/src/social-link/icons/feed.js +++ b/packages/block-library/src/social-link/icons/feed.js @@ -8,7 +8,7 @@ import { } from '@wordpress/components'; export const FeedIcon = ( ) => ( - + ); diff --git a/packages/block-library/src/social-link/icons/fivehundredpx.js b/packages/block-library/src/social-link/icons/fivehundredpx.js index ae74ae01abea56..6961e2b7e5cc26 100644 --- a/packages/block-library/src/social-link/icons/fivehundredpx.js +++ b/packages/block-library/src/social-link/icons/fivehundredpx.js @@ -8,7 +8,7 @@ import { } from '@wordpress/components'; export const FivehundredpxIcon = ( ) => ( - + ); diff --git a/packages/block-library/src/social-link/icons/flickr.js b/packages/block-library/src/social-link/icons/flickr.js index 5c35bc644a537b..7bafa14fabd288 100644 --- a/packages/block-library/src/social-link/icons/flickr.js +++ b/packages/block-library/src/social-link/icons/flickr.js @@ -8,7 +8,7 @@ import { } from '@wordpress/components'; export const FlickrIcon = ( ) => ( - + ); diff --git a/packages/block-library/src/social-link/icons/foursquare.js b/packages/block-library/src/social-link/icons/foursquare.js index 172754dfae8337..1b3b49b8c3c78b 100644 --- a/packages/block-library/src/social-link/icons/foursquare.js +++ b/packages/block-library/src/social-link/icons/foursquare.js @@ -8,7 +8,7 @@ import { } from '@wordpress/components'; export const FoursquareIcon = ( ) => ( - + ); diff --git a/packages/block-library/src/social-link/icons/github.js b/packages/block-library/src/social-link/icons/github.js index 233ef540167340..4dfcd29a971c38 100644 --- a/packages/block-library/src/social-link/icons/github.js +++ b/packages/block-library/src/social-link/icons/github.js @@ -8,7 +8,7 @@ import { } from '@wordpress/components'; export const GithubIcon = ( ) => ( - + ); diff --git a/packages/block-library/src/social-link/icons/goodreads.js b/packages/block-library/src/social-link/icons/goodreads.js index d731ff12abfe71..7997519010ebcb 100644 --- a/packages/block-library/src/social-link/icons/goodreads.js +++ b/packages/block-library/src/social-link/icons/goodreads.js @@ -8,7 +8,7 @@ import { } from '@wordpress/components'; export const GoodreadsIcon = ( ) => ( - + ); diff --git a/packages/block-library/src/social-link/icons/google.js b/packages/block-library/src/social-link/icons/google.js index 6dfc9691df4818..fb7813791be9b1 100644 --- a/packages/block-library/src/social-link/icons/google.js +++ b/packages/block-library/src/social-link/icons/google.js @@ -8,7 +8,7 @@ import { } from '@wordpress/components'; export const GoogleIcon = ( ) => ( - + ); diff --git a/packages/block-library/src/social-link/icons/instagram.js b/packages/block-library/src/social-link/icons/instagram.js index 88e9410d86d36c..01d58e95bac49e 100644 --- a/packages/block-library/src/social-link/icons/instagram.js +++ b/packages/block-library/src/social-link/icons/instagram.js @@ -8,7 +8,7 @@ import { } from '@wordpress/components'; export const InstagramIcon = ( ) => ( - + ); diff --git a/packages/block-library/src/social-link/icons/lastfm.js b/packages/block-library/src/social-link/icons/lastfm.js index 068bc3ee769378..b615e1bf0fddbc 100644 --- a/packages/block-library/src/social-link/icons/lastfm.js +++ b/packages/block-library/src/social-link/icons/lastfm.js @@ -8,7 +8,7 @@ import { } from '@wordpress/components'; export const LastfmIcon = ( ) => ( - + ); diff --git a/packages/block-library/src/social-link/icons/linkedin.js b/packages/block-library/src/social-link/icons/linkedin.js index 7e64bf9ab42b7f..98cec8a81ca0f7 100644 --- a/packages/block-library/src/social-link/icons/linkedin.js +++ b/packages/block-library/src/social-link/icons/linkedin.js @@ -8,7 +8,7 @@ import { } from '@wordpress/components'; export const LinkedinIcon = ( ) => ( - + ); diff --git a/packages/block-library/src/social-link/icons/mail.js b/packages/block-library/src/social-link/icons/mail.js index 724d8087298e53..8e9847cfa370c8 100644 --- a/packages/block-library/src/social-link/icons/mail.js +++ b/packages/block-library/src/social-link/icons/mail.js @@ -8,7 +8,7 @@ import { } from '@wordpress/components'; export const MailIcon = ( ) => ( - + ); diff --git a/packages/block-library/src/social-link/icons/mastodon.js b/packages/block-library/src/social-link/icons/mastodon.js index ce2057c7f004d6..1c1a196d28e6d0 100644 --- a/packages/block-library/src/social-link/icons/mastodon.js +++ b/packages/block-library/src/social-link/icons/mastodon.js @@ -8,7 +8,7 @@ import { } from '@wordpress/components'; export const MastodonIcon = ( ) => ( - + ); diff --git a/packages/block-library/src/social-link/icons/medium.js b/packages/block-library/src/social-link/icons/medium.js index 3dac2431ef11dd..c15c3ca62728fe 100644 --- a/packages/block-library/src/social-link/icons/medium.js +++ b/packages/block-library/src/social-link/icons/medium.js @@ -8,7 +8,7 @@ import { } from '@wordpress/components'; export const MediumIcon = ( ) => ( - + ); diff --git a/packages/block-library/src/social-link/icons/meetup.js b/packages/block-library/src/social-link/icons/meetup.js index 95d9a08c68f554..a1f6d86e009a95 100644 --- a/packages/block-library/src/social-link/icons/meetup.js +++ b/packages/block-library/src/social-link/icons/meetup.js @@ -8,7 +8,7 @@ import { } from '@wordpress/components'; export const MeetupIcon = ( ) => ( - + ); diff --git a/packages/block-library/src/social-link/icons/pinterest.js b/packages/block-library/src/social-link/icons/pinterest.js index 031712d9f82986..d84704a9ba884b 100644 --- a/packages/block-library/src/social-link/icons/pinterest.js +++ b/packages/block-library/src/social-link/icons/pinterest.js @@ -8,7 +8,7 @@ import { } from '@wordpress/components'; export const PinterestIcon = ( ) => ( - + ); diff --git a/packages/block-library/src/social-link/icons/pocket.js b/packages/block-library/src/social-link/icons/pocket.js index 69e6b6062b6dcc..532138ff04f991 100644 --- a/packages/block-library/src/social-link/icons/pocket.js +++ b/packages/block-library/src/social-link/icons/pocket.js @@ -8,7 +8,7 @@ import { } from '@wordpress/components'; export const PocketIcon = ( ) => ( - + ); diff --git a/packages/block-library/src/social-link/icons/reddit.js b/packages/block-library/src/social-link/icons/reddit.js index 5cd423eead8bd5..4a8c7bd14abf71 100644 --- a/packages/block-library/src/social-link/icons/reddit.js +++ b/packages/block-library/src/social-link/icons/reddit.js @@ -8,7 +8,7 @@ import { } from '@wordpress/components'; export const RedditIcon = ( ) => ( - + ); diff --git a/packages/block-library/src/social-link/icons/skype.js b/packages/block-library/src/social-link/icons/skype.js index c294478aedb76d..3c34e3f1c5d73d 100644 --- a/packages/block-library/src/social-link/icons/skype.js +++ b/packages/block-library/src/social-link/icons/skype.js @@ -8,7 +8,7 @@ import { } from '@wordpress/components'; export const SkypeIcon = ( ) => ( - + ); diff --git a/packages/block-library/src/social-link/icons/slideshare.js b/packages/block-library/src/social-link/icons/slideshare.js index 84f4c44695c3af..674a4623bd14b3 100644 --- a/packages/block-library/src/social-link/icons/slideshare.js +++ b/packages/block-library/src/social-link/icons/slideshare.js @@ -8,7 +8,7 @@ import { } from '@wordpress/components'; export const SlideshareIcon = ( ) => ( - + ); diff --git a/packages/block-library/src/social-link/icons/snapchat.js b/packages/block-library/src/social-link/icons/snapchat.js index 5af857e14308d2..eaddf4d7080e11 100644 --- a/packages/block-library/src/social-link/icons/snapchat.js +++ b/packages/block-library/src/social-link/icons/snapchat.js @@ -8,7 +8,7 @@ import { } from '@wordpress/components'; export const SnapchatIcon = ( ) => ( - + ); diff --git a/packages/block-library/src/social-link/icons/soundcloud.js b/packages/block-library/src/social-link/icons/soundcloud.js index 063fb09e82401a..9df4e0af59bc4c 100644 --- a/packages/block-library/src/social-link/icons/soundcloud.js +++ b/packages/block-library/src/social-link/icons/soundcloud.js @@ -8,7 +8,7 @@ import { } from '@wordpress/components'; export const SoundcloudIcon = ( ) => ( - + ); diff --git a/packages/block-library/src/social-link/icons/spotify.js b/packages/block-library/src/social-link/icons/spotify.js index 6c28beee9a7dfd..fe702c4d697d4a 100644 --- a/packages/block-library/src/social-link/icons/spotify.js +++ b/packages/block-library/src/social-link/icons/spotify.js @@ -8,7 +8,7 @@ import { } from '@wordpress/components'; export const SpotifyIcon = ( ) => ( - + ); diff --git a/packages/block-library/src/social-link/icons/stumbleupon.js b/packages/block-library/src/social-link/icons/stumbleupon.js index 489c9c7e9a1e0b..55657bc5ca3625 100644 --- a/packages/block-library/src/social-link/icons/stumbleupon.js +++ b/packages/block-library/src/social-link/icons/stumbleupon.js @@ -8,7 +8,7 @@ import { } from '@wordpress/components'; export const StumbleuponIcon = ( ) => ( - + ); diff --git a/packages/block-library/src/social-link/icons/tumblr.js b/packages/block-library/src/social-link/icons/tumblr.js index 4e49b745389b4b..060a2cf75434ee 100644 --- a/packages/block-library/src/social-link/icons/tumblr.js +++ b/packages/block-library/src/social-link/icons/tumblr.js @@ -8,7 +8,7 @@ import { } from '@wordpress/components'; export const TumblrIcon = ( ) => ( - + ); diff --git a/packages/block-library/src/social-link/icons/twitch.js b/packages/block-library/src/social-link/icons/twitch.js index a56a5f50fad259..ddce3166b74d2c 100644 --- a/packages/block-library/src/social-link/icons/twitch.js +++ b/packages/block-library/src/social-link/icons/twitch.js @@ -8,7 +8,7 @@ import { } from '@wordpress/components'; export const TwitchIcon = ( ) => ( - + ); diff --git a/packages/block-library/src/social-link/icons/twitter.js b/packages/block-library/src/social-link/icons/twitter.js index 7086eebb5581b1..1b6641cadb441c 100644 --- a/packages/block-library/src/social-link/icons/twitter.js +++ b/packages/block-library/src/social-link/icons/twitter.js @@ -8,7 +8,7 @@ import { } from '@wordpress/components'; export const TwitterIcon = ( ) => ( - + ); diff --git a/packages/block-library/src/social-link/icons/vimeo.js b/packages/block-library/src/social-link/icons/vimeo.js index 5258ffcffe5b55..02940e55afc42f 100644 --- a/packages/block-library/src/social-link/icons/vimeo.js +++ b/packages/block-library/src/social-link/icons/vimeo.js @@ -8,7 +8,7 @@ import { } from '@wordpress/components'; export const VimeoIcon = ( ) => ( - + ); diff --git a/packages/block-library/src/social-link/icons/vk.js b/packages/block-library/src/social-link/icons/vk.js index 73e13fb9656de4..14e186d920f136 100644 --- a/packages/block-library/src/social-link/icons/vk.js +++ b/packages/block-library/src/social-link/icons/vk.js @@ -8,7 +8,7 @@ import { } from '@wordpress/components'; export const VkIcon = ( ) => ( - + ); diff --git a/packages/block-library/src/social-link/icons/wordpress.js b/packages/block-library/src/social-link/icons/wordpress.js index 11f026d7048c5a..a6523d67385052 100644 --- a/packages/block-library/src/social-link/icons/wordpress.js +++ b/packages/block-library/src/social-link/icons/wordpress.js @@ -8,7 +8,7 @@ import { } from '@wordpress/components'; export const WordPressIcon = ( ) => ( - + ); diff --git a/packages/block-library/src/social-link/icons/yelp.js b/packages/block-library/src/social-link/icons/yelp.js index 2225aa62dfe7a3..953db89b6bbd72 100644 --- a/packages/block-library/src/social-link/icons/yelp.js +++ b/packages/block-library/src/social-link/icons/yelp.js @@ -8,7 +8,7 @@ import { } from '@wordpress/components'; export const YelpIcon = ( ) => ( - + ); diff --git a/packages/block-library/src/social-link/icons/youtube.js b/packages/block-library/src/social-link/icons/youtube.js index 0a755e82bf6e05..0e822aa5b4f4da 100644 --- a/packages/block-library/src/social-link/icons/youtube.js +++ b/packages/block-library/src/social-link/icons/youtube.js @@ -8,7 +8,7 @@ import { } from '@wordpress/components'; export const YoutubeIcon = ( ) => ( - + ); diff --git a/packages/block-library/src/social-link/index.php b/packages/block-library/src/social-link/index.php index 07642fa4919f4e..f1b7a9ec907c60 100644 --- a/packages/block-library/src/social-link/index.php +++ b/packages/block-library/src/social-link/index.php @@ -107,134 +107,134 @@ function core_social_link_get_icon( $site ) { switch ( $site ) { case 'fivehundredpx': - return ''; + return ''; case 'amazon': - return ''; + return ''; case 'apple': - return ''; + return ''; case 'bandcamp': - return ''; + return ''; case 'behance': - return ''; + return ''; case 'chain': - return ''; + return ''; case 'codepen': - return ''; + return ''; case 'deviantart': - return ''; + return ''; case 'digg': - return ''; + return ''; case 'dribbble': - return ''; + return ''; case 'dropbox': - return ''; + return ''; case 'etsy': - return ''; + return ''; case 'facebook': - return ''; + return ''; case 'feed': - return ''; + return ''; case 'flickr': - return ''; + return ''; case 'foursquare': - return ''; + return ''; case 'goodreads': - return ''; + return ''; case 'google': - return ''; + return ''; case 'github': - return ''; + return ''; case 'instagram': - return ''; + return ''; case 'lastfm': - return ''; + return ''; case 'linkedin': - return ''; + return ''; case 'mail': - return ''; + return ''; case 'mastodon': - return ''; + return ''; case 'meetup': - return ''; + return ''; case 'medium': - return ''; + return ''; case 'pinterest': - return ''; + return ''; case 'pocket': - return ''; + return ''; case 'reddit': - return ''; + return ''; case 'skype': - return ''; + return ''; case 'slideshare': - return ''; + return ''; case 'snapchat': - return ''; + return ''; case 'soundcloud': - return ''; + return ''; case 'spotify': - return ''; + return ''; case 'stumbleupon': - return ''; + return ''; case 'tumblr': - return ''; + return ''; case 'twitch': - return ''; + return ''; case 'twitter': - return ''; + return ''; case 'vimeo': - return ''; + return ''; case 'vk': - return ''; + return ''; // phpcs:disable WordPress.WP.CapitalPDangit.Misspelled case 'wordpress': - return ''; + return ''; case 'yelp': - return ''; + return ''; case 'youtube': - return ''; + return ''; case 'share': default: diff --git a/packages/block-library/src/social-link/social-list.js b/packages/block-library/src/social-link/social-list.js index 410e7be30e6aeb..8e6b74ba958175 100644 --- a/packages/block-library/src/social-link/social-list.js +++ b/packages/block-library/src/social-link/social-list.js @@ -173,7 +173,7 @@ const socialList = { icon: SlideshareIcon, },*/ snapchat: { - name: 'Snapshot', + name: 'Snapchat', icon: SnapchatIcon, }, soundcloud: { diff --git a/packages/block-library/src/social-links/index.js b/packages/block-library/src/social-links/index.js index da9101475f4b12..9d54419d74b897 100644 --- a/packages/block-library/src/social-links/index.js +++ b/packages/block-library/src/social-links/index.js @@ -20,7 +20,8 @@ export const settings = { description: __( 'Create a block of links to your social media or external sites' ), styles: [ { name: 'default', label: __( 'Default' ), isDefault: true }, - { name: 'icon-only', label: __( 'Icon Only' ) }, + { name: 'logos-only', label: __( 'Logos Only' ) }, + { name: 'pill-shape', label: __( 'Pill Shape' ) }, ], edit, save, diff --git a/packages/block-library/src/social-links/style.scss b/packages/block-library/src/social-links/style.scss index 9e6b9895283cfa..70addf413b6975 100644 --- a/packages/block-library/src/social-links/style.scss +++ b/packages/block-library/src/social-links/style.scss @@ -30,7 +30,7 @@ } // Provide colors for a range of icons. -.wp-block-social-links:not(.is-style-icon-only) { +.wp-block-social-links:not(.is-style-logos-only) { .wp-social-link-amazon { background-color: #f90; color: #fff; @@ -185,7 +185,8 @@ .wp-social-link-snapchat { background-color: #fefc00; - color: #050708; + color: #fff; + stroke: #000; } .wp-social-link-soundcloud { @@ -244,9 +245,192 @@ } } -// Treatment for icon only style. -.wp-block-social-links.is-style-icon-only { +// Treatment for logos only style. +.wp-block-social-links.is-style-logos-only { .wp-social-link { background: none; } + + .wp-social-link-amazon { + color: #f90; + } + + .wp-social-link-apple { + color: #000; + } + + .wp-social-link-bandcamp { + color: #1ea0c3; + } + + .wp-social-link-behance { + color: #0757fe; + } + + .wp-social-link-chain { + // Link, has generic colors. + } + + .wp-social-link-codepen { + color: #1e1f26; + } + + .wp-social-link-deviantart { + color: #02e49b; + } + + .wp-social-link-digg { + color: #1b1a19; + } + + .wp-social-link-dribbble { + color: #e94c89; + } + + .wp-social-link-dropbox { + color: #4280ff; + } + + .wp-social-link-etsy { + color: #f45800; + } + + .wp-social-link-facebook { + color: #1977f2; + } + + .wp-social-link-feed { + // Feed, has generic colors. + } + + .wp-social-link-fivehundredpx { + color: #000; + } + + .wp-social-link-flickr { + color: #0461dd; + } + + .wp-social-link-foursquare { + color: #e65678; + } + + .wp-social-link-github { + color: #24292d; + } + + .wp-social-link-goodreads { + color: #382110; + } + + .wp-social-link-google { + color: #ea4434; + } + + .wp-social-link-instagram { + color: #f00075; + } + + .wp-social-link-lastfm { + color: #e21b24; + } + + .wp-social-link-linkedin { + color: #0577b5; + } + + .wp-social-link-mail { + // Mail, has generic colors. + } + + .wp-social-link-mastodon { + color: #3288d4; + } + + .wp-social-link-medium { + color: #02ab6c; + } + + .wp-social-link-meetup { + color: #f6405f; + } + + .wp-social-link-pinterest { + color: #e60122; + } + + .wp-social-link-pocket { + color: #ef4155; + } + + .wp-social-link-reddit { + color: #fe4500; + } + + .wp-social-link-skype { + color: #0478d7; + } + + .wp-social-link-slideshare { + color: #0577b5; + } + + .wp-social-link-snapchat { + color: #fff; + stroke: #000; + } + + .wp-social-link-soundcloud { + color: #ff5600; + } + + .wp-social-link-spotify { + color: #1bd760; + } + + .wp-social-link-stumbleupon { + color: #eb4923; + } + + .wp-social-link-tumblr { + color: #011835; + } + + .wp-social-link-twitch { + color: #6440a4; + } + + .wp-social-link-twitter { + color: #21a1f3; + } + + .wp-social-link-vimeo { + color: #1eb7ea; + } + + .wp-social-link-vk { + color: #4680c2; + } + + .wp-social-link-wordpress { + color: #3499cd; + } + + .wp-social-link-yelp { + background-color: #d32422; + color: #fff; + } + + .wp-social-link-youtube { + color: #ff0100; + } +} + +// Treatment for pill shape style. +.wp-block-social-links.is-style-pill-shape { + .wp-social-link { + width: auto; + padding-left: 16px; + padding-right: 16px; + } } From a11fea9e178e565e83d7a2a1c8ea0a4397276ce7 Mon Sep 17 00:00:00 2001 From: Joen Asmussen Date: Wed, 28 Aug 2019 11:40:34 +0200 Subject: [PATCH 34/54] Polish, and actually remove icons. This removes some comments. It restores some icons, but it permanently removes others: - Apple - Slideshare - Stumbleupon - Digg --- .../src/social-link/icons/apple.js | 14 ------ .../src/social-link/icons/digg.js | 14 ------ .../src/social-link/icons/slideshare.js | 14 ------ .../src/social-link/icons/stumbleupon.js | 14 ------ .../block-library/src/social-link/index.php | 12 ----- .../src/social-link/social-list.js | 44 +++++-------------- .../block-library/src/social-links/style.scss | 24 ---------- 7 files changed, 12 insertions(+), 124 deletions(-) delete mode 100644 packages/block-library/src/social-link/icons/apple.js delete mode 100644 packages/block-library/src/social-link/icons/digg.js delete mode 100644 packages/block-library/src/social-link/icons/slideshare.js delete mode 100644 packages/block-library/src/social-link/icons/stumbleupon.js diff --git a/packages/block-library/src/social-link/icons/apple.js b/packages/block-library/src/social-link/icons/apple.js deleted file mode 100644 index d9f35e83c259f4..00000000000000 --- a/packages/block-library/src/social-link/icons/apple.js +++ /dev/null @@ -1,14 +0,0 @@ -/** - * WordPress dependencies - */ - -import { - Path, - SVG, -} from '@wordpress/components'; - -export const AppleIcon = ( ) => ( - - - -); diff --git a/packages/block-library/src/social-link/icons/digg.js b/packages/block-library/src/social-link/icons/digg.js deleted file mode 100644 index 22d32289c1b42d..00000000000000 --- a/packages/block-library/src/social-link/icons/digg.js +++ /dev/null @@ -1,14 +0,0 @@ -/** - * WordPress dependencies - */ - -import { - Path, - SVG, -} from '@wordpress/components'; - -export const DiggIcon = ( ) => ( - - - -); diff --git a/packages/block-library/src/social-link/icons/slideshare.js b/packages/block-library/src/social-link/icons/slideshare.js deleted file mode 100644 index 674a4623bd14b3..00000000000000 --- a/packages/block-library/src/social-link/icons/slideshare.js +++ /dev/null @@ -1,14 +0,0 @@ -/** - * WordPress dependencies - */ - -import { - Path, - SVG, -} from '@wordpress/components'; - -export const SlideshareIcon = ( ) => ( - - - -); diff --git a/packages/block-library/src/social-link/icons/stumbleupon.js b/packages/block-library/src/social-link/icons/stumbleupon.js deleted file mode 100644 index 55657bc5ca3625..00000000000000 --- a/packages/block-library/src/social-link/icons/stumbleupon.js +++ /dev/null @@ -1,14 +0,0 @@ -/** - * WordPress dependencies - */ - -import { - Path, - SVG, -} from '@wordpress/components'; - -export const StumbleuponIcon = ( ) => ( - - - -); diff --git a/packages/block-library/src/social-link/index.php b/packages/block-library/src/social-link/index.php index f1b7a9ec907c60..7dfe6e3850d048 100644 --- a/packages/block-library/src/social-link/index.php +++ b/packages/block-library/src/social-link/index.php @@ -112,9 +112,6 @@ function core_social_link_get_icon( $site ) { case 'amazon': return ''; - case 'apple': - return ''; - case 'bandcamp': return ''; @@ -130,9 +127,6 @@ function core_social_link_get_icon( $site ) { case 'deviantart': return ''; - case 'digg': - return ''; - case 'dribbble': return ''; @@ -196,9 +190,6 @@ function core_social_link_get_icon( $site ) { case 'skype': return ''; - case 'slideshare': - return ''; - case 'snapchat': return ''; @@ -208,9 +199,6 @@ function core_social_link_get_icon( $site ) { case 'spotify': return ''; - case 'stumbleupon': - return ''; - case 'tumblr': return ''; diff --git a/packages/block-library/src/social-link/social-list.js b/packages/block-library/src/social-link/social-list.js index 8e6b74ba958175..792a57117e1899 100644 --- a/packages/block-library/src/social-link/social-list.js +++ b/packages/block-library/src/social-link/social-list.js @@ -3,15 +3,13 @@ */ import { AmazonIcon, - //AppleIcon, BandcampIcon, BehanceIcon, ChainIcon, CodepenIcon, DeviantartIcon, - //DiggIcon, DribbbleIcon, - //DropboxIcon, + DropboxIcon, EtsyIcon, FacebookIcon, FeedIcon, @@ -19,31 +17,29 @@ import { FlickrIcon, FoursquareIcon, GoodreadsIcon, - //GoogleIcon, + GoogleIcon, GithubIcon, InstagramIcon, LastfmIcon, LinkedinIcon, MailIcon, MastodonIcon, - //MeetupIcon, + MeetupIcon, MediumIcon, PinterestIcon, PocketIcon, RedditIcon, SkypeIcon, - //SlideshareIcon, SnapchatIcon, SoundcloudIcon, SpotifyIcon, - //StumbleuponIcon, TumblrIcon, TwitchIcon, TwitterIcon, VimeoIcon, VkIcon, WordPressIcon, - //YelpIcon, + YelpIcon, YoutubeIcon, } from './icons'; @@ -56,10 +52,6 @@ const socialList = { name: 'Amazon', icon: AmazonIcon, }, - /*apple: { - name: 'Apple', - icon: AppleIcon, - },*/ bandcamp: { name: 'Bandcamp', icon: BandcampIcon, @@ -80,18 +72,14 @@ const socialList = { name: 'DeviantArt', icon: DeviantartIcon, }, - /*digg: { - name: 'Digg', - icon: DiggIcon, - },*/ dribbble: { name: 'Dribbble', icon: DribbbleIcon, }, - /*dropbox: { + dropbox: { name: 'Dropbox', icon: DropboxIcon, - },*/ + }, etsy: { name: 'Etsy', icon: EtsyIcon, @@ -116,10 +104,10 @@ const socialList = { name: 'Goodreads', icon: GoodreadsIcon, }, - /*google: { + google: { name: 'Google', icon: GoogleIcon, - },*/ + }, github: { name: 'Github', icon: GithubIcon, @@ -144,10 +132,10 @@ const socialList = { name: 'Mastodon', icon: MastodonIcon, }, - /*meetup: { + meetup: { name: 'Meetup', icon: MeetupIcon, - },*/ + }, medium: { name: 'Medium', icon: MediumIcon, @@ -168,10 +156,6 @@ const socialList = { name: 'Skype', icon: SkypeIcon, }, - /*slideshare: { - name: 'Slideshare', - icon: SlideshareIcon, - },*/ snapchat: { name: 'Snapchat', icon: SnapchatIcon, @@ -184,10 +168,6 @@ const socialList = { name: 'Spotify', icon: SpotifyIcon, }, - /*stumbleupon: { - name: 'Stumbleupon', - icon: StumbleuponIcon, - },*/ tumblr: { name: 'Tumblr', icon: TumblrIcon, @@ -212,10 +192,10 @@ const socialList = { name: 'WordPress', icon: WordPressIcon, }, - /*yelp: { + yelp: { name: 'Yelp', icon: YelpIcon, - },*/ + }, youtube: { name: 'YouTube', icon: YoutubeIcon, diff --git a/packages/block-library/src/social-links/style.scss b/packages/block-library/src/social-links/style.scss index 70addf413b6975..9ccf50fbccef3d 100644 --- a/packages/block-library/src/social-links/style.scss +++ b/packages/block-library/src/social-links/style.scss @@ -51,10 +51,6 @@ color: #fff; } - .wp-social-link-chain { - // Link, has generic colors. - } - .wp-social-link-codepen { background-color: #1e1f26; color: #fff; @@ -90,10 +86,6 @@ color: #fff; } - .wp-social-link-feed { - // Feed, has generic colors. - } - .wp-social-link-fivehundredpx { background-color: #000; color: #fff; @@ -139,10 +131,6 @@ color: #fff; } - .wp-social-link-mail { - // Mail, has generic colors. - } - .wp-social-link-mastodon { background-color: #3288d4; color: #fff; @@ -267,10 +255,6 @@ color: #0757fe; } - .wp-social-link-chain { - // Link, has generic colors. - } - .wp-social-link-codepen { color: #1e1f26; } @@ -299,10 +283,6 @@ color: #1977f2; } - .wp-social-link-feed { - // Feed, has generic colors. - } - .wp-social-link-fivehundredpx { color: #000; } @@ -339,10 +319,6 @@ color: #0577b5; } - .wp-social-link-mail { - // Mail, has generic colors. - } - .wp-social-link-mastodon { color: #3288d4; } From 42a8fdddfdb1390cda6019f5d71a0c2ccfe94789 Mon Sep 17 00:00:00 2001 From: Joen Asmussen Date: Wed, 28 Aug 2019 11:56:40 +0200 Subject: [PATCH 35/54] Fix URL popover. --- packages/block-library/src/social-link/edit.js | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/packages/block-library/src/social-link/edit.js b/packages/block-library/src/social-link/edit.js index ab2d83435c4e83..fca7de233eb42c 100644 --- a/packages/block-library/src/social-link/edit.js +++ b/packages/block-library/src/social-link/edit.js @@ -41,12 +41,14 @@ const SocialLinkEdit = ( { attributes, setAttributes, isSelected } ) => { setPopover( false ) } > -
      setPopover( false ) }> -
      + setAttributes( { url: evt.target.value } ) } + placeholder={ __( 'Enter site URL' ) } + /> +
      From aaaee8c3e8bedf7eddfbd36785c320ba3858b7c1 Mon Sep 17 00:00:00 2001 From: Joen Asmussen Date: Wed, 28 Aug 2019 12:14:41 +0200 Subject: [PATCH 36/54] This improves the preview. --- packages/block-library/src/social-links/editor.scss | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/packages/block-library/src/social-links/editor.scss b/packages/block-library/src/social-links/editor.scss index 192cb0d91542dd..1f670bc6d92484 100644 --- a/packages/block-library/src/social-links/editor.scss +++ b/packages/block-library/src/social-links/editor.scss @@ -64,12 +64,17 @@ } // Improve the preview. -.block-editor-block-switcher__preview { +// @todo: Look at improving the preview component to make this unnecessary. +.block-editor-block-preview__content { + + // This ensures buttons in preview are fully opaque despite being disabled. .wp-social-link:disabled { opacity: 1; } - .is-style-icon-only .wp-social-link:disabled { - color: $dark-gray-500; + // This ensures the preview is of a good size. + [data-type="core/social-links"] { + width: auto !important; + display: inline-block; } } From 5891e55ae96ffd70fd728c5a49d122218d460399 Mon Sep 17 00:00:00 2001 From: Joen Asmussen Date: Wed, 28 Aug 2019 14:02:53 +0200 Subject: [PATCH 37/54] Try a new "unselected state". --- .../block-library/src/social-link/editor.scss | 22 +++++--------- .../src/social-links/editor.scss | 29 +++++++++++++++++++ 2 files changed, 37 insertions(+), 14 deletions(-) diff --git a/packages/block-library/src/social-link/editor.scss b/packages/block-library/src/social-link/editor.scss index d84cd9133400f9..c2990f65b462fa 100644 --- a/packages/block-library/src/social-link/editor.scss +++ b/packages/block-library/src/social-link/editor.scss @@ -1,21 +1,15 @@ - -// default do not display incomplete -// unless parent or child selected -.wp-social-link__is-incomplete { - display: none; +.has-child-selected .wp-social-link__is-incomplete.wp-social-link__is-incomplete, +.is-selected .wp-social-link__is-incomplete.wp-social-link__is-incomplete { + background-color: $dark-gray-150; } -.has-child-selected .wp-social-link__is-incomplete, -.is-selected .wp-social-link__is-incomplete { - display: block; - opacity: 0.6; - - [data-type*="core/social-link-"].is-selected &, // Matches the selected social logo block. - &:focus { - opacity: 1; - } +.has-child-selected .is-style-logos-only .wp-social-link__is-incomplete.wp-social-link__is-incomplete, +.is-selected .is-style-logos-only .wp-social-link__is-incomplete.wp-social-link__is-incomplete { + color: $dark-gray-150; + background-color: transparent; } + [data-type*="core/social-link-"].is-selected .wp-social-link, // Matches the selected social logo block. .wp-social-link:focus { box-shadow: 0 0 0 1px $white, 0 0 0 3px $blue-medium-500; diff --git a/packages/block-library/src/social-links/editor.scss b/packages/block-library/src/social-links/editor.scss index 1f670bc6d92484..2bcf6de68e9865 100644 --- a/packages/block-library/src/social-links/editor.scss +++ b/packages/block-library/src/social-links/editor.scss @@ -78,3 +78,32 @@ display: inline-block; } } + +// Selected/unselected states. +// Unselected block is preview, selected has additional options. +// When no blocks are configured, the block shouldn't collapse but instead show some gray "skeleton indicators". +[data-type="core/social-links"]:not(.is-selected):not(.has-child-selected) .wp-block-social-links { + min-height: 36px; // This height matches the height of the buttons and ensures an empty block doesn't collapse. +} + +// Disappear but show on hover or nav mode focus. +[data-type="core/social-links"] .wp-social-link__is-incomplete { + transition: transform 0.1s ease; + transform-origin: center center; +} + +[data-type="core/social-links"]:not(.is-selected):not(.has-child-selected):not(.is-hovered) { + .wp-social-link__is-incomplete { + opacity: 0; + transform: scale(0); + width: 0; + padding: 0; + margin-right: 0; + } +} + +[data-type="core/social-links"]:not(.is-selected):not(.has-child-selected) { + .wp-social-link__is-incomplete { + opacity: 0.6; + } +} From 230e6630e443f08e2b88894e6e6c97d0d4456c57 Mon Sep 17 00:00:00 2001 From: Marcus Kazmierczak Date: Wed, 28 Aug 2019 06:42:43 -0700 Subject: [PATCH 38/54] Apply suggestions from code review Thanks for taking the time and reviewing Co-Authored-By: Daniel Richards --- packages/block-library/src/social-link/edit.js | 4 ++-- packages/block-library/src/social-links/edit.js | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/packages/block-library/src/social-link/edit.js b/packages/block-library/src/social-link/edit.js index fca7de233eb42c..96bb80cfaeaeb3 100644 --- a/packages/block-library/src/social-link/edit.js +++ b/packages/block-library/src/social-link/edit.js @@ -25,7 +25,7 @@ const SocialLinkEdit = ( { attributes, setAttributes, isSelected } ) => { const classes = classNames( 'wp-social-link', 'wp-social-link-' + site, - { 'wp-social-link__is-incomplete': ( url ) ? false : true }, + { 'wp-social-link__is-incomplete': url }, ); // Import icon. @@ -45,7 +45,7 @@ const SocialLinkEdit = ( { attributes, setAttributes, isSelected } ) => {
      setAttributes( { url: evt.target.value } ) } + onChange={ ( event ) => setAttributes( { url: event.target.value } ) } placeholder={ __( 'Enter site URL' ) } />
      diff --git a/packages/block-library/src/social-links/edit.js b/packages/block-library/src/social-links/edit.js index 53783f5143ae1a..0edf67dadf86c4 100644 --- a/packages/block-library/src/social-links/edit.js +++ b/packages/block-library/src/social-links/edit.js @@ -15,7 +15,7 @@ const ALLOWED_BLOCKS = Object.keys( socialList ).map( ( site ) => { return 'core/social-link-' + site; } ); -// Template contains the links that show when start +// Template contains the links that show when start. const TEMPLATE = [ [ 'core/social-link-facebook' ], [ 'core/social-link-twitter' ], From 4c5916f4d4828c04ce4b153f973043f7e24ae890 Mon Sep 17 00:00:00 2001 From: Marcus Kazmierczak Date: Wed, 28 Aug 2019 07:29:17 -0700 Subject: [PATCH 39/54] Touch up remaining user interactions - Add WordPress as default logo, so does not collapse to nothing - Per @talldan review, add preventDefault on submit - Clean up removed icons - Fix ! url logic --- packages/block-library/src/social-link/edit.js | 9 +++++++-- packages/block-library/src/social-link/editor.scss | 8 ++++---- packages/block-library/src/social-link/icons/index.js | 4 ---- packages/block-library/src/social-links/edit.js | 2 +- 4 files changed, 12 insertions(+), 11 deletions(-) diff --git a/packages/block-library/src/social-link/edit.js b/packages/block-library/src/social-link/edit.js index 96bb80cfaeaeb3..d52bae3b4e61ab 100644 --- a/packages/block-library/src/social-link/edit.js +++ b/packages/block-library/src/social-link/edit.js @@ -25,7 +25,7 @@ const SocialLinkEdit = ( { attributes, setAttributes, isSelected } ) => { const classes = classNames( 'wp-social-link', 'wp-social-link-' + site, - { 'wp-social-link__is-incomplete': url }, + { 'wp-social-link__is-incomplete': ! url }, ); // Import icon. @@ -41,7 +41,12 @@ const SocialLinkEdit = ( { attributes, setAttributes, isSelected } ) => { setPopover( false ) } > -
      setPopover( false ) }> + { + event.preventDefault(); + setPopover( false ); + } } >
      { // Template contains the links that show when start. const TEMPLATE = [ + [ 'core/social-link-wordpress', { url: 'https://wordpress.org' } ], [ 'core/social-link-facebook' ], [ 'core/social-link-twitter' ], [ 'core/social-link-instagram' ], - [ 'core/social-link-wordpress' ], ]; export const SocialLinksEdit = function( { className } ) { From 386b3231dfe1ca69e579788f896cd2cf08ca3fba Mon Sep 17 00:00:00 2001 From: jasmussen Date: Wed, 28 Aug 2019 18:16:40 +0200 Subject: [PATCH 40/54] Hit area & frontend refinement. --- packages/block-library/src/social-link/editor.scss | 11 +++++++++++ packages/block-library/src/social-links/style.scss | 14 +++++++++++++- 2 files changed, 24 insertions(+), 1 deletion(-) diff --git a/packages/block-library/src/social-link/editor.scss b/packages/block-library/src/social-link/editor.scss index f749af51c4048c..46a15653252788 100644 --- a/packages/block-library/src/social-link/editor.scss +++ b/packages/block-library/src/social-link/editor.scss @@ -1,3 +1,14 @@ +.wp-social-link { + // Frontend outputs a link, backend a button. Both should have the same padding. + // Therefore, the following exactly matches the padding on the frontend link. + padding: 6px; +} + +.wp-block-social-links.is-style-pill-shape .wp-social-link { + padding-left: 16px; + padding-right: 16px; +} + .has-child-selected .wp-social-link__is-incomplete, .is-selected .wp-social-link__is-incomplete { background-color: $dark-gray-150; diff --git a/packages/block-library/src/social-links/style.scss b/packages/block-library/src/social-links/style.scss index 9ccf50fbccef3d..06f5bd72e240fe 100644 --- a/packages/block-library/src/social-links/style.scss +++ b/packages/block-library/src/social-links/style.scss @@ -15,18 +15,27 @@ background-position: center center; background-repeat: no-repeat; margin-right: $grid-size; - padding: 6px; + transition: transform 0.1s ease; a { + padding: 6px; display: block; line-height: 0; + transition: transform 0.1s ease; } a, + a:hover, + a:active, + a:visited, svg { color: currentColor; fill: currentColor; } + + &:hover { + transform: scale(1.1); + } } // Provide colors for a range of icons. @@ -406,6 +415,9 @@ .wp-block-social-links.is-style-pill-shape { .wp-social-link { width: auto; + } + + .wp-social-link a { padding-left: 16px; padding-right: 16px; } From b129a69593d590e5f754c608c4c9f8593fd39314 Mon Sep 17 00:00:00 2001 From: Marcus Kazmierczak Date: Wed, 28 Aug 2019 10:32:13 -0700 Subject: [PATCH 41/54] Remove abbreviation in variable name --- packages/block-library/src/social-link/index.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/block-library/src/social-link/index.js b/packages/block-library/src/social-link/index.js index 1f0bbd23614512..c1a1ecf14ef8e1 100644 --- a/packages/block-library/src/social-link/index.js +++ b/packages/block-library/src/social-link/index.js @@ -10,7 +10,7 @@ import edit from './edit'; import save from './save'; import socialList from './social-list'; -const commonAttribs = { +const commonAttributes = { category: 'widgets', parent: [ 'core/social-links' ], supports: { @@ -32,7 +32,7 @@ export const sites = Object.keys( socialList ).map( title: siteParams.name, icon: siteParams.icon, description: __( 'Link to ' + siteParams.name ), - ...commonAttribs, + ...commonAttributes, attributes: { url: { type: 'string', From ff35ed1437238e77b1c913d41c552792dbdd2417 Mon Sep 17 00:00:00 2001 From: Marcus Kazmierczak Date: Wed, 28 Aug 2019 10:33:07 -0700 Subject: [PATCH 42/54] Remove apple, digg, slideshare, stumbleupon from register --- packages/block-library/src/social-link/index.php | 4 ---- 1 file changed, 4 deletions(-) diff --git a/packages/block-library/src/social-link/index.php b/packages/block-library/src/social-link/index.php index 7dfe6e3850d048..4d04c9cd1c12c4 100644 --- a/packages/block-library/src/social-link/index.php +++ b/packages/block-library/src/social-link/index.php @@ -31,13 +31,11 @@ function render_core_social_link( $attributes ) { function register_block_core_social_link() { $sites = array( 'amazon', - 'apple', 'bandcamp', 'behance', 'chain', 'codepen', 'deviantart', - 'digg', 'dribbble', 'dropbox', 'etsy', @@ -60,11 +58,9 @@ function register_block_core_social_link() { 'pocket', 'reddit', 'skype', - 'slideshare', 'snapchat', 'soundcloud', 'spotify', - 'stumbleupon', 'tumblr', 'twitch', 'twitter', From 168784a543efaa1bf454694ad945e842cc338ff7 Mon Sep 17 00:00:00 2001 From: Marcus Kazmierczak Date: Wed, 28 Aug 2019 10:33:37 -0700 Subject: [PATCH 43/54] Add e2e tests for dropbox, google, meetup, yelp --- .../e2e-tests/fixtures/block-transforms.js | 18 ++++++++++++++- .../blocks/core__social-link-dropbox.html | 3 +++ .../blocks/core__social-link-dropbox.json | 13 +++++++++++ .../core__social-link-dropbox.parsed.json | 22 +++++++++++++++++++ .../core__social-link-dropbox.serialized.html | 3 +++ .../blocks/core__social-link-google.html | 3 +++ .../blocks/core__social-link-google.json | 13 +++++++++++ .../core__social-link-google.parsed.json | 22 +++++++++++++++++++ .../core__social-link-google.serialized.html | 3 +++ .../blocks/core__social-link-meetup.html | 3 +++ .../blocks/core__social-link-meetup.json | 13 +++++++++++ .../core__social-link-meetup.parsed.json | 22 +++++++++++++++++++ .../core__social-link-meetup.serialized.html | 3 +++ .../blocks/core__social-link-yelp.html | 3 +++ .../blocks/core__social-link-yelp.json | 13 +++++++++++ .../blocks/core__social-link-yelp.parsed.json | 22 +++++++++++++++++++ .../core__social-link-yelp.serialized.html | 3 +++ 17 files changed, 181 insertions(+), 1 deletion(-) create mode 100644 packages/e2e-tests/fixtures/blocks/core__social-link-dropbox.html create mode 100644 packages/e2e-tests/fixtures/blocks/core__social-link-dropbox.json create mode 100644 packages/e2e-tests/fixtures/blocks/core__social-link-dropbox.parsed.json create mode 100644 packages/e2e-tests/fixtures/blocks/core__social-link-dropbox.serialized.html create mode 100644 packages/e2e-tests/fixtures/blocks/core__social-link-google.html create mode 100644 packages/e2e-tests/fixtures/blocks/core__social-link-google.json create mode 100644 packages/e2e-tests/fixtures/blocks/core__social-link-google.parsed.json create mode 100644 packages/e2e-tests/fixtures/blocks/core__social-link-google.serialized.html create mode 100644 packages/e2e-tests/fixtures/blocks/core__social-link-meetup.html create mode 100644 packages/e2e-tests/fixtures/blocks/core__social-link-meetup.json create mode 100644 packages/e2e-tests/fixtures/blocks/core__social-link-meetup.parsed.json create mode 100644 packages/e2e-tests/fixtures/blocks/core__social-link-meetup.serialized.html create mode 100644 packages/e2e-tests/fixtures/blocks/core__social-link-yelp.html create mode 100644 packages/e2e-tests/fixtures/blocks/core__social-link-yelp.json create mode 100644 packages/e2e-tests/fixtures/blocks/core__social-link-yelp.parsed.json create mode 100644 packages/e2e-tests/fixtures/blocks/core__social-link-yelp.serialized.html diff --git a/packages/e2e-tests/fixtures/block-transforms.js b/packages/e2e-tests/fixtures/block-transforms.js index e76d3897a912a1..67e041c29dc281 100644 --- a/packages/e2e-tests/fixtures/block-transforms.js +++ b/packages/e2e-tests/fixtures/block-transforms.js @@ -446,6 +446,10 @@ export const EXPECTED_TRANSFORMS = { ], originalBlock: 'Dribbble', }, + 'core__social-link-dropbox': { + availableTransforms: [], + originalBlock: 'Dropbox', + }, 'core__social-link-etsy': { availableTransforms: [ 'Group', @@ -494,6 +498,10 @@ export const EXPECTED_TRANSFORMS = { ], originalBlock: 'Goodreads', }, + 'core__social-link-google': { + availableTransforms: [], + originalBlock: 'Google', + }, 'core__social-link-instagram': { availableTransforms: [ 'Group', @@ -530,6 +538,10 @@ export const EXPECTED_TRANSFORMS = { ], originalBlock: 'Medium', }, + 'core__social-link-meetup': { + availableTransforms: [], + originalBlock: 'Meetup', + }, 'core__social-link-pinterest': { availableTransforms: [ 'Group', @@ -558,7 +570,7 @@ export const EXPECTED_TRANSFORMS = { availableTransforms: [ 'Group', ], - originalBlock: 'Snapshot', + originalBlock: 'Snapchat', }, 'core__social-link-soundcloud': { availableTransforms: [ @@ -608,6 +620,10 @@ export const EXPECTED_TRANSFORMS = { ], originalBlock: 'WordPress', }, + 'core__social-link-yelp': { + availableTransforms: [], + originalBlock: 'Yelp', + }, 'core__social-link-youtube': { availableTransforms: [ 'Group', diff --git a/packages/e2e-tests/fixtures/blocks/core__social-link-dropbox.html b/packages/e2e-tests/fixtures/blocks/core__social-link-dropbox.html new file mode 100644 index 00000000000000..bed92991369a57 --- /dev/null +++ b/packages/e2e-tests/fixtures/blocks/core__social-link-dropbox.html @@ -0,0 +1,3 @@ + + + diff --git a/packages/e2e-tests/fixtures/blocks/core__social-link-dropbox.json b/packages/e2e-tests/fixtures/blocks/core__social-link-dropbox.json new file mode 100644 index 00000000000000..111a36d41d1550 --- /dev/null +++ b/packages/e2e-tests/fixtures/blocks/core__social-link-dropbox.json @@ -0,0 +1,13 @@ +[ + { + "clientId": "_clientId_0", + "name": "core/social-link-dropbox", + "isValid": false, + "attributes": { + "url": "https://example.com/", + "site": "dropbox" + }, + "innerBlocks": [], + "originalContent": "" + } +] diff --git a/packages/e2e-tests/fixtures/blocks/core__social-link-dropbox.parsed.json b/packages/e2e-tests/fixtures/blocks/core__social-link-dropbox.parsed.json new file mode 100644 index 00000000000000..20b834be1abf61 --- /dev/null +++ b/packages/e2e-tests/fixtures/blocks/core__social-link-dropbox.parsed.json @@ -0,0 +1,22 @@ +[ + { + "blockName": "core/social-link-dropbox", + "attrs": { + "url": "https://example.com/" + }, + "innerBlocks": [], + "innerHTML": "\n\n", + "innerContent": [ + "\n\n" + ] + }, + { + "blockName": null, + "attrs": {}, + "innerBlocks": [], + "innerHTML": "\n", + "innerContent": [ + "\n" + ] + } +] diff --git a/packages/e2e-tests/fixtures/blocks/core__social-link-dropbox.serialized.html b/packages/e2e-tests/fixtures/blocks/core__social-link-dropbox.serialized.html new file mode 100644 index 00000000000000..bed92991369a57 --- /dev/null +++ b/packages/e2e-tests/fixtures/blocks/core__social-link-dropbox.serialized.html @@ -0,0 +1,3 @@ + + + diff --git a/packages/e2e-tests/fixtures/blocks/core__social-link-google.html b/packages/e2e-tests/fixtures/blocks/core__social-link-google.html new file mode 100644 index 00000000000000..2d9d7ef6161720 --- /dev/null +++ b/packages/e2e-tests/fixtures/blocks/core__social-link-google.html @@ -0,0 +1,3 @@ + + + diff --git a/packages/e2e-tests/fixtures/blocks/core__social-link-google.json b/packages/e2e-tests/fixtures/blocks/core__social-link-google.json new file mode 100644 index 00000000000000..0570c7c9b7d3dd --- /dev/null +++ b/packages/e2e-tests/fixtures/blocks/core__social-link-google.json @@ -0,0 +1,13 @@ +[ + { + "clientId": "_clientId_0", + "name": "core/social-link-google", + "isValid": false, + "attributes": { + "url": "https://example.com/", + "site": "google" + }, + "innerBlocks": [], + "originalContent": "" + } +] diff --git a/packages/e2e-tests/fixtures/blocks/core__social-link-google.parsed.json b/packages/e2e-tests/fixtures/blocks/core__social-link-google.parsed.json new file mode 100644 index 00000000000000..88ae8e0154d417 --- /dev/null +++ b/packages/e2e-tests/fixtures/blocks/core__social-link-google.parsed.json @@ -0,0 +1,22 @@ +[ + { + "blockName": "core/social-link-google", + "attrs": { + "url": "https://example.com/" + }, + "innerBlocks": [], + "innerHTML": "\n\n", + "innerContent": [ + "\n\n" + ] + }, + { + "blockName": null, + "attrs": {}, + "innerBlocks": [], + "innerHTML": "\n", + "innerContent": [ + "\n" + ] + } +] diff --git a/packages/e2e-tests/fixtures/blocks/core__social-link-google.serialized.html b/packages/e2e-tests/fixtures/blocks/core__social-link-google.serialized.html new file mode 100644 index 00000000000000..2d9d7ef6161720 --- /dev/null +++ b/packages/e2e-tests/fixtures/blocks/core__social-link-google.serialized.html @@ -0,0 +1,3 @@ + + + diff --git a/packages/e2e-tests/fixtures/blocks/core__social-link-meetup.html b/packages/e2e-tests/fixtures/blocks/core__social-link-meetup.html new file mode 100644 index 00000000000000..ea2c16db0f1863 --- /dev/null +++ b/packages/e2e-tests/fixtures/blocks/core__social-link-meetup.html @@ -0,0 +1,3 @@ + + + diff --git a/packages/e2e-tests/fixtures/blocks/core__social-link-meetup.json b/packages/e2e-tests/fixtures/blocks/core__social-link-meetup.json new file mode 100644 index 00000000000000..5a3f3444368076 --- /dev/null +++ b/packages/e2e-tests/fixtures/blocks/core__social-link-meetup.json @@ -0,0 +1,13 @@ +[ + { + "clientId": "_clientId_0", + "name": "core/social-link-meetup", + "isValid": false, + "attributes": { + "url": "https://example.com/", + "site": "meetup" + }, + "innerBlocks": [], + "originalContent": "" + } +] diff --git a/packages/e2e-tests/fixtures/blocks/core__social-link-meetup.parsed.json b/packages/e2e-tests/fixtures/blocks/core__social-link-meetup.parsed.json new file mode 100644 index 00000000000000..508ffc127d9710 --- /dev/null +++ b/packages/e2e-tests/fixtures/blocks/core__social-link-meetup.parsed.json @@ -0,0 +1,22 @@ +[ + { + "blockName": "core/social-link-meetup", + "attrs": { + "url": "https://example.com/" + }, + "innerBlocks": [], + "innerHTML": "\n\n", + "innerContent": [ + "\n\n" + ] + }, + { + "blockName": null, + "attrs": {}, + "innerBlocks": [], + "innerHTML": "\n", + "innerContent": [ + "\n" + ] + } +] diff --git a/packages/e2e-tests/fixtures/blocks/core__social-link-meetup.serialized.html b/packages/e2e-tests/fixtures/blocks/core__social-link-meetup.serialized.html new file mode 100644 index 00000000000000..ea2c16db0f1863 --- /dev/null +++ b/packages/e2e-tests/fixtures/blocks/core__social-link-meetup.serialized.html @@ -0,0 +1,3 @@ + + + diff --git a/packages/e2e-tests/fixtures/blocks/core__social-link-yelp.html b/packages/e2e-tests/fixtures/blocks/core__social-link-yelp.html new file mode 100644 index 00000000000000..b8b73816f0c7b3 --- /dev/null +++ b/packages/e2e-tests/fixtures/blocks/core__social-link-yelp.html @@ -0,0 +1,3 @@ + + + diff --git a/packages/e2e-tests/fixtures/blocks/core__social-link-yelp.json b/packages/e2e-tests/fixtures/blocks/core__social-link-yelp.json new file mode 100644 index 00000000000000..7c1c0bff27f302 --- /dev/null +++ b/packages/e2e-tests/fixtures/blocks/core__social-link-yelp.json @@ -0,0 +1,13 @@ +[ + { + "clientId": "_clientId_0", + "name": "core/social-link-yelp", + "isValid": false, + "attributes": { + "url": "https://example.com/", + "site": "yelp" + }, + "innerBlocks": [], + "originalContent": "" + } +] diff --git a/packages/e2e-tests/fixtures/blocks/core__social-link-yelp.parsed.json b/packages/e2e-tests/fixtures/blocks/core__social-link-yelp.parsed.json new file mode 100644 index 00000000000000..2c5b9057b50dc9 --- /dev/null +++ b/packages/e2e-tests/fixtures/blocks/core__social-link-yelp.parsed.json @@ -0,0 +1,22 @@ +[ + { + "blockName": "core/social-link-yelp", + "attrs": { + "url": "https://example.com/" + }, + "innerBlocks": [], + "innerHTML": "\n\n", + "innerContent": [ + "\n\n" + ] + }, + { + "blockName": null, + "attrs": {}, + "innerBlocks": [], + "innerHTML": "\n", + "innerContent": [ + "\n" + ] + } +] diff --git a/packages/e2e-tests/fixtures/blocks/core__social-link-yelp.serialized.html b/packages/e2e-tests/fixtures/blocks/core__social-link-yelp.serialized.html new file mode 100644 index 00000000000000..b8b73816f0c7b3 --- /dev/null +++ b/packages/e2e-tests/fixtures/blocks/core__social-link-yelp.serialized.html @@ -0,0 +1,3 @@ + + + From 2793b8ff8a8ddf3212926a980906e5eed5121247 Mon Sep 17 00:00:00 2001 From: Marcus Kazmierczak Date: Wed, 28 Aug 2019 12:53:57 -0700 Subject: [PATCH 44/54] Don't open URL popover by default, requires click in --- packages/block-library/src/social-link/edit.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/block-library/src/social-link/edit.js b/packages/block-library/src/social-link/edit.js index d52bae3b4e61ab..c81afda1549ac3 100644 --- a/packages/block-library/src/social-link/edit.js +++ b/packages/block-library/src/social-link/edit.js @@ -21,7 +21,7 @@ import { getIconBySite } from './social-list'; const SocialLinkEdit = ( { attributes, setAttributes, isSelected } ) => { const { url, site } = attributes; - const [ showURLPopover, setPopover ] = useState( true ); + const [ showURLPopover, setPopover ] = useState( false ); const classes = classNames( 'wp-social-link', 'wp-social-link-' + site, From 7cfda72953a2da40c1c6605c66415ed4f309825e Mon Sep 17 00:00:00 2001 From: Marcus Kazmierczak Date: Wed, 28 Aug 2019 12:43:32 -0700 Subject: [PATCH 45/54] Fix e2e-test case fixtures --- packages/e2e-tests/fixtures/block-transforms.js | 16 ++++++++++++---- .../blocks/core__social-link-dropbox.html | 2 +- .../blocks/core__social-link-dropbox.json | 4 ++-- .../blocks/core__social-link-dropbox.parsed.json | 4 ++-- .../core__social-link-dropbox.serialized.html | 2 +- .../blocks/core__social-link-google.html | 2 +- .../blocks/core__social-link-google.json | 4 ++-- .../blocks/core__social-link-google.parsed.json | 4 ++-- .../core__social-link-google.serialized.html | 2 +- .../blocks/core__social-link-meetup.html | 2 +- .../blocks/core__social-link-meetup.json | 4 ++-- .../blocks/core__social-link-meetup.parsed.json | 4 ++-- .../core__social-link-meetup.serialized.html | 2 +- .../fixtures/blocks/core__social-link-yelp.html | 2 +- .../fixtures/blocks/core__social-link-yelp.json | 4 ++-- .../blocks/core__social-link-yelp.parsed.json | 4 ++-- .../core__social-link-yelp.serialized.html | 2 +- 17 files changed, 36 insertions(+), 28 deletions(-) diff --git a/packages/e2e-tests/fixtures/block-transforms.js b/packages/e2e-tests/fixtures/block-transforms.js index 67e041c29dc281..290597129609c7 100644 --- a/packages/e2e-tests/fixtures/block-transforms.js +++ b/packages/e2e-tests/fixtures/block-transforms.js @@ -447,7 +447,9 @@ export const EXPECTED_TRANSFORMS = { originalBlock: 'Dribbble', }, 'core__social-link-dropbox': { - availableTransforms: [], + availableTransforms: [ + 'Group', + ], originalBlock: 'Dropbox', }, 'core__social-link-etsy': { @@ -499,7 +501,9 @@ export const EXPECTED_TRANSFORMS = { originalBlock: 'Goodreads', }, 'core__social-link-google': { - availableTransforms: [], + availableTransforms: [ + 'Group', + ], originalBlock: 'Google', }, 'core__social-link-instagram': { @@ -539,7 +543,9 @@ export const EXPECTED_TRANSFORMS = { originalBlock: 'Medium', }, 'core__social-link-meetup': { - availableTransforms: [], + availableTransforms: [ + 'Group', + ], originalBlock: 'Meetup', }, 'core__social-link-pinterest': { @@ -621,7 +627,9 @@ export const EXPECTED_TRANSFORMS = { originalBlock: 'WordPress', }, 'core__social-link-yelp': { - availableTransforms: [], + availableTransforms: [ + 'Group', + ], originalBlock: 'Yelp', }, 'core__social-link-youtube': { diff --git a/packages/e2e-tests/fixtures/blocks/core__social-link-dropbox.html b/packages/e2e-tests/fixtures/blocks/core__social-link-dropbox.html index bed92991369a57..17934f85191d88 100644 --- a/packages/e2e-tests/fixtures/blocks/core__social-link-dropbox.html +++ b/packages/e2e-tests/fixtures/blocks/core__social-link-dropbox.html @@ -1,3 +1,3 @@ - + diff --git a/packages/e2e-tests/fixtures/blocks/core__social-link-dropbox.json b/packages/e2e-tests/fixtures/blocks/core__social-link-dropbox.json index 111a36d41d1550..41a9e02cab41c5 100644 --- a/packages/e2e-tests/fixtures/blocks/core__social-link-dropbox.json +++ b/packages/e2e-tests/fixtures/blocks/core__social-link-dropbox.json @@ -2,12 +2,12 @@ { "clientId": "_clientId_0", "name": "core/social-link-dropbox", - "isValid": false, + "isValid": true, "attributes": { "url": "https://example.com/", "site": "dropbox" }, "innerBlocks": [], - "originalContent": "" + "originalContent": "" } ] diff --git a/packages/e2e-tests/fixtures/blocks/core__social-link-dropbox.parsed.json b/packages/e2e-tests/fixtures/blocks/core__social-link-dropbox.parsed.json index 20b834be1abf61..c646d46a343aba 100644 --- a/packages/e2e-tests/fixtures/blocks/core__social-link-dropbox.parsed.json +++ b/packages/e2e-tests/fixtures/blocks/core__social-link-dropbox.parsed.json @@ -5,9 +5,9 @@ "url": "https://example.com/" }, "innerBlocks": [], - "innerHTML": "\n\n", + "innerHTML": "\n\n", "innerContent": [ - "\n\n" + "\n\n" ] }, { diff --git a/packages/e2e-tests/fixtures/blocks/core__social-link-dropbox.serialized.html b/packages/e2e-tests/fixtures/blocks/core__social-link-dropbox.serialized.html index bed92991369a57..17934f85191d88 100644 --- a/packages/e2e-tests/fixtures/blocks/core__social-link-dropbox.serialized.html +++ b/packages/e2e-tests/fixtures/blocks/core__social-link-dropbox.serialized.html @@ -1,3 +1,3 @@ - + diff --git a/packages/e2e-tests/fixtures/blocks/core__social-link-google.html b/packages/e2e-tests/fixtures/blocks/core__social-link-google.html index 2d9d7ef6161720..bc940453608082 100644 --- a/packages/e2e-tests/fixtures/blocks/core__social-link-google.html +++ b/packages/e2e-tests/fixtures/blocks/core__social-link-google.html @@ -1,3 +1,3 @@ - + diff --git a/packages/e2e-tests/fixtures/blocks/core__social-link-google.json b/packages/e2e-tests/fixtures/blocks/core__social-link-google.json index 0570c7c9b7d3dd..2044699907626f 100644 --- a/packages/e2e-tests/fixtures/blocks/core__social-link-google.json +++ b/packages/e2e-tests/fixtures/blocks/core__social-link-google.json @@ -2,12 +2,12 @@ { "clientId": "_clientId_0", "name": "core/social-link-google", - "isValid": false, + "isValid": true, "attributes": { "url": "https://example.com/", "site": "google" }, "innerBlocks": [], - "originalContent": "" + "originalContent": "" } ] diff --git a/packages/e2e-tests/fixtures/blocks/core__social-link-google.parsed.json b/packages/e2e-tests/fixtures/blocks/core__social-link-google.parsed.json index 88ae8e0154d417..b5d762df7b3e33 100644 --- a/packages/e2e-tests/fixtures/blocks/core__social-link-google.parsed.json +++ b/packages/e2e-tests/fixtures/blocks/core__social-link-google.parsed.json @@ -5,9 +5,9 @@ "url": "https://example.com/" }, "innerBlocks": [], - "innerHTML": "\n\n", + "innerHTML": "\n\n", "innerContent": [ - "\n\n" + "\n\n" ] }, { diff --git a/packages/e2e-tests/fixtures/blocks/core__social-link-google.serialized.html b/packages/e2e-tests/fixtures/blocks/core__social-link-google.serialized.html index 2d9d7ef6161720..bc940453608082 100644 --- a/packages/e2e-tests/fixtures/blocks/core__social-link-google.serialized.html +++ b/packages/e2e-tests/fixtures/blocks/core__social-link-google.serialized.html @@ -1,3 +1,3 @@ - + diff --git a/packages/e2e-tests/fixtures/blocks/core__social-link-meetup.html b/packages/e2e-tests/fixtures/blocks/core__social-link-meetup.html index ea2c16db0f1863..bcb9ec81c35ebf 100644 --- a/packages/e2e-tests/fixtures/blocks/core__social-link-meetup.html +++ b/packages/e2e-tests/fixtures/blocks/core__social-link-meetup.html @@ -1,3 +1,3 @@ - + diff --git a/packages/e2e-tests/fixtures/blocks/core__social-link-meetup.json b/packages/e2e-tests/fixtures/blocks/core__social-link-meetup.json index 5a3f3444368076..1fc09c840913b8 100644 --- a/packages/e2e-tests/fixtures/blocks/core__social-link-meetup.json +++ b/packages/e2e-tests/fixtures/blocks/core__social-link-meetup.json @@ -2,12 +2,12 @@ { "clientId": "_clientId_0", "name": "core/social-link-meetup", - "isValid": false, + "isValid": true, "attributes": { "url": "https://example.com/", "site": "meetup" }, "innerBlocks": [], - "originalContent": "" + "originalContent": "" } ] diff --git a/packages/e2e-tests/fixtures/blocks/core__social-link-meetup.parsed.json b/packages/e2e-tests/fixtures/blocks/core__social-link-meetup.parsed.json index 508ffc127d9710..3e2fcde86cdccf 100644 --- a/packages/e2e-tests/fixtures/blocks/core__social-link-meetup.parsed.json +++ b/packages/e2e-tests/fixtures/blocks/core__social-link-meetup.parsed.json @@ -5,9 +5,9 @@ "url": "https://example.com/" }, "innerBlocks": [], - "innerHTML": "\n\n", + "innerHTML": "\n\n", "innerContent": [ - "\n\n" + "\n\n" ] }, { diff --git a/packages/e2e-tests/fixtures/blocks/core__social-link-meetup.serialized.html b/packages/e2e-tests/fixtures/blocks/core__social-link-meetup.serialized.html index ea2c16db0f1863..bcb9ec81c35ebf 100644 --- a/packages/e2e-tests/fixtures/blocks/core__social-link-meetup.serialized.html +++ b/packages/e2e-tests/fixtures/blocks/core__social-link-meetup.serialized.html @@ -1,3 +1,3 @@ - + diff --git a/packages/e2e-tests/fixtures/blocks/core__social-link-yelp.html b/packages/e2e-tests/fixtures/blocks/core__social-link-yelp.html index b8b73816f0c7b3..76d6fadfe40984 100644 --- a/packages/e2e-tests/fixtures/blocks/core__social-link-yelp.html +++ b/packages/e2e-tests/fixtures/blocks/core__social-link-yelp.html @@ -1,3 +1,3 @@ - + diff --git a/packages/e2e-tests/fixtures/blocks/core__social-link-yelp.json b/packages/e2e-tests/fixtures/blocks/core__social-link-yelp.json index 7c1c0bff27f302..a7a0482333c5bc 100644 --- a/packages/e2e-tests/fixtures/blocks/core__social-link-yelp.json +++ b/packages/e2e-tests/fixtures/blocks/core__social-link-yelp.json @@ -2,12 +2,12 @@ { "clientId": "_clientId_0", "name": "core/social-link-yelp", - "isValid": false, + "isValid": true, "attributes": { "url": "https://example.com/", "site": "yelp" }, "innerBlocks": [], - "originalContent": "" + "originalContent": "" } ] diff --git a/packages/e2e-tests/fixtures/blocks/core__social-link-yelp.parsed.json b/packages/e2e-tests/fixtures/blocks/core__social-link-yelp.parsed.json index 2c5b9057b50dc9..30e92f74c9fe80 100644 --- a/packages/e2e-tests/fixtures/blocks/core__social-link-yelp.parsed.json +++ b/packages/e2e-tests/fixtures/blocks/core__social-link-yelp.parsed.json @@ -5,9 +5,9 @@ "url": "https://example.com/" }, "innerBlocks": [], - "innerHTML": "\n\n", + "innerHTML": "\n\n", "innerContent": [ - "\n\n" + "\n\n" ] }, { diff --git a/packages/e2e-tests/fixtures/blocks/core__social-link-yelp.serialized.html b/packages/e2e-tests/fixtures/blocks/core__social-link-yelp.serialized.html index b8b73816f0c7b3..76d6fadfe40984 100644 --- a/packages/e2e-tests/fixtures/blocks/core__social-link-yelp.serialized.html +++ b/packages/e2e-tests/fixtures/blocks/core__social-link-yelp.serialized.html @@ -1,3 +1,3 @@ - + From 940cb425b81a7e829c6cc2ac1d76e3aa88031eb2 Mon Sep 17 00:00:00 2001 From: jasmussen Date: Thu, 29 Aug 2019 12:21:16 +0200 Subject: [PATCH 46/54] Make icons in the "logos only" style bigger. --- packages/block-library/src/social-links/style.scss | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/packages/block-library/src/social-links/style.scss b/packages/block-library/src/social-links/style.scss index 06f5bd72e240fe..480df0e3e4236e 100644 --- a/packages/block-library/src/social-links/style.scss +++ b/packages/block-library/src/social-links/style.scss @@ -246,6 +246,13 @@ .wp-block-social-links.is-style-logos-only { .wp-social-link { background: none; + + // Make these bigger. + padding: 4px; + svg { + width: 28px; + height: 28px; + } } .wp-social-link-amazon { From a409c585f461ef599e1c0e1dea7ec044c5242a7e Mon Sep 17 00:00:00 2001 From: Marcus Kazmierczak Date: Thu, 29 Aug 2019 06:25:46 -0700 Subject: [PATCH 47/54] Remove save, using server-side render so not needed --- .../block-library/src/social-link/index.js | 2 -- .../block-library/src/social-link/save.js | 25 ------------------- 2 files changed, 27 deletions(-) delete mode 100644 packages/block-library/src/social-link/save.js diff --git a/packages/block-library/src/social-link/index.js b/packages/block-library/src/social-link/index.js index c1a1ecf14ef8e1..be5f81564498e0 100644 --- a/packages/block-library/src/social-link/index.js +++ b/packages/block-library/src/social-link/index.js @@ -7,7 +7,6 @@ import { __ } from '@wordpress/i18n'; * Internal dependencies */ import edit from './edit'; -import save from './save'; import socialList from './social-list'; const commonAttributes = { @@ -18,7 +17,6 @@ const commonAttributes = { html: false, }, edit, - save, }; // Create individual blocks out of each site in social-list.js diff --git a/packages/block-library/src/social-link/save.js b/packages/block-library/src/social-link/save.js deleted file mode 100644 index baefe119efbf34..00000000000000 --- a/packages/block-library/src/social-link/save.js +++ /dev/null @@ -1,25 +0,0 @@ -/** - * External dependencies - */ -import classNames from 'classnames'; - -/** - * WordPress dependencies - */ -export default function save( { attributes } ) { - const { site, url } = attributes; - - if ( ! url ) { - return null; - } - - // TODO: suggestions for fall back icon? - // @todo: These classes don't appear to render in the final markup at all. - const classes = classNames( 'wp-social-icon' ); - - return ( -
    • - { site } -
    • - ); -} From f342eca1af033b8b1583d4d693f08ac407ce1d30 Mon Sep 17 00:00:00 2001 From: jasmussen Date: Thu, 29 Aug 2019 15:52:50 +0200 Subject: [PATCH 48/54] Comment polish, remove redundant rule, fix gray. --- packages/block-library/src/social-link/editor.scss | 9 +++++---- packages/block-library/src/social-links/editor.scss | 1 - packages/block-library/src/social-links/style.scss | 1 - 3 files changed, 5 insertions(+), 6 deletions(-) diff --git a/packages/block-library/src/social-link/editor.scss b/packages/block-library/src/social-link/editor.scss index 46a15653252788..9121593ece2fa5 100644 --- a/packages/block-library/src/social-link/editor.scss +++ b/packages/block-library/src/social-link/editor.scss @@ -9,13 +9,14 @@ padding-right: 16px; } -.has-child-selected .wp-social-link__is-incomplete, -.is-selected .wp-social-link__is-incomplete { +// The following two rules have their classes doubled to increase specificity. +.has-child-selected .wp-social-link__is-incomplete.wp-social-link__is-incomplete, +.is-selected .wp-social-link__is-incomplete.wp-social-link__is-incomplete { background-color: $dark-gray-150; } -.has-child-selected .is-style-logos-only .wp-social-link__is-incomplete, -.is-selected .is-style-logos-only .wp-social-link__is-incomplete { +.has-child-selected .is-style-logos-only .wp-social-link__is-incomplete.wp-social-link__is-incomplete, +.is-selected .is-style-logos-only .wp-social-link__is-incomplete.wp-social-link__is-incomplete { color: $dark-gray-150; background-color: transparent; } diff --git a/packages/block-library/src/social-links/editor.scss b/packages/block-library/src/social-links/editor.scss index 2bcf6de68e9865..b018b2b0568155 100644 --- a/packages/block-library/src/social-links/editor.scss +++ b/packages/block-library/src/social-links/editor.scss @@ -81,7 +81,6 @@ // Selected/unselected states. // Unselected block is preview, selected has additional options. -// When no blocks are configured, the block shouldn't collapse but instead show some gray "skeleton indicators". [data-type="core/social-links"]:not(.is-selected):not(.has-child-selected) .wp-block-social-links { min-height: 36px; // This height matches the height of the buttons and ensures an empty block doesn't collapse. } diff --git a/packages/block-library/src/social-links/style.scss b/packages/block-library/src/social-links/style.scss index 480df0e3e4236e..0478019a8b8a7a 100644 --- a/packages/block-library/src/social-links/style.scss +++ b/packages/block-library/src/social-links/style.scss @@ -10,7 +10,6 @@ width: 36px; height: 36px; border-radius: 36px; // This makes it pill-shaped instead of oval, in cases where the image fed is not perfectly sized. - background-color: $light-gray-500; background-size: 24px 24px; background-position: center center; background-repeat: no-repeat; From 72d8acf251231dd02e510ae1715454d5e57167da Mon Sep 17 00:00:00 2001 From: Marcus Kazmierczak Date: Thu, 29 Aug 2019 07:26:15 -0700 Subject: [PATCH 49/54] Remove TODO comment, icon issue solved --- packages/block-library/src/social-link/index.js | 1 - 1 file changed, 1 deletion(-) diff --git a/packages/block-library/src/social-link/index.js b/packages/block-library/src/social-link/index.js index be5f81564498e0..692ff27f82fa5f 100644 --- a/packages/block-library/src/social-link/index.js +++ b/packages/block-library/src/social-link/index.js @@ -20,7 +20,6 @@ const commonAttributes = { }; // Create individual blocks out of each site in social-list.js -// TODO: solve icon issue export const sites = Object.keys( socialList ).map( ( site ) => { const siteParams = socialList[ site ]; From 06aafe3f13c865a8c22cbd1d66337d94b2ea45d5 Mon Sep 17 00:00:00 2001 From: Marcus Kazmierczak Date: Thu, 29 Aug 2019 09:10:24 -0700 Subject: [PATCH 50/54] Update e2e tests with pure server-side rendering --- .../e2e-tests/fixtures/blocks/core__social-link-amazon.html | 4 +--- .../e2e-tests/fixtures/blocks/core__social-link-amazon.json | 2 +- .../fixtures/blocks/core__social-link-amazon.parsed.json | 6 ++---- .../blocks/core__social-link-amazon.serialized.html | 4 +--- .../fixtures/blocks/core__social-link-bandcamp.html | 4 +--- .../fixtures/blocks/core__social-link-bandcamp.json | 2 +- .../fixtures/blocks/core__social-link-bandcamp.parsed.json | 6 ++---- .../blocks/core__social-link-bandcamp.serialized.html | 4 +--- .../fixtures/blocks/core__social-link-behance.html | 4 +--- .../fixtures/blocks/core__social-link-behance.json | 2 +- .../fixtures/blocks/core__social-link-behance.parsed.json | 6 ++---- .../blocks/core__social-link-behance.serialized.html | 4 +--- .../e2e-tests/fixtures/blocks/core__social-link-chain.html | 4 +--- .../e2e-tests/fixtures/blocks/core__social-link-chain.json | 2 +- .../fixtures/blocks/core__social-link-chain.parsed.json | 6 ++---- .../fixtures/blocks/core__social-link-chain.serialized.html | 4 +--- .../fixtures/blocks/core__social-link-codepen.html | 4 +--- .../fixtures/blocks/core__social-link-codepen.json | 2 +- .../fixtures/blocks/core__social-link-codepen.parsed.json | 6 ++---- .../blocks/core__social-link-codepen.serialized.html | 4 +--- .../fixtures/blocks/core__social-link-deviantart.html | 4 +--- .../fixtures/blocks/core__social-link-deviantart.json | 2 +- .../blocks/core__social-link-deviantart.parsed.json | 6 ++---- .../blocks/core__social-link-deviantart.serialized.html | 4 +--- .../fixtures/blocks/core__social-link-dribbble.html | 4 +--- .../fixtures/blocks/core__social-link-dribbble.json | 2 +- .../fixtures/blocks/core__social-link-dribbble.parsed.json | 6 ++---- .../blocks/core__social-link-dribbble.serialized.html | 4 +--- .../fixtures/blocks/core__social-link-dropbox.html | 4 +--- .../fixtures/blocks/core__social-link-dropbox.json | 2 +- .../fixtures/blocks/core__social-link-dropbox.parsed.json | 6 ++---- .../blocks/core__social-link-dropbox.serialized.html | 4 +--- .../e2e-tests/fixtures/blocks/core__social-link-etsy.html | 4 +--- .../e2e-tests/fixtures/blocks/core__social-link-etsy.json | 2 +- .../fixtures/blocks/core__social-link-etsy.parsed.json | 6 ++---- .../fixtures/blocks/core__social-link-etsy.serialized.html | 4 +--- .../fixtures/blocks/core__social-link-facebook.html | 4 +--- .../fixtures/blocks/core__social-link-facebook.json | 2 +- .../fixtures/blocks/core__social-link-facebook.parsed.json | 6 ++---- .../blocks/core__social-link-facebook.serialized.html | 4 +--- .../e2e-tests/fixtures/blocks/core__social-link-feed.html | 4 +--- .../e2e-tests/fixtures/blocks/core__social-link-feed.json | 2 +- .../fixtures/blocks/core__social-link-feed.parsed.json | 6 ++---- .../fixtures/blocks/core__social-link-feed.serialized.html | 4 +--- .../fixtures/blocks/core__social-link-fivehundredpx.html | 4 +--- .../fixtures/blocks/core__social-link-fivehundredpx.json | 2 +- .../blocks/core__social-link-fivehundredpx.parsed.json | 6 ++---- .../blocks/core__social-link-fivehundredpx.serialized.html | 4 +--- .../e2e-tests/fixtures/blocks/core__social-link-flickr.html | 4 +--- .../e2e-tests/fixtures/blocks/core__social-link-flickr.json | 2 +- .../fixtures/blocks/core__social-link-flickr.parsed.json | 6 ++---- .../blocks/core__social-link-flickr.serialized.html | 4 +--- .../fixtures/blocks/core__social-link-foursquare.html | 4 +--- .../fixtures/blocks/core__social-link-foursquare.json | 2 +- .../blocks/core__social-link-foursquare.parsed.json | 6 ++---- .../blocks/core__social-link-foursquare.serialized.html | 4 +--- .../e2e-tests/fixtures/blocks/core__social-link-github.html | 4 +--- .../e2e-tests/fixtures/blocks/core__social-link-github.json | 2 +- .../fixtures/blocks/core__social-link-github.parsed.json | 6 ++---- .../blocks/core__social-link-github.serialized.html | 4 +--- .../fixtures/blocks/core__social-link-goodreads.html | 4 +--- .../fixtures/blocks/core__social-link-goodreads.json | 2 +- .../fixtures/blocks/core__social-link-goodreads.parsed.json | 6 ++---- .../blocks/core__social-link-goodreads.serialized.html | 4 +--- .../e2e-tests/fixtures/blocks/core__social-link-google.html | 4 +--- .../e2e-tests/fixtures/blocks/core__social-link-google.json | 2 +- .../fixtures/blocks/core__social-link-google.parsed.json | 6 ++---- .../blocks/core__social-link-google.serialized.html | 4 +--- .../fixtures/blocks/core__social-link-instagram.html | 4 +--- .../fixtures/blocks/core__social-link-instagram.json | 2 +- .../fixtures/blocks/core__social-link-instagram.parsed.json | 6 ++---- .../blocks/core__social-link-instagram.serialized.html | 4 +--- .../e2e-tests/fixtures/blocks/core__social-link-lastfm.html | 4 +--- .../e2e-tests/fixtures/blocks/core__social-link-lastfm.json | 2 +- .../fixtures/blocks/core__social-link-lastfm.parsed.json | 6 ++---- .../blocks/core__social-link-lastfm.serialized.html | 4 +--- .../fixtures/blocks/core__social-link-linkedin.html | 4 +--- .../fixtures/blocks/core__social-link-linkedin.json | 2 +- .../fixtures/blocks/core__social-link-linkedin.parsed.json | 6 ++---- .../blocks/core__social-link-linkedin.serialized.html | 4 +--- .../e2e-tests/fixtures/blocks/core__social-link-mail.html | 4 +--- .../e2e-tests/fixtures/blocks/core__social-link-mail.json | 2 +- .../fixtures/blocks/core__social-link-mail.parsed.json | 6 ++---- .../fixtures/blocks/core__social-link-mail.serialized.html | 4 +--- .../fixtures/blocks/core__social-link-mastodon.html | 4 +--- .../fixtures/blocks/core__social-link-mastodon.json | 2 +- .../fixtures/blocks/core__social-link-mastodon.parsed.json | 6 ++---- .../blocks/core__social-link-mastodon.serialized.html | 4 +--- .../e2e-tests/fixtures/blocks/core__social-link-medium.html | 4 +--- .../e2e-tests/fixtures/blocks/core__social-link-medium.json | 2 +- .../fixtures/blocks/core__social-link-medium.parsed.json | 6 ++---- .../blocks/core__social-link-medium.serialized.html | 4 +--- .../e2e-tests/fixtures/blocks/core__social-link-meetup.html | 4 +--- .../e2e-tests/fixtures/blocks/core__social-link-meetup.json | 2 +- .../fixtures/blocks/core__social-link-meetup.parsed.json | 6 ++---- .../blocks/core__social-link-meetup.serialized.html | 4 +--- .../fixtures/blocks/core__social-link-pinterest.html | 4 +--- .../fixtures/blocks/core__social-link-pinterest.json | 2 +- .../fixtures/blocks/core__social-link-pinterest.parsed.json | 6 ++---- .../blocks/core__social-link-pinterest.serialized.html | 4 +--- .../e2e-tests/fixtures/blocks/core__social-link-pocket.html | 4 +--- .../e2e-tests/fixtures/blocks/core__social-link-pocket.json | 2 +- .../fixtures/blocks/core__social-link-pocket.parsed.json | 6 ++---- .../blocks/core__social-link-pocket.serialized.html | 4 +--- .../e2e-tests/fixtures/blocks/core__social-link-reddit.html | 4 +--- .../e2e-tests/fixtures/blocks/core__social-link-reddit.json | 2 +- .../fixtures/blocks/core__social-link-reddit.parsed.json | 6 ++---- .../blocks/core__social-link-reddit.serialized.html | 4 +--- .../e2e-tests/fixtures/blocks/core__social-link-skype.html | 4 +--- .../e2e-tests/fixtures/blocks/core__social-link-skype.json | 2 +- .../fixtures/blocks/core__social-link-skype.parsed.json | 6 ++---- .../fixtures/blocks/core__social-link-skype.serialized.html | 4 +--- .../fixtures/blocks/core__social-link-snapchat.html | 4 +--- .../fixtures/blocks/core__social-link-snapchat.json | 2 +- .../fixtures/blocks/core__social-link-snapchat.parsed.json | 6 ++---- .../blocks/core__social-link-snapchat.serialized.html | 4 +--- .../fixtures/blocks/core__social-link-soundcloud.html | 4 +--- .../fixtures/blocks/core__social-link-soundcloud.json | 2 +- .../blocks/core__social-link-soundcloud.parsed.json | 6 ++---- .../blocks/core__social-link-soundcloud.serialized.html | 4 +--- .../fixtures/blocks/core__social-link-spotify.html | 4 +--- .../fixtures/blocks/core__social-link-spotify.json | 2 +- .../fixtures/blocks/core__social-link-spotify.parsed.json | 6 ++---- .../blocks/core__social-link-spotify.serialized.html | 4 +--- .../e2e-tests/fixtures/blocks/core__social-link-tumblr.html | 4 +--- .../e2e-tests/fixtures/blocks/core__social-link-tumblr.json | 2 +- .../fixtures/blocks/core__social-link-tumblr.parsed.json | 6 ++---- .../blocks/core__social-link-tumblr.serialized.html | 4 +--- .../e2e-tests/fixtures/blocks/core__social-link-twitch.html | 4 +--- .../e2e-tests/fixtures/blocks/core__social-link-twitch.json | 2 +- .../fixtures/blocks/core__social-link-twitch.parsed.json | 6 ++---- .../blocks/core__social-link-twitch.serialized.html | 4 +--- .../fixtures/blocks/core__social-link-twitter.html | 4 +--- .../fixtures/blocks/core__social-link-twitter.json | 2 +- .../fixtures/blocks/core__social-link-twitter.parsed.json | 6 ++---- .../blocks/core__social-link-twitter.serialized.html | 4 +--- .../e2e-tests/fixtures/blocks/core__social-link-vimeo.html | 4 +--- .../e2e-tests/fixtures/blocks/core__social-link-vimeo.json | 2 +- .../fixtures/blocks/core__social-link-vimeo.parsed.json | 6 ++---- .../fixtures/blocks/core__social-link-vimeo.serialized.html | 4 +--- .../e2e-tests/fixtures/blocks/core__social-link-vk.html | 4 +--- .../e2e-tests/fixtures/blocks/core__social-link-vk.json | 2 +- .../fixtures/blocks/core__social-link-vk.parsed.json | 6 ++---- .../fixtures/blocks/core__social-link-vk.serialized.html | 4 +--- .../fixtures/blocks/core__social-link-wordpress.html | 4 +--- .../fixtures/blocks/core__social-link-wordpress.json | 2 +- .../fixtures/blocks/core__social-link-wordpress.parsed.json | 6 ++---- .../blocks/core__social-link-wordpress.serialized.html | 4 +--- .../e2e-tests/fixtures/blocks/core__social-link-yelp.html | 4 +--- .../e2e-tests/fixtures/blocks/core__social-link-yelp.json | 2 +- .../fixtures/blocks/core__social-link-yelp.parsed.json | 6 ++---- .../fixtures/blocks/core__social-link-yelp.serialized.html | 4 +--- .../fixtures/blocks/core__social-link-youtube.html | 4 +--- .../fixtures/blocks/core__social-link-youtube.json | 2 +- .../fixtures/blocks/core__social-link-youtube.parsed.json | 6 ++---- .../blocks/core__social-link-youtube.serialized.html | 4 +--- packages/e2e-tests/fixtures/blocks/core__social-links.html | 4 +--- packages/e2e-tests/fixtures/blocks/core__social-links.json | 2 +- .../fixtures/blocks/core__social-links.parsed.json | 6 ++---- .../fixtures/blocks/core__social-links.serialized.html | 4 +--- 160 files changed, 200 insertions(+), 440 deletions(-) diff --git a/packages/e2e-tests/fixtures/blocks/core__social-link-amazon.html b/packages/e2e-tests/fixtures/blocks/core__social-link-amazon.html index 2b25bda03be16f..c630c4dcfdca92 100644 --- a/packages/e2e-tests/fixtures/blocks/core__social-link-amazon.html +++ b/packages/e2e-tests/fixtures/blocks/core__social-link-amazon.html @@ -1,3 +1 @@ - - - + diff --git a/packages/e2e-tests/fixtures/blocks/core__social-link-amazon.json b/packages/e2e-tests/fixtures/blocks/core__social-link-amazon.json index 11e7cfc040fcc5..a081e60faa76f2 100644 --- a/packages/e2e-tests/fixtures/blocks/core__social-link-amazon.json +++ b/packages/e2e-tests/fixtures/blocks/core__social-link-amazon.json @@ -8,6 +8,6 @@ "site": "amazon" }, "innerBlocks": [], - "originalContent": "" + "originalContent": "" } ] diff --git a/packages/e2e-tests/fixtures/blocks/core__social-link-amazon.parsed.json b/packages/e2e-tests/fixtures/blocks/core__social-link-amazon.parsed.json index 51d99feed2ece5..f5e1e92ddd4974 100644 --- a/packages/e2e-tests/fixtures/blocks/core__social-link-amazon.parsed.json +++ b/packages/e2e-tests/fixtures/blocks/core__social-link-amazon.parsed.json @@ -5,10 +5,8 @@ "url": "https://example.com/" }, "innerBlocks": [], - "innerHTML": "\n\n", - "innerContent": [ - "\n\n" - ] + "innerHTML": "", + "innerContent": [] }, { "blockName": null, diff --git a/packages/e2e-tests/fixtures/blocks/core__social-link-amazon.serialized.html b/packages/e2e-tests/fixtures/blocks/core__social-link-amazon.serialized.html index 2b25bda03be16f..c630c4dcfdca92 100644 --- a/packages/e2e-tests/fixtures/blocks/core__social-link-amazon.serialized.html +++ b/packages/e2e-tests/fixtures/blocks/core__social-link-amazon.serialized.html @@ -1,3 +1 @@ - - - + diff --git a/packages/e2e-tests/fixtures/blocks/core__social-link-bandcamp.html b/packages/e2e-tests/fixtures/blocks/core__social-link-bandcamp.html index 5d558294087f39..cae593328da616 100644 --- a/packages/e2e-tests/fixtures/blocks/core__social-link-bandcamp.html +++ b/packages/e2e-tests/fixtures/blocks/core__social-link-bandcamp.html @@ -1,3 +1 @@ - - - + diff --git a/packages/e2e-tests/fixtures/blocks/core__social-link-bandcamp.json b/packages/e2e-tests/fixtures/blocks/core__social-link-bandcamp.json index 57e4aa337f84f0..cdbfb242c9c241 100644 --- a/packages/e2e-tests/fixtures/blocks/core__social-link-bandcamp.json +++ b/packages/e2e-tests/fixtures/blocks/core__social-link-bandcamp.json @@ -8,6 +8,6 @@ "site": "bandcamp" }, "innerBlocks": [], - "originalContent": "" + "originalContent": "" } ] diff --git a/packages/e2e-tests/fixtures/blocks/core__social-link-bandcamp.parsed.json b/packages/e2e-tests/fixtures/blocks/core__social-link-bandcamp.parsed.json index 17147babe859cc..c3ade51de7f5ef 100644 --- a/packages/e2e-tests/fixtures/blocks/core__social-link-bandcamp.parsed.json +++ b/packages/e2e-tests/fixtures/blocks/core__social-link-bandcamp.parsed.json @@ -5,10 +5,8 @@ "url": "https://example.com/" }, "innerBlocks": [], - "innerHTML": "\n\n", - "innerContent": [ - "\n\n" - ] + "innerHTML": "", + "innerContent": [] }, { "blockName": null, diff --git a/packages/e2e-tests/fixtures/blocks/core__social-link-bandcamp.serialized.html b/packages/e2e-tests/fixtures/blocks/core__social-link-bandcamp.serialized.html index 5d558294087f39..cae593328da616 100644 --- a/packages/e2e-tests/fixtures/blocks/core__social-link-bandcamp.serialized.html +++ b/packages/e2e-tests/fixtures/blocks/core__social-link-bandcamp.serialized.html @@ -1,3 +1 @@ - - - + diff --git a/packages/e2e-tests/fixtures/blocks/core__social-link-behance.html b/packages/e2e-tests/fixtures/blocks/core__social-link-behance.html index fd4146770dd4b7..af865404ba3c60 100644 --- a/packages/e2e-tests/fixtures/blocks/core__social-link-behance.html +++ b/packages/e2e-tests/fixtures/blocks/core__social-link-behance.html @@ -1,3 +1 @@ - - - + diff --git a/packages/e2e-tests/fixtures/blocks/core__social-link-behance.json b/packages/e2e-tests/fixtures/blocks/core__social-link-behance.json index ed82e95b856128..fe6a3cfdfaf395 100644 --- a/packages/e2e-tests/fixtures/blocks/core__social-link-behance.json +++ b/packages/e2e-tests/fixtures/blocks/core__social-link-behance.json @@ -8,6 +8,6 @@ "site": "behance" }, "innerBlocks": [], - "originalContent": "" + "originalContent": "" } ] diff --git a/packages/e2e-tests/fixtures/blocks/core__social-link-behance.parsed.json b/packages/e2e-tests/fixtures/blocks/core__social-link-behance.parsed.json index 87e810a8dbb056..dbec736490d27f 100644 --- a/packages/e2e-tests/fixtures/blocks/core__social-link-behance.parsed.json +++ b/packages/e2e-tests/fixtures/blocks/core__social-link-behance.parsed.json @@ -5,10 +5,8 @@ "url": "https://example.com/" }, "innerBlocks": [], - "innerHTML": "\n\n", - "innerContent": [ - "\n\n" - ] + "innerHTML": "", + "innerContent": [] }, { "blockName": null, diff --git a/packages/e2e-tests/fixtures/blocks/core__social-link-behance.serialized.html b/packages/e2e-tests/fixtures/blocks/core__social-link-behance.serialized.html index fd4146770dd4b7..af865404ba3c60 100644 --- a/packages/e2e-tests/fixtures/blocks/core__social-link-behance.serialized.html +++ b/packages/e2e-tests/fixtures/blocks/core__social-link-behance.serialized.html @@ -1,3 +1 @@ - - - + diff --git a/packages/e2e-tests/fixtures/blocks/core__social-link-chain.html b/packages/e2e-tests/fixtures/blocks/core__social-link-chain.html index 26b5f83d0e9d35..aa4518a2fb5818 100644 --- a/packages/e2e-tests/fixtures/blocks/core__social-link-chain.html +++ b/packages/e2e-tests/fixtures/blocks/core__social-link-chain.html @@ -1,3 +1 @@ - - - + diff --git a/packages/e2e-tests/fixtures/blocks/core__social-link-chain.json b/packages/e2e-tests/fixtures/blocks/core__social-link-chain.json index b2ab8f8c717420..def33c86baed38 100644 --- a/packages/e2e-tests/fixtures/blocks/core__social-link-chain.json +++ b/packages/e2e-tests/fixtures/blocks/core__social-link-chain.json @@ -8,6 +8,6 @@ "site": "chain" }, "innerBlocks": [], - "originalContent": "" + "originalContent": "" } ] diff --git a/packages/e2e-tests/fixtures/blocks/core__social-link-chain.parsed.json b/packages/e2e-tests/fixtures/blocks/core__social-link-chain.parsed.json index 8ae41c8afad568..02bc7d62d6ce3a 100644 --- a/packages/e2e-tests/fixtures/blocks/core__social-link-chain.parsed.json +++ b/packages/e2e-tests/fixtures/blocks/core__social-link-chain.parsed.json @@ -5,10 +5,8 @@ "url": "https://example.com/" }, "innerBlocks": [], - "innerHTML": "\n\n", - "innerContent": [ - "\n\n" - ] + "innerHTML": "", + "innerContent": [] }, { "blockName": null, diff --git a/packages/e2e-tests/fixtures/blocks/core__social-link-chain.serialized.html b/packages/e2e-tests/fixtures/blocks/core__social-link-chain.serialized.html index 26b5f83d0e9d35..aa4518a2fb5818 100644 --- a/packages/e2e-tests/fixtures/blocks/core__social-link-chain.serialized.html +++ b/packages/e2e-tests/fixtures/blocks/core__social-link-chain.serialized.html @@ -1,3 +1 @@ - - - + diff --git a/packages/e2e-tests/fixtures/blocks/core__social-link-codepen.html b/packages/e2e-tests/fixtures/blocks/core__social-link-codepen.html index 486a866622c6b3..9ec65de01260b3 100644 --- a/packages/e2e-tests/fixtures/blocks/core__social-link-codepen.html +++ b/packages/e2e-tests/fixtures/blocks/core__social-link-codepen.html @@ -1,3 +1 @@ - - - + diff --git a/packages/e2e-tests/fixtures/blocks/core__social-link-codepen.json b/packages/e2e-tests/fixtures/blocks/core__social-link-codepen.json index 48b03dcc8001e9..fe1f234fe10cbc 100644 --- a/packages/e2e-tests/fixtures/blocks/core__social-link-codepen.json +++ b/packages/e2e-tests/fixtures/blocks/core__social-link-codepen.json @@ -8,6 +8,6 @@ "site": "codepen" }, "innerBlocks": [], - "originalContent": "" + "originalContent": "" } ] diff --git a/packages/e2e-tests/fixtures/blocks/core__social-link-codepen.parsed.json b/packages/e2e-tests/fixtures/blocks/core__social-link-codepen.parsed.json index aeb1f09b9d33ea..224cc351a8139a 100644 --- a/packages/e2e-tests/fixtures/blocks/core__social-link-codepen.parsed.json +++ b/packages/e2e-tests/fixtures/blocks/core__social-link-codepen.parsed.json @@ -5,10 +5,8 @@ "url": "https://example.com/" }, "innerBlocks": [], - "innerHTML": "\n\n", - "innerContent": [ - "\n\n" - ] + "innerHTML": "", + "innerContent": [] }, { "blockName": null, diff --git a/packages/e2e-tests/fixtures/blocks/core__social-link-codepen.serialized.html b/packages/e2e-tests/fixtures/blocks/core__social-link-codepen.serialized.html index 486a866622c6b3..9ec65de01260b3 100644 --- a/packages/e2e-tests/fixtures/blocks/core__social-link-codepen.serialized.html +++ b/packages/e2e-tests/fixtures/blocks/core__social-link-codepen.serialized.html @@ -1,3 +1 @@ - - - + diff --git a/packages/e2e-tests/fixtures/blocks/core__social-link-deviantart.html b/packages/e2e-tests/fixtures/blocks/core__social-link-deviantart.html index 43b48bfd336615..510edf67f01b54 100644 --- a/packages/e2e-tests/fixtures/blocks/core__social-link-deviantart.html +++ b/packages/e2e-tests/fixtures/blocks/core__social-link-deviantart.html @@ -1,3 +1 @@ - - - + diff --git a/packages/e2e-tests/fixtures/blocks/core__social-link-deviantart.json b/packages/e2e-tests/fixtures/blocks/core__social-link-deviantart.json index f399a0a1b336ed..316203f142a3ac 100644 --- a/packages/e2e-tests/fixtures/blocks/core__social-link-deviantart.json +++ b/packages/e2e-tests/fixtures/blocks/core__social-link-deviantart.json @@ -8,6 +8,6 @@ "site": "deviantart" }, "innerBlocks": [], - "originalContent": "" + "originalContent": "" } ] diff --git a/packages/e2e-tests/fixtures/blocks/core__social-link-deviantart.parsed.json b/packages/e2e-tests/fixtures/blocks/core__social-link-deviantart.parsed.json index 22096e6f33afe8..741528c2de05b8 100644 --- a/packages/e2e-tests/fixtures/blocks/core__social-link-deviantart.parsed.json +++ b/packages/e2e-tests/fixtures/blocks/core__social-link-deviantart.parsed.json @@ -5,10 +5,8 @@ "url": "https://example.com/" }, "innerBlocks": [], - "innerHTML": "\n\n", - "innerContent": [ - "\n\n" - ] + "innerHTML": "", + "innerContent": [] }, { "blockName": null, diff --git a/packages/e2e-tests/fixtures/blocks/core__social-link-deviantart.serialized.html b/packages/e2e-tests/fixtures/blocks/core__social-link-deviantart.serialized.html index 43b48bfd336615..510edf67f01b54 100644 --- a/packages/e2e-tests/fixtures/blocks/core__social-link-deviantart.serialized.html +++ b/packages/e2e-tests/fixtures/blocks/core__social-link-deviantart.serialized.html @@ -1,3 +1 @@ - - - + diff --git a/packages/e2e-tests/fixtures/blocks/core__social-link-dribbble.html b/packages/e2e-tests/fixtures/blocks/core__social-link-dribbble.html index c7041380336eb5..aa3ffa36021486 100644 --- a/packages/e2e-tests/fixtures/blocks/core__social-link-dribbble.html +++ b/packages/e2e-tests/fixtures/blocks/core__social-link-dribbble.html @@ -1,3 +1 @@ - - - + diff --git a/packages/e2e-tests/fixtures/blocks/core__social-link-dribbble.json b/packages/e2e-tests/fixtures/blocks/core__social-link-dribbble.json index 53d68ac88eb9e9..303a091a45bcef 100644 --- a/packages/e2e-tests/fixtures/blocks/core__social-link-dribbble.json +++ b/packages/e2e-tests/fixtures/blocks/core__social-link-dribbble.json @@ -8,6 +8,6 @@ "site": "dribbble" }, "innerBlocks": [], - "originalContent": "" + "originalContent": "" } ] diff --git a/packages/e2e-tests/fixtures/blocks/core__social-link-dribbble.parsed.json b/packages/e2e-tests/fixtures/blocks/core__social-link-dribbble.parsed.json index 3a78df0c4550a0..f6b92b98394267 100644 --- a/packages/e2e-tests/fixtures/blocks/core__social-link-dribbble.parsed.json +++ b/packages/e2e-tests/fixtures/blocks/core__social-link-dribbble.parsed.json @@ -5,10 +5,8 @@ "url": "https://example.com/" }, "innerBlocks": [], - "innerHTML": "\n\n", - "innerContent": [ - "\n\n" - ] + "innerHTML": "", + "innerContent": [] }, { "blockName": null, diff --git a/packages/e2e-tests/fixtures/blocks/core__social-link-dribbble.serialized.html b/packages/e2e-tests/fixtures/blocks/core__social-link-dribbble.serialized.html index c7041380336eb5..aa3ffa36021486 100644 --- a/packages/e2e-tests/fixtures/blocks/core__social-link-dribbble.serialized.html +++ b/packages/e2e-tests/fixtures/blocks/core__social-link-dribbble.serialized.html @@ -1,3 +1 @@ - - - + diff --git a/packages/e2e-tests/fixtures/blocks/core__social-link-dropbox.html b/packages/e2e-tests/fixtures/blocks/core__social-link-dropbox.html index 17934f85191d88..f6050fe6fc970b 100644 --- a/packages/e2e-tests/fixtures/blocks/core__social-link-dropbox.html +++ b/packages/e2e-tests/fixtures/blocks/core__social-link-dropbox.html @@ -1,3 +1 @@ - - - + diff --git a/packages/e2e-tests/fixtures/blocks/core__social-link-dropbox.json b/packages/e2e-tests/fixtures/blocks/core__social-link-dropbox.json index 41a9e02cab41c5..1495c5c0de9d84 100644 --- a/packages/e2e-tests/fixtures/blocks/core__social-link-dropbox.json +++ b/packages/e2e-tests/fixtures/blocks/core__social-link-dropbox.json @@ -8,6 +8,6 @@ "site": "dropbox" }, "innerBlocks": [], - "originalContent": "" + "originalContent": "" } ] diff --git a/packages/e2e-tests/fixtures/blocks/core__social-link-dropbox.parsed.json b/packages/e2e-tests/fixtures/blocks/core__social-link-dropbox.parsed.json index c646d46a343aba..b1d7ada2aee1e4 100644 --- a/packages/e2e-tests/fixtures/blocks/core__social-link-dropbox.parsed.json +++ b/packages/e2e-tests/fixtures/blocks/core__social-link-dropbox.parsed.json @@ -5,10 +5,8 @@ "url": "https://example.com/" }, "innerBlocks": [], - "innerHTML": "\n\n", - "innerContent": [ - "\n\n" - ] + "innerHTML": "", + "innerContent": [] }, { "blockName": null, diff --git a/packages/e2e-tests/fixtures/blocks/core__social-link-dropbox.serialized.html b/packages/e2e-tests/fixtures/blocks/core__social-link-dropbox.serialized.html index 17934f85191d88..f6050fe6fc970b 100644 --- a/packages/e2e-tests/fixtures/blocks/core__social-link-dropbox.serialized.html +++ b/packages/e2e-tests/fixtures/blocks/core__social-link-dropbox.serialized.html @@ -1,3 +1 @@ - - - + diff --git a/packages/e2e-tests/fixtures/blocks/core__social-link-etsy.html b/packages/e2e-tests/fixtures/blocks/core__social-link-etsy.html index 063edb48aaaf5a..4a5f4d13550e83 100644 --- a/packages/e2e-tests/fixtures/blocks/core__social-link-etsy.html +++ b/packages/e2e-tests/fixtures/blocks/core__social-link-etsy.html @@ -1,3 +1 @@ - - - + diff --git a/packages/e2e-tests/fixtures/blocks/core__social-link-etsy.json b/packages/e2e-tests/fixtures/blocks/core__social-link-etsy.json index 486981557cad66..1b1af269814c0a 100644 --- a/packages/e2e-tests/fixtures/blocks/core__social-link-etsy.json +++ b/packages/e2e-tests/fixtures/blocks/core__social-link-etsy.json @@ -8,6 +8,6 @@ "site": "etsy" }, "innerBlocks": [], - "originalContent": "" + "originalContent": "" } ] diff --git a/packages/e2e-tests/fixtures/blocks/core__social-link-etsy.parsed.json b/packages/e2e-tests/fixtures/blocks/core__social-link-etsy.parsed.json index 095ff4114d736a..526f245ce2c0a6 100644 --- a/packages/e2e-tests/fixtures/blocks/core__social-link-etsy.parsed.json +++ b/packages/e2e-tests/fixtures/blocks/core__social-link-etsy.parsed.json @@ -5,10 +5,8 @@ "url": "https://example.com/" }, "innerBlocks": [], - "innerHTML": "\n\n", - "innerContent": [ - "\n\n" - ] + "innerHTML": "", + "innerContent": [] }, { "blockName": null, diff --git a/packages/e2e-tests/fixtures/blocks/core__social-link-etsy.serialized.html b/packages/e2e-tests/fixtures/blocks/core__social-link-etsy.serialized.html index 063edb48aaaf5a..4a5f4d13550e83 100644 --- a/packages/e2e-tests/fixtures/blocks/core__social-link-etsy.serialized.html +++ b/packages/e2e-tests/fixtures/blocks/core__social-link-etsy.serialized.html @@ -1,3 +1 @@ - - - + diff --git a/packages/e2e-tests/fixtures/blocks/core__social-link-facebook.html b/packages/e2e-tests/fixtures/blocks/core__social-link-facebook.html index 50608923285b3a..0c68ee581f6ba0 100644 --- a/packages/e2e-tests/fixtures/blocks/core__social-link-facebook.html +++ b/packages/e2e-tests/fixtures/blocks/core__social-link-facebook.html @@ -1,3 +1 @@ - - - + diff --git a/packages/e2e-tests/fixtures/blocks/core__social-link-facebook.json b/packages/e2e-tests/fixtures/blocks/core__social-link-facebook.json index a9e807ed94030e..8d15595a70e818 100644 --- a/packages/e2e-tests/fixtures/blocks/core__social-link-facebook.json +++ b/packages/e2e-tests/fixtures/blocks/core__social-link-facebook.json @@ -8,6 +8,6 @@ "site": "facebook" }, "innerBlocks": [], - "originalContent": "" + "originalContent": "" } ] diff --git a/packages/e2e-tests/fixtures/blocks/core__social-link-facebook.parsed.json b/packages/e2e-tests/fixtures/blocks/core__social-link-facebook.parsed.json index 94dd87257310b9..85e63634196eed 100644 --- a/packages/e2e-tests/fixtures/blocks/core__social-link-facebook.parsed.json +++ b/packages/e2e-tests/fixtures/blocks/core__social-link-facebook.parsed.json @@ -5,10 +5,8 @@ "url": "https://example.com/" }, "innerBlocks": [], - "innerHTML": "\n\n", - "innerContent": [ - "\n\n" - ] + "innerHTML": "", + "innerContent": [] }, { "blockName": null, diff --git a/packages/e2e-tests/fixtures/blocks/core__social-link-facebook.serialized.html b/packages/e2e-tests/fixtures/blocks/core__social-link-facebook.serialized.html index 50608923285b3a..0c68ee581f6ba0 100644 --- a/packages/e2e-tests/fixtures/blocks/core__social-link-facebook.serialized.html +++ b/packages/e2e-tests/fixtures/blocks/core__social-link-facebook.serialized.html @@ -1,3 +1 @@ - - - + diff --git a/packages/e2e-tests/fixtures/blocks/core__social-link-feed.html b/packages/e2e-tests/fixtures/blocks/core__social-link-feed.html index 5bb47130ca5a0a..3ff3168cad63aa 100644 --- a/packages/e2e-tests/fixtures/blocks/core__social-link-feed.html +++ b/packages/e2e-tests/fixtures/blocks/core__social-link-feed.html @@ -1,3 +1 @@ - - - + diff --git a/packages/e2e-tests/fixtures/blocks/core__social-link-feed.json b/packages/e2e-tests/fixtures/blocks/core__social-link-feed.json index fccc3df11c2e27..8dbe5639671b02 100644 --- a/packages/e2e-tests/fixtures/blocks/core__social-link-feed.json +++ b/packages/e2e-tests/fixtures/blocks/core__social-link-feed.json @@ -8,6 +8,6 @@ "site": "feed" }, "innerBlocks": [], - "originalContent": "" + "originalContent": "" } ] diff --git a/packages/e2e-tests/fixtures/blocks/core__social-link-feed.parsed.json b/packages/e2e-tests/fixtures/blocks/core__social-link-feed.parsed.json index c104a8e78c2794..983b9f2ffc50b3 100644 --- a/packages/e2e-tests/fixtures/blocks/core__social-link-feed.parsed.json +++ b/packages/e2e-tests/fixtures/blocks/core__social-link-feed.parsed.json @@ -5,10 +5,8 @@ "url": "https://example.com/" }, "innerBlocks": [], - "innerHTML": "\n\n", - "innerContent": [ - "\n\n" - ] + "innerHTML": "", + "innerContent": [] }, { "blockName": null, diff --git a/packages/e2e-tests/fixtures/blocks/core__social-link-feed.serialized.html b/packages/e2e-tests/fixtures/blocks/core__social-link-feed.serialized.html index 5bb47130ca5a0a..3ff3168cad63aa 100644 --- a/packages/e2e-tests/fixtures/blocks/core__social-link-feed.serialized.html +++ b/packages/e2e-tests/fixtures/blocks/core__social-link-feed.serialized.html @@ -1,3 +1 @@ - - - + diff --git a/packages/e2e-tests/fixtures/blocks/core__social-link-fivehundredpx.html b/packages/e2e-tests/fixtures/blocks/core__social-link-fivehundredpx.html index afcdf3976c66e8..cc789b624ef6c4 100644 --- a/packages/e2e-tests/fixtures/blocks/core__social-link-fivehundredpx.html +++ b/packages/e2e-tests/fixtures/blocks/core__social-link-fivehundredpx.html @@ -1,3 +1 @@ - - - + diff --git a/packages/e2e-tests/fixtures/blocks/core__social-link-fivehundredpx.json b/packages/e2e-tests/fixtures/blocks/core__social-link-fivehundredpx.json index c677ee39834f93..9877ca611654d9 100644 --- a/packages/e2e-tests/fixtures/blocks/core__social-link-fivehundredpx.json +++ b/packages/e2e-tests/fixtures/blocks/core__social-link-fivehundredpx.json @@ -8,6 +8,6 @@ "site": "fivehundredpx" }, "innerBlocks": [], - "originalContent": "" + "originalContent": "" } ] diff --git a/packages/e2e-tests/fixtures/blocks/core__social-link-fivehundredpx.parsed.json b/packages/e2e-tests/fixtures/blocks/core__social-link-fivehundredpx.parsed.json index b080e87ece4925..5e44677986e635 100644 --- a/packages/e2e-tests/fixtures/blocks/core__social-link-fivehundredpx.parsed.json +++ b/packages/e2e-tests/fixtures/blocks/core__social-link-fivehundredpx.parsed.json @@ -5,10 +5,8 @@ "url": "https://example.com/" }, "innerBlocks": [], - "innerHTML": "\n\n", - "innerContent": [ - "\n\n" - ] + "innerHTML": "", + "innerContent": [] }, { "blockName": null, diff --git a/packages/e2e-tests/fixtures/blocks/core__social-link-fivehundredpx.serialized.html b/packages/e2e-tests/fixtures/blocks/core__social-link-fivehundredpx.serialized.html index afcdf3976c66e8..cc789b624ef6c4 100644 --- a/packages/e2e-tests/fixtures/blocks/core__social-link-fivehundredpx.serialized.html +++ b/packages/e2e-tests/fixtures/blocks/core__social-link-fivehundredpx.serialized.html @@ -1,3 +1 @@ - - - + diff --git a/packages/e2e-tests/fixtures/blocks/core__social-link-flickr.html b/packages/e2e-tests/fixtures/blocks/core__social-link-flickr.html index 30cce7aa92e936..bee73541a66365 100644 --- a/packages/e2e-tests/fixtures/blocks/core__social-link-flickr.html +++ b/packages/e2e-tests/fixtures/blocks/core__social-link-flickr.html @@ -1,3 +1 @@ - - - + diff --git a/packages/e2e-tests/fixtures/blocks/core__social-link-flickr.json b/packages/e2e-tests/fixtures/blocks/core__social-link-flickr.json index f565d40cd9e06d..d17d87bfb21b76 100644 --- a/packages/e2e-tests/fixtures/blocks/core__social-link-flickr.json +++ b/packages/e2e-tests/fixtures/blocks/core__social-link-flickr.json @@ -8,6 +8,6 @@ "site": "flickr" }, "innerBlocks": [], - "originalContent": "" + "originalContent": "" } ] diff --git a/packages/e2e-tests/fixtures/blocks/core__social-link-flickr.parsed.json b/packages/e2e-tests/fixtures/blocks/core__social-link-flickr.parsed.json index aee44d7afeabf8..edbdc7275d6ef8 100644 --- a/packages/e2e-tests/fixtures/blocks/core__social-link-flickr.parsed.json +++ b/packages/e2e-tests/fixtures/blocks/core__social-link-flickr.parsed.json @@ -5,10 +5,8 @@ "url": "https://example.com/" }, "innerBlocks": [], - "innerHTML": "\n\n", - "innerContent": [ - "\n\n" - ] + "innerHTML": "", + "innerContent": [] }, { "blockName": null, diff --git a/packages/e2e-tests/fixtures/blocks/core__social-link-flickr.serialized.html b/packages/e2e-tests/fixtures/blocks/core__social-link-flickr.serialized.html index 30cce7aa92e936..bee73541a66365 100644 --- a/packages/e2e-tests/fixtures/blocks/core__social-link-flickr.serialized.html +++ b/packages/e2e-tests/fixtures/blocks/core__social-link-flickr.serialized.html @@ -1,3 +1 @@ - - - + diff --git a/packages/e2e-tests/fixtures/blocks/core__social-link-foursquare.html b/packages/e2e-tests/fixtures/blocks/core__social-link-foursquare.html index 5a0fb7eae8afeb..7d340ca429e653 100644 --- a/packages/e2e-tests/fixtures/blocks/core__social-link-foursquare.html +++ b/packages/e2e-tests/fixtures/blocks/core__social-link-foursquare.html @@ -1,3 +1 @@ - - - + diff --git a/packages/e2e-tests/fixtures/blocks/core__social-link-foursquare.json b/packages/e2e-tests/fixtures/blocks/core__social-link-foursquare.json index a8bc34a2b98fd2..1ee1b8c87c4518 100644 --- a/packages/e2e-tests/fixtures/blocks/core__social-link-foursquare.json +++ b/packages/e2e-tests/fixtures/blocks/core__social-link-foursquare.json @@ -8,6 +8,6 @@ "site": "foursquare" }, "innerBlocks": [], - "originalContent": "" + "originalContent": "" } ] diff --git a/packages/e2e-tests/fixtures/blocks/core__social-link-foursquare.parsed.json b/packages/e2e-tests/fixtures/blocks/core__social-link-foursquare.parsed.json index 9d30170ed8d147..b5925cf3d91fdb 100644 --- a/packages/e2e-tests/fixtures/blocks/core__social-link-foursquare.parsed.json +++ b/packages/e2e-tests/fixtures/blocks/core__social-link-foursquare.parsed.json @@ -5,10 +5,8 @@ "url": "https://example.com/" }, "innerBlocks": [], - "innerHTML": "\n\n", - "innerContent": [ - "\n\n" - ] + "innerHTML": "", + "innerContent": [] }, { "blockName": null, diff --git a/packages/e2e-tests/fixtures/blocks/core__social-link-foursquare.serialized.html b/packages/e2e-tests/fixtures/blocks/core__social-link-foursquare.serialized.html index 5a0fb7eae8afeb..7d340ca429e653 100644 --- a/packages/e2e-tests/fixtures/blocks/core__social-link-foursquare.serialized.html +++ b/packages/e2e-tests/fixtures/blocks/core__social-link-foursquare.serialized.html @@ -1,3 +1 @@ - - - + diff --git a/packages/e2e-tests/fixtures/blocks/core__social-link-github.html b/packages/e2e-tests/fixtures/blocks/core__social-link-github.html index ad7a6e59430898..b22a22d38d1824 100644 --- a/packages/e2e-tests/fixtures/blocks/core__social-link-github.html +++ b/packages/e2e-tests/fixtures/blocks/core__social-link-github.html @@ -1,3 +1 @@ - - - + diff --git a/packages/e2e-tests/fixtures/blocks/core__social-link-github.json b/packages/e2e-tests/fixtures/blocks/core__social-link-github.json index ba6ca06289d399..d9c1a71503d96e 100644 --- a/packages/e2e-tests/fixtures/blocks/core__social-link-github.json +++ b/packages/e2e-tests/fixtures/blocks/core__social-link-github.json @@ -8,6 +8,6 @@ "site": "github" }, "innerBlocks": [], - "originalContent": "" + "originalContent": "" } ] diff --git a/packages/e2e-tests/fixtures/blocks/core__social-link-github.parsed.json b/packages/e2e-tests/fixtures/blocks/core__social-link-github.parsed.json index 05fceb5b3c7633..87e489ef52a2d5 100644 --- a/packages/e2e-tests/fixtures/blocks/core__social-link-github.parsed.json +++ b/packages/e2e-tests/fixtures/blocks/core__social-link-github.parsed.json @@ -5,10 +5,8 @@ "url": "https://example.com/" }, "innerBlocks": [], - "innerHTML": "\n\n", - "innerContent": [ - "\n\n" - ] + "innerHTML": "", + "innerContent": [] }, { "blockName": null, diff --git a/packages/e2e-tests/fixtures/blocks/core__social-link-github.serialized.html b/packages/e2e-tests/fixtures/blocks/core__social-link-github.serialized.html index ad7a6e59430898..b22a22d38d1824 100644 --- a/packages/e2e-tests/fixtures/blocks/core__social-link-github.serialized.html +++ b/packages/e2e-tests/fixtures/blocks/core__social-link-github.serialized.html @@ -1,3 +1 @@ - - - + diff --git a/packages/e2e-tests/fixtures/blocks/core__social-link-goodreads.html b/packages/e2e-tests/fixtures/blocks/core__social-link-goodreads.html index 2efb90d34e2425..149e3173fcbd5a 100644 --- a/packages/e2e-tests/fixtures/blocks/core__social-link-goodreads.html +++ b/packages/e2e-tests/fixtures/blocks/core__social-link-goodreads.html @@ -1,3 +1 @@ - - - + diff --git a/packages/e2e-tests/fixtures/blocks/core__social-link-goodreads.json b/packages/e2e-tests/fixtures/blocks/core__social-link-goodreads.json index 52295e89ea6b9f..8dd4f45ab71b04 100644 --- a/packages/e2e-tests/fixtures/blocks/core__social-link-goodreads.json +++ b/packages/e2e-tests/fixtures/blocks/core__social-link-goodreads.json @@ -8,6 +8,6 @@ "site": "goodreads" }, "innerBlocks": [], - "originalContent": "" + "originalContent": "" } ] diff --git a/packages/e2e-tests/fixtures/blocks/core__social-link-goodreads.parsed.json b/packages/e2e-tests/fixtures/blocks/core__social-link-goodreads.parsed.json index 01d093114f9be6..52f0e3516307ff 100644 --- a/packages/e2e-tests/fixtures/blocks/core__social-link-goodreads.parsed.json +++ b/packages/e2e-tests/fixtures/blocks/core__social-link-goodreads.parsed.json @@ -5,10 +5,8 @@ "url": "https://example.com/" }, "innerBlocks": [], - "innerHTML": "\n\n", - "innerContent": [ - "\n\n" - ] + "innerHTML": "", + "innerContent": [] }, { "blockName": null, diff --git a/packages/e2e-tests/fixtures/blocks/core__social-link-goodreads.serialized.html b/packages/e2e-tests/fixtures/blocks/core__social-link-goodreads.serialized.html index 2efb90d34e2425..149e3173fcbd5a 100644 --- a/packages/e2e-tests/fixtures/blocks/core__social-link-goodreads.serialized.html +++ b/packages/e2e-tests/fixtures/blocks/core__social-link-goodreads.serialized.html @@ -1,3 +1 @@ - - - + diff --git a/packages/e2e-tests/fixtures/blocks/core__social-link-google.html b/packages/e2e-tests/fixtures/blocks/core__social-link-google.html index bc940453608082..bb287992b2a60b 100644 --- a/packages/e2e-tests/fixtures/blocks/core__social-link-google.html +++ b/packages/e2e-tests/fixtures/blocks/core__social-link-google.html @@ -1,3 +1 @@ - - - + diff --git a/packages/e2e-tests/fixtures/blocks/core__social-link-google.json b/packages/e2e-tests/fixtures/blocks/core__social-link-google.json index 2044699907626f..f9e932f1175096 100644 --- a/packages/e2e-tests/fixtures/blocks/core__social-link-google.json +++ b/packages/e2e-tests/fixtures/blocks/core__social-link-google.json @@ -8,6 +8,6 @@ "site": "google" }, "innerBlocks": [], - "originalContent": "" + "originalContent": "" } ] diff --git a/packages/e2e-tests/fixtures/blocks/core__social-link-google.parsed.json b/packages/e2e-tests/fixtures/blocks/core__social-link-google.parsed.json index b5d762df7b3e33..8810c90640bc85 100644 --- a/packages/e2e-tests/fixtures/blocks/core__social-link-google.parsed.json +++ b/packages/e2e-tests/fixtures/blocks/core__social-link-google.parsed.json @@ -5,10 +5,8 @@ "url": "https://example.com/" }, "innerBlocks": [], - "innerHTML": "\n\n", - "innerContent": [ - "\n\n" - ] + "innerHTML": "", + "innerContent": [] }, { "blockName": null, diff --git a/packages/e2e-tests/fixtures/blocks/core__social-link-google.serialized.html b/packages/e2e-tests/fixtures/blocks/core__social-link-google.serialized.html index bc940453608082..bb287992b2a60b 100644 --- a/packages/e2e-tests/fixtures/blocks/core__social-link-google.serialized.html +++ b/packages/e2e-tests/fixtures/blocks/core__social-link-google.serialized.html @@ -1,3 +1 @@ - - - + diff --git a/packages/e2e-tests/fixtures/blocks/core__social-link-instagram.html b/packages/e2e-tests/fixtures/blocks/core__social-link-instagram.html index 5e94045ddbef79..9128e9ad8d13a0 100644 --- a/packages/e2e-tests/fixtures/blocks/core__social-link-instagram.html +++ b/packages/e2e-tests/fixtures/blocks/core__social-link-instagram.html @@ -1,3 +1 @@ - - - + diff --git a/packages/e2e-tests/fixtures/blocks/core__social-link-instagram.json b/packages/e2e-tests/fixtures/blocks/core__social-link-instagram.json index 3a2159dc2f429b..671483001d5ffa 100644 --- a/packages/e2e-tests/fixtures/blocks/core__social-link-instagram.json +++ b/packages/e2e-tests/fixtures/blocks/core__social-link-instagram.json @@ -8,6 +8,6 @@ "site": "instagram" }, "innerBlocks": [], - "originalContent": "" + "originalContent": "" } ] diff --git a/packages/e2e-tests/fixtures/blocks/core__social-link-instagram.parsed.json b/packages/e2e-tests/fixtures/blocks/core__social-link-instagram.parsed.json index 679fe7b56491c4..d9b13179d93be0 100644 --- a/packages/e2e-tests/fixtures/blocks/core__social-link-instagram.parsed.json +++ b/packages/e2e-tests/fixtures/blocks/core__social-link-instagram.parsed.json @@ -5,10 +5,8 @@ "url": "https://example.com/" }, "innerBlocks": [], - "innerHTML": "\n\n", - "innerContent": [ - "\n\n" - ] + "innerHTML": "", + "innerContent": [] }, { "blockName": null, diff --git a/packages/e2e-tests/fixtures/blocks/core__social-link-instagram.serialized.html b/packages/e2e-tests/fixtures/blocks/core__social-link-instagram.serialized.html index 5e94045ddbef79..9128e9ad8d13a0 100644 --- a/packages/e2e-tests/fixtures/blocks/core__social-link-instagram.serialized.html +++ b/packages/e2e-tests/fixtures/blocks/core__social-link-instagram.serialized.html @@ -1,3 +1 @@ - - - + diff --git a/packages/e2e-tests/fixtures/blocks/core__social-link-lastfm.html b/packages/e2e-tests/fixtures/blocks/core__social-link-lastfm.html index ceef91384db46d..8c7b86908204de 100644 --- a/packages/e2e-tests/fixtures/blocks/core__social-link-lastfm.html +++ b/packages/e2e-tests/fixtures/blocks/core__social-link-lastfm.html @@ -1,3 +1 @@ - - - + diff --git a/packages/e2e-tests/fixtures/blocks/core__social-link-lastfm.json b/packages/e2e-tests/fixtures/blocks/core__social-link-lastfm.json index 8cdf0f469bbfc8..175b295ee8503f 100644 --- a/packages/e2e-tests/fixtures/blocks/core__social-link-lastfm.json +++ b/packages/e2e-tests/fixtures/blocks/core__social-link-lastfm.json @@ -8,6 +8,6 @@ "site": "lastfm" }, "innerBlocks": [], - "originalContent": "" + "originalContent": "" } ] diff --git a/packages/e2e-tests/fixtures/blocks/core__social-link-lastfm.parsed.json b/packages/e2e-tests/fixtures/blocks/core__social-link-lastfm.parsed.json index ca5265b4b41a78..00642b1baee893 100644 --- a/packages/e2e-tests/fixtures/blocks/core__social-link-lastfm.parsed.json +++ b/packages/e2e-tests/fixtures/blocks/core__social-link-lastfm.parsed.json @@ -5,10 +5,8 @@ "url": "https://example.com/" }, "innerBlocks": [], - "innerHTML": "\n\n", - "innerContent": [ - "\n\n" - ] + "innerHTML": "", + "innerContent": [] }, { "blockName": null, diff --git a/packages/e2e-tests/fixtures/blocks/core__social-link-lastfm.serialized.html b/packages/e2e-tests/fixtures/blocks/core__social-link-lastfm.serialized.html index ceef91384db46d..8c7b86908204de 100644 --- a/packages/e2e-tests/fixtures/blocks/core__social-link-lastfm.serialized.html +++ b/packages/e2e-tests/fixtures/blocks/core__social-link-lastfm.serialized.html @@ -1,3 +1 @@ - - - + diff --git a/packages/e2e-tests/fixtures/blocks/core__social-link-linkedin.html b/packages/e2e-tests/fixtures/blocks/core__social-link-linkedin.html index 4a89e94a85d3ba..833e2a7b2a2e00 100644 --- a/packages/e2e-tests/fixtures/blocks/core__social-link-linkedin.html +++ b/packages/e2e-tests/fixtures/blocks/core__social-link-linkedin.html @@ -1,3 +1 @@ - - - + diff --git a/packages/e2e-tests/fixtures/blocks/core__social-link-linkedin.json b/packages/e2e-tests/fixtures/blocks/core__social-link-linkedin.json index b5ed7764f8a154..178d79b10833f9 100644 --- a/packages/e2e-tests/fixtures/blocks/core__social-link-linkedin.json +++ b/packages/e2e-tests/fixtures/blocks/core__social-link-linkedin.json @@ -8,6 +8,6 @@ "site": "linkedin" }, "innerBlocks": [], - "originalContent": "" + "originalContent": "" } ] diff --git a/packages/e2e-tests/fixtures/blocks/core__social-link-linkedin.parsed.json b/packages/e2e-tests/fixtures/blocks/core__social-link-linkedin.parsed.json index 7bf513eac4bf5f..e67a1198c80e0b 100644 --- a/packages/e2e-tests/fixtures/blocks/core__social-link-linkedin.parsed.json +++ b/packages/e2e-tests/fixtures/blocks/core__social-link-linkedin.parsed.json @@ -5,10 +5,8 @@ "url": "https://example.com/" }, "innerBlocks": [], - "innerHTML": "\n\n", - "innerContent": [ - "\n\n" - ] + "innerHTML": "", + "innerContent": [] }, { "blockName": null, diff --git a/packages/e2e-tests/fixtures/blocks/core__social-link-linkedin.serialized.html b/packages/e2e-tests/fixtures/blocks/core__social-link-linkedin.serialized.html index 4a89e94a85d3ba..833e2a7b2a2e00 100644 --- a/packages/e2e-tests/fixtures/blocks/core__social-link-linkedin.serialized.html +++ b/packages/e2e-tests/fixtures/blocks/core__social-link-linkedin.serialized.html @@ -1,3 +1 @@ - - - + diff --git a/packages/e2e-tests/fixtures/blocks/core__social-link-mail.html b/packages/e2e-tests/fixtures/blocks/core__social-link-mail.html index aec8e4fe8d65ab..1d2554c0627cd9 100644 --- a/packages/e2e-tests/fixtures/blocks/core__social-link-mail.html +++ b/packages/e2e-tests/fixtures/blocks/core__social-link-mail.html @@ -1,3 +1 @@ - - - + diff --git a/packages/e2e-tests/fixtures/blocks/core__social-link-mail.json b/packages/e2e-tests/fixtures/blocks/core__social-link-mail.json index f68344318d8202..d78a44bd488590 100644 --- a/packages/e2e-tests/fixtures/blocks/core__social-link-mail.json +++ b/packages/e2e-tests/fixtures/blocks/core__social-link-mail.json @@ -8,6 +8,6 @@ "site": "mail" }, "innerBlocks": [], - "originalContent": "" + "originalContent": "" } ] diff --git a/packages/e2e-tests/fixtures/blocks/core__social-link-mail.parsed.json b/packages/e2e-tests/fixtures/blocks/core__social-link-mail.parsed.json index 3ebb3c9b4c27d0..4d9f2e909de695 100644 --- a/packages/e2e-tests/fixtures/blocks/core__social-link-mail.parsed.json +++ b/packages/e2e-tests/fixtures/blocks/core__social-link-mail.parsed.json @@ -5,10 +5,8 @@ "url": "https://example.com/" }, "innerBlocks": [], - "innerHTML": "\n\n", - "innerContent": [ - "\n\n" - ] + "innerHTML": "", + "innerContent": [] }, { "blockName": null, diff --git a/packages/e2e-tests/fixtures/blocks/core__social-link-mail.serialized.html b/packages/e2e-tests/fixtures/blocks/core__social-link-mail.serialized.html index aec8e4fe8d65ab..1d2554c0627cd9 100644 --- a/packages/e2e-tests/fixtures/blocks/core__social-link-mail.serialized.html +++ b/packages/e2e-tests/fixtures/blocks/core__social-link-mail.serialized.html @@ -1,3 +1 @@ - - - + diff --git a/packages/e2e-tests/fixtures/blocks/core__social-link-mastodon.html b/packages/e2e-tests/fixtures/blocks/core__social-link-mastodon.html index 9ae04174affdbe..918161e393320d 100644 --- a/packages/e2e-tests/fixtures/blocks/core__social-link-mastodon.html +++ b/packages/e2e-tests/fixtures/blocks/core__social-link-mastodon.html @@ -1,3 +1 @@ - - - + diff --git a/packages/e2e-tests/fixtures/blocks/core__social-link-mastodon.json b/packages/e2e-tests/fixtures/blocks/core__social-link-mastodon.json index e2170c5fc94899..8863d06052d350 100644 --- a/packages/e2e-tests/fixtures/blocks/core__social-link-mastodon.json +++ b/packages/e2e-tests/fixtures/blocks/core__social-link-mastodon.json @@ -8,6 +8,6 @@ "site": "mastodon" }, "innerBlocks": [], - "originalContent": "" + "originalContent": "" } ] diff --git a/packages/e2e-tests/fixtures/blocks/core__social-link-mastodon.parsed.json b/packages/e2e-tests/fixtures/blocks/core__social-link-mastodon.parsed.json index b2c6413458ac1d..8624cb56072e23 100644 --- a/packages/e2e-tests/fixtures/blocks/core__social-link-mastodon.parsed.json +++ b/packages/e2e-tests/fixtures/blocks/core__social-link-mastodon.parsed.json @@ -5,10 +5,8 @@ "url": "https://example.com/" }, "innerBlocks": [], - "innerHTML": "\n\n", - "innerContent": [ - "\n\n" - ] + "innerHTML": "", + "innerContent": [] }, { "blockName": null, diff --git a/packages/e2e-tests/fixtures/blocks/core__social-link-mastodon.serialized.html b/packages/e2e-tests/fixtures/blocks/core__social-link-mastodon.serialized.html index 9ae04174affdbe..918161e393320d 100644 --- a/packages/e2e-tests/fixtures/blocks/core__social-link-mastodon.serialized.html +++ b/packages/e2e-tests/fixtures/blocks/core__social-link-mastodon.serialized.html @@ -1,3 +1 @@ - - - + diff --git a/packages/e2e-tests/fixtures/blocks/core__social-link-medium.html b/packages/e2e-tests/fixtures/blocks/core__social-link-medium.html index 7509f90fbabac7..8d05b709cbf6ce 100644 --- a/packages/e2e-tests/fixtures/blocks/core__social-link-medium.html +++ b/packages/e2e-tests/fixtures/blocks/core__social-link-medium.html @@ -1,3 +1 @@ - - - + diff --git a/packages/e2e-tests/fixtures/blocks/core__social-link-medium.json b/packages/e2e-tests/fixtures/blocks/core__social-link-medium.json index 649b5e59a5ab8f..4e6059a0a46420 100644 --- a/packages/e2e-tests/fixtures/blocks/core__social-link-medium.json +++ b/packages/e2e-tests/fixtures/blocks/core__social-link-medium.json @@ -8,6 +8,6 @@ "site": "medium" }, "innerBlocks": [], - "originalContent": "" + "originalContent": "" } ] diff --git a/packages/e2e-tests/fixtures/blocks/core__social-link-medium.parsed.json b/packages/e2e-tests/fixtures/blocks/core__social-link-medium.parsed.json index 28339189648e24..49a78e2f162bfb 100644 --- a/packages/e2e-tests/fixtures/blocks/core__social-link-medium.parsed.json +++ b/packages/e2e-tests/fixtures/blocks/core__social-link-medium.parsed.json @@ -5,10 +5,8 @@ "url": "https://example.com/" }, "innerBlocks": [], - "innerHTML": "\n\n", - "innerContent": [ - "\n\n" - ] + "innerHTML": "", + "innerContent": [] }, { "blockName": null, diff --git a/packages/e2e-tests/fixtures/blocks/core__social-link-medium.serialized.html b/packages/e2e-tests/fixtures/blocks/core__social-link-medium.serialized.html index 7509f90fbabac7..8d05b709cbf6ce 100644 --- a/packages/e2e-tests/fixtures/blocks/core__social-link-medium.serialized.html +++ b/packages/e2e-tests/fixtures/blocks/core__social-link-medium.serialized.html @@ -1,3 +1 @@ - - - + diff --git a/packages/e2e-tests/fixtures/blocks/core__social-link-meetup.html b/packages/e2e-tests/fixtures/blocks/core__social-link-meetup.html index bcb9ec81c35ebf..fad1ee2daf2932 100644 --- a/packages/e2e-tests/fixtures/blocks/core__social-link-meetup.html +++ b/packages/e2e-tests/fixtures/blocks/core__social-link-meetup.html @@ -1,3 +1 @@ - - - + diff --git a/packages/e2e-tests/fixtures/blocks/core__social-link-meetup.json b/packages/e2e-tests/fixtures/blocks/core__social-link-meetup.json index 1fc09c840913b8..060ec9070f81cc 100644 --- a/packages/e2e-tests/fixtures/blocks/core__social-link-meetup.json +++ b/packages/e2e-tests/fixtures/blocks/core__social-link-meetup.json @@ -8,6 +8,6 @@ "site": "meetup" }, "innerBlocks": [], - "originalContent": "" + "originalContent": "" } ] diff --git a/packages/e2e-tests/fixtures/blocks/core__social-link-meetup.parsed.json b/packages/e2e-tests/fixtures/blocks/core__social-link-meetup.parsed.json index 3e2fcde86cdccf..4c91dfc9a4cd93 100644 --- a/packages/e2e-tests/fixtures/blocks/core__social-link-meetup.parsed.json +++ b/packages/e2e-tests/fixtures/blocks/core__social-link-meetup.parsed.json @@ -5,10 +5,8 @@ "url": "https://example.com/" }, "innerBlocks": [], - "innerHTML": "\n\n", - "innerContent": [ - "\n\n" - ] + "innerHTML": "", + "innerContent": [] }, { "blockName": null, diff --git a/packages/e2e-tests/fixtures/blocks/core__social-link-meetup.serialized.html b/packages/e2e-tests/fixtures/blocks/core__social-link-meetup.serialized.html index bcb9ec81c35ebf..fad1ee2daf2932 100644 --- a/packages/e2e-tests/fixtures/blocks/core__social-link-meetup.serialized.html +++ b/packages/e2e-tests/fixtures/blocks/core__social-link-meetup.serialized.html @@ -1,3 +1 @@ - - - + diff --git a/packages/e2e-tests/fixtures/blocks/core__social-link-pinterest.html b/packages/e2e-tests/fixtures/blocks/core__social-link-pinterest.html index 70de6c7db96c19..1d78b59f30470e 100644 --- a/packages/e2e-tests/fixtures/blocks/core__social-link-pinterest.html +++ b/packages/e2e-tests/fixtures/blocks/core__social-link-pinterest.html @@ -1,3 +1 @@ - - - + diff --git a/packages/e2e-tests/fixtures/blocks/core__social-link-pinterest.json b/packages/e2e-tests/fixtures/blocks/core__social-link-pinterest.json index 832d7ea7a706bd..ad54fd64317e41 100644 --- a/packages/e2e-tests/fixtures/blocks/core__social-link-pinterest.json +++ b/packages/e2e-tests/fixtures/blocks/core__social-link-pinterest.json @@ -8,6 +8,6 @@ "site": "pinterest" }, "innerBlocks": [], - "originalContent": "" + "originalContent": "" } ] diff --git a/packages/e2e-tests/fixtures/blocks/core__social-link-pinterest.parsed.json b/packages/e2e-tests/fixtures/blocks/core__social-link-pinterest.parsed.json index 50d45331e2c1b4..d5344890c9f81b 100644 --- a/packages/e2e-tests/fixtures/blocks/core__social-link-pinterest.parsed.json +++ b/packages/e2e-tests/fixtures/blocks/core__social-link-pinterest.parsed.json @@ -5,10 +5,8 @@ "url": "https://example.com/" }, "innerBlocks": [], - "innerHTML": "\n\n", - "innerContent": [ - "\n\n" - ] + "innerHTML": "", + "innerContent": [] }, { "blockName": null, diff --git a/packages/e2e-tests/fixtures/blocks/core__social-link-pinterest.serialized.html b/packages/e2e-tests/fixtures/blocks/core__social-link-pinterest.serialized.html index 70de6c7db96c19..1d78b59f30470e 100644 --- a/packages/e2e-tests/fixtures/blocks/core__social-link-pinterest.serialized.html +++ b/packages/e2e-tests/fixtures/blocks/core__social-link-pinterest.serialized.html @@ -1,3 +1 @@ - - - + diff --git a/packages/e2e-tests/fixtures/blocks/core__social-link-pocket.html b/packages/e2e-tests/fixtures/blocks/core__social-link-pocket.html index 0d048b81b1f127..c65930150dd3a2 100644 --- a/packages/e2e-tests/fixtures/blocks/core__social-link-pocket.html +++ b/packages/e2e-tests/fixtures/blocks/core__social-link-pocket.html @@ -1,3 +1 @@ - - - + diff --git a/packages/e2e-tests/fixtures/blocks/core__social-link-pocket.json b/packages/e2e-tests/fixtures/blocks/core__social-link-pocket.json index 074fa2154c0912..76e391ee54c292 100644 --- a/packages/e2e-tests/fixtures/blocks/core__social-link-pocket.json +++ b/packages/e2e-tests/fixtures/blocks/core__social-link-pocket.json @@ -8,6 +8,6 @@ "site": "pocket" }, "innerBlocks": [], - "originalContent": "" + "originalContent": "" } ] diff --git a/packages/e2e-tests/fixtures/blocks/core__social-link-pocket.parsed.json b/packages/e2e-tests/fixtures/blocks/core__social-link-pocket.parsed.json index 3c717f87dbf038..8e36616dc54413 100644 --- a/packages/e2e-tests/fixtures/blocks/core__social-link-pocket.parsed.json +++ b/packages/e2e-tests/fixtures/blocks/core__social-link-pocket.parsed.json @@ -5,10 +5,8 @@ "url": "https://example.com/" }, "innerBlocks": [], - "innerHTML": "\n\n", - "innerContent": [ - "\n\n" - ] + "innerHTML": "", + "innerContent": [] }, { "blockName": null, diff --git a/packages/e2e-tests/fixtures/blocks/core__social-link-pocket.serialized.html b/packages/e2e-tests/fixtures/blocks/core__social-link-pocket.serialized.html index 0d048b81b1f127..c65930150dd3a2 100644 --- a/packages/e2e-tests/fixtures/blocks/core__social-link-pocket.serialized.html +++ b/packages/e2e-tests/fixtures/blocks/core__social-link-pocket.serialized.html @@ -1,3 +1 @@ - - - + diff --git a/packages/e2e-tests/fixtures/blocks/core__social-link-reddit.html b/packages/e2e-tests/fixtures/blocks/core__social-link-reddit.html index 3fe18dc549040c..50ab2ae71ab8d6 100644 --- a/packages/e2e-tests/fixtures/blocks/core__social-link-reddit.html +++ b/packages/e2e-tests/fixtures/blocks/core__social-link-reddit.html @@ -1,3 +1 @@ - - - + diff --git a/packages/e2e-tests/fixtures/blocks/core__social-link-reddit.json b/packages/e2e-tests/fixtures/blocks/core__social-link-reddit.json index d4018f314f1800..8e80c1bdfd2858 100644 --- a/packages/e2e-tests/fixtures/blocks/core__social-link-reddit.json +++ b/packages/e2e-tests/fixtures/blocks/core__social-link-reddit.json @@ -8,6 +8,6 @@ "site": "reddit" }, "innerBlocks": [], - "originalContent": "" + "originalContent": "" } ] diff --git a/packages/e2e-tests/fixtures/blocks/core__social-link-reddit.parsed.json b/packages/e2e-tests/fixtures/blocks/core__social-link-reddit.parsed.json index 71d0de5f1b140b..ec740147dbe577 100644 --- a/packages/e2e-tests/fixtures/blocks/core__social-link-reddit.parsed.json +++ b/packages/e2e-tests/fixtures/blocks/core__social-link-reddit.parsed.json @@ -5,10 +5,8 @@ "url": "https://example.com/" }, "innerBlocks": [], - "innerHTML": "\n\n", - "innerContent": [ - "\n\n" - ] + "innerHTML": "", + "innerContent": [] }, { "blockName": null, diff --git a/packages/e2e-tests/fixtures/blocks/core__social-link-reddit.serialized.html b/packages/e2e-tests/fixtures/blocks/core__social-link-reddit.serialized.html index 3fe18dc549040c..50ab2ae71ab8d6 100644 --- a/packages/e2e-tests/fixtures/blocks/core__social-link-reddit.serialized.html +++ b/packages/e2e-tests/fixtures/blocks/core__social-link-reddit.serialized.html @@ -1,3 +1 @@ - - - + diff --git a/packages/e2e-tests/fixtures/blocks/core__social-link-skype.html b/packages/e2e-tests/fixtures/blocks/core__social-link-skype.html index ad6a81b210c7ed..e152f07c6c1c2a 100644 --- a/packages/e2e-tests/fixtures/blocks/core__social-link-skype.html +++ b/packages/e2e-tests/fixtures/blocks/core__social-link-skype.html @@ -1,3 +1 @@ - - - + diff --git a/packages/e2e-tests/fixtures/blocks/core__social-link-skype.json b/packages/e2e-tests/fixtures/blocks/core__social-link-skype.json index 363cecde53d459..c0ae1176050066 100644 --- a/packages/e2e-tests/fixtures/blocks/core__social-link-skype.json +++ b/packages/e2e-tests/fixtures/blocks/core__social-link-skype.json @@ -8,6 +8,6 @@ "site": "skype" }, "innerBlocks": [], - "originalContent": "" + "originalContent": "" } ] diff --git a/packages/e2e-tests/fixtures/blocks/core__social-link-skype.parsed.json b/packages/e2e-tests/fixtures/blocks/core__social-link-skype.parsed.json index db9c0fe307f779..7fc823fc994055 100644 --- a/packages/e2e-tests/fixtures/blocks/core__social-link-skype.parsed.json +++ b/packages/e2e-tests/fixtures/blocks/core__social-link-skype.parsed.json @@ -5,10 +5,8 @@ "url": "https://example.com/" }, "innerBlocks": [], - "innerHTML": "\n\n", - "innerContent": [ - "\n\n" - ] + "innerHTML": "", + "innerContent": [] }, { "blockName": null, diff --git a/packages/e2e-tests/fixtures/blocks/core__social-link-skype.serialized.html b/packages/e2e-tests/fixtures/blocks/core__social-link-skype.serialized.html index ad6a81b210c7ed..e152f07c6c1c2a 100644 --- a/packages/e2e-tests/fixtures/blocks/core__social-link-skype.serialized.html +++ b/packages/e2e-tests/fixtures/blocks/core__social-link-skype.serialized.html @@ -1,3 +1 @@ - - - + diff --git a/packages/e2e-tests/fixtures/blocks/core__social-link-snapchat.html b/packages/e2e-tests/fixtures/blocks/core__social-link-snapchat.html index 25b2d51ece3a1b..a9e616b5c22cec 100644 --- a/packages/e2e-tests/fixtures/blocks/core__social-link-snapchat.html +++ b/packages/e2e-tests/fixtures/blocks/core__social-link-snapchat.html @@ -1,3 +1 @@ - - - + diff --git a/packages/e2e-tests/fixtures/blocks/core__social-link-snapchat.json b/packages/e2e-tests/fixtures/blocks/core__social-link-snapchat.json index 64382a0acd7feb..827254a450e7db 100644 --- a/packages/e2e-tests/fixtures/blocks/core__social-link-snapchat.json +++ b/packages/e2e-tests/fixtures/blocks/core__social-link-snapchat.json @@ -8,6 +8,6 @@ "site": "snapchat" }, "innerBlocks": [], - "originalContent": "" + "originalContent": "" } ] diff --git a/packages/e2e-tests/fixtures/blocks/core__social-link-snapchat.parsed.json b/packages/e2e-tests/fixtures/blocks/core__social-link-snapchat.parsed.json index 1e121a457fc4a7..1547a02060ddd0 100644 --- a/packages/e2e-tests/fixtures/blocks/core__social-link-snapchat.parsed.json +++ b/packages/e2e-tests/fixtures/blocks/core__social-link-snapchat.parsed.json @@ -5,10 +5,8 @@ "url": "https://example.com/" }, "innerBlocks": [], - "innerHTML": "\n\n", - "innerContent": [ - "\n\n" - ] + "innerHTML": "", + "innerContent": [] }, { "blockName": null, diff --git a/packages/e2e-tests/fixtures/blocks/core__social-link-snapchat.serialized.html b/packages/e2e-tests/fixtures/blocks/core__social-link-snapchat.serialized.html index 25b2d51ece3a1b..a9e616b5c22cec 100644 --- a/packages/e2e-tests/fixtures/blocks/core__social-link-snapchat.serialized.html +++ b/packages/e2e-tests/fixtures/blocks/core__social-link-snapchat.serialized.html @@ -1,3 +1 @@ - - - + diff --git a/packages/e2e-tests/fixtures/blocks/core__social-link-soundcloud.html b/packages/e2e-tests/fixtures/blocks/core__social-link-soundcloud.html index 259e9e73d72ce5..82ea5653bc362b 100644 --- a/packages/e2e-tests/fixtures/blocks/core__social-link-soundcloud.html +++ b/packages/e2e-tests/fixtures/blocks/core__social-link-soundcloud.html @@ -1,3 +1 @@ - - - + diff --git a/packages/e2e-tests/fixtures/blocks/core__social-link-soundcloud.json b/packages/e2e-tests/fixtures/blocks/core__social-link-soundcloud.json index f9717e76ab390c..4d76ca9c5ff7bc 100644 --- a/packages/e2e-tests/fixtures/blocks/core__social-link-soundcloud.json +++ b/packages/e2e-tests/fixtures/blocks/core__social-link-soundcloud.json @@ -8,6 +8,6 @@ "site": "soundcloud" }, "innerBlocks": [], - "originalContent": "" + "originalContent": "" } ] diff --git a/packages/e2e-tests/fixtures/blocks/core__social-link-soundcloud.parsed.json b/packages/e2e-tests/fixtures/blocks/core__social-link-soundcloud.parsed.json index ef3d0a905b41fe..17358f2e6f7a3f 100644 --- a/packages/e2e-tests/fixtures/blocks/core__social-link-soundcloud.parsed.json +++ b/packages/e2e-tests/fixtures/blocks/core__social-link-soundcloud.parsed.json @@ -5,10 +5,8 @@ "url": "https://example.com/" }, "innerBlocks": [], - "innerHTML": "\n\n", - "innerContent": [ - "\n\n" - ] + "innerHTML": "", + "innerContent": [] }, { "blockName": null, diff --git a/packages/e2e-tests/fixtures/blocks/core__social-link-soundcloud.serialized.html b/packages/e2e-tests/fixtures/blocks/core__social-link-soundcloud.serialized.html index 259e9e73d72ce5..82ea5653bc362b 100644 --- a/packages/e2e-tests/fixtures/blocks/core__social-link-soundcloud.serialized.html +++ b/packages/e2e-tests/fixtures/blocks/core__social-link-soundcloud.serialized.html @@ -1,3 +1 @@ - - - + diff --git a/packages/e2e-tests/fixtures/blocks/core__social-link-spotify.html b/packages/e2e-tests/fixtures/blocks/core__social-link-spotify.html index f9ee8d6e9d6698..152b96e2efea6d 100644 --- a/packages/e2e-tests/fixtures/blocks/core__social-link-spotify.html +++ b/packages/e2e-tests/fixtures/blocks/core__social-link-spotify.html @@ -1,3 +1 @@ - - - + diff --git a/packages/e2e-tests/fixtures/blocks/core__social-link-spotify.json b/packages/e2e-tests/fixtures/blocks/core__social-link-spotify.json index 941cb39db08c70..d02543135f2587 100644 --- a/packages/e2e-tests/fixtures/blocks/core__social-link-spotify.json +++ b/packages/e2e-tests/fixtures/blocks/core__social-link-spotify.json @@ -8,6 +8,6 @@ "site": "spotify" }, "innerBlocks": [], - "originalContent": "" + "originalContent": "" } ] diff --git a/packages/e2e-tests/fixtures/blocks/core__social-link-spotify.parsed.json b/packages/e2e-tests/fixtures/blocks/core__social-link-spotify.parsed.json index 3a89054176dd30..fc81eff1afe871 100644 --- a/packages/e2e-tests/fixtures/blocks/core__social-link-spotify.parsed.json +++ b/packages/e2e-tests/fixtures/blocks/core__social-link-spotify.parsed.json @@ -5,10 +5,8 @@ "url": "https://example.com/" }, "innerBlocks": [], - "innerHTML": "\n\n", - "innerContent": [ - "\n\n" - ] + "innerHTML": "", + "innerContent": [] }, { "blockName": null, diff --git a/packages/e2e-tests/fixtures/blocks/core__social-link-spotify.serialized.html b/packages/e2e-tests/fixtures/blocks/core__social-link-spotify.serialized.html index f9ee8d6e9d6698..152b96e2efea6d 100644 --- a/packages/e2e-tests/fixtures/blocks/core__social-link-spotify.serialized.html +++ b/packages/e2e-tests/fixtures/blocks/core__social-link-spotify.serialized.html @@ -1,3 +1 @@ - - - + diff --git a/packages/e2e-tests/fixtures/blocks/core__social-link-tumblr.html b/packages/e2e-tests/fixtures/blocks/core__social-link-tumblr.html index c667e5a4d15460..337386ff5bbbb9 100644 --- a/packages/e2e-tests/fixtures/blocks/core__social-link-tumblr.html +++ b/packages/e2e-tests/fixtures/blocks/core__social-link-tumblr.html @@ -1,3 +1 @@ - - - + diff --git a/packages/e2e-tests/fixtures/blocks/core__social-link-tumblr.json b/packages/e2e-tests/fixtures/blocks/core__social-link-tumblr.json index e1806d1fb08347..de9ce89f19b513 100644 --- a/packages/e2e-tests/fixtures/blocks/core__social-link-tumblr.json +++ b/packages/e2e-tests/fixtures/blocks/core__social-link-tumblr.json @@ -8,6 +8,6 @@ "site": "tumblr" }, "innerBlocks": [], - "originalContent": "" + "originalContent": "" } ] diff --git a/packages/e2e-tests/fixtures/blocks/core__social-link-tumblr.parsed.json b/packages/e2e-tests/fixtures/blocks/core__social-link-tumblr.parsed.json index b6130a5f613654..c63805e6101946 100644 --- a/packages/e2e-tests/fixtures/blocks/core__social-link-tumblr.parsed.json +++ b/packages/e2e-tests/fixtures/blocks/core__social-link-tumblr.parsed.json @@ -5,10 +5,8 @@ "url": "https://example.com/" }, "innerBlocks": [], - "innerHTML": "\n\n", - "innerContent": [ - "\n\n" - ] + "innerHTML": "", + "innerContent": [] }, { "blockName": null, diff --git a/packages/e2e-tests/fixtures/blocks/core__social-link-tumblr.serialized.html b/packages/e2e-tests/fixtures/blocks/core__social-link-tumblr.serialized.html index c667e5a4d15460..337386ff5bbbb9 100644 --- a/packages/e2e-tests/fixtures/blocks/core__social-link-tumblr.serialized.html +++ b/packages/e2e-tests/fixtures/blocks/core__social-link-tumblr.serialized.html @@ -1,3 +1 @@ - - - + diff --git a/packages/e2e-tests/fixtures/blocks/core__social-link-twitch.html b/packages/e2e-tests/fixtures/blocks/core__social-link-twitch.html index 290d4108d7a9c2..29f048b3d1be8e 100644 --- a/packages/e2e-tests/fixtures/blocks/core__social-link-twitch.html +++ b/packages/e2e-tests/fixtures/blocks/core__social-link-twitch.html @@ -1,3 +1 @@ - - - + diff --git a/packages/e2e-tests/fixtures/blocks/core__social-link-twitch.json b/packages/e2e-tests/fixtures/blocks/core__social-link-twitch.json index 9945e1d3ba9e24..0975169f8d6d4b 100644 --- a/packages/e2e-tests/fixtures/blocks/core__social-link-twitch.json +++ b/packages/e2e-tests/fixtures/blocks/core__social-link-twitch.json @@ -8,6 +8,6 @@ "site": "twitch" }, "innerBlocks": [], - "originalContent": "" + "originalContent": "" } ] diff --git a/packages/e2e-tests/fixtures/blocks/core__social-link-twitch.parsed.json b/packages/e2e-tests/fixtures/blocks/core__social-link-twitch.parsed.json index 9cc1686d44bc94..8949b729ad13e7 100644 --- a/packages/e2e-tests/fixtures/blocks/core__social-link-twitch.parsed.json +++ b/packages/e2e-tests/fixtures/blocks/core__social-link-twitch.parsed.json @@ -5,10 +5,8 @@ "url": "https://example.com/" }, "innerBlocks": [], - "innerHTML": "\n\n", - "innerContent": [ - "\n\n" - ] + "innerHTML": "", + "innerContent": [] }, { "blockName": null, diff --git a/packages/e2e-tests/fixtures/blocks/core__social-link-twitch.serialized.html b/packages/e2e-tests/fixtures/blocks/core__social-link-twitch.serialized.html index 290d4108d7a9c2..29f048b3d1be8e 100644 --- a/packages/e2e-tests/fixtures/blocks/core__social-link-twitch.serialized.html +++ b/packages/e2e-tests/fixtures/blocks/core__social-link-twitch.serialized.html @@ -1,3 +1 @@ - - - + diff --git a/packages/e2e-tests/fixtures/blocks/core__social-link-twitter.html b/packages/e2e-tests/fixtures/blocks/core__social-link-twitter.html index 82bec9cd5eaafb..3b9db6b710313f 100644 --- a/packages/e2e-tests/fixtures/blocks/core__social-link-twitter.html +++ b/packages/e2e-tests/fixtures/blocks/core__social-link-twitter.html @@ -1,3 +1 @@ - - - + diff --git a/packages/e2e-tests/fixtures/blocks/core__social-link-twitter.json b/packages/e2e-tests/fixtures/blocks/core__social-link-twitter.json index e3441a367f17dd..dfaa1321180dc1 100644 --- a/packages/e2e-tests/fixtures/blocks/core__social-link-twitter.json +++ b/packages/e2e-tests/fixtures/blocks/core__social-link-twitter.json @@ -8,6 +8,6 @@ "site": "twitter" }, "innerBlocks": [], - "originalContent": "" + "originalContent": "" } ] diff --git a/packages/e2e-tests/fixtures/blocks/core__social-link-twitter.parsed.json b/packages/e2e-tests/fixtures/blocks/core__social-link-twitter.parsed.json index 3fd2b4859aedb7..880324c23f8d31 100644 --- a/packages/e2e-tests/fixtures/blocks/core__social-link-twitter.parsed.json +++ b/packages/e2e-tests/fixtures/blocks/core__social-link-twitter.parsed.json @@ -5,10 +5,8 @@ "url": "https://example.com/" }, "innerBlocks": [], - "innerHTML": "\n\n", - "innerContent": [ - "\n\n" - ] + "innerHTML": "", + "innerContent": [] }, { "blockName": null, diff --git a/packages/e2e-tests/fixtures/blocks/core__social-link-twitter.serialized.html b/packages/e2e-tests/fixtures/blocks/core__social-link-twitter.serialized.html index 82bec9cd5eaafb..3b9db6b710313f 100644 --- a/packages/e2e-tests/fixtures/blocks/core__social-link-twitter.serialized.html +++ b/packages/e2e-tests/fixtures/blocks/core__social-link-twitter.serialized.html @@ -1,3 +1 @@ - - - + diff --git a/packages/e2e-tests/fixtures/blocks/core__social-link-vimeo.html b/packages/e2e-tests/fixtures/blocks/core__social-link-vimeo.html index 74b52213760f17..5e93e096e89db8 100644 --- a/packages/e2e-tests/fixtures/blocks/core__social-link-vimeo.html +++ b/packages/e2e-tests/fixtures/blocks/core__social-link-vimeo.html @@ -1,3 +1 @@ - - - + diff --git a/packages/e2e-tests/fixtures/blocks/core__social-link-vimeo.json b/packages/e2e-tests/fixtures/blocks/core__social-link-vimeo.json index a9c20352ae9814..cbb6f2ac014653 100644 --- a/packages/e2e-tests/fixtures/blocks/core__social-link-vimeo.json +++ b/packages/e2e-tests/fixtures/blocks/core__social-link-vimeo.json @@ -8,6 +8,6 @@ "site": "vimeo" }, "innerBlocks": [], - "originalContent": "" + "originalContent": "" } ] diff --git a/packages/e2e-tests/fixtures/blocks/core__social-link-vimeo.parsed.json b/packages/e2e-tests/fixtures/blocks/core__social-link-vimeo.parsed.json index 67f50090cfe8e7..b60bb1cd48c72f 100644 --- a/packages/e2e-tests/fixtures/blocks/core__social-link-vimeo.parsed.json +++ b/packages/e2e-tests/fixtures/blocks/core__social-link-vimeo.parsed.json @@ -5,10 +5,8 @@ "url": "https://example.com/" }, "innerBlocks": [], - "innerHTML": "\n\n", - "innerContent": [ - "\n\n" - ] + "innerHTML": "", + "innerContent": [] }, { "blockName": null, diff --git a/packages/e2e-tests/fixtures/blocks/core__social-link-vimeo.serialized.html b/packages/e2e-tests/fixtures/blocks/core__social-link-vimeo.serialized.html index 74b52213760f17..5e93e096e89db8 100644 --- a/packages/e2e-tests/fixtures/blocks/core__social-link-vimeo.serialized.html +++ b/packages/e2e-tests/fixtures/blocks/core__social-link-vimeo.serialized.html @@ -1,3 +1 @@ - - - + diff --git a/packages/e2e-tests/fixtures/blocks/core__social-link-vk.html b/packages/e2e-tests/fixtures/blocks/core__social-link-vk.html index 2fa5602dc499a9..bfd120873062e8 100644 --- a/packages/e2e-tests/fixtures/blocks/core__social-link-vk.html +++ b/packages/e2e-tests/fixtures/blocks/core__social-link-vk.html @@ -1,3 +1 @@ - - - + diff --git a/packages/e2e-tests/fixtures/blocks/core__social-link-vk.json b/packages/e2e-tests/fixtures/blocks/core__social-link-vk.json index e48a38a285c36b..1c07d246de471a 100644 --- a/packages/e2e-tests/fixtures/blocks/core__social-link-vk.json +++ b/packages/e2e-tests/fixtures/blocks/core__social-link-vk.json @@ -8,6 +8,6 @@ "site": "vk" }, "innerBlocks": [], - "originalContent": "" + "originalContent": "" } ] diff --git a/packages/e2e-tests/fixtures/blocks/core__social-link-vk.parsed.json b/packages/e2e-tests/fixtures/blocks/core__social-link-vk.parsed.json index 41706b316fbfed..7306459001ebdd 100644 --- a/packages/e2e-tests/fixtures/blocks/core__social-link-vk.parsed.json +++ b/packages/e2e-tests/fixtures/blocks/core__social-link-vk.parsed.json @@ -5,10 +5,8 @@ "url": "https://example.com/" }, "innerBlocks": [], - "innerHTML": "\n\n", - "innerContent": [ - "\n\n" - ] + "innerHTML": "", + "innerContent": [] }, { "blockName": null, diff --git a/packages/e2e-tests/fixtures/blocks/core__social-link-vk.serialized.html b/packages/e2e-tests/fixtures/blocks/core__social-link-vk.serialized.html index 2fa5602dc499a9..bfd120873062e8 100644 --- a/packages/e2e-tests/fixtures/blocks/core__social-link-vk.serialized.html +++ b/packages/e2e-tests/fixtures/blocks/core__social-link-vk.serialized.html @@ -1,3 +1 @@ - - - + diff --git a/packages/e2e-tests/fixtures/blocks/core__social-link-wordpress.html b/packages/e2e-tests/fixtures/blocks/core__social-link-wordpress.html index a2376794cc300b..08e5b837c6f176 100644 --- a/packages/e2e-tests/fixtures/blocks/core__social-link-wordpress.html +++ b/packages/e2e-tests/fixtures/blocks/core__social-link-wordpress.html @@ -1,3 +1 @@ - - - + diff --git a/packages/e2e-tests/fixtures/blocks/core__social-link-wordpress.json b/packages/e2e-tests/fixtures/blocks/core__social-link-wordpress.json index 65d8ae41a711b5..24342d4d939368 100644 --- a/packages/e2e-tests/fixtures/blocks/core__social-link-wordpress.json +++ b/packages/e2e-tests/fixtures/blocks/core__social-link-wordpress.json @@ -8,6 +8,6 @@ "site": "wordpress" }, "innerBlocks": [], - "originalContent": "" + "originalContent": "" } ] diff --git a/packages/e2e-tests/fixtures/blocks/core__social-link-wordpress.parsed.json b/packages/e2e-tests/fixtures/blocks/core__social-link-wordpress.parsed.json index e278fe0a4202a3..5970c1c528515d 100644 --- a/packages/e2e-tests/fixtures/blocks/core__social-link-wordpress.parsed.json +++ b/packages/e2e-tests/fixtures/blocks/core__social-link-wordpress.parsed.json @@ -5,10 +5,8 @@ "url": "https://example.com/" }, "innerBlocks": [], - "innerHTML": "\n\n", - "innerContent": [ - "\n\n" - ] + "innerHTML": "", + "innerContent": [] }, { "blockName": null, diff --git a/packages/e2e-tests/fixtures/blocks/core__social-link-wordpress.serialized.html b/packages/e2e-tests/fixtures/blocks/core__social-link-wordpress.serialized.html index a2376794cc300b..08e5b837c6f176 100644 --- a/packages/e2e-tests/fixtures/blocks/core__social-link-wordpress.serialized.html +++ b/packages/e2e-tests/fixtures/blocks/core__social-link-wordpress.serialized.html @@ -1,3 +1 @@ - - - + diff --git a/packages/e2e-tests/fixtures/blocks/core__social-link-yelp.html b/packages/e2e-tests/fixtures/blocks/core__social-link-yelp.html index 76d6fadfe40984..29ec6f9fa952c8 100644 --- a/packages/e2e-tests/fixtures/blocks/core__social-link-yelp.html +++ b/packages/e2e-tests/fixtures/blocks/core__social-link-yelp.html @@ -1,3 +1 @@ - - - + diff --git a/packages/e2e-tests/fixtures/blocks/core__social-link-yelp.json b/packages/e2e-tests/fixtures/blocks/core__social-link-yelp.json index a7a0482333c5bc..c1302ead5a7bd2 100644 --- a/packages/e2e-tests/fixtures/blocks/core__social-link-yelp.json +++ b/packages/e2e-tests/fixtures/blocks/core__social-link-yelp.json @@ -8,6 +8,6 @@ "site": "yelp" }, "innerBlocks": [], - "originalContent": "" + "originalContent": "" } ] diff --git a/packages/e2e-tests/fixtures/blocks/core__social-link-yelp.parsed.json b/packages/e2e-tests/fixtures/blocks/core__social-link-yelp.parsed.json index 30e92f74c9fe80..5863f9d0b1b2dc 100644 --- a/packages/e2e-tests/fixtures/blocks/core__social-link-yelp.parsed.json +++ b/packages/e2e-tests/fixtures/blocks/core__social-link-yelp.parsed.json @@ -5,10 +5,8 @@ "url": "https://example.com/" }, "innerBlocks": [], - "innerHTML": "\n\n", - "innerContent": [ - "\n\n" - ] + "innerHTML": "", + "innerContent": [] }, { "blockName": null, diff --git a/packages/e2e-tests/fixtures/blocks/core__social-link-yelp.serialized.html b/packages/e2e-tests/fixtures/blocks/core__social-link-yelp.serialized.html index 76d6fadfe40984..29ec6f9fa952c8 100644 --- a/packages/e2e-tests/fixtures/blocks/core__social-link-yelp.serialized.html +++ b/packages/e2e-tests/fixtures/blocks/core__social-link-yelp.serialized.html @@ -1,3 +1 @@ - - - + diff --git a/packages/e2e-tests/fixtures/blocks/core__social-link-youtube.html b/packages/e2e-tests/fixtures/blocks/core__social-link-youtube.html index cfe8238fff6417..0521ba017ba213 100644 --- a/packages/e2e-tests/fixtures/blocks/core__social-link-youtube.html +++ b/packages/e2e-tests/fixtures/blocks/core__social-link-youtube.html @@ -1,3 +1 @@ - - - + diff --git a/packages/e2e-tests/fixtures/blocks/core__social-link-youtube.json b/packages/e2e-tests/fixtures/blocks/core__social-link-youtube.json index b419ab2ba5b97f..c8d54e0d61afc6 100644 --- a/packages/e2e-tests/fixtures/blocks/core__social-link-youtube.json +++ b/packages/e2e-tests/fixtures/blocks/core__social-link-youtube.json @@ -8,6 +8,6 @@ "site": "youtube" }, "innerBlocks": [], - "originalContent": "" + "originalContent": "" } ] diff --git a/packages/e2e-tests/fixtures/blocks/core__social-link-youtube.parsed.json b/packages/e2e-tests/fixtures/blocks/core__social-link-youtube.parsed.json index c092b315aeba17..447f6933d65ad8 100644 --- a/packages/e2e-tests/fixtures/blocks/core__social-link-youtube.parsed.json +++ b/packages/e2e-tests/fixtures/blocks/core__social-link-youtube.parsed.json @@ -5,10 +5,8 @@ "url": "https://example.com/" }, "innerBlocks": [], - "innerHTML": "\n\n", - "innerContent": [ - "\n\n" - ] + "innerHTML": "", + "innerContent": [] }, { "blockName": null, diff --git a/packages/e2e-tests/fixtures/blocks/core__social-link-youtube.serialized.html b/packages/e2e-tests/fixtures/blocks/core__social-link-youtube.serialized.html index cfe8238fff6417..0521ba017ba213 100644 --- a/packages/e2e-tests/fixtures/blocks/core__social-link-youtube.serialized.html +++ b/packages/e2e-tests/fixtures/blocks/core__social-link-youtube.serialized.html @@ -1,3 +1 @@ - - - + diff --git a/packages/e2e-tests/fixtures/blocks/core__social-links.html b/packages/e2e-tests/fixtures/blocks/core__social-links.html index 8b4a85da9849d0..4f867ddd4fb039 100644 --- a/packages/e2e-tests/fixtures/blocks/core__social-links.html +++ b/packages/e2e-tests/fixtures/blocks/core__social-links.html @@ -1,5 +1,3 @@ - + diff --git a/packages/e2e-tests/fixtures/blocks/core__social-links.json b/packages/e2e-tests/fixtures/blocks/core__social-links.json index 1e3cfc330310af..ba0eff9f681a1e 100644 --- a/packages/e2e-tests/fixtures/blocks/core__social-links.json +++ b/packages/e2e-tests/fixtures/blocks/core__social-links.json @@ -14,7 +14,7 @@ "site": "mastodon" }, "innerBlocks": [], - "originalContent": "" + "originalContent": "" } ], "originalContent": "
        " diff --git a/packages/e2e-tests/fixtures/blocks/core__social-links.parsed.json b/packages/e2e-tests/fixtures/blocks/core__social-links.parsed.json index d8c7da158cfb19..9cb2198691c845 100644 --- a/packages/e2e-tests/fixtures/blocks/core__social-links.parsed.json +++ b/packages/e2e-tests/fixtures/blocks/core__social-links.parsed.json @@ -9,10 +9,8 @@ "url": "https://mastodon.social/@marcuskaz" }, "innerBlocks": [], - "innerHTML": "\n\n", - "innerContent": [ - "\n\n" - ] + "innerHTML": "", + "innerContent": [] } ], "innerHTML": "\n
          \n", diff --git a/packages/e2e-tests/fixtures/blocks/core__social-links.serialized.html b/packages/e2e-tests/fixtures/blocks/core__social-links.serialized.html index 8b4a85da9849d0..4f867ddd4fb039 100644 --- a/packages/e2e-tests/fixtures/blocks/core__social-links.serialized.html +++ b/packages/e2e-tests/fixtures/blocks/core__social-links.serialized.html @@ -1,5 +1,3 @@ - + From 3578260ffbac4d396663024e6d89cf65f4ec89dc Mon Sep 17 00:00:00 2001 From: jasmussen Date: Fri, 30 Aug 2019 12:49:52 +0200 Subject: [PATCH 51/54] Polish. Remove obsolete code, add generic colors. --- .../block-library/src/social-link/edit.js | 2 +- .../src/social-link/social-list.js | 2 +- .../block-library/src/social-links/edit.js | 4 +- .../block-library/src/social-links/style.scss | 45 +++---------------- .../e2e-tests/fixtures/block-transforms.js | 2 +- 5 files changed, 12 insertions(+), 43 deletions(-) diff --git a/packages/block-library/src/social-link/edit.js b/packages/block-library/src/social-link/edit.js index c81afda1549ac3..a689b2ebd11a4f 100644 --- a/packages/block-library/src/social-link/edit.js +++ b/packages/block-library/src/social-link/edit.js @@ -51,7 +51,7 @@ const SocialLinkEdit = ( { attributes, setAttributes, isSelected } ) => { setAttributes( { url: event.target.value } ) } - placeholder={ __( 'Enter site URL' ) } + placeholder={ __( 'Enter Address or Profile' ) } />
          diff --git a/packages/block-library/src/social-link/social-list.js b/packages/block-library/src/social-link/social-list.js index 792a57117e1899..98c8120449c5ae 100644 --- a/packages/block-library/src/social-link/social-list.js +++ b/packages/block-library/src/social-link/social-list.js @@ -125,7 +125,7 @@ const socialList = { icon: LinkedinIcon, }, mail: { - name: 'E-mail', + name: 'Mail', icon: MailIcon, }, mastodon: { diff --git a/packages/block-library/src/social-links/edit.js b/packages/block-library/src/social-links/edit.js index df1dca14b3b51c..a6f4ac04140139 100644 --- a/packages/block-library/src/social-links/edit.js +++ b/packages/block-library/src/social-links/edit.js @@ -17,10 +17,12 @@ const ALLOWED_BLOCKS = Object.keys( socialList ).map( ( site ) => { // Template contains the links that show when start. const TEMPLATE = [ - [ 'core/social-link-wordpress', { url: 'https://wordpress.org' } ], [ 'core/social-link-facebook' ], [ 'core/social-link-twitter' ], [ 'core/social-link-instagram' ], + [ 'core/social-link-linkedin' ], + [ 'core/social-link-youtube' ], + [ 'core/social-link-mail', { url: 'mailto:' } ], ]; export const SocialLinksEdit = function( { className } ) { diff --git a/packages/block-library/src/social-links/style.scss b/packages/block-library/src/social-links/style.scss index 0478019a8b8a7a..932eac82db1116 100644 --- a/packages/block-library/src/social-links/style.scss +++ b/packages/block-library/src/social-links/style.scss @@ -10,9 +10,6 @@ width: 36px; height: 36px; border-radius: 36px; // This makes it pill-shaped instead of oval, in cases where the image fed is not perfectly sized. - background-size: 24px 24px; - background-position: center center; - background-repeat: no-repeat; margin-right: $grid-size; transition: transform 0.1s ease; @@ -39,16 +36,17 @@ // Provide colors for a range of icons. .wp-block-social-links:not(.is-style-logos-only) { + // Generic items such as mail, feed, etc. + .wp-social-link { + background-color: #f0f0f0; + color: #444; + } + .wp-social-link-amazon { background-color: #f90; color: #fff; } - .wp-social-link-apple { - background-color: #f1f1f1; - color: #000; - } - .wp-social-link-bandcamp { background-color: #1ea0c3; color: #fff; @@ -69,11 +67,6 @@ color: #fff; } - .wp-social-link-digg { - background-color: #f1f1f1; - color: #1b1a19; - } - .wp-social-link-dribbble { background-color: #e94c89; color: #fff; @@ -174,11 +167,6 @@ color: #fff; } - .wp-social-link-slideshare { - background-color: #0577b5; - color: #fff; - } - .wp-social-link-snapchat { background-color: #fefc00; color: #fff; @@ -195,11 +183,6 @@ color: #fff; } - .wp-social-link-stumbleupon { - background-color: #eb4923; - color: #fff; - } - .wp-social-link-tumblr { background-color: #011835; color: #fff; @@ -258,10 +241,6 @@ color: #f90; } - .wp-social-link-apple { - color: #000; - } - .wp-social-link-bandcamp { color: #1ea0c3; } @@ -278,10 +257,6 @@ color: #02e49b; } - .wp-social-link-digg { - color: #1b1a19; - } - .wp-social-link-dribbble { color: #e94c89; } @@ -362,10 +337,6 @@ color: #0478d7; } - .wp-social-link-slideshare { - color: #0577b5; - } - .wp-social-link-snapchat { color: #fff; stroke: #000; @@ -379,10 +350,6 @@ color: #1bd760; } - .wp-social-link-stumbleupon { - color: #eb4923; - } - .wp-social-link-tumblr { color: #011835; } diff --git a/packages/e2e-tests/fixtures/block-transforms.js b/packages/e2e-tests/fixtures/block-transforms.js index 290597129609c7..1b366c15a23ae6 100644 --- a/packages/e2e-tests/fixtures/block-transforms.js +++ b/packages/e2e-tests/fixtures/block-transforms.js @@ -528,7 +528,7 @@ export const EXPECTED_TRANSFORMS = { availableTransforms: [ 'Group', ], - originalBlock: 'E-mail', + originalBlock: 'Mail', }, 'core__social-link-mastodon': { availableTransforms: [ From fc1caf2fd178adc36fc2f33c627844fbcbba6140 Mon Sep 17 00:00:00 2001 From: jasmussen Date: Fri, 30 Aug 2019 13:12:19 +0200 Subject: [PATCH 52/54] Add centering. --- packages/block-library/src/social-links/editor.scss | 5 +++++ packages/block-library/src/social-links/index.js | 3 +++ packages/block-library/src/social-links/style.scss | 8 ++++++++ 3 files changed, 16 insertions(+) diff --git a/packages/block-library/src/social-links/editor.scss b/packages/block-library/src/social-links/editor.scss index b018b2b0568155..1e08baf10fea7d 100644 --- a/packages/block-library/src/social-links/editor.scss +++ b/packages/block-library/src/social-links/editor.scss @@ -63,6 +63,11 @@ } } +// Center flex items. This has an equivalent in style.scss. +[data-type="core/social-links"][data-align="center"] .wp-block-social-links { + justify-content: center; +} + // Improve the preview. // @todo: Look at improving the preview component to make this unnecessary. .block-editor-block-preview__content { diff --git a/packages/block-library/src/social-links/index.js b/packages/block-library/src/social-links/index.js index 9d54419d74b897..847851c944f30b 100644 --- a/packages/block-library/src/social-links/index.js +++ b/packages/block-library/src/social-links/index.js @@ -18,6 +18,9 @@ export const settings = { title: __( 'Social links' ), icon: 'share', description: __( 'Create a block of links to your social media or external sites' ), + supports: { + align: [ 'left', 'center', 'right' ], + }, styles: [ { name: 'default', label: __( 'Default' ), isDefault: true }, { name: 'logos-only', label: __( 'Logos Only' ) }, diff --git a/packages/block-library/src/social-links/style.scss b/packages/block-library/src/social-links/style.scss index 932eac82db1116..ee5e1305dfa767 100644 --- a/packages/block-library/src/social-links/style.scss +++ b/packages/block-library/src/social-links/style.scss @@ -34,6 +34,14 @@ } } +// Center flex items. This has an equivalent in editor.scss. +// It also needs to override some of the default classes usually applied to the centering class. +.wp-block-social-links.aligncenter { + justify-content: center; + display: flex; +} + + // Provide colors for a range of icons. .wp-block-social-links:not(.is-style-logos-only) { // Generic items such as mail, feed, etc. From 4f8a0bc6d554703a2edc69ab914ae28e4e926614 Mon Sep 17 00:00:00 2001 From: Joen Asmussen Date: Fri, 6 Sep 2019 11:43:37 +0200 Subject: [PATCH 53/54] Update packages/block-library/src/social-link/edit.js MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Dig it. Co-Authored-By: Andrés --- packages/block-library/src/social-link/edit.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/block-library/src/social-link/edit.js b/packages/block-library/src/social-link/edit.js index a689b2ebd11a4f..986de58e60b920 100644 --- a/packages/block-library/src/social-link/edit.js +++ b/packages/block-library/src/social-link/edit.js @@ -51,7 +51,7 @@ const SocialLinkEdit = ( { attributes, setAttributes, isSelected } ) => { setAttributes( { url: event.target.value } ) } - placeholder={ __( 'Enter Address or Profile' ) } + placeholder={ __( 'Enter Address' ) } />
          From e777dd519573940a2a597416baece47fa9b4d667 Mon Sep 17 00:00:00 2001 From: Marcus Kazmierczak Date: Fri, 6 Sep 2019 06:56:04 -0700 Subject: [PATCH 54/54] Remove duplicate icon definition --- packages/block-library/src/social-links/index.js | 1 - 1 file changed, 1 deletion(-) diff --git a/packages/block-library/src/social-links/index.js b/packages/block-library/src/social-links/index.js index 847851c944f30b..1e9df3194865a8 100644 --- a/packages/block-library/src/social-links/index.js +++ b/packages/block-library/src/social-links/index.js @@ -16,7 +16,6 @@ export { metadata, name }; export const settings = { title: __( 'Social links' ), - icon: 'share', description: __( 'Create a block of links to your social media or external sites' ), supports: { align: [ 'left', 'center', 'right' ],