Skip to content

Commit

Permalink
Merge branch 'release/1.20.0' into fix-group-crash
Browse files Browse the repository at this point in the history
  • Loading branch information
dratwas committed Jan 10, 2020
1 parent 8722ec3 commit ec5bbd8
Show file tree
Hide file tree
Showing 12 changed files with 1,854 additions and 1,815 deletions.
5 changes: 5 additions & 0 deletions RELEASE-NOTES.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,11 @@
1.20.0
------
* Fix bug where image placeholders would sometimes not be shown
* Introduce new Stepper component, used in the Spacer block to select the block's height
* Hide image size selection options when image is a url
* Fix crash on undo
* Style fixes on the navigation UI
* [iOS] Fix focus issue

1.19.0
------
Expand Down
16 changes: 12 additions & 4 deletions bin/po2android.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,15 +14,23 @@ const indent = ' ';
* @return {string} Escaped string to be copied into the XML <string></string> node
*/
function escapeResourceXML( unsafeXMLValue ) {
// Let's first replace XML special characters that JSON.stringify does not escape: <, > and &
// Then let's use JSON.stringify to handle pre and post spaces as well as escaping ", \, \t and \n
return JSON.stringify( unsafeXMLValue.replace( /[<>&]/g, function( character ) {
// See: https://tekeye.uk/android/examples/android-string-resources-gotchas
// Let's replace XML special characters <, >, &, ", ', \, \t and \n
// Note that this does not support android:textstyle attributes (<b></b>...)
return unsafeXMLValue.replace( /(\r?\n|\r|\t|<|>|&|'|"|\\)/gm, function( character ) {
switch ( character ) {
case '<': return '&lt;';
case '>': return '&gt;';
case '&': return '&amp;';
case '\'': return '\\\'';
case '"': return '\\\"';
case '\r':
case '\n':
case '\r\n': return '\\n';
case '\t': return '\\t';
case '\\': return '\\\\';
}
} ) );
} );
}

/**
Expand Down
1,725 changes: 868 additions & 857 deletions bundle/android/App.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion bundle/android/App.js.map

Large diffs are not rendered by default.

167 changes: 84 additions & 83 deletions bundle/android/strings.xml

Large diffs are not rendered by default.

1,739 changes: 875 additions & 864 deletions bundle/ios/App.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion bundle/ios/App.js.map

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion bundle/ios/GutenbergNativeTranslations.swift
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ import Foundation
private func dummy() {
_ = NSLocalizedString("'%s' isn't yet supported on WordPress for Android", comment: "translators: %s: Name of the block")
_ = NSLocalizedString("'%s' isn't yet supported on WordPress for iOS", comment: "")
_ = NSLocalizedString("%1$s. Current value is %2$s", comment: "translators: accessibility text. Inform about current value. %1$s: Control label %2$s: Current value.")
_ = NSLocalizedString("%s Block", comment: "translators: accessibility text. %s: block name.")
_ = NSLocalizedString("%s block. Empty", comment: "translators: accessibility text for the media block empty state. %s: media type")
_ = NSLocalizedString("%s block. This block has invalid content", comment: "translators: accessibility text for blocks with invalid content. %d: localized block title")
Expand Down Expand Up @@ -81,6 +82,5 @@ private func dummy() {
_ = NSLocalizedString("Title:", comment: "")
_ = NSLocalizedString("Translate", comment: "")
_ = NSLocalizedString("Ungroup", comment: "")
_ = NSLocalizedString("Unsupported", comment: "")
_ = NSLocalizedString("We are working hard to add more blocks with each release. In the meantime, you can also edit this post on the web.", comment: "")
_ = NSLocalizedString("WordPress Media Library", comment: "")
4 changes: 3 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "gutenberg-mobile",
"version": "1.19.0",
"version": "1.20.0",
"private": true,
"config": {
"jsfiles": "./*.js src/*.js src/**/*.js src/**/**/*.js",
Expand Down Expand Up @@ -85,7 +85,9 @@
"pregenstrings": "test -f gutenberg.pot || yarn makepot:gutenberg",
"genstrings": "yarn genstrings:android && yarn genstrings:ios",
"genstrings:android": "yarn makepot:android && ./bin/po2android.js gutenberg-android.pot bundle/android/strings.xml",
"genstrings:android:check": "xmllint --noout bundle/android/strings.xml",
"genstrings:ios": "yarn makepot:ios && ./bin/po2swift.js gutenberg-ios.pot bundle/ios/GutenbergNativeTranslations.swift",
"postgenstrings:android": "yarn genstrings:android:check",
"android": "react-native run-android",
"prewpandroid": "rm -Rf $TMPDIR/gbmobile-wpandroidfakernroot && mkdir $TMPDIR/gbmobile-wpandroidfakernroot && ln -s $(cd \"$(dirname \"../../../\")\"; pwd) $TMPDIR/gbmobile-wpandroidfakernroot/android",
"wpandroid": "yarn android --root $TMPDIR/gbmobile-wpandroidfakernroot --variant wasabiDebug --appIdSuffix beta --appFolder WordPress --main-activity=ui.WPLaunchActivity",
Expand Down
2 changes: 1 addition & 1 deletion react-native-aztec/android/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ buildscript {
wordpressUtilsVersion = '1.22'
espressoVersion = '3.0.1'

aztecVersion = 'v1.3.36'
aztecVersion = 'v1.3.37'
}

repositories {
Expand Down
3 changes: 2 additions & 1 deletion react-native-aztec/ios/RNTAztecView/RCTAztecView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -669,6 +669,7 @@ extension RCTAztecView: UITextViewDelegate {
}

func textViewDidEndEditing(_ textView: UITextView) {
onBlur?([:])
let text = packForRN(cleanHTML(), withName: "text")
onBlur?(text)
}
}
2 changes: 1 addition & 1 deletion react-native-aztec/src/AztecView.js
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,7 @@ class AztecView extends React.Component {

_onPress = (event) => {
if ( ! this.isFocused() ) {
this.focus(event); // Call to move the focus in RN way (TextInputState)
this.focus(); // Call to move the focus in RN way (TextInputState)
this._onFocus(event); // Check if there are listeners set on the focus event
}
}
Expand Down

0 comments on commit ec5bbd8

Please sign in to comment.