From 789c77a5b151cbb7a9cc62f4a0d962158115652a Mon Sep 17 00:00:00 2001 From: Rich Tabor Date: Fri, 31 Mar 2023 19:21:55 -0400 Subject: [PATCH 1/8] Use media icon in core/media-text Media Container --- .../src/media-text/media-container-icon.js | 12 ------------ .../block-library/src/media-text/media-container.js | 6 +----- 2 files changed, 1 insertion(+), 17 deletions(-) delete mode 100644 packages/block-library/src/media-text/media-container-icon.js diff --git a/packages/block-library/src/media-text/media-container-icon.js b/packages/block-library/src/media-text/media-container-icon.js deleted file mode 100644 index e5eb65d261dc58..00000000000000 --- a/packages/block-library/src/media-text/media-container-icon.js +++ /dev/null @@ -1,12 +0,0 @@ -/** - * WordPress dependencies - */ -import { Path, SVG } from '@wordpress/components'; - -export default ( - - - - - -); diff --git a/packages/block-library/src/media-text/media-container.js b/packages/block-library/src/media-text/media-container.js index f2bdb475bae345..e5a6270bad8dc9 100644 --- a/packages/block-library/src/media-text/media-container.js +++ b/packages/block-library/src/media-text/media-container.js @@ -20,11 +20,7 @@ import { useDispatch } from '@wordpress/data'; import { forwardRef } from '@wordpress/element'; import { isBlobURL } from '@wordpress/blob'; import { store as noticesStore } from '@wordpress/notices'; - -/** - * Internal dependencies - */ -import icon from './media-container-icon'; +import { media as icon } from '@wordpress/icons'; /** * Constants From ccec4e4654eaebb1c56bb37bda667901d2dd4321 Mon Sep 17 00:00:00 2001 From: Rich Tabor Date: Fri, 31 Mar 2023 19:22:27 -0400 Subject: [PATCH 2/8] Update media.js icon with new media icon (image + video display) --- packages/icons/src/library/media.js | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/packages/icons/src/library/media.js b/packages/icons/src/library/media.js index 23b1b1f7ecd527..717050c94ae77c 100644 --- a/packages/icons/src/library/media.js +++ b/packages/icons/src/library/media.js @@ -5,7 +5,12 @@ import { SVG, Path } from '@wordpress/primitives'; const media = ( - + + ); From eacf387c9fed6b8f13d6a34e27e844a7be31a19b Mon Sep 17 00:00:00 2001 From: Rich Tabor Date: Fri, 31 Mar 2023 19:23:24 -0400 Subject: [PATCH 3/8] Use video icon for existing media icon implementations --- .../block-editor/src/components/media-replace-flow/index.js | 2 +- packages/block-library/src/video/tracks-editor.js | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/packages/block-editor/src/components/media-replace-flow/index.js b/packages/block-editor/src/components/media-replace-flow/index.js index 29790419af1317..e256295763ab25 100644 --- a/packages/block-editor/src/components/media-replace-flow/index.js +++ b/packages/block-editor/src/components/media-replace-flow/index.js @@ -23,7 +23,7 @@ import { DOWN } from '@wordpress/keycodes'; import { postFeaturedImage, upload, - media as mediaIcon, + video as mediaIcon, } from '@wordpress/icons'; import { compose } from '@wordpress/compose'; import { __unstableStripHTML as stripHTML } from '@wordpress/dom'; diff --git a/packages/block-library/src/video/tracks-editor.js b/packages/block-library/src/video/tracks-editor.js index 366d521f5aa625..95ee948a7fc88e 100644 --- a/packages/block-library/src/video/tracks-editor.js +++ b/packages/block-library/src/video/tracks-editor.js @@ -22,7 +22,7 @@ import { MediaUploadCheck, store as blockEditorStore, } from '@wordpress/block-editor'; -import { upload, media } from '@wordpress/icons'; +import { upload, video } from '@wordpress/icons'; import { useSelect } from '@wordpress/data'; import { useState } from '@wordpress/element'; import { getFilename } from '@wordpress/url'; @@ -251,7 +251,7 @@ export default function TracksEditor( { tracks = [], onChange } ) { allowedTypes={ ALLOWED_TYPES } render={ ( { open } ) => ( { __( 'Open Media Library' ) } From ed7f508e723753e9b73be016574bdb0aec789401 Mon Sep 17 00:00:00 2001 From: Rich Tabor Date: Tue, 4 Apr 2023 16:33:17 -0400 Subject: [PATCH 4/8] Update media icon --- packages/icons/src/library/media.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/icons/src/library/media.js b/packages/icons/src/library/media.js index 717050c94ae77c..a3f5cad616469d 100644 --- a/packages/icons/src/library/media.js +++ b/packages/icons/src/library/media.js @@ -5,11 +5,11 @@ import { SVG, Path } from '@wordpress/primitives'; const media = ( - + ); From 049457c928cdde47d3f780e2b780c1f04f2dc756 Mon Sep 17 00:00:00 2001 From: Rich Tabor Date: Tue, 4 Apr 2023 16:33:37 -0400 Subject: [PATCH 5/8] Use media icon for media library --- .../block-editor/src/components/media-replace-flow/index.js | 2 +- packages/block-library/src/video/tracks-editor.js | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/packages/block-editor/src/components/media-replace-flow/index.js b/packages/block-editor/src/components/media-replace-flow/index.js index e256295763ab25..29790419af1317 100644 --- a/packages/block-editor/src/components/media-replace-flow/index.js +++ b/packages/block-editor/src/components/media-replace-flow/index.js @@ -23,7 +23,7 @@ import { DOWN } from '@wordpress/keycodes'; import { postFeaturedImage, upload, - video as mediaIcon, + media as mediaIcon, } from '@wordpress/icons'; import { compose } from '@wordpress/compose'; import { __unstableStripHTML as stripHTML } from '@wordpress/dom'; diff --git a/packages/block-library/src/video/tracks-editor.js b/packages/block-library/src/video/tracks-editor.js index 95ee948a7fc88e..366d521f5aa625 100644 --- a/packages/block-library/src/video/tracks-editor.js +++ b/packages/block-library/src/video/tracks-editor.js @@ -22,7 +22,7 @@ import { MediaUploadCheck, store as blockEditorStore, } from '@wordpress/block-editor'; -import { upload, video } from '@wordpress/icons'; +import { upload, media } from '@wordpress/icons'; import { useSelect } from '@wordpress/data'; import { useState } from '@wordpress/element'; import { getFilename } from '@wordpress/url'; @@ -251,7 +251,7 @@ export default function TracksEditor( { tracks = [], onChange } ) { allowedTypes={ ALLOWED_TYPES } render={ ( { open } ) => ( { __( 'Open Media Library' ) } From 7f2fb26278542db7e39f08e81493528319d8890a Mon Sep 17 00:00:00 2001 From: Rich Tabor Date: Wed, 5 Apr 2023 12:18:59 -0400 Subject: [PATCH 6/8] Trigger test --- packages/icons/src/library/media.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/icons/src/library/media.js b/packages/icons/src/library/media.js index a3f5cad616469d..e2bc9a7cd35f27 100644 --- a/packages/icons/src/library/media.js +++ b/packages/icons/src/library/media.js @@ -2,7 +2,7 @@ * WordPress dependencies */ import { SVG, Path } from '@wordpress/primitives'; - +// comment const media = ( From 78787b4dad9d5f03205450774de17650b27c0000 Mon Sep 17 00:00:00 2001 From: Rich Tabor Date: Wed, 5 Apr 2023 12:19:08 -0400 Subject: [PATCH 7/8] Trigger test --- packages/icons/src/library/media.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/icons/src/library/media.js b/packages/icons/src/library/media.js index e2bc9a7cd35f27..a3f5cad616469d 100644 --- a/packages/icons/src/library/media.js +++ b/packages/icons/src/library/media.js @@ -2,7 +2,7 @@ * WordPress dependencies */ import { SVG, Path } from '@wordpress/primitives'; -// comment + const media = ( From a27a26427a3fc840098e19dbd7ae59f73309f63c Mon Sep 17 00:00:00 2001 From: Rich Tabor Date: Wed, 5 Apr 2023 12:25:39 -0400 Subject: [PATCH 8/8] Update media-container.native.js --- packages/block-library/src/media-text/media-container.native.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/block-library/src/media-text/media-container.native.js b/packages/block-library/src/media-text/media-container.native.js index a131abc9deba6c..2057486b73ac9c 100644 --- a/packages/block-library/src/media-text/media-container.native.js +++ b/packages/block-library/src/media-text/media-container.native.js @@ -26,12 +26,12 @@ import { Component } from '@wordpress/element'; import { __ } from '@wordpress/i18n'; import { isURL, getProtocol } from '@wordpress/url'; import { compose, withPreferredColorScheme } from '@wordpress/compose'; +import { media as icon } from '@wordpress/icons'; /** * Internal dependencies */ import styles from './style.scss'; -import icon from './media-container-icon'; import SvgIconRetry from './icon-retry'; /**