From d81db5b8216302b6d7156595e068b9f1391c22d4 Mon Sep 17 00:00:00 2001 From: Dan Roundhill Date: Wed, 1 Sep 2021 09:43:56 -0600 Subject: [PATCH 1/3] Replace the default edit icon with the new one from the gutenberg icon library at https://wordpress.github.io/gutenberg/?path=/story/icons-icon--library --- .../jetpack/extensions/blocks/videopress/edit.js | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/projects/plugins/jetpack/extensions/blocks/videopress/edit.js b/projects/plugins/jetpack/extensions/blocks/videopress/edit.js index b6321fffcfa86..0acb96747cbed 100644 --- a/projects/plugins/jetpack/extensions/blocks/videopress/edit.js +++ b/projects/plugins/jetpack/extensions/blocks/videopress/edit.js @@ -7,6 +7,7 @@ import { BaseControl, Button, PanelBody, + Path, SandBox, SelectControl, ToggleControl, @@ -34,6 +35,7 @@ import { get, indexOf } from 'lodash'; import Loading from './loading'; import { getVideoPressUrl } from './url'; import { getClassNames } from './utils'; +import renderMaterialIcon from '../../shared/render-material-icon'; import SeekbarColorSettings from './seekbar-color-settings'; const VIDEO_POSTER_ALLOWED_MEDIA_TYPES = [ 'image' ]; @@ -276,7 +278,14 @@ const VideoPressEdit = CoreVideoEdit => className="components-icon-button components-toolbar__control" label={ __( 'Edit video', 'jetpack' ) } onClick={ this.switchToEditing } - icon="edit" + icon={ renderMaterialIcon( + , + 18, + 18 + ) } /> From eef2120fcb81c76ca9b5d7b1a4b1d81cdc8dae68 Mon Sep 17 00:00:00 2001 From: Dan Roundhill Date: Wed, 1 Sep 2021 09:46:50 -0600 Subject: [PATCH 2/3] Adding changelog. --- .../jetpack/changelog/update-videopress-block-edit-icon | 4 ++++ 1 file changed, 4 insertions(+) create mode 100644 projects/plugins/jetpack/changelog/update-videopress-block-edit-icon diff --git a/projects/plugins/jetpack/changelog/update-videopress-block-edit-icon b/projects/plugins/jetpack/changelog/update-videopress-block-edit-icon new file mode 100644 index 0000000000000..a287f741ebfe8 --- /dev/null +++ b/projects/plugins/jetpack/changelog/update-videopress-block-edit-icon @@ -0,0 +1,4 @@ +Significance: patch +Type: enhancement + +Updated the edit icon design in the VideoPress block toolbar. From 8c1a5b5b441c3a54e4774d0e133d92c544b772eb Mon Sep 17 00:00:00 2001 From: Dan Roundhill Date: Wed, 1 Sep 2021 13:08:07 -0600 Subject: [PATCH 3/3] Updating to use `@wordpress/icons` lib and keep icon 24px. --- .../jetpack/extensions/blocks/videopress/edit.js | 12 ++---------- 1 file changed, 2 insertions(+), 10 deletions(-) diff --git a/projects/plugins/jetpack/extensions/blocks/videopress/edit.js b/projects/plugins/jetpack/extensions/blocks/videopress/edit.js index 0acb96747cbed..927a3d3b1587d 100644 --- a/projects/plugins/jetpack/extensions/blocks/videopress/edit.js +++ b/projects/plugins/jetpack/extensions/blocks/videopress/edit.js @@ -7,7 +7,6 @@ import { BaseControl, Button, PanelBody, - Path, SandBox, SelectControl, ToggleControl, @@ -26,6 +25,7 @@ import { } from '@wordpress/block-editor'; import { Component, createRef, Fragment } from '@wordpress/element'; import { __, _x, sprintf } from '@wordpress/i18n'; +import { Icon, pencil } from '@wordpress/icons'; import classnames from 'classnames'; import { get, indexOf } from 'lodash'; @@ -35,7 +35,6 @@ import { get, indexOf } from 'lodash'; import Loading from './loading'; import { getVideoPressUrl } from './url'; import { getClassNames } from './utils'; -import renderMaterialIcon from '../../shared/render-material-icon'; import SeekbarColorSettings from './seekbar-color-settings'; const VIDEO_POSTER_ALLOWED_MEDIA_TYPES = [ 'image' ]; @@ -278,14 +277,7 @@ const VideoPressEdit = CoreVideoEdit => className="components-icon-button components-toolbar__control" label={ __( 'Edit video', 'jetpack' ) } onClick={ this.switchToEditing } - icon={ renderMaterialIcon( - , - 18, - 18 - ) } + icon={ } />