From adbd3a26f2fae2496a9950f50f7b0c1562b48245 Mon Sep 17 00:00:00 2001 From: Shreyash Date: Mon, 12 Feb 2024 08:46:38 +0530 Subject: [PATCH 1/6] Remove obsolete wp-env configuration from package.json (#58877) (#58899) Co-authored-by: shreyash3087 Co-authored-by: talldan Co-authored-by: lgersman --- bin/docker-compose.override.yml.template | 17 ----------------- package.json | 13 ------------- 2 files changed, 30 deletions(-) delete mode 100644 bin/docker-compose.override.yml.template diff --git a/bin/docker-compose.override.yml.template b/bin/docker-compose.override.yml.template deleted file mode 100644 index 465211fe7a4a63..00000000000000 --- a/bin/docker-compose.override.yml.template +++ /dev/null @@ -1,17 +0,0 @@ -services: - wordpress-develop: - volumes: - - %PLUGIN_MOUNT_DIR%:/var/www/${LOCAL_DIR-src}/wp-content/plugins/%PLUGIN_INSTALL_DIR% - - %PLUGIN_MOUNT_DIR%/packages/e2e-tests/plugins:/var/www/${LOCAL_DIR-src}/wp-content/plugins/gutenberg-test-plugins - - %PLUGIN_MOUNT_DIR%/packages/e2e-tests/mu-plugins:/var/www/${LOCAL_DIR-src}/wp-content/mu-plugins - php: - volumes: - - %PLUGIN_MOUNT_DIR%:/var/www/${LOCAL_DIR-src}/wp-content/plugins/%PLUGIN_INSTALL_DIR% - - %PLUGIN_MOUNT_DIR%/packages/e2e-tests/plugins:/var/www/${LOCAL_DIR-src}/wp-content/plugins/gutenberg-test-plugins - - %PLUGIN_MOUNT_DIR%/packages/e2e-tests/mu-plugins:/var/www/${LOCAL_DIR-src}/wp-content/mu-plugins - cli: - volumes: - - %PLUGIN_MOUNT_DIR%:/var/www/${LOCAL_DIR-src}/wp-content/plugins/%PLUGIN_INSTALL_DIR% - phpunit: - volumes: - - %PLUGIN_MOUNT_DIR%:/var/www/${LOCAL_DIR-src}/wp-content/plugins/%PLUGIN_INSTALL_DIR% diff --git a/package.json b/package.json index da0987a03de62c..70bf7877039ad5 100644 --- a/package.json +++ b/package.json @@ -378,18 +378,5 @@ "**/tsconfig.json": [ "npm run lint:tsconfig" ] - }, - "wp-env": { - "plugin-dir": "gutenberg", - "plugin-name": "Gutenberg", - "docker-template": "./bin/docker-compose.override.yml.template", - "welcome-logo": [ - ",⁻⁻⁻· . |", - "| ،⁓’. . |--- ,---. ,---. |---. ,---. ,---. ,---.", - "| | | | | |---' | | | | |---' | | |", - "`---' `---' `---’ `---’ ' ` `---' `---’ ` `---|", - " `---'" - ], - "welcome-build-command": "npm run dev" } } From 1e83dd7be68d3dffabedd45cbd9abf39ab3ff3ed Mon Sep 17 00:00:00 2001 From: Aki Hamano <54422211+t-hamano@users.noreply.github.com> Date: Mon, 12 Feb 2024 12:21:37 +0900 Subject: [PATCH 2/6] Spacer block: Fix `null` label in tooltip when horizontal layout (#58909) --- packages/block-library/src/spacer/editor.scss | 2 ++ 1 file changed, 2 insertions(+) diff --git a/packages/block-library/src/spacer/editor.scss b/packages/block-library/src/spacer/editor.scss index 9eb8c8b4b263ee..e0c700795c0870 100644 --- a/packages/block-library/src/spacer/editor.scss +++ b/packages/block-library/src/spacer/editor.scss @@ -42,5 +42,7 @@ &.resize-horizontal { margin-bottom: 0; + // Important is used to have higher specificity than the inline style set by re-resizable library. + height: 100% !important; } } From 34951680aca52f0aeed216a4ec158863abe4ecbf Mon Sep 17 00:00:00 2001 From: Aki Hamano <54422211+t-hamano@users.noreply.github.com> Date: Mon, 12 Feb 2024 12:36:15 +0900 Subject: [PATCH 3/6] Block JSON schema: Update `shadow` definition (#58910) * Block JSON schema: Fix `shadow` definition * Update schema * Fix schema --- schemas/json/block.json | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/schemas/json/block.json b/schemas/json/block.json index 7234f36a5e0ecb..e5e63df17d7324 100644 --- a/schemas/json/block.json +++ b/schemas/json/block.json @@ -556,10 +556,12 @@ } }, "shadow": { + "default": false, "description": "Allow blocks to define a box shadow.", "oneOf": [ { - "type": "boolean" + "type": "boolean", + "description": "Defines whether a box shadow is enabled or not." }, { "type": "object" From 2325d227142624723461f0b8410da1239eb8c6a7 Mon Sep 17 00:00:00 2001 From: Aki Hamano <54422211+t-hamano@users.noreply.github.com> Date: Mon, 12 Feb 2024 13:22:50 +0900 Subject: [PATCH 4/6] Tweak save hub button (#58917) --- .../edit-site/src/components/header-edit-mode/index.js | 2 +- packages/edit-site/src/components/save-button/index.js | 3 ++- packages/edit-site/src/components/save-hub/style.scss | 7 +++++-- 3 files changed, 8 insertions(+), 4 deletions(-) diff --git a/packages/edit-site/src/components/header-edit-mode/index.js b/packages/edit-site/src/components/header-edit-mode/index.js index 773edf469143b9..5b8b44f63efe74 100644 --- a/packages/edit-site/src/components/header-edit-mode/index.js +++ b/packages/edit-site/src/components/header-edit-mode/index.js @@ -206,7 +206,7 @@ export default function HeaderEditMode() { ) } - + { ! isDistractionFree && ( ) } diff --git a/packages/edit-site/src/components/save-button/index.js b/packages/edit-site/src/components/save-button/index.js index 461264bd5a5633..7ad809f1231247 100644 --- a/packages/edit-site/src/components/save-button/index.js +++ b/packages/edit-site/src/components/save-button/index.js @@ -22,6 +22,7 @@ export default function SaveButton( { showTooltip = true, defaultLabel, icon, + size, __next40pxDefaultSize = false, } ) { const { isDirty, isSaving, isSaveViewOpen, previewingThemeName } = @@ -119,7 +120,7 @@ export default function SaveButton( { showTooltip={ showTooltip } icon={ icon } __next40pxDefaultSize={ __next40pxDefaultSize } - size="compact" + size={ size } > { label } diff --git a/packages/edit-site/src/components/save-hub/style.scss b/packages/edit-site/src/components/save-hub/style.scss index 5cb7cca1f85018..4562cf2ad4654a 100644 --- a/packages/edit-site/src/components/save-hub/style.scss +++ b/packages/edit-site/src/components/save-hub/style.scss @@ -3,13 +3,16 @@ border-top: 1px solid $gray-800; flex-shrink: 0; margin: 0; - padding: $grid-unit-20 + $grid-unit-05 $canvas-padding; + padding: $grid-unit-20 $canvas-padding; } .edit-site-save-hub__button { color: inherit; width: 100%; - justify-content: center; + + &.components-button.components-button { + justify-content: center; + } &[aria-disabled="true"] { opacity: 1; From 83ce8592825dba84689a15bdd1498e379e498dfc Mon Sep 17 00:00:00 2001 From: tellthemachines Date: Mon, 12 Feb 2024 18:21:15 +1100 Subject: [PATCH 5/6] Fix Spacer orientation when inside a block with default flex layout. (#58921) Co-authored-by: tellthemachines Co-authored-by: andrewserong Co-authored-by: t-hamano Co-authored-by: draganescu --- packages/block-library/src/spacer/edit.js | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/packages/block-library/src/spacer/edit.js b/packages/block-library/src/spacer/edit.js index 11133732042d3f..d384f7997ec388 100644 --- a/packages/block-library/src/spacer/edit.js +++ b/packages/block-library/src/spacer/edit.js @@ -93,9 +93,14 @@ const SpacerEdit = ( { return editorSettings?.disableCustomSpacingSizes; } ); const { orientation } = context; - const { orientation: parentOrientation, type } = parentLayout || {}; + const { + orientation: parentOrientation, + type, + default: { type: defaultType } = {}, + } = parentLayout || {}; // Check if the spacer is inside a flex container. - const isFlexLayout = type === 'flex'; + const isFlexLayout = + type === 'flex' || ( ! type && defaultType === 'flex' ); // If the spacer is inside a flex container, it should either inherit the orientation // of the parent or use the flex default orientation. const inheritedOrientation = From 1283299733af3aabfbb88ab12a4471c4e54edfaa Mon Sep 17 00:00:00 2001 From: Aki Hamano <54422211+t-hamano@users.noreply.github.com> Date: Mon, 12 Feb 2024 16:33:47 +0900 Subject: [PATCH 6/6] HeadingLevelDropdown: Remove unnecessary isPressed prop (#56636) --- .../block-heading-level-dropdown/index.js | 42 ++++++++----------- 1 file changed, 17 insertions(+), 25 deletions(-) diff --git a/packages/block-editor/src/components/block-heading-level-dropdown/index.js b/packages/block-editor/src/components/block-heading-level-dropdown/index.js index a8296d48ad2683..84540d393876ff 100644 --- a/packages/block-editor/src/components/block-heading-level-dropdown/index.js +++ b/packages/block-editor/src/components/block-heading-level-dropdown/index.js @@ -46,31 +46,23 @@ export default function HeadingLevelDropdown( { icon={ } label={ __( 'Change level' ) } controls={ options.map( ( targetLevel ) => { - { - const isActive = targetLevel === value; - - return { - icon: ( - - ), - title: - targetLevel === 0 - ? __( 'Paragraph' ) - : sprintf( - // translators: %s: heading level e.g: "1", "2", "3" - __( 'Heading %d' ), - targetLevel - ), - isActive, - onClick() { - onChange( targetLevel ); - }, - role: 'menuitemradio', - }; - } + const isActive = targetLevel === value; + return { + icon: , + title: + targetLevel === 0 + ? __( 'Paragraph' ) + : sprintf( + // translators: %s: heading level e.g: "1", "2", "3" + __( 'Heading %d' ), + targetLevel + ), + isActive, + onClick() { + onChange( targetLevel ); + }, + role: 'menuitemradio', + }; } ) } /> );