From cb8c408cfb5244e5b37c52c7b5e118ec1739af34 Mon Sep 17 00:00:00 2001 From: Carlos Garcia Date: Fri, 31 Dec 2021 13:00:44 +0100 Subject: [PATCH 1/6] Disable text format recalculation on delete in Aztec --- packages/react-native-aztec/ios/RNTAztecView/RCTAztecView.swift | 2 ++ 1 file changed, 2 insertions(+) diff --git a/packages/react-native-aztec/ios/RNTAztecView/RCTAztecView.swift b/packages/react-native-aztec/ios/RNTAztecView/RCTAztecView.swift index 8e94be11f8323..a3515eae9447f 100644 --- a/packages/react-native-aztec/ios/RNTAztecView/RCTAztecView.swift +++ b/packages/react-native-aztec/ios/RNTAztecView/RCTAztecView.swift @@ -146,6 +146,8 @@ class RCTAztecView: Aztec.TextView { storage.htmlConverter.characterToReplaceLastEmptyLine = Character(.zeroWidthSpace) storage.htmlConverter.shouldCollapseSpaces = false shouldNotifyOfNonUserChanges = false + // Typing attributes are controlled by RichText component so we have to prevent Aztec to recalculate them when deleting backward. + shouldRecalculateTypingAttributesOnDeleteBackward = false disableLinkTapRecognizer() preBackgroundColor = .clear } From ce281864eae41754e0d4c43c4cc40aa773dff9ed Mon Sep 17 00:00:00 2001 From: Carlos Garcia Date: Fri, 31 Dec 2021 13:56:19 +0100 Subject: [PATCH 2/6] Update Podfile --- packages/react-native-editor/ios/Podfile | 4 ++++ packages/react-native-editor/ios/Podfile.lock | 14 +++++++++++--- 2 files changed, 15 insertions(+), 3 deletions(-) diff --git a/packages/react-native-editor/ios/Podfile b/packages/react-native-editor/ios/Podfile index ecf582c8cd8fa..05f6d0416f3b1 100644 --- a/packages/react-native-editor/ios/Podfile +++ b/packages/react-native-editor/ios/Podfile @@ -5,6 +5,10 @@ platform :ios, '13.0' require_relative '../../../node_modules/react-native/scripts/react_native_pods' require_relative '../../../node_modules/@react-native-community/cli-platform-ios/native_modules' +# Changes Aztec reference to last commit from https://github.com/wordpress-mobile/AztecEditor-iOS/pull/1346 PR. +# ONLY FOR TESTING, IT SHOULD BE DELETED ONCE THE AZTEC PR IS MERGED! +pod 'WordPress-Aztec-iOS', :git => 'https://github.com/wordpress-mobile/AztecEditor-iOS.git', :commit => 'd68c76ec8f01490c741077dccefc17b17ce19f2d' + target 'GutenbergDemo' do # Comment the next line if you don't want to use dynamic frameworks use_frameworks! diff --git a/packages/react-native-editor/ios/Podfile.lock b/packages/react-native-editor/ios/Podfile.lock index 5eead50f70d4c..b5eaa6a47245c 100644 --- a/packages/react-native-editor/ios/Podfile.lock +++ b/packages/react-native-editor/ios/Podfile.lock @@ -355,12 +355,12 @@ DEPENDENCIES: - RNScreens (from `../../../node_modules/react-native-screens`) - RNSVG (from `../../../node_modules/react-native-svg`) - RNTAztecView (from `../../react-native-aztec`) + - WordPress-Aztec-iOS (from `https://github.com/wordpress-mobile/AztecEditor-iOS.git`, commit `d68c76ec8f01490c741077dccefc17b17ce19f2d`) - Yoga (from `../../../node_modules/react-native/ReactCommon/yoga`) SPEC REPOS: trunk: - boost-for-react-native - - WordPress-Aztec-iOS EXTERNAL SOURCES: BVLinearGradient: @@ -449,15 +449,23 @@ EXTERNAL SOURCES: :path: "../../../node_modules/react-native-svg" RNTAztecView: :path: "../../react-native-aztec" + WordPress-Aztec-iOS: + :commit: d68c76ec8f01490c741077dccefc17b17ce19f2d + :git: https://github.com/wordpress-mobile/AztecEditor-iOS.git Yoga: :path: "../../../node_modules/react-native/ReactCommon/yoga" +CHECKOUT OPTIONS: + WordPress-Aztec-iOS: + :commit: d68c76ec8f01490c741077dccefc17b17ce19f2d + :git: https://github.com/wordpress-mobile/AztecEditor-iOS.git + SPEC CHECKSUMS: boost-for-react-native: 39c7adb57c4e60d6c5479dd8623128eb5b3f0f2c BVLinearGradient: 1e5474c982efcfcaed47f368a61431bb38a4faf8 DoubleConversion: cf9b38bf0b2d048436d9a82ad2abe1404f11e7de FBLazyVector: 49cbe4b43e445b06bf29199b6ad2057649e4c8f5 - FBReactNativeSpec: 483e4a3c2982c1ce57d08e90fea6be852dd5f691 + FBReactNativeSpec: ebf5d0d5406a50fed4bd7e93460435dfddcab39a glog: 73c2498ac6884b13ede40eda8228cb1eee9d9d62 Gutenberg: c60e4e43b9cba783fd2e65aad912d1b6cf2f0098 RCT-Folly: ec7a233ccc97cc556cf7237f0db1ff65b986f27c @@ -500,6 +508,6 @@ SPEC CHECKSUMS: WordPress-Aztec-iOS: 129276e7d1391acb08157641a54394668bb0d7f8 Yoga: 8c8436d4171c87504c648ae23b1d81242bdf3bbf -PODFILE CHECKSUM: db5f67a29ecba75541dad181ff59246b6da2fb09 +PODFILE CHECKSUM: c44f53e59fbb9a57271609645edc63f61a84cd74 COCOAPODS: 1.10.1 From 6c130ac8517b8ca176bb845444f36eda92e2ba76 Mon Sep 17 00:00:00 2001 From: Carlos Garcia Date: Fri, 31 Dec 2021 16:47:02 +0100 Subject: [PATCH 3/6] Update Aztec-Android ref --- packages/react-native-aztec/android/build.gradle | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/react-native-aztec/android/build.gradle b/packages/react-native-aztec/android/build.gradle index 27d4e4de03885..5c67684e05faa 100644 --- a/packages/react-native-aztec/android/build.gradle +++ b/packages/react-native-aztec/android/build.gradle @@ -9,7 +9,7 @@ buildscript { jSoupVersion = '1.10.3' wordpressUtilsVersion = '1.22' espressoVersion = '3.0.1' - aztecVersion = 'v1.5.2' + aztecVersion = '949-2563f926dcb6ecf9bb53ffbf740aba664ab37db0' willPublishReactNativeAztecBinary = properties["willPublishReactNativeAztecBinary"]?.toBoolean() ?: false } } From 288ade517044412fb550036523f0bb522ad52a75 Mon Sep 17 00:00:00 2001 From: Carlos Garcia Date: Mon, 3 Jan 2022 10:48:24 +0100 Subject: [PATCH 4/6] 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 8ada7d0fe5eb2..9fe8a6ae2d1f4 100644 --- a/packages/react-native-editor/CHANGELOG.md +++ b/packages/react-native-editor/CHANGELOG.md @@ -12,6 +12,7 @@ For each user feature we should also add a importance categorization label to i ## Unreleased - [*] Give multi-line block names central alignment in inserter [#37185] - [**] Fix empty line apperaing when splitting heading blocks on Android 12 [#37279] +- [**] Fix text formatting mode lost after backspace is used [#37676] ## 1.68.0 - [**] Fix undo/redo functionality in links when applying text format [#36861] From 37e61c120283ccc04ab6790ab52e96b58364b079 Mon Sep 17 00:00:00 2001 From: Carlos Garcia Date: Wed, 5 Jan 2022 12:31:25 +0100 Subject: [PATCH 5/6] Update Aztec version for Android --- packages/react-native-aztec/android/build.gradle | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/react-native-aztec/android/build.gradle b/packages/react-native-aztec/android/build.gradle index 5c67684e05faa..596716c230c31 100644 --- a/packages/react-native-aztec/android/build.gradle +++ b/packages/react-native-aztec/android/build.gradle @@ -9,7 +9,7 @@ buildscript { jSoupVersion = '1.10.3' wordpressUtilsVersion = '1.22' espressoVersion = '3.0.1' - aztecVersion = '949-2563f926dcb6ecf9bb53ffbf740aba664ab37db0' + aztecVersion = 'v1.5.3' willPublishReactNativeAztecBinary = properties["willPublishReactNativeAztecBinary"]?.toBoolean() ?: false } } From daa9ac4e2c65c3bbf38afbb4842eca5b9209f47a Mon Sep 17 00:00:00 2001 From: Carlos Garcia Date: Wed, 5 Jan 2022 13:46:57 +0100 Subject: [PATCH 6/6] Update WordPress-Aztec-iOS version to 1.19.7 --- .../react-native-aztec/RNTAztecView.podspec | 2 +- packages/react-native-editor/ios/Podfile | 4 ---- packages/react-native-editor/ios/Podfile.lock | 20 ++++++------------- 3 files changed, 7 insertions(+), 19 deletions(-) diff --git a/packages/react-native-aztec/RNTAztecView.podspec b/packages/react-native-aztec/RNTAztecView.podspec index 970a8b6af6a70..48bab6bfe706b 100644 --- a/packages/react-native-aztec/RNTAztecView.podspec +++ b/packages/react-native-aztec/RNTAztecView.podspec @@ -18,6 +18,6 @@ Pod::Spec.new do |s| s.xcconfig = {'OTHER_LDFLAGS' => '-lxml2', 'HEADER_SEARCH_PATHS' => '/usr/include/libxml2'} s.dependency 'React-Core' - s.dependency 'WordPress-Aztec-iOS', '~> 1.19.6' + s.dependency 'WordPress-Aztec-iOS', '~> 1.19.7' end diff --git a/packages/react-native-editor/ios/Podfile b/packages/react-native-editor/ios/Podfile index a7e2a7f750e95..88d0963b5d523 100644 --- a/packages/react-native-editor/ios/Podfile +++ b/packages/react-native-editor/ios/Podfile @@ -3,10 +3,6 @@ project 'GutenbergDemo.xcodeproj' require_relative '../../../node_modules/react-native/scripts/react_native_pods' require_relative '../../../node_modules/@react-native-community/cli-platform-ios/native_modules' -# Changes Aztec reference to last commit from https://github.com/wordpress-mobile/AztecEditor-iOS/pull/1346 PR. -# ONLY FOR TESTING, IT SHOULD BE DELETED ONCE THE AZTEC PR IS MERGED! -pod 'WordPress-Aztec-iOS', :git => 'https://github.com/wordpress-mobile/AztecEditor-iOS.git', :commit => 'd68c76ec8f01490c741077dccefc17b17ce19f2d' - # Uncomment the next line to define a global platform for your project app_ios_deployment_target = Gem::Version.new('13.0') platform :ios, app_ios_deployment_target.version diff --git a/packages/react-native-editor/ios/Podfile.lock b/packages/react-native-editor/ios/Podfile.lock index dc36a62cc23d0..bf06bd90b2ee1 100644 --- a/packages/react-native-editor/ios/Podfile.lock +++ b/packages/react-native-editor/ios/Podfile.lock @@ -314,8 +314,8 @@ PODS: - React-Core - RNTAztecView (1.68.0): - React-Core - - WordPress-Aztec-iOS (~> 1.19.6) - - WordPress-Aztec-iOS (1.19.6) + - WordPress-Aztec-iOS (~> 1.19.7) + - WordPress-Aztec-iOS (1.19.7) - Yoga (1.14.0) DEPENDENCIES: @@ -367,12 +367,12 @@ DEPENDENCIES: - RNScreens (from `../../../node_modules/react-native-screens`) - RNSVG (from `../../../node_modules/react-native-svg`) - RNTAztecView (from `../../react-native-aztec`) - - WordPress-Aztec-iOS (from `https://github.com/wordpress-mobile/AztecEditor-iOS.git`, commit `d68c76ec8f01490c741077dccefc17b17ce19f2d`) - Yoga (from `../../../node_modules/react-native/ReactCommon/yoga`) SPEC REPOS: trunk: - fmt + - WordPress-Aztec-iOS EXTERNAL SOURCES: boost: @@ -467,17 +467,9 @@ EXTERNAL SOURCES: :path: "../../../node_modules/react-native-svg" RNTAztecView: :path: "../../react-native-aztec" - WordPress-Aztec-iOS: - :commit: d68c76ec8f01490c741077dccefc17b17ce19f2d - :git: https://github.com/wordpress-mobile/AztecEditor-iOS.git Yoga: :path: "../../../node_modules/react-native/ReactCommon/yoga" -CHECKOUT OPTIONS: - WordPress-Aztec-iOS: - :commit: d68c76ec8f01490c741077dccefc17b17ce19f2d - :git: https://github.com/wordpress-mobile/AztecEditor-iOS.git - SPEC CHECKSUMS: boost: a7c83b31436843459a1961bfd74b96033dc77234 BVLinearGradient: f6eff3552b842aac99ff6f21197e57f87cfd956d @@ -525,10 +517,10 @@ SPEC CHECKSUMS: RNReanimated: 7d8459391b2f3e1dc6dea919307db4adf4c1d254 RNScreens: ec0e85d1babdd61d7ec78c98072d9e6b62d96ff6 RNSVG: b3b9c40381636e5116894398d72a830be15b7258 - RNTAztecView: bdcd4b1b309ed88241779868bfbba05ca8432795 - WordPress-Aztec-iOS: 129276e7d1391acb08157641a54394668bb0d7f8 + RNTAztecView: e502408a3c3cb98f513346a179febb91bcd3e528 + WordPress-Aztec-iOS: 144f124148079084860368dfd27cb96e0952853e Yoga: 9a08effa851c1d8cc1647691895540bc168ea65f -PODFILE CHECKSUM: 95dc27d322287da9b1ecac989fcfd28dfcd84fcf +PODFILE CHECKSUM: 563423e4045de5607d9ba4dd3a53595bb1a8c8cc COCOAPODS: 1.10.1