From a8fa1f7f38ce463d35f6207233289c28867286cc Mon Sep 17 00:00:00 2001 From: Carlos Garcia Date: Thu, 23 Nov 2023 13:26:35 +0100 Subject: [PATCH 01/18] Release script: Update react-native-editor version to 1.109.0 --- packages/react-native-aztec/package.json | 2 +- packages/react-native-bridge/package.json | 2 +- packages/react-native-editor/package.json | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/packages/react-native-aztec/package.json b/packages/react-native-aztec/package.json index 996eeabaae1c1..631781600d78d 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.108.0", + "version": "1.109.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 927b2ef14ec3d..20ae851c89686 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.108.0", + "version": "1.109.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/package.json b/packages/react-native-editor/package.json index e00754eccec44..b599c2cc51c65 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.108.0", + "version": "1.109.0", "description": "Mobile WordPress gutenberg editor.", "author": "The WordPress Contributors", "license": "GPL-2.0-or-later", From a6f2d96d58c292e24a83c9654a439af95aca8cbe Mon Sep 17 00:00:00 2001 From: Carlos Garcia Date: Thu, 23 Nov 2023 13:26:35 +0100 Subject: [PATCH 02/18] Release script: Update CHANGELOG for version 1.109.0 --- packages/react-native-editor/CHANGELOG.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/packages/react-native-editor/CHANGELOG.md b/packages/react-native-editor/CHANGELOG.md index 2fef3d50be338..3b503649e6224 100644 --- a/packages/react-native-editor/CHANGELOG.md +++ b/packages/react-native-editor/CHANGELOG.md @@ -10,6 +10,8 @@ For each user feature we should also add a importance categorization label to i --> ## Unreleased + +## 1.109.0 - [*] Audio block: Improve legibility of audio file details on various background colors [#55627] ## 1.108.0 From 15d16aa039b6ae672f742e49ca8ba9f42356e4cd Mon Sep 17 00:00:00 2001 From: Carlos Garcia Date: Thu, 23 Nov 2023 13:27:45 +0100 Subject: [PATCH 03/18] Release script: Update podfile --- package-lock.json | 6 +++--- packages/react-native-editor/ios/Podfile.lock | 8 ++++---- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/package-lock.json b/package-lock.json index d82b2404c610e..563514c0afd10 100644 --- a/package-lock.json +++ b/package-lock.json @@ -56217,7 +56217,7 @@ }, "packages/react-native-aztec": { "name": "@wordpress/react-native-aztec", - "version": "1.108.0", + "version": "1.109.0", "license": "GPL-2.0-or-later", "dependencies": { "@wordpress/element": "file:../element", @@ -56230,7 +56230,7 @@ }, "packages/react-native-bridge": { "name": "@wordpress/react-native-bridge", - "version": "1.108.0", + "version": "1.109.0", "license": "GPL-2.0-or-later", "dependencies": { "@wordpress/react-native-aztec": "file:../react-native-aztec" @@ -56241,7 +56241,7 @@ }, "packages/react-native-editor": { "name": "@wordpress/react-native-editor", - "version": "1.108.0", + "version": "1.109.0", "hasInstallScript": true, "license": "GPL-2.0-or-later", "dependencies": { diff --git a/packages/react-native-editor/ios/Podfile.lock b/packages/react-native-editor/ios/Podfile.lock index 95decffb6206d..d6f0ca39a09bf 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.71.11) - fmt (6.2.1) - glog (0.3.5) - - Gutenberg (1.108.0): + - Gutenberg (1.109.0): - React-Core (= 0.71.11) - React-CoreModules (= 0.71.11) - React-RCTImage (= 0.71.11) @@ -429,7 +429,7 @@ PODS: - React-RCTImage - RNSVG (13.9.0): - React-Core - - RNTAztecView (1.108.0): + - RNTAztecView (1.109.0): - React-Core - WordPress-Aztec-iOS (= 1.19.9) - SDWebImage (5.11.1): @@ -617,7 +617,7 @@ SPEC CHECKSUMS: FBReactNativeSpec: f07662560742d82a5b73cee116c70b0b49bcc220 fmt: ff9d55029c625d3757ed641535fd4a75fedc7ce9 glog: 04b94705f318337d7ead9e6d17c019bd9b1f6b1b - Gutenberg: c765216d64630eb86d053ff53214abaedbd5f535 + Gutenberg: dd556a8be3f8b5225862823f050e57d0a22e0614 hermes-engine: 34c863b446d0135b85a6536fa5fd89f48196f848 libevent: 4049cae6c81cdb3654a443be001fb9bdceff7913 libwebp: 60305b2e989864154bd9be3d772730f08fc6a59c @@ -662,7 +662,7 @@ SPEC CHECKSUMS: RNReanimated: d4f363f4987ae0ade3e36ff81c94e68261bf4b8d RNScreens: 68fd1060f57dd1023880bf4c05d74784b5392789 RNSVG: 53c661b76829783cdaf9b7a57258f3d3b4c28315 - RNTAztecView: dfa8817995fc92b8a0ba755763aab77445650c91 + RNTAztecView: 8415d8e322e98d087b3f8fbba0669e84d6b235cb SDWebImage: a7f831e1a65eb5e285e3fb046a23fcfbf08e696d SDWebImageWebPCoder: 908b83b6adda48effe7667cd2b7f78c897e5111d WordPress-Aztec-iOS: fbebd569c61baa252b3f5058c0a2a9a6ada686bb From 6f5b6ae648ff249c06033a03c505decc4b16518d Mon Sep 17 00:00:00 2001 From: Carlos Garcia Date: Thu, 23 Nov 2023 13:40:30 +0100 Subject: [PATCH 04/18] Update `react-native-editor` changelog --- packages/react-native-editor/CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/packages/react-native-editor/CHANGELOG.md b/packages/react-native-editor/CHANGELOG.md index 3b503649e6224..9b892e4389c54 100644 --- a/packages/react-native-editor/CHANGELOG.md +++ b/packages/react-native-editor/CHANGELOG.md @@ -13,6 +13,7 @@ For each user feature we should also add a importance categorization label to i ## 1.109.0 - [*] Audio block: Improve legibility of audio file details on various background colors [#55627] +- [*] Fix ungroup functionality in `WarningMaxDepthExceeded` component [#56445] ## 1.108.0 - [*] Fix error when pasting deeply nested structure content [#55613] From 134ce476da601811eea9ce653e8e565ae951d8a7 Mon Sep 17 00:00:00 2001 From: Carlos Garcia Date: Fri, 24 Nov 2023 11:14:19 +0100 Subject: [PATCH 05/18] Update `react-native-editor` changelog --- packages/react-native-editor/CHANGELOG.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/react-native-editor/CHANGELOG.md b/packages/react-native-editor/CHANGELOG.md index 9b892e4389c54..635937c4d8ce0 100644 --- a/packages/react-native-editor/CHANGELOG.md +++ b/packages/react-native-editor/CHANGELOG.md @@ -13,7 +13,7 @@ For each user feature we should also add a importance categorization label to i ## 1.109.0 - [*] Audio block: Improve legibility of audio file details on various background colors [#55627] -- [*] Fix ungroup functionality in `WarningMaxDepthExceeded` component [#56445] +- [*] In the deeply nested block warning, only display the ungroup option for blocks that support it [#56445] ## 1.108.0 - [*] Fix error when pasting deeply nested structure content [#55613] From e3560fb4db47bbf88ae83b5908133f0da2babf04 Mon Sep 17 00:00:00 2001 From: Gerardo Pacheco Date: Tue, 28 Nov 2023 17:17:36 +0100 Subject: [PATCH 06/18] Mobile - Fix issue when backspacing in an empty Paragraph block (#56496) * Bring changes from #55134 to the mobile code * Mobile - RichText - Force focus when the block is selected but the textinput is not, for cases when merging blocks. * Update Buttons integration test due to a change in the logic of the app where deleting the only button available does not remove the block * Mobile - Heading block - Adds integration test for merging a Heading block with an empty Paragraph block * Mobile - Paragraph block - Adds integration test to check that backspacing in an empty Paragraph block merges succesfully with the previous block and keeps the focus on the TextInput * Mobile - RichText - Set selection values to be the last character position when merging and adds some comments to explain what is doing * Mobile - Paragraph block test - Use focusTextInput to check the TextInput is in focused instead of checking for the fomatting toolbar button * Rename shouldFocusTextInputAfterUpdate to shouldFocusTextInputAfterMerge * Update CHANGELOG --- .../src/components/block-list/block.native.js | 2 + .../src/components/rich-text/index.native.js | 2 +- .../rich-text/native/index.native.js | 47 ++++++++++++++++++- .../test/__snapshots__/edit.native.js.snap | 6 --- .../src/buttons/test/edit.native.js | 27 ----------- .../test/__snapshots__/index.native.js.snap | 6 +++ .../src/heading/test/index.native.js | 40 ++++++++++++++++ .../src/paragraph/test/edit.native.js | 38 ++++++++++++++- packages/react-native-editor/CHANGELOG.md | 1 + .../integration-test-helpers/add-block.js | 8 ++-- 10 files changed, 136 insertions(+), 41 deletions(-) diff --git a/packages/block-editor/src/components/block-list/block.native.js b/packages/block-editor/src/components/block-list/block.native.js index c6cce290985c2..03a84d530ba12 100644 --- a/packages/block-editor/src/components/block-list/block.native.js +++ b/packages/block-editor/src/components/block-list/block.native.js @@ -605,6 +605,8 @@ const applyWithDispatch = withDispatch( ( dispatch, ownProps, registry ) => { } moveFirstItemUp( rootClientId ); + } else { + removeBlock( clientId ); } } }, diff --git a/packages/block-editor/src/components/rich-text/index.native.js b/packages/block-editor/src/components/rich-text/index.native.js index aab10e9ab6547..9427962eced19 100644 --- a/packages/block-editor/src/components/rich-text/index.native.js +++ b/packages/block-editor/src/components/rich-text/index.native.js @@ -223,7 +223,7 @@ function RichTextWrapper( // an intentional user interaction distinguishing between Backspace and // Delete to remove the empty field, but also to avoid merge & remove // causing destruction of two fields (merge, then removed merged). - if ( onRemove && isEmpty( value ) && isReverse ) { + else if ( onRemove && isEmpty( value ) && isReverse ) { onRemove( ! isReverse ); } }, diff --git a/packages/block-editor/src/components/rich-text/native/index.native.js b/packages/block-editor/src/components/rich-text/native/index.native.js index 2381b9809eca8..ab465b2441154 100644 --- a/packages/block-editor/src/components/rich-text/native/index.native.js +++ b/packages/block-editor/src/components/rich-text/native/index.native.js @@ -650,6 +650,40 @@ export class RichText extends Component { return shouldDrop; } + /** + * Determines whether the text input should receive focus after an update. + * For cases where a RichText with a value is merged with an empty one. + * + * @param {Object} prevProps - The previous props of the component. + * @return {boolean} True if the text input should receive focus, false otherwise. + */ + shouldFocusTextInputAfterMerge( prevProps ) { + const { + __unstableIsSelected: isSelected, + blockIsSelected, + selectionStart, + selectionEnd, + __unstableMobileNoFocusOnMount, + } = this.props; + + const { + __unstableIsSelected: prevIsSelected, + blockIsSelected: prevBlockIsSelected, + } = prevProps; + + const noSelectionValues = + selectionStart === undefined && selectionEnd === undefined; + const textInputWasNotFocused = ! prevIsSelected && ! isSelected; + + return ( + ! __unstableMobileNoFocusOnMount && + noSelectionValues && + textInputWasNotFocused && + ! prevBlockIsSelected && + blockIsSelected + ); + } + onSelectionChangeFromAztec( start, end, text, event ) { if ( this.shouldDropEventFromAztec( event, 'onSelectionChange' ) ) { return; @@ -843,9 +877,8 @@ export class RichText extends Component { if ( this.props.value !== this.value ) { this.value = this.props.value; } - const { __unstableIsSelected: isSelected } = this.props; - const { __unstableIsSelected: prevIsSelected } = prevProps; + const { __unstableIsSelected: isSelected } = this.props; if ( isSelected && ! prevIsSelected ) { this._editor.focus(); @@ -855,6 +888,16 @@ export class RichText extends Component { this.props.selectionStart || 0, this.props.selectionEnd || 0 ); + } else if ( this.shouldFocusTextInputAfterMerge( prevProps ) ) { + // Since this is happening when merging blocks, the selection should be at the last character position. + // As a fallback the internal selectionEnd value is used. + const lastCharacterPosition = + this.value?.length ?? this.selectionEnd; + this._editor.focus(); + this.props.onSelectionChange( + lastCharacterPosition, + lastCharacterPosition + ); } else if ( ! isSelected && prevIsSelected ) { this._editor.blur(); } diff --git a/packages/block-library/src/buttons/test/__snapshots__/edit.native.js.snap b/packages/block-library/src/buttons/test/__snapshots__/edit.native.js.snap index 25867634d12d8..1a55c807225d9 100644 --- a/packages/block-library/src/buttons/test/__snapshots__/edit.native.js.snap +++ b/packages/block-library/src/buttons/test/__snapshots__/edit.native.js.snap @@ -71,9 +71,3 @@ exports[`Buttons block when a button is shown removing button along with buttons

" `; - -exports[`Buttons block when a button is shown removing button along with buttons block removes the button and buttons block when deleting the block using the delete (backspace) key 1`] = ` -" -

-" -`; diff --git a/packages/block-library/src/buttons/test/edit.native.js b/packages/block-library/src/buttons/test/edit.native.js index 2fe70d034aa74..f393a31c7330a 100644 --- a/packages/block-library/src/buttons/test/edit.native.js +++ b/packages/block-library/src/buttons/test/edit.native.js @@ -18,7 +18,6 @@ import { */ import { getBlockTypes, unregisterBlockType } from '@wordpress/blocks'; import { registerCoreBlocks } from '@wordpress/block-library'; -import { BACKSPACE } from '@wordpress/keycodes'; const BUTTONS_HTML = `
@@ -238,32 +237,6 @@ describe( 'Buttons block', () => { expect( getEditorHtml() ).toMatchSnapshot(); } ); - - it( 'removes the button and buttons block when deleting the block using the delete (backspace) key', async () => { - const screen = await initializeEditor( { - initialHtml: BUTTONS_HTML, - } ); - - // Get block - const buttonsBlock = await getBlock( screen, 'Buttons' ); - triggerBlockListLayout( buttonsBlock ); - - // Get inner button block - const buttonBlock = await getBlock( screen, 'Button' ); - fireEvent.press( buttonBlock ); - - const buttonInput = - within( buttonBlock ).getByLabelText( 'Text input. Empty' ); - - // Delete block - fireEvent( buttonInput, 'onKeyDown', { - nativeEvent: {}, - preventDefault() {}, - keyCode: BACKSPACE, - } ); - - expect( getEditorHtml() ).toMatchSnapshot(); - } ); } ); } ); diff --git a/packages/block-library/src/heading/test/__snapshots__/index.native.js.snap b/packages/block-library/src/heading/test/__snapshots__/index.native.js.snap index 308aa8ac729bf..c0397e823d451 100644 --- a/packages/block-library/src/heading/test/__snapshots__/index.native.js.snap +++ b/packages/block-library/src/heading/test/__snapshots__/index.native.js.snap @@ -6,6 +6,12 @@ exports[`Heading block inserts block 1`] = ` " `; +exports[`Heading block should merge with an empty Paragraph block and keep being the Heading block 1`] = ` +" +

A quick brown fox jumps over the lazy dog.

+" +`; + exports[`Heading block should set a background color 1`] = ` "

A quick brown fox jumps over the lazy dog.

diff --git a/packages/block-library/src/heading/test/index.native.js b/packages/block-library/src/heading/test/index.native.js index 5b7abbc91ad94..1582e96aae0f4 100644 --- a/packages/block-library/src/heading/test/index.native.js +++ b/packages/block-library/src/heading/test/index.native.js @@ -17,6 +17,7 @@ import { */ import { getBlockTypes, unregisterBlockType } from '@wordpress/blocks'; import { registerCoreBlocks } from '@wordpress/block-library'; +import { BACKSPACE, ENTER } from '@wordpress/keycodes'; beforeAll( () => { // Register all core blocks @@ -134,4 +135,43 @@ describe( 'Heading block', () => { ) ).toBeVisible(); } ); + + it( 'should merge with an empty Paragraph block and keep being the Heading block', async () => { + // Arrange + const screen = await initializeEditor(); + await addBlock( screen, 'Paragraph' ); + + // Act + const paragraphBlock = getBlock( screen, 'Paragraph' ); + fireEvent.press( paragraphBlock ); + + const paragraphTextInput = + within( paragraphBlock ).getByPlaceholderText( 'Start writing…' ); + fireEvent( paragraphTextInput, 'onKeyDown', { + nativeEvent: {}, + preventDefault() {}, + keyCode: ENTER, + } ); + + await addBlock( screen, 'Heading' ); + const headingBlock = getBlock( screen, 'Heading', { rowIndex: 2 } ); + fireEvent.press( headingBlock ); + + const headingTextInput = + within( headingBlock ).getByPlaceholderText( 'Heading' ); + typeInRichText( + headingTextInput, + 'A quick brown fox jumps over the lazy dog.', + { finalSelectionStart: 0, finalSelectionEnd: 0 } + ); + + fireEvent( headingTextInput, 'onKeyDown', { + nativeEvent: {}, + preventDefault() {}, + keyCode: BACKSPACE, + } ); + + // Assert + expect( getEditorHtml() ).toMatchSnapshot(); + } ); } ); diff --git a/packages/block-library/src/paragraph/test/edit.native.js b/packages/block-library/src/paragraph/test/edit.native.js index 8220ad0888c79..fdb082246171b 100644 --- a/packages/block-library/src/paragraph/test/edit.native.js +++ b/packages/block-library/src/paragraph/test/edit.native.js @@ -17,11 +17,12 @@ import { waitForElementToBeRemoved, } from 'test/helpers'; import Clipboard from '@react-native-clipboard/clipboard'; +import TextInputState from 'react-native/Libraries/Components/TextInput/TextInputState'; /** * WordPress dependencies */ -import { ENTER } from '@wordpress/keycodes'; +import { BACKSPACE, ENTER } from '@wordpress/keycodes'; /** * Internal dependencies @@ -685,4 +686,39 @@ describe( 'Paragraph block', () => { " ` ); } ); + + it( 'should focus on the previous Paragraph block when backspacing in an empty Paragraph block', async () => { + // Arrange + const screen = await initializeEditor(); + await addBlock( screen, 'Paragraph' ); + + // Act + const paragraphBlock = getBlock( screen, 'Paragraph' ); + fireEvent.press( paragraphBlock ); + const paragraphTextInput = + within( paragraphBlock ).getByPlaceholderText( 'Start writing…' ); + typeInRichText( paragraphTextInput, 'A quick brown fox jumps' ); + + await addBlock( screen, 'Paragraph' ); + const secondParagraphBlock = getBlock( screen, 'Paragraph', { + rowIndex: 2, + } ); + fireEvent.press( secondParagraphBlock ); + + // Clear mock history + TextInputState.focusTextInput.mockClear(); + + const secondParagraphTextInput = + within( secondParagraphBlock ).getByPlaceholderText( + 'Start writing…' + ); + fireEvent( secondParagraphTextInput, 'onKeyDown', { + nativeEvent: {}, + preventDefault() {}, + keyCode: BACKSPACE, + } ); + + // Assert + expect( TextInputState.focusTextInput ).toHaveBeenCalled(); + } ); } ); diff --git a/packages/react-native-editor/CHANGELOG.md b/packages/react-native-editor/CHANGELOG.md index 635937c4d8ce0..4e509a232b3e5 100644 --- a/packages/react-native-editor/CHANGELOG.md +++ b/packages/react-native-editor/CHANGELOG.md @@ -10,6 +10,7 @@ For each user feature we should also add a importance categorization label to i --> ## Unreleased +- [***] Fix issue when backspacing in an empty Paragraph block [#56496] ## 1.109.0 - [*] Audio block: Improve legibility of audio file details on various background colors [#55627] diff --git a/test/native/integration-test-helpers/add-block.js b/test/native/integration-test-helpers/add-block.js index 5a15cb59fc6e1..eded603829c48 100644 --- a/test/native/integration-test-helpers/add-block.js +++ b/test/native/integration-test-helpers/add-block.js @@ -6,7 +6,7 @@ import { Platform } from '@wordpress/element'; /** * External dependencies */ -import { act, fireEvent } from '@testing-library/react-native'; +import { act, fireEvent, within } from '@testing-library/react-native'; import { AccessibilityInfo } from 'react-native'; /** @@ -31,9 +31,9 @@ export const addBlock = async ( fireEvent.press( screen.getByLabelText( 'Add block' ) ); } - const blockList = screen.getByTestId( 'InserterUI-Blocks' ); + const inserterModal = screen.getByTestId( 'InserterUI-Blocks' ); // onScroll event used to force the FlatList to render all items - fireEvent.scroll( blockList, { + fireEvent.scroll( inserterModal, { nativeEvent: { contentOffset: { y: 0, x: 0 }, contentSize: { width: 100, height: 100 }, @@ -41,7 +41,7 @@ export const addBlock = async ( }, } ); - const blockButton = await screen.findByText( blockName ); + const blockButton = await within( inserterModal ).findByText( blockName ); // Blocks can perform belated state updates after they are inserted. // To avoid potential `act` warnings, we ensure that all timers and queued // microtasks are executed. From 290d21d22386ce9a92832ebec97091d04755a405 Mon Sep 17 00:00:00 2001 From: Gerardo Date: Wed, 29 Nov 2023 15:08:47 +0100 Subject: [PATCH 07/18] Release script: Update react-native-editor version to 1.109.1 --- packages/react-native-aztec/package.json | 2 +- packages/react-native-bridge/package.json | 2 +- packages/react-native-editor/package.json | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/packages/react-native-aztec/package.json b/packages/react-native-aztec/package.json index 631781600d78d..e814be90943a7 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.109.0", + "version": "1.109.1", "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 20ae851c89686..ca7cfc3de79bc 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.109.0", + "version": "1.109.1", "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/package.json b/packages/react-native-editor/package.json index b599c2cc51c65..aa41fc9ffa1af 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.109.0", + "version": "1.109.1", "description": "Mobile WordPress gutenberg editor.", "author": "The WordPress Contributors", "license": "GPL-2.0-or-later", From aaf04bbfc2560ccbacba8ae68a2485efe60abd61 Mon Sep 17 00:00:00 2001 From: Gerardo Date: Wed, 29 Nov 2023 15:11:25 +0100 Subject: [PATCH 08/18] Release script: Update CHANGELOG for version 1.109.1 --- packages/react-native-editor/CHANGELOG.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/packages/react-native-editor/CHANGELOG.md b/packages/react-native-editor/CHANGELOG.md index 4e509a232b3e5..9a11959ef1379 100644 --- a/packages/react-native-editor/CHANGELOG.md +++ b/packages/react-native-editor/CHANGELOG.md @@ -10,6 +10,8 @@ For each user feature we should also add a importance categorization label to i --> ## Unreleased + +## 1.109.1 - [***] Fix issue when backspacing in an empty Paragraph block [#56496] ## 1.109.0 From 67f099eb5768e56b3dcf425cef52a244454efc2b Mon Sep 17 00:00:00 2001 From: Gerardo Date: Wed, 29 Nov 2023 15:14:34 +0100 Subject: [PATCH 09/18] Release script: Update podfile --- package-lock.json | 6 +++--- packages/react-native-editor/ios/Podfile.lock | 8 ++++---- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/package-lock.json b/package-lock.json index 563514c0afd10..0b66a01c24985 100644 --- a/package-lock.json +++ b/package-lock.json @@ -56217,7 +56217,7 @@ }, "packages/react-native-aztec": { "name": "@wordpress/react-native-aztec", - "version": "1.109.0", + "version": "1.109.1", "license": "GPL-2.0-or-later", "dependencies": { "@wordpress/element": "file:../element", @@ -56230,7 +56230,7 @@ }, "packages/react-native-bridge": { "name": "@wordpress/react-native-bridge", - "version": "1.109.0", + "version": "1.109.1", "license": "GPL-2.0-or-later", "dependencies": { "@wordpress/react-native-aztec": "file:../react-native-aztec" @@ -56241,7 +56241,7 @@ }, "packages/react-native-editor": { "name": "@wordpress/react-native-editor", - "version": "1.109.0", + "version": "1.109.1", "hasInstallScript": true, "license": "GPL-2.0-or-later", "dependencies": { diff --git a/packages/react-native-editor/ios/Podfile.lock b/packages/react-native-editor/ios/Podfile.lock index d6f0ca39a09bf..dd3021ab8a6db 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.71.11) - fmt (6.2.1) - glog (0.3.5) - - Gutenberg (1.109.0): + - Gutenberg (1.109.1): - React-Core (= 0.71.11) - React-CoreModules (= 0.71.11) - React-RCTImage (= 0.71.11) @@ -429,7 +429,7 @@ PODS: - React-RCTImage - RNSVG (13.9.0): - React-Core - - RNTAztecView (1.109.0): + - RNTAztecView (1.109.1): - React-Core - WordPress-Aztec-iOS (= 1.19.9) - SDWebImage (5.11.1): @@ -617,7 +617,7 @@ SPEC CHECKSUMS: FBReactNativeSpec: f07662560742d82a5b73cee116c70b0b49bcc220 fmt: ff9d55029c625d3757ed641535fd4a75fedc7ce9 glog: 04b94705f318337d7ead9e6d17c019bd9b1f6b1b - Gutenberg: dd556a8be3f8b5225862823f050e57d0a22e0614 + Gutenberg: ce2b737d183d0179cb86596412bad21d48eafdcb hermes-engine: 34c863b446d0135b85a6536fa5fd89f48196f848 libevent: 4049cae6c81cdb3654a443be001fb9bdceff7913 libwebp: 60305b2e989864154bd9be3d772730f08fc6a59c @@ -662,7 +662,7 @@ SPEC CHECKSUMS: RNReanimated: d4f363f4987ae0ade3e36ff81c94e68261bf4b8d RNScreens: 68fd1060f57dd1023880bf4c05d74784b5392789 RNSVG: 53c661b76829783cdaf9b7a57258f3d3b4c28315 - RNTAztecView: 8415d8e322e98d087b3f8fbba0669e84d6b235cb + RNTAztecView: 8d9b3bd517873101ab1ea89948b45c601bcedea0 SDWebImage: a7f831e1a65eb5e285e3fb046a23fcfbf08e696d SDWebImageWebPCoder: 908b83b6adda48effe7667cd2b7f78c897e5111d WordPress-Aztec-iOS: fbebd569c61baa252b3f5058c0a2a9a6ada686bb From 3d42ef9f89920a360c028a7631fec372383d4814 Mon Sep 17 00:00:00 2001 From: Carlos Garcia Date: Thu, 30 Nov 2023 18:34:23 +0100 Subject: [PATCH 10/18] [RNMobile] Fixes a crash on pasting MS Word list markup (#56653) * Add polyfill for Element.prototype.remove * Enable unit tests of `raw-handling` API filter `ms-list-converter` * Update `react-native-editor` changelog --- packages/react-native-editor/CHANGELOG.md | 1 + packages/react-native-editor/src/jsdom-patches.js | 12 ++++++++++++ test/native/jest.config.js | 1 - 3 files changed, 13 insertions(+), 1 deletion(-) diff --git a/packages/react-native-editor/CHANGELOG.md b/packages/react-native-editor/CHANGELOG.md index 9a11959ef1379..2a922b873e240 100644 --- a/packages/react-native-editor/CHANGELOG.md +++ b/packages/react-native-editor/CHANGELOG.md @@ -13,6 +13,7 @@ For each user feature we should also add a importance categorization label to i ## 1.109.1 - [***] Fix issue when backspacing in an empty Paragraph block [#56496] +- [**] Fixes a crash on pasting MS Word list markup [#56653] ## 1.109.0 - [*] Audio block: Improve legibility of audio file details on various background colors [#55627] diff --git a/packages/react-native-editor/src/jsdom-patches.js b/packages/react-native-editor/src/jsdom-patches.js index f33dd892f8c18..c86e4c82f3127 100644 --- a/packages/react-native-editor/src/jsdom-patches.js +++ b/packages/react-native-editor/src/jsdom-patches.js @@ -171,6 +171,18 @@ Element.prototype.closest = function ( selector ) { return null; }; +/** + * Implementation of Element.prototype.remove based on polyfills: + * - https://github.com/chenzhenxi/element-remove/blob/master/index.js + * (referenced in https://developer.mozilla.org/en-US/docs/Web/API/Element/remove#see_also) + * - https://github.com/JakeChampion/polyfill-library/blob/master/polyfills/Element/prototype/remove/polyfill.js + */ +Element.prototype.remove = function () { + if ( this.parentNode ) { + this.parentNode.removeChild( this ); + } +}; + /** * Helper function to check if a node implements the NonDocumentTypeChildNode * interface diff --git a/test/native/jest.config.js b/test/native/jest.config.js index ad5c794ebbce8..4859ea597e0f6 100644 --- a/test/native/jest.config.js +++ b/test/native/jest.config.js @@ -24,7 +24,6 @@ const transpiledPackageNames = glob( 'packages/*/src/index.{js,ts}' ).map( const RAW_HANDLING_UNSUPPORTED_UNIT_TESTS = [ 'html-formatting-remover', 'phrasing-content-reducer', - 'ms-list-converter', 'figure-content-reducer', 'special-comment-converter', 'normalise-blocks', From 99deadc33fa30dc0552eeb5017c0250e020dcdad Mon Sep 17 00:00:00 2001 From: Carlos Garcia Date: Fri, 1 Dec 2023 16:37:08 +0100 Subject: [PATCH 11/18] [RNMobile] Fix issue related to receiving undefined ref in text color format (#56686) * Fix issue related to receiving undefined ref in text color format In rare cases, `TextColorEdit` might receive the `RichText` ref as undefined. This ref is used to get the background color of the text and use it in the toolbar button. * Update `react-native-editor` changelog * Add test to cover undefined `contentRef` case * Correct typo in `changelog` --- .../src/text-color/index.native.js | 4 +- .../src/text-color/test/index.native.js | 64 ++++++++++++++++++- packages/react-native-editor/CHANGELOG.md | 1 + 3 files changed, 64 insertions(+), 5 deletions(-) diff --git a/packages/format-library/src/text-color/index.native.js b/packages/format-library/src/text-color/index.native.js index 7c44e4efc001a..c19f2a3700ea7 100644 --- a/packages/format-library/src/text-color/index.native.js +++ b/packages/format-library/src/text-color/index.native.js @@ -33,9 +33,7 @@ const name = 'core/text-color'; const title = __( 'Text color' ); function getComputedStyleProperty( element, property ) { - const { - props: { style = {} }, - } = element; + const style = element?.props?.style ?? {}; if ( property === 'background-color' ) { const { backgroundColor, baseColors } = style; diff --git a/packages/format-library/src/text-color/test/index.native.js b/packages/format-library/src/text-color/test/index.native.js index c7350cfe4bb6c..9a148dec4358b 100644 --- a/packages/format-library/src/text-color/test/index.native.js +++ b/packages/format-library/src/text-color/test/index.native.js @@ -2,17 +2,29 @@ * External dependencies */ import { + fireEvent, getEditorHtml, initializeEditor, - fireEvent, + render, waitFor, } from 'test/helpers'; /** * WordPress dependencies */ -import { setDefaultBlockName, unregisterBlockType } from '@wordpress/blocks'; +import { + registerBlockType, + setDefaultBlockName, + unregisterBlockType, +} from '@wordpress/blocks'; import { coreBlocks } from '@wordpress/block-library'; +import { BlockControls, BlockEdit } from '@wordpress/block-editor'; +import { SlotFillProvider } from '@wordpress/components'; + +/** + * Internal dependencies + */ +import { textColor } from '..'; const COLOR_PINK = '#f78da7'; const paragraph = coreBlocks[ 'core/paragraph' ]; @@ -164,4 +176,52 @@ describe( 'Text color', () => { expect( getEditorHtml() ).toMatchSnapshot(); } ); + + it( 'renders when "contentRef" is undefined', () => { + registerBlockType( 'core/test-block', { + save: () => {}, + category: 'text', + title: 'block title', + edit: ( { children } ) => <>{ children }, + } ); + const TextColorEdit = textColor.edit; + // Empty text with black color set as the text color + const textValue = { + formats: [], + replacements: [], + text: '', + start: 0, + end: 0, + activeFormats: [ + { + type: 'core/text-color', + attributes: { + style: 'background-color:rgba(0, 0, 0, 0);color:#111111', + class: 'has-contrast-color', + }, + }, + ], + }; + + const { getByLabelText } = render( + + + + + + + ); + + const textColorButton = getByLabelText( 'Text color' ); + expect( textColorButton ).toBeDefined(); + } ); } ); diff --git a/packages/react-native-editor/CHANGELOG.md b/packages/react-native-editor/CHANGELOG.md index 2a922b873e240..8da935f0f965d 100644 --- a/packages/react-native-editor/CHANGELOG.md +++ b/packages/react-native-editor/CHANGELOG.md @@ -13,6 +13,7 @@ For each user feature we should also add a importance categorization label to i ## 1.109.1 - [***] Fix issue when backspacing in an empty Paragraph block [#56496] +- [**] Fix issue related to text color format and receiving in rare cases an undefined ref from `RichText` component [#56686] - [**] Fixes a crash on pasting MS Word list markup [#56653] ## 1.109.0 From 8c82075950e9fcc4f68b9bb4e9a399e7b89dc10e Mon Sep 17 00:00:00 2001 From: Carlos Garcia Date: Mon, 4 Dec 2023 11:56:38 +0100 Subject: [PATCH 12/18] [RNMobile] Fix HTML to blocks conversion when no transformations are available (#56723) * Add native workaround for HTML block in `htmlToBlocks` * Add raw handling tests This file is a clone of the same `blocks-raw-handling.js` file located in `gutenberg/test/integration`. The reason for the separation is that several of the test cases fail in the native version. For now, we are going to skip them, but we'd need to work on them in the future. Once all issues in tests are addressed, we'll remove this file in favor of the original one. * Update blocks raw handling test snapshot with original values * Disable more pasteHandler test cases due to not matching test snapshot * Comment obsolete snapshots of blocks raw handling tests The reason for commenting them instead of removing is that, in the future, we'll restore them once we address the failing test cases. --- .../src/api/raw-handling/html-to-blocks.js | 13 + .../blocks-raw-handling.native.js.snap | 212 +++++++ .../integration/blocks-raw-handling.native.js | 587 ++++++++++++++++++ 3 files changed, 812 insertions(+) create mode 100644 test/native/integration/__snapshots__/blocks-raw-handling.native.js.snap create mode 100644 test/native/integration/blocks-raw-handling.native.js diff --git a/packages/blocks/src/api/raw-handling/html-to-blocks.js b/packages/blocks/src/api/raw-handling/html-to-blocks.js index 18630a9abdce4..1ee2bdc263126 100644 --- a/packages/blocks/src/api/raw-handling/html-to-blocks.js +++ b/packages/blocks/src/api/raw-handling/html-to-blocks.js @@ -1,7 +1,13 @@ +/** + * WordPress dependencies + */ +import { Platform } from '@wordpress/element'; + /** * Internal dependencies */ import { createBlock, findTransform } from '../factory'; +import parse from '../parser'; import { getBlockAttributes } from '../parser/get-block-attributes'; import { getRawTransforms } from './get-raw-transforms'; @@ -28,6 +34,13 @@ export function htmlToBlocks( html, handler ) { ); if ( ! rawTransform ) { + // Until the HTML block is supported in the native version, we'll parse it + // instead of creating the block to generate it as an unsupported block. + if ( Platform.isNative ) { + return parse( + `${ node.outerHTML }` + ); + } return createBlock( // Should not be hardcoded. 'core/html', diff --git a/test/native/integration/__snapshots__/blocks-raw-handling.native.js.snap b/test/native/integration/__snapshots__/blocks-raw-handling.native.js.snap new file mode 100644 index 0000000000000..75d8caebbe31e --- /dev/null +++ b/test/native/integration/__snapshots__/blocks-raw-handling.native.js.snap @@ -0,0 +1,212 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP + +/* +exports[`Blocks raw handling pasteHandler apple 1`] = `"This is a title


This is a heading


This is a paragraph with a link.


A
Bulleted
Indented
List


One
Two
Three


One
Two
Three
1
2
3
I
II
III


An image:
"`; + +exports[`Blocks raw handling pasteHandler classic 1`] = `"First paragraph

Second paragraph
Third paragraph
Fourth paragraph
Fifth paragraph
Sixth paragraph"`; + +exports[`Blocks raw handling pasteHandler evernote 1`] = `"This is a paragraph.


This is a link.


An
Unordered
Indented
List


One
Two
Indented
Three






One
Two
Three
Four
Five
Six
"`; + +exports[`Blocks raw handling pasteHandler google-docs 1`] = `"This is a title

This is a heading

Formatting test: bold, italic, link, strikethrough, superscript, subscript, nested.

A
Bulleted
Indented
List

One
Two
Three




One
Two
Three
1
2
3
I
II
III





An image:


"`; + +exports[`Blocks raw handling pasteHandler google-docs-list-only 1`] = `"My first list item
A sub list item
A second sub list item
My second list item
My third list item"`; + +exports[`Blocks raw handling pasteHandler google-docs-table 1`] = `"



One
Two
Three
1
2
3
I
II
III"`; + +exports[`Blocks raw handling pasteHandler google-docs-table-with-colspan 1`] = `"

Test colspan

"`; + +exports[`Blocks raw handling pasteHandler google-docs-table-with-comments 1`] = `"



One
Two
Three
1
2
3
I
II
III"`; + +exports[`Blocks raw handling pasteHandler google-docs-table-with-rowspan 1`] = `"

Test rowspan

"`; + +exports[`Blocks raw handling pasteHandler google-docs-with-comments 1`] = `"This is a title

This is a heading

Formatting test: bold, italic, link, strikethrough, superscript, subscript, nested.

A
Bulleted
Indented
List

One
Two
Three




One
Two
Three
1
2
3
I
II
III





An image:



"`; +*/ + +exports[`Blocks raw handling pasteHandler gutenberg 1`] = `"Test"`; + +exports[`Blocks raw handling pasteHandler iframe-embed 1`] = `""`; + +/* +exports[`Blocks raw handling pasteHandler markdown 1`] = `"This is a heading with italic
This is a paragraph with a link, bold, and strikethrough.
Preserve
line breaks please.
Lists
A
Bulleted Indented
List
One
Two
Three
Table
First Header
Second Header
Content from cell 1
Content from cell 2
Content in the first column
Content in the second column



Table with empty cells.
Quote
First
Second
Code
Inline code tags should work.
This is a code block."`; + +exports[`Blocks raw handling pasteHandler ms-word 1`] = `"This is a title
 
This is a subtitle
 
This is a heading level 1
 
This is a heading level 2
 
This is a paragraph with a link.
 
A
Bulleted
Indented
List
 
One
Two
Three
 
One
Two
Three
1
2
3
I
II
III
 
An image:
 

This is an anchor link that leads to the next paragraph.
This is the paragraph with the anchor.
This is an anchor link that leads nowhere.
This is a paragraph with an anchor with no link pointing to it.
This is a reference to a footnote[1].
This is a reference to an endnote[i].


[1] This is a footnote.


[i] This is an endnote."`; + +exports[`Blocks raw handling pasteHandler ms-word-list 1`] = `"This is a headline?
This is a text:
One
Two
Three
Lorem Ipsum.
 "`; + +exports[`Blocks raw handling pasteHandler ms-word-online 1`] = `"This is a heading 
This is a paragraph with a link

Bulleted 
Indented 
List 
 
One 
Two 
Three 

One 
Two 
Three 




II 
III 
 
An image: 
 "`; + +exports[`Blocks raw handling pasteHandler ms-word-styled 1`] = `"
Lorem ipsum dolor sit amet, consectetur adipiscing elit 


Lorem ipsum dolor sit amet, consectetur adipiscing elit. Pellentesque aliquet hendrerit auctor. Nam lobortis, est vel lacinia tincidunt, purus tellus vehicula ex, nec pharetra justo dui sed lorem. Nam congue laoreet massa, quis varius est tincidunt ut."`; + +exports[`Blocks raw handling pasteHandler nested-divs 1`] = `"First paragraph

Second paragraph
Third paragraph
Fourth paragraph
Fifth paragraph
Sixth paragraph"`; + +exports[`Blocks raw handling pasteHandler one-image 1`] = `""`; + +exports[`Blocks raw handling pasteHandler plain 1`] = `"test
test

test"`; + +exports[`Blocks raw handling pasteHandler shortcode-matching 1`] = `"[gallery ids="40,41,42"]
[gallery ids="1000"]
[gallery ids="42"]"`; +*/ + +exports[`Blocks raw handling pasteHandler should remove extra blank lines 1`] = ` +" +

1

+ + + +

2

+" +`; + +exports[`Blocks raw handling pasteHandler should strip HTML formatting space from inline text 1`] = `"Lorem ipsum dolor sit amet, consectetur adipiscing elit. Praesent a elit eget tortor molestie egestas. Donec pretium urna vitae mattis imperdiet. Praesent et lorem iaculis, volutpat odio vitae, ornare lacus. Donec ut felis tristique, pharetra erat id, viverra justo. Integer sit amet elementum arcu, eget pharetra felis. In malesuada enim est, sed placerat nulla feugiat at. Vestibulum feugiat vitae elit sit amet tincidunt. Pellentesque finibus sed dolor non facilisis. Curabitur accumsan ante ac hendrerit vestibulum."`; + +exports[`Blocks raw handling pasteHandler should strip some text-level elements 1`] = ` +" +

This is ncorect

+" +`; + +exports[`Blocks raw handling pasteHandler should strip windows data 1`] = ` +" +

Heading Win

+ + + +

Paragraph Win

+" +`; + +/* +exports[`Blocks raw handling pasteHandler slack-paragraphs 1`] = `"test with link
a new line

a new paragraph
another new line

another paragraph"`; + +exports[`Blocks raw handling pasteHandler slack-quote 1`] = `"Test with link."`; + +exports[`Blocks raw handling pasteHandler two-images 1`] = `" "`; + +exports[`Blocks raw handling pasteHandler wordpress 1`] = `"Howdy
This is a paragraph.
More tag

Shortcode
[gallery ids="1"]

test
test"`; +*/ + +exports[`Blocks raw handling should correctly handle quotes with mixed content 1`] = ` +" +
+

chicken

+ + + +

ribs

+
+" +`; + +exports[`rawHandler should convert HTML post to blocks with minimal content changes 1`] = ` +" +

Howdy

+ + + +
+ + + +

This is a paragraph.

+ + + +

Preserve me!

+ + + +

More tag

+ + + + + + + +

Shortcode

+ + + + + + + +
+
Term
+
+ Description. +
+
+ + + +
    +
  1. Item
  2. +
+ + + +
+

Text.

+
+ + + +
+

Heading

+ + + +

Text.

+
+" +`; + +exports[`rawHandler should convert a caption shortcode 1`] = ` +" +
test
+" +`; + +exports[`rawHandler should convert a caption shortcode with caption 1`] = ` +" +
test
+" +`; + +exports[`rawHandler should convert a caption shortcode with link 1`] = ` +" +
Bell on Wharf
Bell on wharf in San Francisco
+" +`; + +exports[`rawHandler should convert a list with attributes 1`] = ` +" +
    +
  1. 1 +
      +
    1. 1
    2. +
    +
  2. +
+" +`; + +exports[`rawHandler should convert to unsupported HTML block when no transformation is available 1`] = ` +" +

Hello world!

+" +`; + +exports[`rawHandler should not strip any text-level elements 1`] = ` +" +

This is ncorect

+" +`; + +exports[`rawHandler should preserve alignment 1`] = ` +" +

center

+" +`; diff --git a/test/native/integration/blocks-raw-handling.native.js b/test/native/integration/blocks-raw-handling.native.js new file mode 100644 index 0000000000000..5f21ca035fbf9 --- /dev/null +++ b/test/native/integration/blocks-raw-handling.native.js @@ -0,0 +1,587 @@ +/** + * External dependencies + */ +import fs from 'fs'; +import path from 'path'; + +/** + * WordPress dependencies + */ +import { + createBlock, + getBlockContent, + pasteHandler, + rawHandler, + registerBlockType, + serialize, +} from '@wordpress/blocks'; +import { registerCoreBlocks } from '@wordpress/block-library'; + +function readFile( filePath ) { + return fs.existsSync( filePath ) + ? fs.readFileSync( filePath, 'utf8' ).trim() + : ''; +} + +// Path to the fixtures provided in `gutenberg/test/integration`. +const fixturesPath = `${ __dirname }/../../integration`; + +// NOTE: This file is a clone of the same `blocks-raw-handling.js` file located in +// `gutenberg/test/integration`. The reason for the separation is that several of +// the test cases fail in the native version. For now, we are going to skip them, but +// we'd need to work on them in the future. +// +// Once all issues in tests are addressed, we'll remove this file in favor of the +// original one. +describe( 'Blocks raw handling', () => { + beforeAll( () => { + // Load all hooks that modify blocks. + require( '../../../packages/editor/src/hooks' ); + registerCoreBlocks(); + registerBlockType( 'test/gallery', { + title: 'Test Gallery', + category: 'text', + attributes: { + ids: { + type: 'array', + default: [], + }, + }, + transforms: { + from: [ + { + type: 'shortcode', + tag: 'gallery', + isMatch( { named: { ids } } ) { + return ids.indexOf( 42 ) > -1; + }, + attributes: { + ids: { + type: 'array', + shortcode: ( { named: { ids } } ) => + ids + .split( ',' ) + .map( ( id ) => parseInt( id, 10 ) ), + }, + }, + priority: 9, + }, + ], + }, + save: () => null, + } ); + + registerBlockType( 'test/non-inline-block', { + title: 'Test Non Inline Block', + category: 'text', + supports: { + pasteTextInline: false, + }, + transforms: { + from: [ + { + type: 'raw', + isMatch: ( node ) => { + return ( + 'words to live by' === node.textContent.trim() + ); + }, + transform: () => { + return createBlock( 'core/embed', { + url: 'https://www.youtube.com/watch?v=dQw4w9WgXcQ', + } ); + }, + }, + ], + }, + save: () => null, + } ); + + registerBlockType( 'test/transform-to-multiple-blocks', { + title: 'Test Transform to Multiple Blocks', + category: 'text', + transforms: { + from: [ + { + type: 'raw', + isMatch: ( node ) => { + return node.textContent + .split( ' ' ) + .every( ( chunk ) => /^P\S+?/.test( chunk ) ); + }, + transform: ( node ) => { + return node.textContent + .split( ' ' ) + .map( ( chunk ) => + createBlock( 'core/paragraph', { + content: chunk.substring( 1 ), + } ) + ); + }, + }, + ], + }, + save: () => null, + } ); + } ); + + it( 'should filter inline content', () => { + const filtered = pasteHandler( { + HTML: '

test

', + mode: 'INLINE', + } ); + + expect( filtered ).toBe( 'test' ); + expect( console ).toHaveLogged(); + } ); + + it( 'should ignore Google Docs UID tag', () => { + const filtered = pasteHandler( { + HTML: 'test', + mode: 'AUTO', + } ); + + expect( filtered ).toBe( 'test' ); + expect( console ).toHaveLogged(); + } ); + + it( 'should ignore Google Docs UID tag in inline mode', () => { + const filtered = pasteHandler( { + HTML: 'test', + mode: 'INLINE', + } ); + + expect( filtered ).toBe( 'test' ); + expect( console ).toHaveLogged(); + } ); + + it( 'should paste special whitespace', () => { + const filtered = pasteHandler( { + HTML: '

', + plainText: ' ', + mode: 'AUTO', + } ); + + expect( console ).toHaveLogged(); + expect( filtered ).toBe( ' ' ); + } ); + + it( 'should paste special whitespace in plain text only', () => { + const filtered = pasteHandler( { + HTML: '', + plainText: ' ', + mode: 'AUTO', + } ); + + expect( console ).toHaveLogged(); + expect( filtered ).toBe( ' ' ); + } ); + + it( 'should parse Markdown', () => { + const filtered = pasteHandler( { + HTML: '* one
* two
* three', + plainText: '* one\n* two\n* three', + mode: 'AUTO', + } ) + .map( getBlockContent ) + .join( '' ); + + expect( filtered ).toMatchInlineSnapshot( ` + "
    +
  • one
  • + + + +
  • two
  • + + + +
  • three
  • +
" + ` ); + expect( console ).toHaveLogged(); + } ); + + it( 'should parse bulleted list', () => { + const filtered = pasteHandler( { + HTML: '• one
• two
• three', + plainText: '• one\n• two\n• three', + mode: 'AUTO', + } ) + .map( getBlockContent ) + .join( '' ); + + expect( filtered ).toMatchInlineSnapshot( ` + "
    +
  • one
  • + + + +
  • two
  • + + + +
  • three
  • +
" + ` ); + expect( console ).toHaveLogged(); + } ); + + it( 'should parse inline Markdown', () => { + const filtered = pasteHandler( { + HTML: 'Some **bold** text.', + plainText: 'Some **bold** text.', + mode: 'AUTO', + } ); + + expect( filtered ).toBe( 'Some bold text.' ); + expect( console ).toHaveLogged(); + } ); + + it( 'should parse HTML in plainText', () => { + const filtered = pasteHandler( { + HTML: '<p>Some <strong>bold</strong> text.</p>', + plainText: '

Some bold text.

', + mode: 'AUTO', + } ); + + expect( filtered ).toBe( 'Some bold text.' ); + expect( console ).toHaveLogged(); + } ); + + it( 'should parse Markdown with HTML', () => { + const filtered = pasteHandler( { + HTML: '', + plainText: '# Some heading\n\nA paragraph.', + mode: 'AUTO', + } ) + .map( getBlockContent ) + .join( '' ); + + expect( filtered ).toBe( + '

Some heading

A paragraph.

' + ); + expect( console ).toHaveLogged(); + } ); + + it.skip( 'should break up forced inline content', () => { + const filtered = pasteHandler( { + HTML: '

test

test

', + mode: 'INLINE', + } ); + + expect( filtered ).toBe( 'test
test' ); + expect( console ).toHaveLogged(); + } ); + + it( 'should normalize decomposed characters', () => { + const filtered = pasteHandler( { + HTML: 'schön', + mode: 'INLINE', + } ); + + expect( filtered ).toBe( 'schön' ); + expect( console ).toHaveLogged(); + } ); + + it.skip( 'should not treat single non-inlineable block as inline text', () => { + const filtered = pasteHandler( { + HTML: '

words to live by

', + plainText: 'words to live by\n', + mode: 'AUTO', + } ); + + expect( filtered ).toHaveLength( 1 ); + expect( filtered[ 0 ].name ).toBe( 'core/embed' ); + expect( console ).toHaveLogged(); + } ); + + it( 'should treat single heading as inline text', () => { + const filtered = pasteHandler( { + HTML: '

FOO

', + plainText: 'FOO\n', + mode: 'AUTO', + } ); + + expect( filtered ).toBe( 'FOO' ); + expect( console ).toHaveLogged(); + } ); + + it( 'should treat single list item as inline text', () => { + const filtered = pasteHandler( { + HTML: '
  • Some bold text.
', + plainText: 'Some bold text.\n', + mode: 'AUTO', + } ); + + expect( filtered ).toBe( 'Some bold text.' ); + expect( console ).toHaveLogged(); + } ); + + it( 'should treat multiple list items as a block', () => { + const filtered = pasteHandler( { + HTML: '
  • One
  • Two
  • Three
', + plainText: 'One\nTwo\nThree\n', + mode: 'AUTO', + } ) + .map( getBlockContent ) + .join( '' ); + + expect( filtered ).toMatchInlineSnapshot( ` + "
    +
  • One
  • + + + +
  • Two
  • + + + +
  • Three
  • +
" + ` ); + expect( console ).toHaveLogged(); + } ); + + it( 'should correctly handle quotes with mixed content', () => { + const filtered = serialize( + pasteHandler( { + HTML: '

chicken

ribs

', + mode: 'AUTO', + } ) + ); + + expect( filtered ).toMatchSnapshot(); + expect( console ).toHaveLogged(); + } ); + + it( 'should paste gutenberg content from plain text', () => { + const block = ''; + expect( + serialize( + pasteHandler( { + plainText: block, + mode: 'AUTO', + } ) + ) + ).toBe( block ); + } ); + + it.skip( 'should handle transforms that return an array of blocks', () => { + const transformed = pasteHandler( { + HTML: '

P1 P2

', + plainText: 'P1 P2\n', + } ) + .map( getBlockContent ) + .join( '' ); + + expect( transformed ).toBe( '

1

2

' ); + expect( console ).toHaveLogged(); + } ); + + it( 'should convert pre', () => { + const transformed = pasteHandler( { + HTML: '
1\n2
', + plainText: '1\n2', + } ) + .map( getBlockContent ) + .join( '' ); + + expect( transformed ).toBe( + '
1\n2
' + ); + expect( console ).toHaveLogged(); + } ); + + it( 'should convert code', () => { + const transformed = pasteHandler( { + HTML: '
1\n2
', + plainText: '1\n2', + } ) + .map( getBlockContent ) + .join( '' ); + + expect( transformed ).toBe( + '
1\n2
' + ); + expect( console ).toHaveLogged(); + } ); + + describe( 'pasteHandler', () => { + // TODO: The cases commented should be eventually addressed and restored. + [ + // 'plain', + // 'classic', + // 'nested-divs', + // 'apple', + // 'google-docs', + // 'google-docs-list-only', + // 'google-docs-table', + // 'google-docs-table-with-colspan', + // 'google-docs-table-with-rowspan', + // 'google-docs-table-with-comments', + // 'google-docs-with-comments', + // 'ms-word', + // 'ms-word-list', + // 'ms-word-styled', + // 'ms-word-online', + // 'evernote', + 'iframe-embed', + // 'one-image', + // 'two-images', + // 'markdown', + // 'wordpress', + 'gutenberg', + // 'shortcode-matching', + // 'slack-quote', + // 'slack-paragraphs', + ].forEach( ( type ) => { + // eslint-disable-next-line jest/valid-title + it( type, () => { + const HTML = readFile( + path.join( + fixturesPath, + `fixtures/documents/${ type }-in.html` + ) + ); + const plainText = readFile( + path.join( + fixturesPath, + `fixtures/documents/${ type }-in.txt` + ) + ); + const output = readFile( + path.join( + fixturesPath, + `fixtures/documents/${ type }-out.html` + ) + ); + + if ( ! ( HTML || plainText ) || ! output ) { + throw new Error( `Expected fixtures for type ${ type }` ); + } + + const converted = pasteHandler( { HTML, plainText } ); + const serialized = + typeof converted === 'string' + ? converted + : serialize( converted ); + + expect( serialized ).toBe( output ); + + const convertedInline = pasteHandler( { + HTML, + plainText, + mode: 'INLINE', + } ); + + expect( convertedInline ).toMatchSnapshot(); + expect( console ).toHaveLogged(); + } ); + } ); + + it( 'should strip some text-level elements', () => { + const HTML = '

This is ncorect

'; + expect( serialize( pasteHandler( { HTML } ) ) ).toMatchSnapshot(); + expect( console ).toHaveLogged(); + } ); + + it( 'should remove extra blank lines', () => { + const HTML = readFile( + path.join( + fixturesPath, + 'fixtures/documents/google-docs-blank-lines.html' + ) + ); + expect( serialize( pasteHandler( { HTML } ) ) ).toMatchSnapshot(); + expect( console ).toHaveLogged(); + } ); + + it( 'should strip windows data', () => { + const HTML = readFile( + path.join( fixturesPath, 'fixtures/documents/windows.html' ) + ); + expect( serialize( pasteHandler( { HTML } ) ) ).toMatchSnapshot(); + } ); + + it.skip( 'should strip HTML formatting space from inline text', () => { + const HTML = readFile( + path.join( + fixturesPath, + 'fixtures/documents/inline-with-html-formatting-space.html' + ) + ); + expect( pasteHandler( { HTML } ) ).toMatchSnapshot(); + expect( console ).toHaveLogged(); + } ); + } ); +} ); + +describe( 'rawHandler', () => { + it.skip( 'should convert HTML post to blocks with minimal content changes', () => { + const HTML = readFile( + path.join( + fixturesPath, + 'fixtures/documents/wordpress-convert.html' + ) + ); + expect( serialize( rawHandler( { HTML } ) ) ).toMatchSnapshot(); + } ); + + it.skip( 'should convert a caption shortcode', () => { + const HTML = readFile( + path.join( + fixturesPath, + 'fixtures/documents/shortcode-caption.html' + ) + ); + expect( serialize( rawHandler( { HTML } ) ) ).toMatchSnapshot(); + } ); + + it.skip( 'should convert a caption shortcode with link', () => { + const HTML = readFile( + path.join( + fixturesPath, + 'fixtures/documents/shortcode-caption-with-link.html' + ) + ); + expect( serialize( rawHandler( { HTML } ) ) ).toMatchSnapshot(); + } ); + + it.skip( 'should convert a caption shortcode with caption', () => { + const HTML = readFile( + path.join( + fixturesPath, + 'fixtures/documents/shortcode-caption-with-caption-link.html' + ) + ); + expect( serialize( rawHandler( { HTML } ) ) ).toMatchSnapshot(); + } ); + + it.skip( 'should convert a list with attributes', () => { + const HTML = readFile( + path.join( + fixturesPath, + 'fixtures/documents/list-with-attributes.html' + ) + ); + expect( serialize( rawHandler( { HTML } ) ) ).toMatchSnapshot(); + } ); + + it.skip( 'should not strip any text-level elements', () => { + const HTML = '

This is ncorect

'; + expect( serialize( rawHandler( { HTML } ) ) ).toMatchSnapshot(); + } ); + + it.skip( 'should preserve alignment', () => { + const HTML = '

center

'; + expect( serialize( rawHandler( { HTML } ) ) ).toMatchSnapshot(); + } ); + + // This is an extra test added to cover the case fixed in: + // `rnmobile/fix/div-tag-convert-to-blocks`. + it( 'should convert to unsupported HTML block when no transformation is available', () => { + const HTML = '

Hello world!

'; + expect( serialize( rawHandler( { HTML } ) ) ).toMatchSnapshot(); + } ); +} ); From aad3fa4c6edf335311d85436c99d2c3e383e724c Mon Sep 17 00:00:00 2001 From: Ella <4710635+ellatrix@users.noreply.github.com> Date: Fri, 1 Dec 2023 14:22:22 +0100 Subject: [PATCH 13/18] RichText (native): remove HTML check in getFormatColors (#56684) --- .../native/get-format-colors.native.js | 73 +++++++++---------- .../rich-text/native/index.native.js | 2 +- 2 files changed, 34 insertions(+), 41 deletions(-) diff --git a/packages/block-editor/src/components/rich-text/native/get-format-colors.native.js b/packages/block-editor/src/components/rich-text/native/get-format-colors.native.js index a54d3e10f78a0..b68186246523f 100644 --- a/packages/block-editor/src/components/rich-text/native/get-format-colors.native.js +++ b/packages/block-editor/src/components/rich-text/native/get-format-colors.native.js @@ -5,50 +5,43 @@ import { getColorObjectByAttributeValues } from '../../../components/colors'; const FORMAT_TYPE = 'core/text-color'; const REGEX_TO_MATCH = /^has-(.*)-color$/; -const TAGS_TO_SEARCH = /\ { - format.forEach( ( currentFormat ) => { - if ( currentFormat?.type === FORMAT_TYPE ) { - const className = currentFormat?.attributes?.class; - currentFormat.attributes.style = - currentFormat.attributes.style.replace( / /g, '' ); + // We are looping through a sparse array where empty indices will be + // skipped. + newFormats.forEach( ( format ) => { + format.forEach( ( currentFormat ) => { + if ( currentFormat?.type === FORMAT_TYPE ) { + const className = currentFormat?.attributes?.class; - className?.split( ' ' ).forEach( ( currentClass ) => { - const match = currentClass.match( REGEX_TO_MATCH ); - if ( match ) { - const [ , colorSlug ] = - currentClass.match( REGEX_TO_MATCH ); - const colorObject = getColorObjectByAttributeValues( - colors, - colorSlug - ); - const currentStyles = - currentFormat?.attributes?.style; - if ( - colorObject && - ( ! currentStyles || - currentStyles?.indexOf( - colorObject.color - ) === -1 ) - ) { - currentFormat.attributes.style = [ - `color: ${ colorObject.color }`, - currentStyles, - ].join( ';' ); - } + className?.split( ' ' ).forEach( ( currentClass ) => { + const match = currentClass.match( REGEX_TO_MATCH ); + if ( match ) { + const [ , colorSlug ] = + currentClass.match( REGEX_TO_MATCH ); + const colorObject = getColorObjectByAttributeValues( + colors, + colorSlug + ); + const currentStyles = currentFormat?.attributes?.style; + if ( + colorObject && + ( ! currentStyles || + currentStyles?.indexOf( colorObject.color ) === + -1 ) + ) { + currentFormat.attributes.style = [ + `color: ${ colorObject.color }`, + currentStyles, + ].join( ';' ); } - } ); - } - } ); + } + } ); + } } ); + } ); - return newFormats; - } - - return formats; + return newFormats; } diff --git a/packages/block-editor/src/components/rich-text/native/index.native.js b/packages/block-editor/src/components/rich-text/native/index.native.js index ab465b2441154..951d52ece6d69 100644 --- a/packages/block-editor/src/components/rich-text/native/index.native.js +++ b/packages/block-editor/src/components/rich-text/native/index.native.js @@ -196,7 +196,7 @@ export class RichText extends Component { const { formats, replacements, text } = currentValue; const { activeFormats } = this.state; - const newFormats = getFormatColors( value, formats, colorPalette ); + const newFormats = getFormatColors( formats, colorPalette ); return { formats: newFormats, From 967346410b684d2d0d4f48eb3d04a15e9ebf3783 Mon Sep 17 00:00:00 2001 From: Gerardo Pacheco Date: Mon, 4 Dec 2023 16:34:55 +0100 Subject: [PATCH 14/18] Mobile - Global Styles - Fix issue with custom color variables not being parsed (#56752) --- .../test/utils.native.js | 22 +++++++++++++++++++ .../global-styles-context/utils.native.js | 14 ++++++++++++ 2 files changed, 36 insertions(+) diff --git a/packages/components/src/mobile/global-styles-context/test/utils.native.js b/packages/components/src/mobile/global-styles-context/test/utils.native.js index c1f968de24e48..6144b9a13ae89 100644 --- a/packages/components/src/mobile/global-styles-context/test/utils.native.js +++ b/packages/components/src/mobile/global-styles-context/test/utils.native.js @@ -108,6 +108,28 @@ describe( 'parseStylesVariables', () => { expect.objectContaining( PARSED_GLOBAL_STYLES ) ); } ); + + it( 'returns the parsed custom color values correctly', () => { + const defaultStyles = { + ...DEFAULT_GLOBAL_STYLES, + color: { + text: 'var(--wp--custom--color--blue)', + background: 'var(--wp--custom--color--green)', + }, + }; + const customValues = parseStylesVariables( + JSON.stringify( RAW_FEATURES.custom ), + MAPPED_VALUES + ); + const styles = parseStylesVariables( + JSON.stringify( defaultStyles ), + MAPPED_VALUES, + customValues + ); + expect( styles ).toEqual( + expect.objectContaining( PARSED_GLOBAL_STYLES ) + ); + } ); } ); describe( 'getGlobalStyles', () => { diff --git a/packages/components/src/mobile/global-styles-context/utils.native.js b/packages/components/src/mobile/global-styles-context/utils.native.js index f2cbcae9c3f3e..b56e28da46207 100644 --- a/packages/components/src/mobile/global-styles-context/utils.native.js +++ b/packages/components/src/mobile/global-styles-context/utils.native.js @@ -248,6 +248,20 @@ export function parseStylesVariables( styles, mappedValues, customValues ) { const customValuesData = customValues ?? JSON.parse( stylesBase ); stylesBase = stylesBase.replace( regex, ( _$1, $2 ) => { const path = $2.split( '--' ); + + // Supports cases for variables like var(--wp--custom--color--background) + if ( path[ 0 ] === 'color' ) { + const colorKey = path[ path.length - 1 ]; + if ( mappedValues?.color ) { + const matchedValue = mappedValues.color?.values?.find( + ( { slug } ) => slug === colorKey + ); + if ( matchedValue ) { + return `${ matchedValue?.color }`; + } + } + } + if ( path.reduce( ( prev, curr ) => prev && prev[ curr ], From 74e8f7347418b41db67298ddfac286ea8994217b Mon Sep 17 00:00:00 2001 From: Siobhan Bamber Date: Mon, 4 Dec 2023 19:15:12 +0000 Subject: [PATCH 15/18] [RNMobile] Address `NullPointerException` crash in `AztecHeadingSpan` (#56757) Address rare cases where a null value is passed to a heading block, causing a crash. --- packages/react-native-aztec/android/build.gradle | 2 +- packages/react-native-editor/CHANGELOG.md | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/packages/react-native-aztec/android/build.gradle b/packages/react-native-aztec/android/build.gradle index 7647548360ca7..18093ff1c2c13 100644 --- a/packages/react-native-aztec/android/build.gradle +++ b/packages/react-native-aztec/android/build.gradle @@ -11,7 +11,7 @@ buildscript { espressoVersion = '3.0.1' // libs - aztecVersion = 'v1.8.0' + aztecVersion = 'v1.9.0' wordpressUtilsVersion = '3.3.0' // main diff --git a/packages/react-native-editor/CHANGELOG.md b/packages/react-native-editor/CHANGELOG.md index 8da935f0f965d..1626064ca9e1a 100644 --- a/packages/react-native-editor/CHANGELOG.md +++ b/packages/react-native-editor/CHANGELOG.md @@ -15,6 +15,7 @@ For each user feature we should also add a importance categorization label to i - [***] Fix issue when backspacing in an empty Paragraph block [#56496] - [**] Fix issue related to text color format and receiving in rare cases an undefined ref from `RichText` component [#56686] - [**] Fixes a crash on pasting MS Word list markup [#56653] +- [**] Address rare cases where a null value is passed to a heading block, causing a crash [#56757] ## 1.109.0 - [*] Audio block: Improve legibility of audio file details on various background colors [#55627] From 6734e00d3b7ae963e592cccdd2a54b6c1882a622 Mon Sep 17 00:00:00 2001 From: Carlos Garcia Date: Tue, 5 Dec 2023 11:14:31 +0100 Subject: [PATCH 16/18] Release script: Update react-native-editor version to 1.109.2 --- packages/react-native-aztec/package.json | 2 +- packages/react-native-bridge/package.json | 2 +- packages/react-native-editor/package.json | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/packages/react-native-aztec/package.json b/packages/react-native-aztec/package.json index e814be90943a7..fbf34269306ee 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.109.1", + "version": "1.109.2", "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 ca7cfc3de79bc..6b9bdb782d66d 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.109.1", + "version": "1.109.2", "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/package.json b/packages/react-native-editor/package.json index aa41fc9ffa1af..bcc15b44b4ca1 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.109.1", + "version": "1.109.2", "description": "Mobile WordPress gutenberg editor.", "author": "The WordPress Contributors", "license": "GPL-2.0-or-later", From 9f24d7fedc5a44c683eebc9591612660c043af83 Mon Sep 17 00:00:00 2001 From: Carlos Garcia Date: Tue, 5 Dec 2023 11:23:31 +0100 Subject: [PATCH 17/18] Release script: Update CHANGELOG for version 1.109.2 --- packages/react-native-editor/CHANGELOG.md | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/packages/react-native-editor/CHANGELOG.md b/packages/react-native-editor/CHANGELOG.md index 1626064ca9e1a..644554ae763ee 100644 --- a/packages/react-native-editor/CHANGELOG.md +++ b/packages/react-native-editor/CHANGELOG.md @@ -11,11 +11,16 @@ For each user feature we should also add a importance categorization label to i ## Unreleased -## 1.109.1 -- [***] Fix issue when backspacing in an empty Paragraph block [#56496] +## 1.109.2 - [**] Fix issue related to text color format and receiving in rare cases an undefined ref from `RichText` component [#56686] - [**] Fixes a crash on pasting MS Word list markup [#56653] - [**] Address rare cases where a null value is passed to a heading block, causing a crash [#56757] +- [**] Fixes a crash related to HTML to blocks conversion when no transformations are available [#56723] +- [**] Fixes a crash related to undefined attributes in `getFormatColors` function of `RichText` component [#56684] +- [**] Fixes an issue with custom color variables not being parsed when using global styles [#56752] + +## 1.109.1 +- [***] Fix issue when backspacing in an empty Paragraph block [#56496] ## 1.109.0 - [*] Audio block: Improve legibility of audio file details on various background colors [#55627] From b10351bdffe4242597e6ea04419fd26bd8fbfef3 Mon Sep 17 00:00:00 2001 From: Carlos Garcia Date: Tue, 5 Dec 2023 11:28:01 +0100 Subject: [PATCH 18/18] Release script: Update podfile --- package-lock.json | 6 +++--- packages/react-native-editor/ios/Podfile.lock | 8 ++++---- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/package-lock.json b/package-lock.json index 0b66a01c24985..55d571dc582d2 100644 --- a/package-lock.json +++ b/package-lock.json @@ -56217,7 +56217,7 @@ }, "packages/react-native-aztec": { "name": "@wordpress/react-native-aztec", - "version": "1.109.1", + "version": "1.109.2", "license": "GPL-2.0-or-later", "dependencies": { "@wordpress/element": "file:../element", @@ -56230,7 +56230,7 @@ }, "packages/react-native-bridge": { "name": "@wordpress/react-native-bridge", - "version": "1.109.1", + "version": "1.109.2", "license": "GPL-2.0-or-later", "dependencies": { "@wordpress/react-native-aztec": "file:../react-native-aztec" @@ -56241,7 +56241,7 @@ }, "packages/react-native-editor": { "name": "@wordpress/react-native-editor", - "version": "1.109.1", + "version": "1.109.2", "hasInstallScript": true, "license": "GPL-2.0-or-later", "dependencies": { diff --git a/packages/react-native-editor/ios/Podfile.lock b/packages/react-native-editor/ios/Podfile.lock index dd3021ab8a6db..51b5554191ea8 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.71.11) - fmt (6.2.1) - glog (0.3.5) - - Gutenberg (1.109.1): + - Gutenberg (1.109.2): - React-Core (= 0.71.11) - React-CoreModules (= 0.71.11) - React-RCTImage (= 0.71.11) @@ -429,7 +429,7 @@ PODS: - React-RCTImage - RNSVG (13.9.0): - React-Core - - RNTAztecView (1.109.1): + - RNTAztecView (1.109.2): - React-Core - WordPress-Aztec-iOS (= 1.19.9) - SDWebImage (5.11.1): @@ -617,7 +617,7 @@ SPEC CHECKSUMS: FBReactNativeSpec: f07662560742d82a5b73cee116c70b0b49bcc220 fmt: ff9d55029c625d3757ed641535fd4a75fedc7ce9 glog: 04b94705f318337d7ead9e6d17c019bd9b1f6b1b - Gutenberg: ce2b737d183d0179cb86596412bad21d48eafdcb + Gutenberg: 2da422f5cdffef9f66fc57f87ddba4dbda5ceb9d hermes-engine: 34c863b446d0135b85a6536fa5fd89f48196f848 libevent: 4049cae6c81cdb3654a443be001fb9bdceff7913 libwebp: 60305b2e989864154bd9be3d772730f08fc6a59c @@ -662,7 +662,7 @@ SPEC CHECKSUMS: RNReanimated: d4f363f4987ae0ade3e36ff81c94e68261bf4b8d RNScreens: 68fd1060f57dd1023880bf4c05d74784b5392789 RNSVG: 53c661b76829783cdaf9b7a57258f3d3b4c28315 - RNTAztecView: 8d9b3bd517873101ab1ea89948b45c601bcedea0 + RNTAztecView: dc2635b4d33818f4c113717ff67071c1e367ed8c SDWebImage: a7f831e1a65eb5e285e3fb046a23fcfbf08e696d SDWebImageWebPCoder: 908b83b6adda48effe7667cd2b7f78c897e5111d WordPress-Aztec-iOS: fbebd569c61baa252b3f5058c0a2a9a6ada686bb