From 0db2ddeb5860629c42b611e6b35316e401d1ba7f Mon Sep 17 00:00:00 2001 From: Aki Hamano <54422211+t-hamano@users.noreply.github.com> Date: Fri, 9 Dec 2022 05:42:22 +0900 Subject: [PATCH 001/209] Empty Theme: Add the `$schema` property in `theme.json` and rename template directories (#46300) --- test/emptytheme/{block-template-parts => parts}/header.html | 0 test/emptytheme/{block-templates => templates}/category.html | 0 test/emptytheme/{block-templates => templates}/index.html | 0 test/emptytheme/{block-templates => templates}/singular.html | 0 test/emptytheme/theme.json | 1 + 5 files changed, 1 insertion(+) rename test/emptytheme/{block-template-parts => parts}/header.html (100%) rename test/emptytheme/{block-templates => templates}/category.html (100%) rename test/emptytheme/{block-templates => templates}/index.html (100%) rename test/emptytheme/{block-templates => templates}/singular.html (100%) diff --git a/test/emptytheme/block-template-parts/header.html b/test/emptytheme/parts/header.html similarity index 100% rename from test/emptytheme/block-template-parts/header.html rename to test/emptytheme/parts/header.html diff --git a/test/emptytheme/block-templates/category.html b/test/emptytheme/templates/category.html similarity index 100% rename from test/emptytheme/block-templates/category.html rename to test/emptytheme/templates/category.html diff --git a/test/emptytheme/block-templates/index.html b/test/emptytheme/templates/index.html similarity index 100% rename from test/emptytheme/block-templates/index.html rename to test/emptytheme/templates/index.html diff --git a/test/emptytheme/block-templates/singular.html b/test/emptytheme/templates/singular.html similarity index 100% rename from test/emptytheme/block-templates/singular.html rename to test/emptytheme/templates/singular.html diff --git a/test/emptytheme/theme.json b/test/emptytheme/theme.json index ed2d7b8d0946aa..b28e6c9f274b2f 100644 --- a/test/emptytheme/theme.json +++ b/test/emptytheme/theme.json @@ -1,4 +1,5 @@ { + "$schema": "https://schemas.wp.org/trunk/theme.json", "version": 2, "settings": { "appearanceTools": true, From db830856f3dd5b843476c2769117bc2e1d4c07e7 Mon Sep 17 00:00:00 2001 From: Aki Hamano <54422211+t-hamano@users.noreply.github.com> Date: Fri, 9 Dec 2022 06:16:10 +0900 Subject: [PATCH 002/209] Media & Text Block: create undo history when media width is changed (#46084) --- packages/block-library/src/media-text/edit.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/block-library/src/media-text/edit.js b/packages/block-library/src/media-text/edit.js index b85249f3a74b27..83b7074e3d1550 100644 --- a/packages/block-library/src/media-text/edit.js +++ b/packages/block-library/src/media-text/edit.js @@ -199,7 +199,7 @@ function MediaTextEdit( { attributes, isSelected, setAttributes, clientId } ) { setAttributes( { mediaWidth: applyWidthConstraints( width ), } ); - setTemporaryMediaWidth( applyWidthConstraints( width ) ); + setTemporaryMediaWidth( null ); }; const classNames = classnames( { From aba74e95fcf1b3784485bf4669f32681ec95a1df Mon Sep 17 00:00:00 2001 From: Marin Atanasov <8436925+tyxla@users.noreply.github.com> Date: Thu, 8 Dec 2022 23:52:27 +0200 Subject: [PATCH 003/209] Block Editor: Fix `no-node-access` violations in `BlockSelectionClearer` (#46408) --- .../block-selection-clearer/test/index.js | 24 +++++++++---------- 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/packages/block-editor/src/components/block-selection-clearer/test/index.js b/packages/block-editor/src/components/block-selection-clearer/test/index.js index 3886055aebaf4f..63e4a3fa2427c6 100644 --- a/packages/block-editor/src/components/block-selection-clearer/test/index.js +++ b/packages/block-editor/src/components/block-selection-clearer/test/index.js @@ -43,12 +43,12 @@ describe( 'BlockSelectionClearer component', () => { } ) ); render( - + ); - const button = screen.getByRole( 'button' ); - fireEvent.mouseDown( button.parentElement ); + + fireEvent.mouseDown( screen.getByTestId( 'selection-clearer' ) ); expect( mockClearSelectedBlock ).toBeCalled(); } ); @@ -64,12 +64,12 @@ describe( 'BlockSelectionClearer component', () => { } ) ); render( - + ); - const button = screen.getByRole( 'button' ); - fireEvent.mouseDown( button.parentElement ); + + fireEvent.mouseDown( screen.getByTestId( 'selection-clearer' ) ); expect( mockClearSelectedBlock ).toBeCalled(); } ); @@ -82,12 +82,12 @@ describe( 'BlockSelectionClearer component', () => { } ) ); render( - + ); - const button = screen.getByRole( 'button' ); - fireEvent.mouseDown( button.parentElement ); + + fireEvent.mouseDown( screen.getByTestId( 'selection-clearer' ) ); expect( mockClearSelectedBlock ).not.toBeCalled(); } ); @@ -106,12 +106,12 @@ describe( 'BlockSelectionClearer component', () => { } ) ); render( - + ); - const button = screen.getByRole( 'button' ); - fireEvent.mouseDown( button.parentElement ); + + fireEvent.mouseDown( screen.getByTestId( 'selection-clearer' ) ); expect( mockClearSelectedBlock ).not.toBeCalled(); } ); From 6c3bdc68a29788ab50744e3a0c64d6bcbc4c4e75 Mon Sep 17 00:00:00 2001 From: Aki Hamano <54422211+t-hamano@users.noreply.github.com> Date: Fri, 9 Dec 2022 07:09:57 +0900 Subject: [PATCH 004/209] Doc: Fix description and documentation for link color support (#46405) --- .../block-api/block-supports.md | 31 ++++++------------- schemas/json/block.json | 2 +- 2 files changed, 11 insertions(+), 22 deletions(-) diff --git a/docs/reference-guides/block-api/block-supports.md b/docs/reference-guides/block-api/block-supports.md index f3d15f118ae8fa..68afd793231eff 100644 --- a/docs/reference-guides/block-api/block-supports.md +++ b/docs/reference-guides/block-api/block-supports.md @@ -351,36 +351,25 @@ supports: { Link color presets are sourced from the `editor-color-palette` [theme support](/docs/how-to-guides/themes/theme-support.md#block-color-palettes). -When the block declares support for `color.link`, the attributes definition is extended to include two new attributes: `linkColor` and `style`: - -- `linkColor`: attribute of `string` type with no default assigned. - - When a user chooses from the list of preset link colors, the preset slug is stored in the `linkColor` attribute. - - The block can apply a default preset text color by specifying its own attribute with a default e.g.: - - ```js - attributes: { - linkColor: { - type: 'string', - default: 'some-preset-link-color-slug', - } - } - ``` +When the block declares support for `color.link`, the attributes definition is extended to include the `style` attribute: - `style`: attribute of `object` type with no default assigned. - When a custom link color is selected (i.e. using the custom color picker), the custom color value is stored in the `style.color.link` attribute. + When a link color is selected, the color value is stored in the `style.elements.link.color.text` attribute. - The block can apply a default custom link color by specifying its own attribute with a default e.g.: + The block can apply a default link color by specifying its own attribute with a default e.g.: ```js attributes: { style: { type: 'object', default: { - color: { - link: '#ff0000', + elements: { + link: { + color: { + text: '#ff0000', + } + } } } } @@ -583,7 +572,7 @@ attributes: { } ``` -A spacing property may define an array of allowable sides – 'top', 'right', 'bottom', 'left' – that can be configured. When such arbitrary sides are defined, only UI controls for those sides are displayed. +A spacing property may define an array of allowable sides – 'top', 'right', 'bottom', 'left' – that can be configured. When such arbitrary sides are defined, only UI controls for those sides are displayed. Axial sides are defined with the `vertical` and `horizontal` terms, and display a single UI control for each axial pair (for example, `vertical` controls both the top and bottom sides). A spacing property may support arbitrary individual sides **or** axial sides, but not a mix of both. diff --git a/schemas/json/block.json b/schemas/json/block.json index f23ef249577bd9..3a3726010d0b67 100644 --- a/schemas/json/block.json +++ b/schemas/json/block.json @@ -272,7 +272,7 @@ }, "link": { "type": "boolean", - "description": "This property adds block controls which allow the user to set link color in a block, link color is disabled by default.\n\nLink color presets are sourced from the editor-color-palette theme support.\n\nWhen the block declares support for color.link, the attributes definition is extended to include two new attributes: linkColor and style", + "description": "This property adds block controls which allow the user to set link color in a block, link color is disabled by default.\n\nLink color presets are sourced from the editor-color-palette theme support.\n\nWhen the block declares support for color.link, the attributes definition is extended to include the style attribute", "default": false }, "text": { From 3e435cd7c00267311afcf5f04b498b3a88cb1459 Mon Sep 17 00:00:00 2001 From: tellthemachines Date: Fri, 9 Dec 2022 09:15:21 +1100 Subject: [PATCH 005/209] Only pass parentLayout to block edit if not empty (#46390) * Only pass parentLayout to block edit if not empty * Make sure object.keys check doesn't error --- packages/block-editor/src/components/block-list/block.js | 6 ++++-- packages/block-editor/src/components/inner-blocks/index.js | 4 +++- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/packages/block-editor/src/components/block-list/block.js b/packages/block-editor/src/components/block-list/block.js index 70456ac213fc3b..3980dd7b2aead3 100644 --- a/packages/block-editor/src/components/block-list/block.js +++ b/packages/block-editor/src/components/block-list/block.js @@ -132,7 +132,7 @@ function BlockListBlock( { const { removeBlock } = useDispatch( blockEditorStore ); const onRemove = useCallback( () => removeBlock( clientId ), [ clientId ] ); - const parentLayout = useLayout(); + const parentLayout = useLayout() || {}; // We wrap the BlockEdit component in a div that hides it when editing in // HTML mode. This allows us to render all of the ancillary pieces @@ -152,7 +152,9 @@ function BlockListBlock( { isSelectionEnabled={ isSelectionEnabled } toggleSelection={ toggleSelection } __unstableLayoutClassNames={ layoutClassNames } - __unstableParentLayout={ parentLayout } + __unstableParentLayout={ + Object.keys( parentLayout ).length ? parentLayout : undefined + } /> ); diff --git a/packages/block-editor/src/components/inner-blocks/index.js b/packages/block-editor/src/components/inner-blocks/index.js index 80362754a394fd..4542afc797462a 100644 --- a/packages/block-editor/src/components/inner-blocks/index.js +++ b/packages/block-editor/src/components/inner-blocks/index.js @@ -112,7 +112,9 @@ function UncontrolledInnerBlocks( props ) { __experimentalAppenderTagName={ __experimentalAppenderTagName } __experimentalLayout={ { ...__experimentalLayout, - allowSizingOnChildren, + ...( allowSizingOnChildren && { + allowSizingOnChildren: true, + } ), } } wrapperRef={ wrapperRef } placeholder={ placeholder } From 0afb8682f63fc97bc42620f64a740c21b4b8b53b Mon Sep 17 00:00:00 2001 From: Chintan hingrajiya <38949444+chintu51@users.noreply.github.com> Date: Fri, 9 Dec 2022 03:50:25 +0530 Subject: [PATCH 006/209] Add missing useState import in color picker docs. (#42069) --- packages/components/src/color-picker/README.md | 1 + 1 file changed, 1 insertion(+) diff --git a/packages/components/src/color-picker/README.md b/packages/components/src/color-picker/README.md index 3aa595183ac735..05ebf9a1abfac6 100644 --- a/packages/components/src/color-picker/README.md +++ b/packages/components/src/color-picker/README.md @@ -6,6 +6,7 @@ ```jsx import { ColorPicker } from '@wordpress/components'; +import { useState } from '@wordpress/element'; function Example() { const [color, setColor] = useState(); From 87344e71b463c6a74b5a532e7f6dfcbd0a5f85d6 Mon Sep 17 00:00:00 2001 From: Chintan hingrajiya <38949444+chintu51@users.noreply.github.com> Date: Fri, 9 Dec 2022 03:52:10 +0530 Subject: [PATCH 007/209] Add missing useState import in confirm dialog docs. (#42071) --- packages/components/src/confirm-dialog/README.md | 1 + 1 file changed, 1 insertion(+) diff --git a/packages/components/src/confirm-dialog/README.md b/packages/components/src/confirm-dialog/README.md index 5ed36534898490..9274a8fa2eaea1 100644 --- a/packages/components/src/confirm-dialog/README.md +++ b/packages/components/src/confirm-dialog/README.md @@ -44,6 +44,7 @@ Let the parent component control when the dialog is open/closed. It's activated ```jsx import { __experimentalConfirmDialog as ConfirmDialog } from '@wordpress/components'; +import { useState } from '@wordpress/element'; function Example() { const [ isOpen, setIsOpen ] = useState( true ); From e641c4a41882c03d41bda1feee3099f3b906ee5d Mon Sep 17 00:00:00 2001 From: Chintan hingrajiya <38949444+chintu51@users.noreply.github.com> Date: Fri, 9 Dec 2022 03:53:53 +0530 Subject: [PATCH 008/209] Add missing useState import in BorderBoxControl documentation. (#42067) --- .../src/border-box-control/border-box-control/README.md | 1 + 1 file changed, 1 insertion(+) diff --git a/packages/components/src/border-box-control/border-box-control/README.md b/packages/components/src/border-box-control/border-box-control/README.md index ce0c3a9ebc7054..4efe365cb50b7b 100644 --- a/packages/components/src/border-box-control/border-box-control/README.md +++ b/packages/components/src/border-box-control/border-box-control/README.md @@ -29,6 +29,7 @@ show "Mixed" placeholder text. ```jsx import { __experimentalBorderBoxControl as BorderBoxControl } from '@wordpress/components'; import { __ } from '@wordpress/i18n'; +import { useState } from '@wordpress/element'; const colors = [ { name: 'Blue 20', color: '#72aee6' }, From 4c057c4da43a4164856a5e483fbf7a7a92e84d46 Mon Sep 17 00:00:00 2001 From: Gutenberg Repository Automation Date: Thu, 8 Dec 2022 22:30:30 +0000 Subject: [PATCH 009/209] Bump plugin version to 14.7.1 --- gutenberg.php | 2 +- package-lock.json | 2 +- package.json | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/gutenberg.php b/gutenberg.php index dcb8b7a511da1f..c5f94c50522dbd 100644 --- a/gutenberg.php +++ b/gutenberg.php @@ -5,7 +5,7 @@ * Description: Printing since 1440. This is the development plugin for the new block editor in core. * Requires at least: 6.0 * Requires PHP: 5.6 - * Version: 14.7.0 + * Version: 14.7.1 * Author: Gutenberg Team * Text Domain: gutenberg * diff --git a/package-lock.json b/package-lock.json index 92dcebbe946dd4..72f8cef95c9aca 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,6 +1,6 @@ { "name": "gutenberg", - "version": "14.7.0", + "version": "14.7.1", "lockfileVersion": 1, "requires": true, "dependencies": { diff --git a/package.json b/package.json index da5cd3a9367137..386b7b6314b0fd 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "gutenberg", - "version": "14.7.0", + "version": "14.7.1", "private": true, "description": "A new WordPress editor experience.", "author": "The WordPress Contributors", From 11e429a0f88e033e23454b7fab6aad64bad9799c Mon Sep 17 00:00:00 2001 From: Gutenberg Repository Automation Date: Thu, 8 Dec 2022 22:45:30 +0000 Subject: [PATCH 010/209] Update Changelog for 14.7.1 --- changelog.txt | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/changelog.txt b/changelog.txt index 2ed8e64f0d1691..5427245e8d4688 100644 --- a/changelog.txt +++ b/changelog.txt @@ -1,5 +1,23 @@ == Changelog == += 14.7.1 = + + + +## Changelog + +### Bug Fixes + +#### Layout +- Only pass parentLayout to block edit if not empty. ([46390](https://github.com/WordPress/gutenberg/pull/46390)) + +## Contributors + +The following contributors merged PRs in this release: + +@tellthemachines + + = 14.7.0 = From 2226a5e9574c0456087f4c22b209fe7b84081e89 Mon Sep 17 00:00:00 2001 From: Ramon Date: Fri, 9 Dec 2022 12:34:41 +1100 Subject: [PATCH 011/209] Block editor: hide fixed contextual toolbar (#46298) * Hide contextual block toolbar if no blocks are selected. This is because it creates a large, empty space at the top of the page, taking up room in mobile and showing an empty space in the site editor view mode. * Revert hiding toolbar editor-wide Temporary CSS rule to hide the contextual toolbar in view mode for the site editor --- .../edit-site/src/components/block-editor/index.js | 2 ++ .../src/components/block-editor/style.scss | 13 +++++++++++++ 2 files changed, 15 insertions(+) diff --git a/packages/edit-site/src/components/block-editor/index.js b/packages/edit-site/src/components/block-editor/index.js index b3b2b9212fd6bc..6ea9b01d7ce7e2 100644 --- a/packages/edit-site/src/components/block-editor/index.js +++ b/packages/edit-site/src/components/block-editor/index.js @@ -180,6 +180,7 @@ export default function BlockEditor( { setIsInserterOpen } ) { canvasMode !== 'view' && // Disable resizing in mobile viewport. ! isMobileViewport; + const isViewMode = canvasMode === 'view'; const NavMenuSidebarToggle = () => ( @@ -243,6 +244,7 @@ export default function BlockEditor( { setIsInserterOpen } ) { { diff --git a/packages/edit-site/src/components/block-editor/style.scss b/packages/edit-site/src/components/block-editor/style.scss index 76ddabe01adc6f..f767c650d5ce75 100644 --- a/packages/edit-site/src/components/block-editor/style.scss +++ b/packages/edit-site/src/components/block-editor/style.scss @@ -49,6 +49,19 @@ // Removing this will cancel the bottom margins in the iframe. overflow: auto; } + + /* + Temporary to hide the contextual toolbar in view mode. + See: https://github.com/WordPress/gutenberg/pull/46298 + This rule can possibly be removed once the + contextual toolbar has been redesigned. + See: https://github.com/WordPress/gutenberg/issues/40450 + */ + &.is-view-mode { + .block-editor-block-contextual-toolbar { + display: none; + } + } } .edit-site-visual-editor__back-button { From 3cb388172d6024c65807f14b33ab5bfa06715b2a Mon Sep 17 00:00:00 2001 From: Matias Benedetto Date: Thu, 8 Dec 2022 23:03:54 -0300 Subject: [PATCH 012/209] WP Webfonts: avoid duplicated font families if the font family name was defined using fallback values. (#46378) * WP Webfonts: avoid duplicated font families if the font family name was defined using fallback values. * lint * get_font_slug: if font slug is defined it returns the slug * format --- lib/experimental/class-wp-webfonts.php | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/lib/experimental/class-wp-webfonts.php b/lib/experimental/class-wp-webfonts.php index e40aca9e8671f8..0c0cb06a27ffb3 100644 --- a/lib/experimental/class-wp-webfonts.php +++ b/lib/experimental/class-wp-webfonts.php @@ -178,7 +178,9 @@ public function enqueue_webfont( $font_family_name ) { */ public static function get_font_slug( $to_convert ) { if ( is_array( $to_convert ) ) { - if ( isset( $to_convert['font-family'] ) ) { + if ( isset( $to_convert['slug'] ) ) { + return $to_convert['slug']; + } elseif ( isset( $to_convert['font-family'] ) ) { $to_convert = $to_convert['font-family']; } elseif ( isset( $to_convert['fontFamily'] ) ) { $to_convert = $to_convert['fontFamily']; @@ -188,6 +190,11 @@ public static function get_font_slug( $to_convert ) { } } + // If the font-family is a comma-separated list (example: "Inter, sans-serif" ), use just the first font. + if ( strpos( $to_convert, ',' ) !== false ) { + $to_convert = explode( ',', $to_convert )[0]; + } + return sanitize_title( $to_convert ); } From 7c927d0a0c0273795e10207ab23caceeaeffe90c Mon Sep 17 00:00:00 2001 From: Derek Blank Date: Fri, 9 Dec 2022 12:10:27 +1000 Subject: [PATCH 013/209] Mobile Release v1.86.0 (#46389) * Release script: Update react-native-editor version to 1.86.0 * Release script: Update with changes from 'npm run core preios' * Update CHANGELOG --- packages/react-native-aztec/package.json | 2 +- packages/react-native-bridge/package.json | 2 +- packages/react-native-editor/CHANGELOG.md | 3 +++ packages/react-native-editor/ios/Podfile.lock | 14 +++++++------- packages/react-native-editor/package.json | 2 +- 5 files changed, 13 insertions(+), 10 deletions(-) diff --git a/packages/react-native-aztec/package.json b/packages/react-native-aztec/package.json index dfaa2409c5955c..ba382a39b52aa5 100644 --- a/packages/react-native-aztec/package.json +++ b/packages/react-native-aztec/package.json @@ -1,6 +1,6 @@ { "name": "@wordpress/react-native-aztec", - "version": "1.85.1", + "version": "1.86.0", "description": "Aztec view for react-native.", "private": true, "author": "The WordPress Contributors", diff --git a/packages/react-native-bridge/package.json b/packages/react-native-bridge/package.json index c774196860c911..4458cfeb3a3051 100644 --- a/packages/react-native-bridge/package.json +++ b/packages/react-native-bridge/package.json @@ -1,6 +1,6 @@ { "name": "@wordpress/react-native-bridge", - "version": "1.85.1", + "version": "1.86.0", "description": "Native bridge library used to integrate the block editor into a native App.", "private": true, "author": "The WordPress Contributors", diff --git a/packages/react-native-editor/CHANGELOG.md b/packages/react-native-editor/CHANGELOG.md index 374e297fc6d2a9..5551a5344dab96 100644 --- a/packages/react-native-editor/CHANGELOG.md +++ b/packages/react-native-editor/CHANGELOG.md @@ -10,6 +10,9 @@ For each user feature we should also add a importance categorization label to i --> ## Unreleased + +## 1.86.0 +- [**] Upgrade React Native to 0.69.4 [#43485] - [**] Prevent error message from unneccesarily firing when uploading to Gallery block [#46175] ## 1.85.0 diff --git a/packages/react-native-editor/ios/Podfile.lock b/packages/react-native-editor/ios/Podfile.lock index 3a97ea92fe7697..e376938d797c9b 100644 --- a/packages/react-native-editor/ios/Podfile.lock +++ b/packages/react-native-editor/ios/Podfile.lock @@ -13,7 +13,7 @@ PODS: - ReactCommon/turbomodule/core (= 0.69.4) - fmt (6.2.1) - glog (0.3.5) - - Gutenberg (1.85.1): + - Gutenberg (1.86.0): - React-Core (= 0.69.4) - React-CoreModules (= 0.69.4) - React-RCTImage (= 0.69.4) @@ -362,7 +362,7 @@ PODS: - React-Core - RNSVG (9.13.6): - React-Core - - RNTAztecView (1.85.1): + - RNTAztecView (1.86.0): - React-Core - WordPress-Aztec-iOS (~> 1.19.8) - SDWebImage (5.11.1): @@ -540,14 +540,14 @@ EXTERNAL SOURCES: SPEC CHECKSUMS: boost: a7c83b31436843459a1961bfd74b96033dc77234 BVLinearGradient: ace34fab72158c068ae989a0ebdbf86cb4ef0e49 - DoubleConversion: 5189b271737e1565bdce30deb4a08d647e3f5f54 + DoubleConversion: 831926d9b8bf8166fd87886c4abab286c2422662 FBLazyVector: c71b8c429a8af2aff1013934a7152e9d9d0c937d FBReactNativeSpec: 2ff441cbe6e58c1778d8a5cf3311831a6a8c0809 fmt: ff9d55029c625d3757ed641535fd4a75fedc7ce9 - glog: 3d02b25ca00c2d456734d0bcff864cbc62f6ae1a - Gutenberg: 3030a119b01cbfa29925327398a7cfaa63c9bfc7 + glog: 5337263514dd6f09803962437687240c5dc39aa4 + Gutenberg: 943a12eae51ca3dcda2ef86b4efe4f4a23854763 libwebp: 60305b2e989864154bd9be3d772730f08fc6a59c - RCT-Folly: b9d9fe1fc70114b751c076104e52f3b1b5e5a95a + RCT-Folly: a21c126816d8025b547704b777a2ba552f3d9fa9 RCTRequired: bd9d2ab0fda10171fcbcf9ba61a7df4dc15a28f4 RCTTypeSafety: e44e139bf6ec8042db396201834fc2372f6a21cd React: 482cd1ba23c471be1aed3800180be2427418d7be @@ -588,7 +588,7 @@ SPEC CHECKSUMS: RNReanimated: 8b189a09da0345d84b33b8cde57a57f8ed847352 RNScreens: 953633729a42e23ad0c93574d676b361e3335e8b RNSVG: 36a7359c428dcb7c6bce1cc546fbfebe069809b0 - RNTAztecView: 0d144de38c612c41953b2222f6facdcdae67fca8 + RNTAztecView: 634d437faf2908196c7d1237c210936466d6a37d SDWebImage: a7f831e1a65eb5e285e3fb046a23fcfbf08e696d SDWebImageWebPCoder: 908b83b6adda48effe7667cd2b7f78c897e5111d WordPress-Aztec-iOS: 7d11d598f14c82c727c08b56bd35fbeb7dafb504 diff --git a/packages/react-native-editor/package.json b/packages/react-native-editor/package.json index c20912d7e88026..52311f5aea4b00 100644 --- a/packages/react-native-editor/package.json +++ b/packages/react-native-editor/package.json @@ -1,6 +1,6 @@ { "name": "@wordpress/react-native-editor", - "version": "1.85.1", + "version": "1.86.0", "description": "Mobile WordPress gutenberg editor.", "author": "The WordPress Contributors", "license": "GPL-2.0-or-later", From 82680ec3c959fcff039f5f9887eb3e43791e88c4 Mon Sep 17 00:00:00 2001 From: Marin Atanasov <8436925+tyxla@users.noreply.github.com> Date: Fri, 9 Dec 2022 09:07:06 +0200 Subject: [PATCH 014/209] Block Editor: Fix no-node-access violations in BlockPreview (#46409) --- .../components/block-preview/test/index.js | 53 +++++++------------ 1 file changed, 18 insertions(+), 35 deletions(-) diff --git a/packages/block-editor/src/components/block-preview/test/index.js b/packages/block-editor/src/components/block-preview/test/index.js index b83bef8a1453b1..8687f2e066db51 100644 --- a/packages/block-editor/src/components/block-preview/test/index.js +++ b/packages/block-editor/src/components/block-preview/test/index.js @@ -17,36 +17,6 @@ import { */ import { useBlockPreview } from '../'; -jest.mock( '@wordpress/dom', () => { - const focus = jest.requireActual( '../../../../../dom/src' ).focus; - - return { - focus: { - ...focus, - focusable: { - ...focus.focusable, - find( context ) { - // In JSDOM, all elements have zero'd widths and height. - // This is a metric for focusable's `isVisible`, so find - // and apply an arbitrary non-zero width. - Array.from( context.querySelectorAll( '*' ) ).forEach( - ( element ) => { - Object.defineProperties( element, { - offsetWidth: { - get: () => 1, - configurable: true, - }, - } ); - } - ); - - return focus.focusable.find( ...arguments ); - }, - }, - }, - }; -} ); - jest.useRealTimers(); describe( 'useBlockPreview', () => { @@ -78,14 +48,19 @@ describe( 'useBlockPreview', () => { blocks, props: { className }, } ); - return
; + return ( +
+ ); } it( 'will render a block preview with minimal nesting', async () => { const blocks = []; blocks.push( createBlock( 'core/test-block' ) ); - const { container } = render( + render( { ); expect( previewedBlockContents ).toBeInTheDocument(); + const blockPreviewComponent = screen.getByTestId( + 'block-preview-component' + ); + // Ensure the block preview class names are merged with the component's class name. - expect( container.firstChild.className ).toBe( - 'test-container-classname block-editor-block-preview__live-content components-disabled' + expect( blockPreviewComponent ).toHaveClass( + 'block-editor-block-preview__live-content' + ); + expect( blockPreviewComponent ).toHaveClass( + 'test-container-classname' ); + expect( blockPreviewComponent ).toHaveClass( 'components-disabled' ); // Ensure there is no nesting between the parent component and rendered blocks. - expect( container.firstChild.firstChild ).toBe( previewedBlock ); + expect( blockPreviewComponent ).toContainElement( previewedBlock ); } ); } ); From da8c004b6792f968eb49d9a964f9ef466aa0ac46 Mon Sep 17 00:00:00 2001 From: George Mamadashvili Date: Fri, 9 Dec 2022 11:09:29 +0400 Subject: [PATCH 015/209] Group: Remove unnecessary 'useCallback' (#46418) --- packages/block-library/src/group/edit.js | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/packages/block-library/src/group/edit.js b/packages/block-library/src/group/edit.js index 7c324d76c587d3..8962d8a8a3bf16 100644 --- a/packages/block-library/src/group/edit.js +++ b/packages/block-library/src/group/edit.js @@ -12,7 +12,6 @@ import { } from '@wordpress/block-editor'; import { SelectControl } from '@wordpress/components'; import { __ } from '@wordpress/i18n'; -import { useCallback } from '@wordpress/element'; /** * Internal dependencies @@ -123,13 +122,10 @@ function GroupEdit( { ); const { selectBlock } = useDispatch( blockEditorStore ); - const updateSelection = useCallback( - ( newClientId ) => selectBlock( newClientId, -1 ), - [ selectBlock ] - ); + const selectVariation = ( nextVariation ) => { setAttributes( nextVariation.attributes ); - updateSelection( clientId ); + selectBlock( clientId, -1 ); setShowPlaceholder( false ); }; From cdf49b370877fdff6e05f1401eebe16d407a7a77 Mon Sep 17 00:00:00 2001 From: George Mamadashvili Date: Fri, 9 Dec 2022 12:45:18 +0400 Subject: [PATCH 016/209] Template Parts: Remove unnecessary 'useCallback' (#46420) --- .../block-library/src/template-part/edit/selection-modal.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/packages/block-library/src/template-part/edit/selection-modal.js b/packages/block-library/src/template-part/edit/selection-modal.js index 7a544d9898ff1a..9a83914ddb4241 100644 --- a/packages/block-library/src/template-part/edit/selection-modal.js +++ b/packages/block-library/src/template-part/edit/selection-modal.js @@ -1,7 +1,7 @@ /** * WordPress dependencies */ -import { useCallback, useMemo, useState } from '@wordpress/element'; +import { useMemo, useState } from '@wordpress/element'; import { __, sprintf } from '@wordpress/i18n'; import { store as noticesStore } from '@wordpress/notices'; import { useDispatch } from '@wordpress/data'; @@ -57,7 +57,7 @@ export default function TemplatePartSelectionModal( { const { createSuccessNotice } = useDispatch( noticesStore ); - const onTemplatePartSelect = useCallback( ( templatePart ) => { + const onTemplatePartSelect = ( templatePart ) => { setAttributes( { slug: templatePart.slug, theme: templatePart.theme, @@ -74,7 +74,7 @@ export default function TemplatePartSelectionModal( { } ); onClose(); - }, [] ); + }; const createFromBlocks = useCreateTemplatePartFromBlocks( area, From 04bfaad266a54d16dbf554cfa9a536daff03ef67 Mon Sep 17 00:00:00 2001 From: Ella <4710635+ellatrix@users.noreply.github.com> Date: Fri, 9 Dec 2022 10:54:47 +0200 Subject: [PATCH 017/209] Rich text: add button to clear unknown format (#44086) --- .../rich-text/format-toolbar/index.js | 2 +- .../format-library/src/default-formats.js | 2 + packages/format-library/src/unknown/index.js | 42 +++++++++++++++++++ packages/rich-text/src/create.js | 23 +++++----- .../src/remove-unregistered-formatting.js | 0 packages/rich-text/src/store/selectors.js | 12 ++++-- packages/rich-text/src/test/helpers/index.js | 4 ++ packages/rich-text/src/to-tree.js | 8 +++- .../specs/editor/plugins/format-api.spec.js | 22 ++++++++++ 9 files changed, 98 insertions(+), 17 deletions(-) create mode 100644 packages/format-library/src/unknown/index.js create mode 100644 packages/rich-text/src/remove-unregistered-formatting.js diff --git a/packages/block-editor/src/components/rich-text/format-toolbar/index.js b/packages/block-editor/src/components/rich-text/format-toolbar/index.js index 7817fc284ae520..445cd38b4cc1de 100644 --- a/packages/block-editor/src/components/rich-text/format-toolbar/index.js +++ b/packages/block-editor/src/components/rich-text/format-toolbar/index.js @@ -23,7 +23,7 @@ const POPOVER_PROPS = { const FormatToolbar = () => { return ( <> - { [ 'bold', 'italic', 'link' ].map( ( format ) => ( + { [ 'bold', 'italic', 'link', 'unknown' ].map( ( format ) => ( { + return formats.some( ( format ) => format.type === name ); + } ); + + if ( ! isActive && ! hasUnknownFormats ) { + return null; + } + + return ( + + ); + }, +}; diff --git a/packages/rich-text/src/create.js b/packages/rich-text/src/create.js index b9b31e14762573..7fdcf8adba7628 100644 --- a/packages/rich-text/src/create.js +++ b/packages/rich-text/src/create.js @@ -43,7 +43,7 @@ function createEmptyValue() { }; } -function toFormat( { type, attributes } ) { +function toFormat( { tagName, attributes } ) { let formatType; if ( attributes && attributes.class ) { @@ -65,11 +65,11 @@ function toFormat( { type, attributes } ) { if ( ! formatType ) { formatType = - select( richTextStore ).getFormatTypeForBareElement( type ); + select( richTextStore ).getFormatTypeForBareElement( tagName ); } if ( ! formatType ) { - return attributes ? { type, attributes } : { type }; + return attributes ? { type: tagName, attributes } : { type: tagName }; } if ( @@ -80,7 +80,7 @@ function toFormat( { type, attributes } ) { } if ( ! attributes ) { - return { type: formatType.name }; + return { type: formatType.name, tagName }; } const registeredAttributes = {}; @@ -115,6 +115,7 @@ function toFormat( { type, attributes } ) { return { type: formatType.name, + tagName, attributes: registeredAttributes, unregisteredAttributes, }; @@ -368,7 +369,7 @@ function createFromElement( { // Optimise for speed. for ( let index = 0; index < length; index++ ) { const node = element.childNodes[ index ]; - const type = node.nodeName.toLowerCase(); + const tagName = node.nodeName.toLowerCase(); if ( node.nodeType === node.TEXT_NODE ) { let filter = removeReservedCharacters; @@ -398,19 +399,19 @@ function createFromElement( { // Ignore any placeholders. ( node.getAttribute( 'data-rich-text-placeholder' ) || // Ignore any line breaks that are not inserted by us. - ( type === 'br' && + ( tagName === 'br' && ! node.getAttribute( 'data-rich-text-line-break' ) ) ) ) { accumulateSelection( accumulator, node, range, createEmptyValue() ); continue; } - if ( type === 'script' ) { + if ( tagName === 'script' ) { const value = { formats: [ , ], replacements: [ { - type, + type: tagName, attributes: { 'data-rich-text-script': node.getAttribute( 'data-rich-text-script' ) || @@ -425,20 +426,20 @@ function createFromElement( { continue; } - if ( type === 'br' ) { + if ( tagName === 'br' ) { accumulateSelection( accumulator, node, range, createEmptyValue() ); mergePair( accumulator, create( { text: '\n' } ) ); continue; } const format = toFormat( { - type, + tagName, attributes: getAttributes( { element: node } ), } ); if ( multilineWrapperTags && - multilineWrapperTags.indexOf( type ) !== -1 + multilineWrapperTags.indexOf( tagName ) !== -1 ) { const value = createFromMultilineElement( { element: node, diff --git a/packages/rich-text/src/remove-unregistered-formatting.js b/packages/rich-text/src/remove-unregistered-formatting.js new file mode 100644 index 00000000000000..e69de29bb2d1d6 diff --git a/packages/rich-text/src/store/selectors.js b/packages/rich-text/src/store/selectors.js index 32a50cf89020d2..52aa4dead99bf7 100644 --- a/packages/rich-text/src/store/selectors.js +++ b/packages/rich-text/src/store/selectors.js @@ -37,9 +37,15 @@ export function getFormatType( state, name ) { * @return {?Object} Format type. */ export function getFormatTypeForBareElement( state, bareElementTagName ) { - return getFormatTypes( state ).find( ( { className, tagName } ) => { - return className === null && bareElementTagName === tagName; - } ); + const formatTypes = getFormatTypes( state ); + return ( + formatTypes.find( ( { className, tagName } ) => { + return className === null && bareElementTagName === tagName; + } ) || + formatTypes.find( ( { className, tagName } ) => { + return className === null && '*' === tagName; + } ) + ); } /** diff --git a/packages/rich-text/src/test/helpers/index.js b/packages/rich-text/src/test/helpers/index.js index 96090ea64b51a4..15aa032978c66b 100644 --- a/packages/rich-text/src/test/helpers/index.js +++ b/packages/rich-text/src/test/helpers/index.js @@ -784,6 +784,7 @@ export const specWithRegistration = [ [ { type: 'my-plugin/link', + tagName: 'a', attributes: {}, unregisteredAttributes: {}, }, @@ -808,6 +809,7 @@ export const specWithRegistration = [ [ { type: 'my-plugin/link', + tagName: 'a', attributes: {}, unregisteredAttributes: { class: 'test', @@ -834,6 +836,7 @@ export const specWithRegistration = [ [ { type: 'core/link', + tagName: 'a', attributes: {}, unregisteredAttributes: { class: 'custom-format', @@ -899,6 +902,7 @@ export const specWithRegistration = [ [ { type: 'my-plugin/link', + tagName: 'a', attributes: {}, unregisteredAttributes: {}, }, diff --git a/packages/rich-text/src/to-tree.js b/packages/rich-text/src/to-tree.js index 8b2397013de4d5..74cc08581e83c4 100644 --- a/packages/rich-text/src/to-tree.js +++ b/packages/rich-text/src/to-tree.js @@ -35,6 +35,7 @@ function restoreOnAttributes( attributes, isEditableTree ) { * * @param {Object} $1 Named parameters. * @param {string} $1.type The format type. + * @param {string} $1.tagName The tag name. * @param {Object} $1.attributes The format attributes. * @param {Object} $1.unregisteredAttributes The unregistered format * attributes. @@ -48,6 +49,7 @@ function restoreOnAttributes( attributes, isEditableTree ) { */ function fromFormat( { type, + tagName, attributes, unregisteredAttributes, object, @@ -100,7 +102,7 @@ function fromFormat( { } return { - type: formatType.tagName, + type: formatType.tagName === '*' ? tagName : formatType.tagName, object: formatType.object, attributes: restoreOnAttributes( elementAttributes, isEditableTree ), }; @@ -241,7 +243,8 @@ export function toTree( { return; } - const { type, attributes, unregisteredAttributes } = format; + const { type, tagName, attributes, unregisteredAttributes } = + format; const boundaryClass = isEditableTree && @@ -253,6 +256,7 @@ export function toTree( { parent, fromFormat( { type, + tagName, attributes, unregisteredAttributes, boundaryClass, diff --git a/test/e2e/specs/editor/plugins/format-api.spec.js b/test/e2e/specs/editor/plugins/format-api.spec.js index a294a2034f0558..1b1d3b3d4173ff 100644 --- a/test/e2e/specs/editor/plugins/format-api.spec.js +++ b/test/e2e/specs/editor/plugins/format-api.spec.js @@ -34,6 +34,28 @@ test.describe( 'Using Format API', () => { expect( content ).toBe( `

First paragraph

+` + ); + } ); + + test( 'should show unknow formatting button', async ( { + editor, + page, + } ) => { + await editor.insertBlock( { + name: 'core/paragraph', + attributes: { content: 'test' }, + } ); + expect( await editor.getEditedPostContent() ).toBe( + ` +

test

+` + ); + await page.keyboard.press( 'ArrowRight' ); + await editor.clickBlockToolbarButton( 'Clear Unknown Formatting' ); + expect( await editor.getEditedPostContent() ).toBe( + ` +

test

` ); } ); From 299b85e17b564f1f993328fdb46d71e70bec9a2d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9?= <583546+oandregal@users.noreply.github.com> Date: Fri, 9 Dec 2022 10:32:14 +0100 Subject: [PATCH 018/209] Try template drill down on shell sidebar (browse mode) (#45100) Co-authored-by: Riad Benguella Co-authored-by: James Koster --- packages/base-styles/_mixins.scss | 33 ++++ .../blocks/post-comments-form.test.js | 7 +- .../src/components/layout/style.scss | 4 +- .../sidebar-navigation-item/index.js | 14 +- .../sidebar-navigation-item/style.scss | 10 +- .../sidebar-navigation-root/index.js | 86 --------- .../sidebar-navigation-root/style.scss | 3 - .../sidebar-navigation-screen-main/index.js | 72 ++++++++ .../index.js | 167 ++++++++++++++++++ .../style.scss | 4 + .../sidebar-navigation-screen/index.js | 55 ++++++ .../sidebar-navigation-screen/style.scss | 39 ++++ .../sidebar-navigation-title/index.js | 30 ---- .../sidebar-navigation-title/style.scss | 16 -- .../edit-site/src/components/sidebar/index.js | 18 +- .../src/components/sidebar/style.scss | 8 +- packages/edit-site/src/style.scss | 4 +- 17 files changed, 416 insertions(+), 154 deletions(-) delete mode 100644 packages/edit-site/src/components/sidebar-navigation-root/index.js delete mode 100644 packages/edit-site/src/components/sidebar-navigation-root/style.scss create mode 100644 packages/edit-site/src/components/sidebar-navigation-screen-main/index.js create mode 100644 packages/edit-site/src/components/sidebar-navigation-screen-templates/index.js create mode 100644 packages/edit-site/src/components/sidebar-navigation-screen-templates/style.scss create mode 100644 packages/edit-site/src/components/sidebar-navigation-screen/index.js create mode 100644 packages/edit-site/src/components/sidebar-navigation-screen/style.scss delete mode 100644 packages/edit-site/src/components/sidebar-navigation-title/index.js delete mode 100644 packages/edit-site/src/components/sidebar-navigation-title/style.scss diff --git a/packages/base-styles/_mixins.scss b/packages/base-styles/_mixins.scss index fae5488e5e3d0c..9eee5820eba811 100644 --- a/packages/base-styles/_mixins.scss +++ b/packages/base-styles/_mixins.scss @@ -550,3 +550,36 @@ } /* stylelint-enable function-comma-space-after */ } + +@mixin custom-scrollbars-on-hover() { + visibility: hidden; + + $handle-color: #757575; + $track-color: #1e1e1e; + + // WebKit + &::-webkit-scrollbar { + width: 12px; + height: 12px; + } + &::-webkit-scrollbar-track { + background-color: $track-color; + } + &::-webkit-scrollbar-thumb { + background-color: $handle-color; + border-radius: 8px; + border: 3px solid transparent; + background-clip: padding-box; + } + + // Firefox 109+ and Chrome 111+ + scrollbar-color: $handle-color $track-color; // Syntax, "dark", "light", or "#handle-color #track-color" + scrollbar-width: thin; + scrollbar-gutter: stable; + + &:hover, + &:focus, + & > * { + visibility: visible; + } +} diff --git a/packages/e2e-tests/specs/experiments/blocks/post-comments-form.test.js b/packages/e2e-tests/specs/experiments/blocks/post-comments-form.test.js index 4253c38a3da049..5c36049468427a 100644 --- a/packages/e2e-tests/specs/experiments/blocks/post-comments-form.test.js +++ b/packages/e2e-tests/specs/experiments/blocks/post-comments-form.test.js @@ -27,9 +27,10 @@ describe( 'Post Comments Form', () => { '.edit-site-sidebar-navigation-item', { text: /templates/i } ); - await expect( page ).toClick( '.components-heading > a', { - text: /singular/i, - } ); + await expect( page ).toClick( + '.edit-site-sidebar-navigation-item', + { text: /singular/i } + ); await enterEditMode(); // Insert post comments form diff --git a/packages/edit-site/src/components/layout/style.scss b/packages/edit-site/src/components/layout/style.scss index 81c7c9869f8d99..de34bc008f739b 100644 --- a/packages/edit-site/src/components/layout/style.scss +++ b/packages/edit-site/src/components/layout/style.scss @@ -45,7 +45,9 @@ .edit-site-layout__sidebar { grid-area: sidebar; z-index: 1; - padding-top: $grid-unit-80; + overflow-y: auto; + max-height: calc(100vh - #{$header-height}); + @include custom-scrollbars-on-hover; // This is only necessary for the exit animation .edit-site-layout.is-full-canvas & { diff --git a/packages/edit-site/src/components/sidebar-navigation-item/index.js b/packages/edit-site/src/components/sidebar-navigation-item/index.js index a39ecfe7734bfc..fb5cfdf1b32f84 100644 --- a/packages/edit-site/src/components/sidebar-navigation-item/index.js +++ b/packages/edit-site/src/components/sidebar-navigation-item/index.js @@ -9,13 +9,14 @@ import classnames from 'classnames'; import { __experimentalItem as Item, __experimentalHStack as HStack, - FlexItem, + FlexBlock, } from '@wordpress/components'; -import { Icon } from '@wordpress/icons'; +import { chevronRight, Icon } from '@wordpress/icons'; export default function SidebarNavigationItem( { className, icon, + withChevron = false, children, ...props } ) { @@ -34,7 +35,14 @@ export default function SidebarNavigationItem( { icon={ icon } size={ 24 } /> - { children } + { children } + { withChevron && ( + + ) } ) } { ! icon && children } diff --git a/packages/edit-site/src/components/sidebar-navigation-item/style.scss b/packages/edit-site/src/components/sidebar-navigation-item/style.scss index 61885c0132fa28..7d77e2cb8b76db 100644 --- a/packages/edit-site/src/components/sidebar-navigation-item/style.scss +++ b/packages/edit-site/src/components/sidebar-navigation-item/style.scss @@ -1,9 +1,17 @@ .edit-site-sidebar-navigation-item.components-item { color: $gray-600; + border-width: $border-width-tab; &:hover, - &:focus, + &:focus { + color: $white; + background: $gray-800; + border-width: $border-width-tab; + } + &[aria-current] { color: $white; + background: var(--wp-admin-theme-color); + border-width: $border-width-tab; } } diff --git a/packages/edit-site/src/components/sidebar-navigation-root/index.js b/packages/edit-site/src/components/sidebar-navigation-root/index.js deleted file mode 100644 index 96c3a9324c0cfa..00000000000000 --- a/packages/edit-site/src/components/sidebar-navigation-root/index.js +++ /dev/null @@ -1,86 +0,0 @@ -/** - * WordPress dependencies - */ -import { - __experimentalItemGroup as ItemGroup, - __experimentalVStack as VStack, - __experimentalHStack as HStack, - Button, -} from '@wordpress/components'; -import { __ } from '@wordpress/i18n'; -import { layout, symbolFilled } from '@wordpress/icons'; -import { useDispatch } from '@wordpress/data'; -import { useViewportMatch } from '@wordpress/compose'; - -/** - * Internal dependencies - */ -import SidebarNavigationTitle from '../sidebar-navigation-title'; -import { useLink } from '../routes/link'; -import SidebarNavigationItem from '../sidebar-navigation-item'; -import { useLocation } from '../routes'; -import { store as editSiteStore } from '../../store'; -import getIsListPage from '../../utils/get-is-list-page'; - -export default function SidebarNavigationRoot() { - const { params } = useLocation(); - const isListPage = getIsListPage( params ); - const isEditorPage = ! isListPage; - const templatesLink = useLink( { - postType: 'wp_template', - postId: undefined, - } ); - const templatePartsLink = useLink( { - postType: 'wp_template_part', - postId: undefined, - } ); - const { __unstableSetCanvasMode } = useDispatch( editSiteStore ); - const isMobileViewport = useViewportMatch( 'medium', '<' ); - const isTemplatesPage = - params.postType === 'wp_template' && ! params.postId; - const isTemplatePartsPage = - params.postType === 'wp_template_part' && ! params.postId; - - return ( - - -
{ __( 'Design' ) }
- { ! isMobileViewport && isEditorPage && ( - - ) } - - } - /> - -
- ); -} diff --git a/packages/edit-site/src/components/sidebar-navigation-root/style.scss b/packages/edit-site/src/components/sidebar-navigation-root/style.scss deleted file mode 100644 index 7d2efc6efeb292..00000000000000 --- a/packages/edit-site/src/components/sidebar-navigation-root/style.scss +++ /dev/null @@ -1,3 +0,0 @@ -.edit-site-sidebar-navigation-root { - margin: 0 $button-size; -} diff --git a/packages/edit-site/src/components/sidebar-navigation-screen-main/index.js b/packages/edit-site/src/components/sidebar-navigation-screen-main/index.js new file mode 100644 index 00000000000000..9a7b4479c972bc --- /dev/null +++ b/packages/edit-site/src/components/sidebar-navigation-screen-main/index.js @@ -0,0 +1,72 @@ +/** + * WordPress dependencies + */ +import { + __experimentalItemGroup as ItemGroup, + __experimentalHStack as HStack, + __experimentalNavigatorButton as NavigatorButton, + Button, +} from '@wordpress/components'; +import { __ } from '@wordpress/i18n'; +import { layout, symbolFilled } from '@wordpress/icons'; +import { useDispatch } from '@wordpress/data'; +import { useViewportMatch } from '@wordpress/compose'; + +/** + * Internal dependencies + */ +import SidebarNavigationScreen from '../sidebar-navigation-screen'; +import SidebarNavigationItem from '../sidebar-navigation-item'; +import { useLocation } from '../routes'; +import { store as editSiteStore } from '../../store'; +import getIsListPage from '../../utils/get-is-list-page'; + +export default function SidebarNavigationScreenMain() { + const { params } = useLocation(); + const isListPage = getIsListPage( params ); + const isEditorPage = ! isListPage; + const { __unstableSetCanvasMode } = useDispatch( editSiteStore ); + const isMobileViewport = useViewportMatch( 'medium', '<' ); + + return ( + +
{ __( 'Design' ) }
+ { ! isMobileViewport && isEditorPage && ( + + ) } + + } + content={ + + + { __( 'Templates' ) } + + + { __( 'Template Parts' ) } + + + } + /> + ); +} diff --git a/packages/edit-site/src/components/sidebar-navigation-screen-templates/index.js b/packages/edit-site/src/components/sidebar-navigation-screen-templates/index.js new file mode 100644 index 00000000000000..f807c2bacd62a6 --- /dev/null +++ b/packages/edit-site/src/components/sidebar-navigation-screen-templates/index.js @@ -0,0 +1,167 @@ +/** + * WordPress dependencies + */ +import { + __experimentalItemGroup as ItemGroup, + __experimentalHStack as HStack, + Button, +} from '@wordpress/components'; +import { __ } from '@wordpress/i18n'; +import { useDispatch, useSelect } from '@wordpress/data'; +import { useEntityRecords } from '@wordpress/core-data'; +import { decodeEntities } from '@wordpress/html-entities'; +import { useViewportMatch } from '@wordpress/compose'; + +/** + * Internal dependencies + */ +import SidebarNavigationScreen from '../sidebar-navigation-screen'; +import { useLink } from '../routes/link'; +import SidebarNavigationItem from '../sidebar-navigation-item'; +import { useLocation } from '../routes'; +import { store as editSiteStore } from '../../store'; +import getIsListPage from '../../utils/get-is-list-page'; + +function omit( object, keys ) { + return Object.fromEntries( + Object.entries( object ).filter( ( [ key ] ) => ! keys.includes( key ) ) + ); +} + +const Item = ( { item } ) => { + const linkInfo = useLink( item.params ); + const props = item.params + ? { ...omit( item, 'params' ), ...linkInfo } + : item; + return ; +}; + +const config = { + wp_template: { + path: '/templates', + labels: { + title: __( 'Templates' ), + loading: __( 'Loading templates' ), + notFound: __( 'No templates found' ), + manage: __( 'Manage all templates' ), + }, + }, + wp_template_part: { + path: '/template-parts', + labels: { + title: __( 'Template parts' ), + loading: __( 'Loading template parts' ), + notFound: __( 'No template parts found' ), + manage: __( 'Manage all template parts' ), + }, + }, +}; + +export default function SidebarNavigationScreenTemplates( { + postType = 'wp_template', +} ) { + const { params } = useLocation(); + const { __unstableSetCanvasMode } = useDispatch( editSiteStore ); + const isMobileViewport = useViewportMatch( 'medium', '<' ); + const isListPage = getIsListPage( params ); + const isEditorPage = ! isListPage; + + // Ideally the URL params would be enough. + // Loading the editor should ideally redirect to the home page + // instead of fetching the edited entity here. + const { editedPostId, editedPostType } = useSelect( ( select ) => { + const { getEditedPostType, getEditedPostId } = select( editSiteStore ); + return { + editedPostId: getEditedPostId(), + editedPostType: getEditedPostType(), + }; + }, [] ); + + const { records: templates, isResolving: isLoading } = useEntityRecords( + 'postType', + postType, + { + per_page: -1, + } + ); + + let items = []; + if ( isLoading ) { + items = [ + { + children: config[ postType ].labels.loading, + }, + ]; + } else if ( ! templates && ! isLoading ) { + items = [ + { + children: config[ postType ].labels.notFound, + }, + ]; + } else { + items = templates?.map( ( template ) => ( { + params: { + postType, + postId: template.id, + }, + children: decodeEntities( + template.title?.rendered || template.slug + ), + 'aria-current': + ( params.postType === postType && + params.postId === template.id ) || + // This is a special case for the home page. + ( editedPostId === template.id && + editedPostType === postType && + !! params.postId ) + ? 'page' + : undefined, + } ) ); + } + + return ( + +
{ config[ postType ].labels.title }
+ { ! isMobileViewport && isEditorPage && ( + + ) } + + } + content={ + <> + + { items.map( ( item, index ) => ( + + ) ) } + + + + + } + /> + ); +} diff --git a/packages/edit-site/src/components/sidebar-navigation-screen-templates/style.scss b/packages/edit-site/src/components/sidebar-navigation-screen-templates/style.scss new file mode 100644 index 00000000000000..432774f903e465 --- /dev/null +++ b/packages/edit-site/src/components/sidebar-navigation-screen-templates/style.scss @@ -0,0 +1,4 @@ +.edit-site-sidebar-navigation-screen-templates__see-all { + /* Overrides the margin that comes from the Item component */ + margin-top: $grid-unit-20 !important; +} diff --git a/packages/edit-site/src/components/sidebar-navigation-screen/index.js b/packages/edit-site/src/components/sidebar-navigation-screen/index.js new file mode 100644 index 00000000000000..7edca14681007d --- /dev/null +++ b/packages/edit-site/src/components/sidebar-navigation-screen/index.js @@ -0,0 +1,55 @@ +/** + * WordPress dependencies + */ +import { + __experimentalHStack as HStack, + __experimentalVStack as VStack, + __experimentalNavigatorBackButton as NavigatorBackButton, + __experimentalNavigatorScreen as NavigatorScreen, +} from '@wordpress/components'; +import { isRTL, __, sprintf } from '@wordpress/i18n'; +import { chevronRight, chevronLeft } from '@wordpress/icons'; + +export default function SidebarNavigationScreen( { + path, + parentTitle, + title, + content, +} ) { + return ( + + + + { parentTitle ? ( + + ) : ( +
+ ) } + +
+ { title } +
+ + + + + + ); +} diff --git a/packages/edit-site/src/components/sidebar-navigation-screen/style.scss b/packages/edit-site/src/components/sidebar-navigation-screen/style.scss new file mode 100644 index 00000000000000..e3044e95bbdd05 --- /dev/null +++ b/packages/edit-site/src/components/sidebar-navigation-screen/style.scss @@ -0,0 +1,39 @@ +.edit-site-sidebar-navigation-screen { + display: flex; + flex-direction: column; + overflow-x: unset !important; + position: relative; +} + +.edit-site-sidebar-navigation-screen__content { + margin: 0 $button-size; + flex-grow: 1; + overflow-y: auto; +} + +.edit-site-sidebar-navigation-screen__title-icon { + position: sticky; + top: 0; + background: $gray-900; + padding-top: $grid-unit-80; + box-shadow: 0 $grid-unit-10 $grid-unit-20 $gray-900; + margin-bottom: $grid-unit-10; + padding-bottom: $grid-unit-10; +} + +.edit-site-sidebar-navigation-screen__title { + font-size: calc(1.56 * 13px); + font-weight: 600; +} + +.edit-site-sidebar-navigation-screen__back { + color: $gray-200; + + &:hover { + color: $white; + } +} + +.edit-site-sidebar-navigation-screen__icon-placeholder { + width: $button-size; +} diff --git a/packages/edit-site/src/components/sidebar-navigation-title/index.js b/packages/edit-site/src/components/sidebar-navigation-title/index.js deleted file mode 100644 index c233b06544ffe9..00000000000000 --- a/packages/edit-site/src/components/sidebar-navigation-title/index.js +++ /dev/null @@ -1,30 +0,0 @@ -/** - * WordPress dependencies - */ -import { - __experimentalHStack as HStack, - __experimentalNavigatorBackButton as NavigatorBackButton, -} from '@wordpress/components'; -import { isRTL, __, sprintf } from '@wordpress/i18n'; -import { chevronRight, chevronLeft } from '@wordpress/icons'; - -export default function SidebarNavigationTitle( { parentTitle, title } ) { - return ( - - { parentTitle ? ( - - ) : ( -
- ) } -
{ title }
- - ); -} diff --git a/packages/edit-site/src/components/sidebar-navigation-title/style.scss b/packages/edit-site/src/components/sidebar-navigation-title/style.scss deleted file mode 100644 index 0ac287fec2cdfa..00000000000000 --- a/packages/edit-site/src/components/sidebar-navigation-title/style.scss +++ /dev/null @@ -1,16 +0,0 @@ -.edit-site-sidebar-navigation-title { - font-size: calc(1.56 * 13px); - font-weight: 600; -} - -.edit-site-sidebar-navigation-title__back { - color: $gray-200; - - &:hover { - color: $white; - } -} - -.edit-site-sidebar-navigation-title__icon-placeholder { - width: $button-size; -} diff --git a/packages/edit-site/src/components/sidebar/index.js b/packages/edit-site/src/components/sidebar/index.js index 578f13813305b9..154fa9c0a17b48 100644 --- a/packages/edit-site/src/components/sidebar/index.js +++ b/packages/edit-site/src/components/sidebar/index.js @@ -1,19 +1,23 @@ /** * WordPress dependencies */ -import { __experimentalVStack as VStack } from '@wordpress/components'; +import { __experimentalNavigatorProvider as NavigatorProvider } from '@wordpress/components'; /** * Internal dependencies */ -import SidebarNavigationRoot from '../sidebar-navigation-root'; +import SidebarNavigationScreenMain from '../sidebar-navigation-screen-main'; +import SidebarNavigationScreenTemplates from '../sidebar-navigation-screen-templates'; export function Sidebar() { return ( - -
- -
-
+ + + + + ); } diff --git a/packages/edit-site/src/components/sidebar/style.scss b/packages/edit-site/src/components/sidebar/style.scss index 3fbdfbafbe06f4..456a5bf9dc9de3 100644 --- a/packages/edit-site/src/components/sidebar/style.scss +++ b/packages/edit-site/src/components/sidebar/style.scss @@ -1,4 +1,8 @@ -.edit-site-sidebar__content { +.edit-site-sidebar__content.edit-site-sidebar__content { + overflow-x: unset; +} + +.edit-site-sidebar__content > div { // This matches the logo padding - padding: $grid-unit-15; + padding: 0 $grid-unit-15; } diff --git a/packages/edit-site/src/style.scss b/packages/edit-site/src/style.scss index 9b871cff4f2d50..be5b51e16ea084 100644 --- a/packages/edit-site/src/style.scss +++ b/packages/edit-site/src/style.scss @@ -20,8 +20,8 @@ @import "./components/layout/style.scss"; @import "./components/sidebar/style.scss"; @import "./components/sidebar-navigation-item/style.scss"; -@import "./components/sidebar-navigation-root/style.scss"; -@import "./components/sidebar-navigation-title/style.scss"; +@import "./components/sidebar-navigation-screen/style.scss"; +@import "./components/sidebar-navigation-screen-templates/style.scss"; @import "./components/site-icon/style.scss"; @import "./components/style-book/style.scss"; From c48fec7da1c5e5e1a45c9f15a6eb98d5474ea0d2 Mon Sep 17 00:00:00 2001 From: George Mamadashvili Date: Fri, 9 Dec 2022 13:36:57 +0400 Subject: [PATCH 019/209] Template Parts: Fix modal search stacking context (#46421) --- packages/base-styles/_z-index.scss | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/base-styles/_z-index.scss b/packages/base-styles/_z-index.scss index 6ae833adde1c2e..ec3be48f1b9752 100644 --- a/packages/base-styles/_z-index.scss +++ b/packages/base-styles/_z-index.scss @@ -13,7 +13,7 @@ $z-layers: ( ".edit-site-code-editor__toolbar": 1, // These next three share a stacking context - ".block-library-template-part__selection-search": 1, // higher sticky element + ".block-library-template-part__selection-search": 2, // higher sticky element // These next two share a stacking context ".interface-complementary-area .components-panel" : 0, // lower scrolling content From b1a4b76864c319ec5a24780bff71202f26216a00 Mon Sep 17 00:00:00 2001 From: Nik Tsekouras Date: Fri, 9 Dec 2022 12:09:54 +0200 Subject: [PATCH 020/209] [Block Library - Group]: Remove placeholder leftovers (#46423) --- .../block-library/src/group/placeholder.js | 31 ++++--------------- 1 file changed, 6 insertions(+), 25 deletions(-) diff --git a/packages/block-library/src/group/placeholder.js b/packages/block-library/src/group/placeholder.js index 0f8fbc253c8986..daf535df8bf607 100644 --- a/packages/block-library/src/group/placeholder.js +++ b/packages/block-library/src/group/placeholder.js @@ -24,10 +24,7 @@ const getGroupPlaceholderIcons = ( name = 'group' ) => { height="32" viewBox="0 0 44 32" > - + ), 'group-row': ( @@ -37,10 +34,7 @@ const getGroupPlaceholderIcons = ( name = 'group' ) => { height="32" viewBox="0 0 44 32" > - + ), 'group-stack': ( @@ -50,10 +44,7 @@ const getGroupPlaceholderIcons = ( name = 'group' ) => { height="32" viewBox="0 0 44 32" > - + ), }; @@ -130,23 +121,13 @@ export function useShouldShowPlaceHolder( { * @return {JSX.Element} The placeholder. */ function GroupPlaceHolder( { name, onSelect } ) { - const { defaultVariation, variations } = useSelect( - ( select ) => { - const { getBlockVariations, getDefaultBlockVariation } = - select( blocksStore ); - return { - defaultVariation: getDefaultBlockVariation( name, 'block' ), - variations: getBlockVariations( name, 'block' ) || [], - }; - }, + const variations = useSelect( + ( select ) => select( blocksStore ).getBlockVariations( name, 'block' ), [ name ] ); const blockProps = useBlockProps( { className: 'wp-block-group__placeholder', } ); - const selectVariation = ( nextVariation = defaultVariation ) => - onSelect( nextVariation ); - return (
selectVariation( variation ) } + onClick={ () => onSelect( variation ) } className="wp-block-group-placeholder__variation-button" label={ `${ variation.title }: ${ variation.description }` } /> From 4bf53ef23e9dbefeebdac8a94b26c87e8eb2efce Mon Sep 17 00:00:00 2001 From: Nik Tsekouras Date: Fri, 9 Dec 2022 12:10:11 +0200 Subject: [PATCH 021/209] [Inserter]: Pattern title tooltip (#46419) * [Inserter]: Try pattern title tooltip * rename to `showTitlesAsTooltip` --- .../components/block-patterns-list/index.js | 71 ++++++++++++------- .../components/inserter/block-patterns-tab.js | 5 ++ .../src/components/inserter/menu.js | 1 + .../src/components/inserter/style.scss | 4 -- 4 files changed, 53 insertions(+), 28 deletions(-) diff --git a/packages/block-editor/src/components/block-patterns-list/index.js b/packages/block-editor/src/components/block-patterns-list/index.js index 925410e760f6a4..12b1d362a24fa1 100644 --- a/packages/block-editor/src/components/block-patterns-list/index.js +++ b/packages/block-editor/src/components/block-patterns-list/index.js @@ -6,6 +6,7 @@ import { __unstableComposite as Composite, __unstableUseCompositeState as useCompositeState, __unstableCompositeItem as CompositeItem, + Tooltip, } from '@wordpress/components'; import { useInstanceId } from '@wordpress/compose'; import { __ } from '@wordpress/i18n'; @@ -16,7 +17,20 @@ import { __ } from '@wordpress/i18n'; import BlockPreview from '../block-preview'; import InserterDraggableBlocks from '../inserter-draggable-blocks'; -function BlockPattern( { isDraggable, pattern, onClick, composite } ) { +const WithToolTip = ( { showTooltip, title, children } ) => { + if ( showTooltip ) { + return { children }; + } + return <>{ children }; +}; + +function BlockPattern( { + isDraggable, + pattern, + onClick, + composite, + showTooltip, +} ) { const { blocks, viewportWidth } = pattern; const instanceId = useInstanceId( BlockPattern ); const descriptionId = `block-editor-block-patterns-list__item-description-${ instanceId }`; @@ -34,30 +48,37 @@ function BlockPattern( { isDraggable, pattern, onClick, composite } ) { onDragStart={ onDragStart } onDragEnd={ onDragEnd } > - onClick( pattern, blocks ) } - aria-label={ pattern.title } - aria-describedby={ - pattern.description ? descriptionId : undefined - } + - -
- { pattern.title } -
- { !! pattern.description && ( - - { pattern.description } - - ) } -
+ onClick( pattern, blocks ) } + aria-label={ pattern.title } + aria-describedby={ + pattern.description ? descriptionId : undefined + } + > + + { ! showTooltip && ( +
+ { pattern.title } +
+ ) } + { !! pattern.description && ( + + { pattern.description } + + ) } +
+
) } @@ -77,6 +98,7 @@ function BlockPatternList( { onClickPattern, orientation, label = __( 'Block Patterns' ), + showTitlesAsTooltip, } ) { const composite = useCompositeState( { orientation } ); return ( @@ -95,6 +117,7 @@ function BlockPatternList( { onClick={ onClickPattern } isDraggable={ isDraggable } composite={ composite } + showTooltip={ showTitlesAsTooltip } /> ) : ( diff --git a/packages/block-editor/src/components/inserter/block-patterns-tab.js b/packages/block-editor/src/components/inserter/block-patterns-tab.js index f4d22efa7f6fc6..a1e9c839894650 100644 --- a/packages/block-editor/src/components/inserter/block-patterns-tab.js +++ b/packages/block-editor/src/components/inserter/block-patterns-tab.js @@ -83,6 +83,7 @@ export function BlockPatternsCategoryDialog( { rootClientId, onInsert, category, + showTitlesAsTooltip, } ) { const container = useRef(); @@ -103,6 +104,7 @@ export function BlockPatternsCategoryDialog( { rootClientId={ rootClientId } onInsert={ onInsert } category={ category } + showTitlesAsTooltip={ showTitlesAsTooltip } />
); @@ -112,6 +114,7 @@ export function BlockPatternsCategoryPanel( { rootClientId, onInsert, category, + showTitlesAsTooltip, } ) { const [ allPatterns, , onClick ] = usePatternsState( onInsert, @@ -161,6 +164,7 @@ export function BlockPatternsCategoryPanel( { orientation="vertical" category={ category.label } isDraggable + showTitlesAsTooltip={ showTitlesAsTooltip } />
); @@ -233,6 +237,7 @@ function BlockPatternsTabs( { onInsert={ onInsert } rootClientId={ rootClientId } category={ category } + showTitlesAsTooltip={ false } /> ) } diff --git a/packages/block-editor/src/components/inserter/menu.js b/packages/block-editor/src/components/inserter/menu.js index 830374f3de5649..beb97af1466987 100644 --- a/packages/block-editor/src/components/inserter/menu.js +++ b/packages/block-editor/src/components/inserter/menu.js @@ -293,6 +293,7 @@ function InserterMenu( rootClientId={ destinationRootClientId } onInsert={ onInsertPattern } category={ selectedPatternCategory } + showTitlesAsTooltip /> ) }
diff --git a/packages/block-editor/src/components/inserter/style.scss b/packages/block-editor/src/components/inserter/style.scss index 9abce3edfaac57..fe2f49ad7c9a3f 100644 --- a/packages/block-editor/src/components/inserter/style.scss +++ b/packages/block-editor/src/components/inserter/style.scss @@ -316,10 +316,6 @@ $block-inserter-tabs-height: 44px; box-shadow: 0 0 0 2px $gray-900, 0 15px 25px rgb(0 0 0 / 7%); } } - - .block-editor-block-patterns-list__item-title { - display: none; - } } .block-editor-inserter__patterns-category-panel { From 8810e56ccd4a8c131ef58f8910ebed905c593db9 Mon Sep 17 00:00:00 2001 From: George Mamadashvili Date: Fri, 9 Dec 2022 14:32:39 +0400 Subject: [PATCH 022/209] Query: Cleanup variation picker component (#46424) --- .../src/query/edit/query-placeholder.js | 20 ++++--------------- 1 file changed, 4 insertions(+), 16 deletions(-) diff --git a/packages/block-library/src/query/edit/query-placeholder.js b/packages/block-library/src/query/edit/query-placeholder.js index 8e1debe5341a61..fa1ef818e2f1f7 100644 --- a/packages/block-library/src/query/edit/query-placeholder.js +++ b/packages/block-library/src/query/edit/query-placeholder.js @@ -104,20 +104,8 @@ function QueryVariationPicker( { icon, label, } ) { - const { defaultVariation, scopeVariations } = useSelect( - ( select ) => { - const { - getBlockVariations, - getBlockType, - getDefaultBlockVariation, - } = select( blocksStore ); - - return { - blockType: getBlockType( name ), - defaultVariation: getDefaultBlockVariation( name, 'block' ), - scopeVariations: getBlockVariations( name, 'block' ), - }; - }, + const variations = useSelect( + ( select ) => select( blocksStore ).getBlockVariations( name, 'block' ), [ name ] ); const { replaceInnerBlocks } = useDispatch( blockEditorStore ); @@ -127,8 +115,8 @@ function QueryVariationPicker( { <__experimentalBlockVariationPicker icon={ icon } label={ label } - variations={ scopeVariations } - onSelect={ ( nextVariation = defaultVariation ) => { + variations={ variations } + onSelect={ ( nextVariation ) => { if ( nextVariation.attributes ) { setAttributes( { ...nextVariation.attributes, From abc4dbdb36dbc8a1c93644569e506ddacb0a5fa5 Mon Sep 17 00:00:00 2001 From: Jarda Snajdr Date: Fri, 9 Dec 2022 15:27:44 +0100 Subject: [PATCH 023/209] Check popover positioning by adding and testing is-positioned class (#46429) --- .../components/url-popover/test/__snapshots__/index.js.snap | 6 +++--- packages/components/src/popover/index.tsx | 1 + .../src/components/dot-tip/test/__snapshots__/index.js.snap | 2 +- test/unit/config/matchers/to-be-positioned-popover.js | 2 +- 4 files changed, 6 insertions(+), 5 deletions(-) diff --git a/packages/block-editor/src/components/url-popover/test/__snapshots__/index.js.snap b/packages/block-editor/src/components/url-popover/test/__snapshots__/index.js.snap index 023dd8769b783a..12c09f2c7c98ab 100644 --- a/packages/block-editor/src/components/url-popover/test/__snapshots__/index.js.snap +++ b/packages/block-editor/src/components/url-popover/test/__snapshots__/index.js.snap @@ -4,7 +4,7 @@ exports[`URLPopover matches the snapshot in its default state 1`] = `
@@ -52,7 +52,7 @@ exports[`URLPopover matches the snapshot when the settings are toggled open 1`]
@@ -107,7 +107,7 @@ exports[`URLPopover matches the snapshot when there are no settings 1`] = `
diff --git a/packages/components/src/popover/index.tsx b/packages/components/src/popover/index.tsx index 1d3b2af1dec1ae..c56d1f8475315a 100644 --- a/packages/components/src/popover/index.tsx +++ b/packages/components/src/popover/index.tsx @@ -472,6 +472,7 @@ const UnforwardedPopover = ( placement={ computedPlacement } className={ classnames( 'components-popover', className, { 'is-expanded': isExpanded, + 'is-positioned': x !== null && y !== null, // Use the 'alternate' classname for 'toolbar' variant for back compat. [ `is-${ computedVariant === 'toolbar' diff --git a/packages/nux/src/components/dot-tip/test/__snapshots__/index.js.snap b/packages/nux/src/components/dot-tip/test/__snapshots__/index.js.snap index 7d87549eac0aa1..876bae4b690887 100644 --- a/packages/nux/src/components/dot-tip/test/__snapshots__/index.js.snap +++ b/packages/nux/src/components/dot-tip/test/__snapshots__/index.js.snap @@ -3,7 +3,7 @@ exports[`DotTip should render correctly 1`] = `