Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Mobile Release v1.43.0 #27566

Merged
merged 9 commits into from
Dec 23, 2020
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ export function __experimentalUseGradient( {
const { gradient, customGradient } = useSelect(
( select ) => {
const { getBlockAttributes } = select( 'core/block-editor' );
const attributes = getBlockAttributes( clientId );
const attributes = getBlockAttributes( clientId ) || {};
return {
customGradient: attributes[ customGradientAttribute ],
gradient: attributes[ gradientAttribute ],
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ export default function useEditorFeature( featurePath ) {
'__experimentalSelector',
] );
if ( isObject( selectors ) ) {
const blockAttributes = getBlockAttributes( clientId );
const blockAttributes = getBlockAttributes( clientId ) || {};
for ( const contextSelector in selectors ) {
const { attributes } = selectors[ contextSelector ];
if ( blockAttributesMatch( blockAttributes, attributes ) ) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,11 +41,11 @@
import com.facebook.react.views.text.ReactFontManager;
import com.facebook.react.views.text.ReactTextUpdate;
import com.facebook.react.views.textinput.ReactContentSizeChangedEvent;
import com.facebook.react.views.textinput.ReactTextChangedEvent;
import com.facebook.react.views.textinput.ReactTextInputEvent;
import com.facebook.react.views.textinput.ReactTextInputManager;
import com.facebook.react.views.textinput.ScrollWatcher;

import org.wordpress.aztec.Constants;
import org.wordpress.aztec.formatting.LinkFormatter;
import org.wordpress.aztec.glideloader.GlideImageLoader;
import org.wordpress.aztec.glideloader.GlideVideoThumbnailLoader;
Expand Down Expand Up @@ -677,7 +677,7 @@ public void onTextChanged(CharSequence s, int start, int before, int count) {


if (mPreviousText.length() == 0
&& !TextUtils.isEmpty(newText)
&& !isTextEmpty(newText)
&& !TextUtils.isEmpty(mEditText.getTagName())
&& mEditText.getSelectedStyles().isEmpty()) {

Expand All @@ -691,6 +691,12 @@ public void onTextChanged(CharSequence s, int start, int before, int count) {
}
}

// This accounts for the END_OF_BUFFER_MARKER that is added to blocks to maintain the styling, if the only char
// is the zero width marker then it is considered "empty"
private boolean isTextEmpty(String text) {
return text.length() == 0 || (text.length() == 1 && text.charAt(0) == Constants.INSTANCE.getEND_OF_BUFFER_MARKER());
}

@Override
public void afterTextChanged(Editable s) {}
}
Expand Down
2 changes: 1 addition & 1 deletion packages/react-native-aztec/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@wordpress/react-native-aztec",
"version": "1.42.1",
"version": "1.43.0",
"description": "Aztec view for react-native.",
"private": true,
"author": "The WordPress Contributors",
Expand Down
2 changes: 1 addition & 1 deletion packages/react-native-bridge/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@wordpress/react-native-bridge",
"version": "1.42.1",
"version": "1.43.0",
"description": "Native bridge library used to integrate the block editor into a native App.",
"private": true,
"author": "The WordPress Contributors",
Expand Down
5 changes: 5 additions & 0 deletions packages/react-native-editor/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,11 @@ For each user feature we should also add a importance categorization label to i

## Unreleased

## 1.43.0
* [***] New Block: File [#27228]
* [**] Fix issue where a blocks would disappear when deleting all of the text inside without requiring the extra backspace to remove the block. [#27583]

## 1.42.0
* [***] Adding support for selecting different unit of value in Cover and Columns blocks [#26161]
* [**] Button block - Add link picker to the block settings [#26206]
* [**] Support to render background/text colors in Group, Paragraph and Quote blocks [#25994]
Expand Down
8 changes: 4 additions & 4 deletions packages/react-native-editor/ios/Podfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ PODS:
- DoubleConversion
- glog
- glog (0.3.5)
- Gutenberg (1.42.1):
- Gutenberg (1.43.0):
- React-Core (= 0.61.5)
- React-CoreModules (= 0.61.5)
- React-RCTImage (= 0.61.5)
Expand Down Expand Up @@ -253,7 +253,7 @@ PODS:
- React-Core
- RNSVG (9.13.6-gb):
- React-Core
- RNTAztecView (1.42.1):
- RNTAztecView (1.43.0):
- React-Core
- WordPress-Aztec-iOS (~> 1.19.3)
- WordPress-Aztec-iOS (1.19.3)
Expand Down Expand Up @@ -402,7 +402,7 @@ SPEC CHECKSUMS:
FBReactNativeSpec: 118d0d177724c2d67f08a59136eb29ef5943ec75
Folly: 30e7936e1c45c08d884aa59369ed951a8e68cf51
glog: 1f3da668190260b06b429bb211bfbee5cd790c28
Gutenberg: d4257899f1def887029385c03eeadb20f8769506
Gutenberg: 0bf0e3308e75b4c4693447d3ce672410e978616e
RCTRequired: b153add4da6e7dbc44aebf93f3cf4fcae392ddf1
RCTTypeSafety: 9aa1b91d7f9310fc6eadc3cf95126ffe818af320
React: b6a59ef847b2b40bb6e0180a97d0ca716969ac78
Expand Down Expand Up @@ -435,7 +435,7 @@ SPEC CHECKSUMS:
RNReanimated: f05baf4cd76b6eab2e4d7e2b244424960b968918
RNScreens: 953633729a42e23ad0c93574d676b361e3335e8b
RNSVG: 46c4b680fe18237fa01eb7d7b311d77618fde31f
RNTAztecView: 38c4acd97d152a125eba9318125c3a75ea99e1db
RNTAztecView: 2b2423ec5349be4170212c6d81345525b4d9f41c
WordPress-Aztec-iOS: b7ac8b30f746992e85d9668453ac87c2cdcecf4f
Yoga: f2a7cd4280bfe2cca5a7aed98ba0eb3d1310f18b

Expand Down
2 changes: 1 addition & 1 deletion packages/react-native-editor/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@wordpress/react-native-editor",
"version": "1.42.1",
"version": "1.43.0",
"description": "Mobile WordPress gutenberg editor.",
"author": "The WordPress Contributors",
"license": "GPL-2.0-or-later",
Expand Down