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

Release v1.19.0 #1667

Merged
merged 131 commits into from
Dec 13, 2019
Merged
Changes from 26 commits
Commits
Show all changes
131 commits
Select commit Hold shift + click to select a range
6b11d52
Correct path to the jest binary
hypest Nov 8, 2019
6a24cca
Update GB reference.
SergioEstevao Nov 20, 2019
044873b
Update release notes.
SergioEstevao Nov 21, 2019
2fb8162
Pass postType as initial prop on iOS
koke Nov 21, 2019
a151e3d
Pass postType down to Editor
koke Nov 21, 2019
09367d3
Allow Android to set the post type
koke Nov 21, 2019
338212d
updafe test files and iOS version for running locally with xcode 11
JavonDavis Nov 22, 2019
e5dc0b1
Update gutenberg ref
etoledom Nov 22, 2019
70648f1
Update aztec to version that support reversed and start on lists.
SergioEstevao Nov 25, 2019
0d4a79d
Update Gutenberg to version where list settings are active in native.
SergioEstevao Nov 25, 2019
37c2a31
update block list check and capabilities
JavonDavis Nov 25, 2019
7e17c09
replace double click on android
JavonDavis Nov 25, 2019
70869d4
fix block insertion timeout
JavonDavis Nov 25, 2019
abb96a5
update branch with develop
JavonDavis Nov 25, 2019
81fe82d
Update gutenberg ref
etoledom Nov 25, 2019
14c11cb
update gutenberg ref
JavonDavis Nov 26, 2019
a1cfa38
Update GB-reference.
SergioEstevao Nov 26, 2019
ae5be4b
Update release notes.
SergioEstevao Nov 26, 2019
2f19c48
revert caps to iPhone Simulator
JavonDavis Nov 26, 2019
2767bcb
Update GB reference.
SergioEstevao Nov 26, 2019
2598f73
Fix spacing
mkevins Nov 27, 2019
e76565b
Add static method to Media class to create instance using mimeType
mkevins Nov 27, 2019
4da4d3f
Add flag to track when appending multiple selected media items as blocks
mkevins Nov 27, 2019
c072a93
Introduce mediaSelectionCancelled method in WPAndroidGlueCode
mkevins Nov 27, 2019
183850f
Set flag to append blocks when multiple = false is not respected
mkevins Nov 27, 2019
1dbe658
Only use appendUploadMediaFiles plural version
mkevins Nov 27, 2019
4829cb6
Update gutenberg ref
etoledom Nov 27, 2019
dee1b50
Update to latest Gutenberg master
hypest Nov 27, 2019
8aa5a69
Patch jsdom to implement Element.closest()
hypest Nov 27, 2019
cfcb038
Merge pull request #1622 from wordpress-mobile/master-merge-1.7.1
Tug Nov 27, 2019
70f2855
Merge branch 'develop' into fix/multiple-media-selection-handling
mkevins Nov 27, 2019
394540e
Add docstring to the function
hypest Nov 27, 2019
919526c
Return null as per https://dom.spec.whatwg.org/#dom-element-closest
hypest Nov 27, 2019
0a0a6c7
Update Aztec version.
SergioEstevao Nov 27, 2019
d509b99
Update GB reference.
SergioEstevao Nov 27, 2019
2a523b7
Update gutenberg ref
etoledom Nov 27, 2019
a440f00
Update RELEASE-NOTES.txt
etoledom Nov 27, 2019
77561ed
Update GB reference
SergioEstevao Nov 27, 2019
cc7fb04
Merge branch 'refs/heads/develop' into issue/implement_video_properties
SergioEstevao Nov 27, 2019
f9d941e
Improve code block style
SergioEstevao Nov 27, 2019
ae73a07
Update GB reference.
SergioEstevao Nov 27, 2019
ca75471
Merge pull request #1626 from wordpress-mobile/issue/1625-implement-e…
cameronvoell Nov 28, 2019
a752b56
Merge remote-tracking branch 'origin/develop' into issue/image-size-i…
etoledom Nov 28, 2019
ceca01a
Update gutenberg ref
etoledom Nov 28, 2019
b4b2d11
Merge remote-tracking branch 'origin/develop' into issue/1522-fix-cra…
etoledom Nov 28, 2019
d3424c4
Update Media mimeType truncation to use enum names
mkevins Nov 28, 2019
0089c0d
Add Javadoc for mAppendsMultipleSelectedToSiblingBlocks flag
mkevins Nov 28, 2019
72cb4cc
Set appends to sibling blocks flag explicitly for all requests
mkevins Nov 28, 2019
22d2875
Add clarifying comment for special block append handling
mkevins Nov 28, 2019
fb6847d
Remove singular (unused) appendMedia method
mkevins Nov 28, 2019
1174488
Merge branch 'develop' into fix/multiple-media-selection-handling
mkevins Nov 28, 2019
0ba8d55
Merge pull request #1611 from wordpress-mobile/issue/image-size-impro…
etoledom Nov 28, 2019
509bf96
Merge pull request #1628 from wordpress-mobile/issue/1522-fix-crash-r…
etoledom Nov 28, 2019
091dc7b
Update GB reference.
SergioEstevao Nov 28, 2019
670aabf
Merge branch 'refs/heads/develop' into issue/implement_video_properties
SergioEstevao Nov 28, 2019
ce63a41
Update GB reference to master.
SergioEstevao Nov 28, 2019
ef0a6c7
Set appends to sibling blocks flag explicitly for other media pick
mkevins Nov 28, 2019
d39c152
Merge pull request #1601 from wordpress-mobile/issue/implement_video_…
SergioEstevao Nov 28, 2019
ac0b389
Update GB reference.
SergioEstevao Nov 28, 2019
0abdc7a
Update GB reference.
SergioEstevao Nov 28, 2019
3bcdcf6
Use lowercase for Media mimeType truncation
mkevins Nov 29, 2019
6937842
Merge branch 'develop' into fix/multiple-media-selection-handling
mkevins Nov 29, 2019
bab368c
Update Gutenberg
koke Nov 29, 2019
0a289b2
Merge remote-tracking branch 'origin/develop' into add/post-type
koke Nov 29, 2019
8bad4ab
Merge pull request #1606 from wordpress-mobile/add/post-type
koke Nov 29, 2019
86769b8
Point to aztecVersion hash which supports list with start and reverse…
marecar3 Nov 29, 2019
e00ae96
Merge
marecar3 Nov 29, 2019
362be51
Merge branch 'master' into develop
maxme Nov 29, 2019
c8a88ab
Update GB reference.
SergioEstevao Nov 29, 2019
47e0e7a
Merge branch 'refs/heads/develop' into issue/fix_merge_of_preformatte…
SergioEstevao Nov 29, 2019
4a30b38
Update GB reference.
SergioEstevao Nov 29, 2019
d98c181
Merge branch 'refs/heads/develop' into issue/368_improve_code_block
SergioEstevao Nov 29, 2019
bfefe06
Update GB reference.
SergioEstevao Nov 29, 2019
825d00f
Update GB reference
SergioEstevao Dec 2, 2019
f6c5b0a
Update GB reference.
SergioEstevao Dec 2, 2019
f091d71
Merge pull request #1630 from wordpress-mobile/issue/368_improve_code…
SergioEstevao Dec 2, 2019
facf8fa
Merge branch 'develop' into fix/multiple-media-selection-handling
mkevins Dec 3, 2019
42d44a5
Merge pull request #1621 from wordpress-mobile/fix/multiple-media-sel…
mkevins Dec 3, 2019
0133cc3
Update aztec version
marecar3 Dec 3, 2019
b4c10c6
Merge branch 'develop' into issue/list_settings
marecar3 Dec 3, 2019
39a174a
Update aztec version
marecar3 Dec 4, 2019
5e2c2bf
Add colors for gallery block
mkevins Dec 4, 2019
049b03d
Update gutenberg reference
mkevins Dec 4, 2019
f7d765a
Update gutenberg reference
mkevins Dec 4, 2019
fc06e4b
Update gutenberg reference
mkevins Dec 4, 2019
d8f20fb
Merge pull request #1647 from wordpress-mobile/fix/add-gallery-colors
mkevins Dec 4, 2019
8540269
Update GB reference.
SergioEstevao Dec 4, 2019
07ec30e
Merge branch 'refs/heads/develop' into issue/list_settings
SergioEstevao Dec 4, 2019
9ba31c0
Update Aztec version to 1.14.0
SergioEstevao Dec 4, 2019
fa041e2
Merge branch 'refs/heads/develop' into issue/fix_merge_of_preformatte…
SergioEstevao Dec 5, 2019
f1dc8d5
Merge pull request #1636 from wordpress-mobile/issue/fix_merge_of_pre…
SergioEstevao Dec 5, 2019
a28d54c
Make sure if the textColor is changed the default text color is updated.
SergioEstevao Dec 5, 2019
e6ac571
Use Slider from react-native-community lib (#1620)
lukewalczak Dec 5, 2019
8e9a59f
Merge pull request #1653 from wordpress-mobile/issue/fix_setting_text…
SergioEstevao Dec 5, 2019
0ecb05a
Merge branch 'refs/heads/develop' into fix/xcode-11
SergioEstevao Dec 6, 2019
fbe3501
Update Aztec editor version.
SergioEstevao Dec 6, 2019
208c693
Update to iOS 13
SergioEstevao Dec 6, 2019
0b7b88c
Update Xcode version.
SergioEstevao Dec 6, 2019
19aa4bf
Use iOS 12 for tests.
SergioEstevao Dec 6, 2019
863bced
Fix typo
SergioEstevao Dec 6, 2019
4bba803
Update Aztec to fix CI error with xcode 10
etoledom Dec 6, 2019
3f1b14c
Use iOS 12.2
SergioEstevao Dec 6, 2019
fd26b79
Update Appium version.
SergioEstevao Dec 6, 2019
98e8833
Update to appium 1.15.1
SergioEstevao Dec 6, 2019
2f9a560
Merge pull request #1557 from wordpress-mobile/fix/test-debugging-path
hypest Dec 6, 2019
000a15c
Merge pull request #1657 from wordpress-mobile/issue/xcode-10-compati…
etoledom Dec 6, 2019
5c76a16
Update to Appium 1.15.1 only in iOS
SergioEstevao Dec 6, 2019
ce9dd04
Update caps.
SergioEstevao Dec 6, 2019
6573570
Add Gallery Block (#1498)
mkevins Dec 6, 2019
6886b1d
Merge branch 'refs/heads/develop' into fix/xcode-11
SergioEstevao Dec 6, 2019
ff46fb2
Merge branch 'refs/heads/develop' into fix/xcode-11
SergioEstevao Dec 6, 2019
407a4bc
Update gutenberg ref (#1646)
Dec 6, 2019
42bb332
Add release notes for Gallery (#1658)
pinarol Dec 6, 2019
e5120a3
Make sure we use iPhone 11 (iOS 13) for build and run tests
SergioEstevao Dec 6, 2019
9b0d4e7
Merge branch 'develop' into issue/list_settings
marecar3 Dec 6, 2019
f4a100b
Pooint aztecVersion to develop
marecar3 Dec 6, 2019
e3da1bb
Update Appium for Android tests too.
SergioEstevao Dec 6, 2019
5f25f18
Set Appium to 1.15.0
SergioEstevao Dec 6, 2019
c9d27c5
Update aztec version to 1.3.36
marecar3 Dec 7, 2019
a8d56bf
Update appium to 1.16.0-rc.1
SergioEstevao Dec 9, 2019
57c3334
Update Aztec iOS to 1.14.1
SergioEstevao Dec 9, 2019
e091d80
Update GB reference.
SergioEstevao Dec 9, 2019
f47c127
Merge pull request #1619 from wordpress-mobile/issue/list_settings
SergioEstevao Dec 9, 2019
7644a01
Merge pull request #1608 from wordpress-mobile/fix/xcode-11
SergioEstevao Dec 9, 2019
035fc31
Activate preformat block on android platform (#1615)
marecar3 Dec 9, 2019
a300e58
Updates package.json and JS bundle for 1.19.0 release.
cameronvoell Dec 9, 2019
d65ff79
Update gutenberg reference
mkevins Dec 10, 2019
a93ea6c
Update gutenberg reference
mkevins Dec 10, 2019
e16b030
Merge pull request #1668 from wordpress-mobile/fix/fork-with-viewport…
mkevins Dec 10, 2019
35444f1
Updating bundles.
cameronvoell Dec 10, 2019
e483ff7
Updating release notes to show video settings in 1.19
cameronvoell Dec 13, 2019
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions RELEASE-NOTES.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,12 @@
1.19.0
------
* [iOS] Fix crash dismissing bottom-sheet after device rotation.

1.18.0
------
* Add support for Video block settings
* [iOS] Added native fullscreen preview when clicking image from Image Block

1.17.0
------
* Include block title in Unsupported block's UI
4 changes: 2 additions & 2 deletions __device-tests__/helpers/test-data.js
Original file line number Diff line number Diff line change
@@ -72,8 +72,8 @@ exports.blockInsertionHtmlFromTitle = `<!-- wp:paragraph -->

exports.imageCaption = `C'est la vie my friends`;

exports.imageCompletehtml = `<!-- wp:image {"id":1} -->
<figure class="wp-block-image"><img src="https://cldup.com/cXyG__fTLN.jpg" alt="" class="wp-image-1"/><figcaption>C'est la vie my friends</figcaption></figure>
exports.imageCompletehtml = `<!-- wp:image {"id":1,"sizeslug":"large"} -->
<figure class="wp-block-image size-large"><img src="https://cldup.com/cXyG__fTLN.jpg" alt="" class="wp-image-1"/><figcaption>C'est la vie my friends</figcaption></figure>
<!-- /wp:image -->

<!-- wp:paragraph -->
72 changes: 59 additions & 13 deletions bin/po2android.js
Original file line number Diff line number Diff line change
@@ -1,12 +1,19 @@
#!/usr/bin/env node

const gettextParser = require( 'gettext-parser' ),
fs = require( 'fs' );
fs = require( 'fs' ),
crypto = require( 'crypto' );

const indent = ' ';

/**
* Encode a raw string into an Android-compatible value
*
* See: https://tekeye.uk/android/examples/android-string-resources-gotchas
* @param {string} unsafeXMLValue input string to be escaped
* @return {string} Escaped string to be copied into the XML <string></string> node
*/
function escapeResourceXML( unsafeXMLValue ) {
// See: https://tekeye.uk/android/examples/android-string-resources-gotchas
// 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 ) {
@@ -18,13 +25,47 @@ function escapeResourceXML( unsafeXMLValue ) {
} ) );
}

/**
* Generate a unique string identifier to use as the `name` property in our xml.
* Try using the string first by stripping any non-alphanumeric characters and cropping it
* Then try hashing the string and appending it to the the sanatized string
* If none of the above makes a unique ref for our string throw an error
*
* @param {string} str raw string
* @param {string} prefix Optional prefix to add to the name
* @return {string} A unique name for this string
*/
const getUniqueName = ( function() {
const names = {};
const ANDROID_MAX_NAME_LENGTH = 100;
const HASH_LENGTH = 8;
return ( str, prefix = 'gutenberg_native_' ) => {
const maxNameLength = ANDROID_MAX_NAME_LENGTH - prefix.length - HASH_LENGTH - 10; // leave some margin just in case
let name = str.replace( /\W+/g, '_' ).toLocaleLowerCase().substring( 0, maxNameLength );
// trim underscores left and right
name = name.replace( /^_+|_+$/g, '' );
// if name exists, use name + hash of the full string
if ( name in names ) {
const strHashShort = crypto.createHash( 'sha1' ).update( str ).digest( 'hex' ).substring( 0, HASH_LENGTH );
name = `${ name }_${ strHashShort }`;
}
// if name still exists
if ( name in names ) {
throw new Error( `Could not generate a unique name for string "${ str }"` );
}
names[ name ] = true;
return `${ prefix }${ name }`;
};
}() );

function po2Android( poInput ) {
const po = gettextParser.po.parse( poInput );
const translations = po.translations[ '' ];
const androidResources = Object.values( translations ).map( ( translation, id ) => {
if ( translation.msgid === '' ) {
return null;
const androidResourcesMap = Object.values( translations ).reduce( ( result, translation ) => {
if ( ! translation.msgid ) {
return result;
}
const uniqueName = getUniqueName( translation.msgid );
const escapedValue = escapeResourceXML( translation.msgid );
const escapedValuePlural = escapeResourceXML( translation.msgid_plural || '' );
const comment = translation.comments.extracted || '';
@@ -33,17 +74,22 @@ function po2Android( poInput ) {
localizedEntry += `${ indent }<!-- ${ comment.replace( '--', '—' ) } -->\n`;
}
if ( translation.msgid_plural ) {
localizedEntry += `${ indent }<plurals name="gutenberg_native_string_${ id }" tools:ignore="UnusedResources">
${ indent }${ indent }<item quantity="one">${ escapedValue }</item>
${ indent }${ indent }<item quantity="other">${ escapedValuePlural }</item>
${ indent }</plurals>
localizedEntry += `${ indent }<string-array name="${ uniqueName }" tools:ignore="UnusedResources">
${ indent }${ indent }<item>${ escapedValue }</item>
${ indent }${ indent }<item>${ escapedValuePlural }</item>
${ indent }</string-array>
`;
} else {
localizedEntry += `${ indent }<string name="gutenberg_native_string_${ id }" tools:ignore="UnusedResources">${ escapedValue }</string>\n`;
localizedEntry += `${ indent }<string name="${ uniqueName }" tools:ignore="UnusedResources">${ escapedValue }</string>\n`;
}
return localizedEntry;
} ).filter( Boolean );
return `<?xml version="1.0" encoding="utf-8"?>\n<resources xmlns:tools="http://schemas.android.com/tools">\n${ androidResources.join( '' ) }</resources>\n`;
result[ uniqueName ] = localizedEntry;
return result;
}, {} );
// try to minimize changes in diffs by sorting strings
const androidResourcesSortedList = Object.entries( androidResourcesMap )
.sort( ( left, right ) => left[ 0 ].localeCompare( right[ 0 ] ) )
.map( ( entry ) => entry[ 1 ] );
return `<?xml version="1.0" encoding="utf-8"?>\n<resources xmlns:tools="http://schemas.android.com/tools">\n${ androidResourcesSortedList.join( '' ) }</resources>\n`;
}

if ( require.main === module ) {
16 changes: 10 additions & 6 deletions bin/po2swift.js
Original file line number Diff line number Diff line change
@@ -6,15 +6,19 @@ const gettextParser = require( 'gettext-parser' ),
function po2Swift( poInput ) {
const po = gettextParser.po.parse( poInput );
const translations = po.translations[ '' ];
const swiftStrings = Object.values( translations ).map( ( translation, id ) => {
if ( translation.msgid === '' ) {
return null;
const swiftStringsMap = Object.values( translations ).reduce( ( result, translation ) => {
if ( ! translation.msgid ) {
return result;
}
const encodedValue = JSON.stringify( translation.msgid );
const encodedComment = JSON.stringify( translation.comments.extracted || '' );
return `let string${ id } = NSLocalizedString(${ encodedValue }, comment: ${ encodedComment })`;
} ).filter( Boolean );
return swiftStrings.join( '\n' ) + '\n';
result[ translation.msgid ] = `_ = NSLocalizedString(${ encodedValue }, comment: ${ encodedComment })`;
return result;
}, {} );
const swiftStringsSortedList = Object.entries( swiftStringsMap )
.sort( ( left, right ) => left[ 0 ].localeCompare( right[ 0 ] ) )
.map( ( entry ) => entry[ 1 ] );
return `import Foundation\n\nprivate func dummy() {\n ${ swiftStringsSortedList.join( '\n ' ) }\n`;
}

if ( require.main === module ) {
3,468 changes: 1,743 additions & 1,725 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.

Loading