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/1.14.0 #1392

Merged
merged 102 commits into from
Oct 4, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
102 commits
Select commit Hold shift + click to select a range
d4b1907
Intercept paste without formatting command.
SergioEstevao Sep 9, 2019
1835f14
Update Gutenberg ref
geriux Sep 9, 2019
e2defe5
Fix store crash with gutenberg master
Tug Sep 13, 2019
4433387
Update gutenberg ref
Tug Sep 13, 2019
a652ccc
Update gutenberg ref
Tug Sep 19, 2019
8ab38d5
Remove unused require
Tug Sep 20, 2019
fb33f0c
Fix tests
Tug Sep 20, 2019
d0cc756
Merge remote-tracking branch 'origin/develop' into update/fix-store-c…
Tug Sep 20, 2019
8c2c477
Add missing @wordpress/block-directory package in symlinked-packages
Tug Sep 20, 2019
08caa7c
Update gutenberg ref
Tug Sep 20, 2019
fc8eb7d
Only report selection changes if text view is still first responder.
SergioEstevao Sep 20, 2019
e71f34a
Don't allow interactions with URL in Aztec text blocks.
SergioEstevao Sep 20, 2019
e74f4cd
Merge pull request #1376 from wordpress-mobile/master
daniloercoli Sep 23, 2019
ba7d6f0
Updated gutenberg ref
geriux Sep 23, 2019
f84373a
Merge branch 'develop' of github.com:wordpress-mobile/gutenberg-mobil…
geriux Sep 23, 2019
0ba72e8
Update GB reference.
SergioEstevao Sep 23, 2019
8b0bb3a
Update GB reference.
SergioEstevao Sep 23, 2019
1e0ad56
Use real timers for e2e tests
Tug Sep 24, 2019
4dc784e
Update GB reference.
SergioEstevao Sep 24, 2019
25c4488
Move selection to the start of the URL.
SergioEstevao Sep 24, 2019
0fec680
Make sure links selection is still possible.
SergioEstevao Sep 24, 2019
e930453
Join two guards.
SergioEstevao Sep 24, 2019
e309cd8
Update GB reference.
SergioEstevao Sep 24, 2019
97da943
Use fake timers in unit tests not config
Tug Sep 24, 2019
2cf5c1b
Update GB reference.
SergioEstevao Sep 25, 2019
e220399
Merge pull request #1374 from wordpress-mobile/issue/1368_add_link_to…
SergioEstevao Sep 25, 2019
36cfcb3
Update GB reference.
SergioEstevao Sep 25, 2019
6c9af81
Merge branch 'develop' into issue/1373_tap_links_opens_safari
SergioEstevao Sep 25, 2019
0aaeceb
Update GB reference.
SergioEstevao Sep 25, 2019
97b34f0
Update GB reference.
SergioEstevao Sep 25, 2019
dd3a6d6
Merge pull request #1377 from wordpress-mobile/issue/1261_add_missing…
SergioEstevao Sep 25, 2019
091a75e
Merge branch 'develop' into issue/1311_fix_paste_without_formatting
SergioEstevao Sep 25, 2019
03cc901
Update gutenberg ref
Tug Sep 26, 2019
47ed605
Update gutenberg ref
Tug Sep 26, 2019
bfe9d35
Update GB reference.
SergioEstevao Sep 26, 2019
042ee2b
Merge remote-tracking branch 'origin/develop' into update/fix-store-c…
Tug Sep 26, 2019
79009b1
Add comment explaining why we need to call jest.runAllTicks();
Tug Sep 26, 2019
82ce8df
Fix lint issue on rmobile/master on gutenberg repo (#1388)
lukewalczak Sep 26, 2019
257733d
Update GB reference.
SergioEstevao Sep 26, 2019
69c339d
Merge remote-tracking branch 'origin/develop' into update/fix-store-c…
Tug Sep 26, 2019
d597760
Merge branch 'develop' into issue/1311_fix_paste_without_formatting
SergioEstevao Sep 26, 2019
b651fbe
Update gutenberg ref
Tug Sep 26, 2019
640455e
Merge pull request #1360 from wordpress-mobile/issue/1311_fix_paste_w…
SergioEstevao Sep 26, 2019
e7e7b7b
Merge remote-tracking branch 'origin/develop' into update/fix-store-c…
Tug Sep 26, 2019
4b6e763
Update gutenberg ref
geriux Sep 26, 2019
6eb780d
Merge branch 'develop' of github.com:wordpress-mobile/gutenberg-mobil…
geriux Sep 27, 2019
155d694
Gitmodules update
geriux Sep 27, 2019
b390e1d
Update gutenberg ref
geriux Sep 27, 2019
c364ab4
Merge pull request #1361 from wordpress-mobile/feature/move-media-upl…
koke Sep 27, 2019
20a565c
Increase the number of workers so tests don't get queued when calling…
Tug Sep 27, 2019
3b5577f
Reenable disabled e2e tests
Tug Sep 27, 2019
6c75768
Reenable disabled e2e tests
Tug Sep 27, 2019
8c9f4cb
Update gutenberg ref
Tug Sep 27, 2019
81168f5
Update gutenberg ref
Tug Sep 27, 2019
fb6db57
Disable warning notices
Tug Sep 27, 2019
561f27e
Disable warning notices, fix lint
Tug Sep 27, 2019
078e62d
Merge remote-tracking branch 'origin/develop' into update/fix-store-c…
Tug Sep 27, 2019
39856db
Update GB reference.
SergioEstevao Sep 27, 2019
56f8d09
Merge branch 'develop' into issue/1373_tap_links_opens_safari
SergioEstevao Sep 27, 2019
0081ee8
Update gutenberg ref
Tug Sep 27, 2019
71815cb
Update GB reference.
SergioEstevao Sep 27, 2019
be87adf
Revert max workers to 3 and increase timeout in tests for now
Tug Sep 27, 2019
b55f55d
Update gutenberg ref
Tug Sep 27, 2019
36fb499
Merge pull request #1366 from wordpress-mobile/update/fix-store-crash
Tug Sep 27, 2019
9aaa7d6
Update GB reference.
SergioEstevao Sep 29, 2019
57459f9
Add isAppender functionality to MediaPlaceholder (#1327)
lukewalczak Sep 30, 2019
945626e
Only apply selection fix on iOS 13.0.0
SergioEstevao Sep 30, 2019
731b965
Merge branch 'develop' into issue/1373_tap_links_opens_safari
SergioEstevao Sep 30, 2019
3182479
Point to gutenberg master
marecar3 Sep 30, 2019
fbc1ad1
Update GB reference.
SergioEstevao Sep 30, 2019
fca1431
Point to the latest well known gb master ref
marecar3 Sep 30, 2019
11299f2
Update bundle
marecar3 Sep 30, 2019
2b1673b
Feat: Cross platform InspectorControls (#1341)
jbinda Sep 30, 2019
e0c41aa
Update release notes.
SergioEstevao Sep 30, 2019
040d5ad
Update GB reference.
SergioEstevao Sep 30, 2019
36c1153
Update GB reference.
SergioEstevao Sep 30, 2019
16283de
Update GB reference.
SergioEstevao Oct 1, 2019
e0e76bd
Update GB reference.
SergioEstevao Oct 1, 2019
1ddbc6f
Merge pull request #1393 from wordpress-mobile/master
SergioEstevao Oct 1, 2019
44544a9
Merge branch 'develop' into issue/1373_tap_links_opens_safari
SergioEstevao Oct 1, 2019
e8d7a93
Merge branch 'develop' into release/1.14.0
marecar3 Oct 1, 2019
638c72e
Merge pull request #1375 from wordpress-mobile/issue/1373_tap_links_o…
SergioEstevao Oct 1, 2019
0444ba3
Update gutenberg ref to the latest rnmobile/release-1.14.0
marecar3 Oct 1, 2019
b006c72
Update GB reference.
SergioEstevao Oct 1, 2019
c74358f
Merge branch 'develop' into release/1.14.0
marecar3 Oct 1, 2019
7a6dd6c
Merge pull request #1375 from wordpress-mobile/issue/1373_tap_links_o…
SergioEstevao Oct 1, 2019
7a412c8
Merge branch 'release/1.14.0' of https://github.com/wordpress-mobile/…
marecar3 Oct 1, 2019
27274dd
Update bundle
marecar3 Oct 1, 2019
1696ab5
Update GB reference.
SergioEstevao Oct 1, 2019
67c433e
Update bundle
marecar3 Oct 1, 2019
b84453d
Update GB reference to fix Header issues.
SergioEstevao Oct 2, 2019
b01446d
Update bundle
marecar3 Oct 3, 2019
93540d0
Android 8 only: Set View.LAYER_TYPE_SOFTWARE on mReactRootView when s…
daniloercoli Oct 3, 2019
d049940
Update release note
daniloercoli Oct 3, 2019
bb24d3f
Increment aztec versio to 1.3.31
marecar3 Oct 3, 2019
7c98591
Merge branch 'release/1.14.0' into issue/wp-android-1268_Content-is-m…
marecar3 Oct 3, 2019
9dd2b2b
Merge pull request #1401 from wordpress-mobile/issue/wp-android-1268_…
daniloercoli Oct 3, 2019
37a0c73
Update gutenberg ref
marecar3 Oct 3, 2019
ad1ad78
Update bundle
marecar3 Oct 3, 2019
9afdaad
Update gb reference
marecar3 Oct 4, 2019
4aadd63
Update bundle
marecar3 Oct 4, 2019
ba606df
Update Aztec iOS to v1.10.1
etoledom Oct 4, 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
6 changes: 6 additions & 0 deletions RELEASE-NOTES.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
1.14.0
------
* Fix a bug on iOS 13.0 were tapping on a link opens Safari
* Fix a link editing issue, where trying to add a empty link at the start of another link would remove the existing link.
* Fix missing content on long posts in html mode on Android

1.12.0
------
* Add rich text styling to video captions
Expand Down
2 changes: 1 addition & 1 deletion __device-tests__/gutenberg-editor-block-insertion.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ import {
} from './helpers/utils';
import testData from './helpers/test-data';

jasmine.DEFAULT_TIMEOUT_INTERVAL = 400000;
jasmine.DEFAULT_TIMEOUT_INTERVAL = 1000000;

describe( 'Gutenberg Editor tests for Block insertion', () => {
let driver;
Expand Down
2 changes: 1 addition & 1 deletion __device-tests__/gutenberg-editor-heading.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ import {
} from './helpers/utils';
import testData from './helpers/test-data';

jasmine.DEFAULT_TIMEOUT_INTERVAL = 400000;
jasmine.DEFAULT_TIMEOUT_INTERVAL = 1000000;

describe( 'Gutenberg Editor tests', () => {
let driver;
Expand Down
2 changes: 1 addition & 1 deletion __device-tests__/gutenberg-editor-image.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ import {
} from './helpers/utils';
import testData from './helpers/test-data';

jasmine.DEFAULT_TIMEOUT_INTERVAL = 400000;
jasmine.DEFAULT_TIMEOUT_INTERVAL = 1000000;

describe( 'Gutenberg Editor Image Block tests', () => {
let driver;
Expand Down
2 changes: 1 addition & 1 deletion __device-tests__/gutenberg-editor-lists-end.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ import {
} from './helpers/utils';
import testData from './helpers/test-data';

jasmine.DEFAULT_TIMEOUT_INTERVAL = 400000;
jasmine.DEFAULT_TIMEOUT_INTERVAL = 1000000;

describe( 'Gutenberg Editor tests for List block (end)', () => {
let driver;
Expand Down
4 changes: 2 additions & 2 deletions __device-tests__/gutenberg-editor-lists.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,9 @@ import {
} from './helpers/utils';
import testData from './helpers/test-data';

jasmine.DEFAULT_TIMEOUT_INTERVAL = 400000;
jasmine.DEFAULT_TIMEOUT_INTERVAL = 1000000;

xdescribe( 'Gutenberg Editor tests for List block', () => {
describe( 'Gutenberg Editor tests for List block', () => {
let driver;
let editorPage;
let allPassed = true;
Expand Down
2 changes: 1 addition & 1 deletion __device-tests__/gutenberg-editor-paragraph.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ import {
} from './helpers/utils';
import testData from './helpers/test-data';

jasmine.DEFAULT_TIMEOUT_INTERVAL = 400000;
jasmine.DEFAULT_TIMEOUT_INTERVAL = 1000000;

describe( 'Gutenberg Editor tests for Paragraph Block', () => {
let driver;
Expand Down
2 changes: 1 addition & 1 deletion __device-tests__/gutenberg-editor-paste.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ import {
} from './helpers/utils';
import testData from './helpers/test-data';

jasmine.DEFAULT_TIMEOUT_INTERVAL = 400000;
jasmine.DEFAULT_TIMEOUT_INTERVAL = 1000000;

describe( 'Gutenberg Editor paste tests', () => {
// skip iOS for now
Expand Down
4 changes: 2 additions & 2 deletions __device-tests__/gutenberg-editor-rotatation.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,9 @@ import {
} from './helpers/utils';
import testData from './helpers/test-data';

jasmine.DEFAULT_TIMEOUT_INTERVAL = 300000;
jasmine.DEFAULT_TIMEOUT_INTERVAL = 1000000;

xdescribe( 'Gutenberg Editor tests', () => {
describe( 'Gutenberg Editor tests', () => {
let driver;
let editorPage;
let allPassed = true;
Expand Down
1,727 changes: 864 additions & 863 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.

1,743 changes: 872 additions & 871 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 gutenberg
Submodule gutenberg updated 828 files
1 change: 1 addition & 0 deletions jest_ui.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ const main = require( './jest.config.js' );

module.exports = {
...main,
timers: 'real',
setupFiles: [],
testMatch: [ '**/__device-tests__/**/*.test.[jt]s?(x)' ],
testPathIgnorePatterns: [
Expand Down
6 changes: 3 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "gutenberg-mobile",
"version": "1.13.1",
"version": "1.14.0",
"private": true,
"config": {
"jsfiles": "./*.js src/*.js src/**/*.js src/**/**/*.js",
Expand Down Expand Up @@ -147,8 +147,8 @@
"node-libs-react-native": "^1.0.2",
"node-sass": "^4.12.0",
"react": "16.8.6",
"react-native": "jtreanor/react-native#v0.60.0-patched",
"react-native-dark-mode": "git+https://github.com/wordpress-mobile/react-native-dark-mode.git#f09bf1480e7b34536413ab3300f29e4375edb2c6",
"react-native": "jtreanor/react-native#v0.60.0-patched",
"react-native-dark-mode": "git+https://github.com/wordpress-mobile/react-native-dark-mode.git#f09bf1480e7b34536413ab3300f29e4375edb2c6",
"react-native-hr": "git+https://github.com/Riglerr/react-native-hr.git#2d01a5cf77212d100e8b99e0310cce5234f977b3",
"react-native-keyboard-aware-scroll-view": "git+https://github.com/wordpress-mobile/react-native-keyboard-aware-scroll-view.git#gb-v0.8.7",
"react-native-modal": "^6.5.0",
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.30'
aztecVersion = 'v1.3.31'
}

repositories {
Expand Down
2 changes: 1 addition & 1 deletion react-native-aztec/ios/Cartfile
Original file line number Diff line number Diff line change
@@ -1 +1 @@
github "wordpress-mobile/AztecEditor-iOS" "1.9.0"
github "wordpress-mobile/AztecEditor-iOS" "1.10.1"
2 changes: 1 addition & 1 deletion react-native-aztec/ios/Cartfile.resolved
Original file line number Diff line number Diff line change
@@ -1 +1 @@
github "wordpress-mobile/AztecEditor-iOS" "1.9.0"
github "wordpress-mobile/AztecEditor-iOS" "1.10.1"
38 changes: 27 additions & 11 deletions react-native-aztec/ios/RNTAztecView/RCTAztecView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -245,14 +245,23 @@ class RCTAztecView: Aztec.TextView {
}

override func paste(_ sender: Any?) {
let start = selectedRange.location
let end = selectedRange.location + selectedRange.length

let pasteboard = UIPasteboard.general
let text = readText(from: pasteboard) ?? ""
let html = readHTML(from: pasteboard) ?? ""
let imagesURLs = readImages(from: pasteboard)
sendPasteCallback(text: text, html: html, imagesURLs: imagesURLs);
}

override func pasteWithoutFormatting(_ sender: Any?) {
let pasteboard = UIPasteboard.general
let text = readText(from: pasteboard) ?? ""
let imagesURLs = readImages(from: pasteboard)
sendPasteCallback(text: text, html: "", imagesURLs: imagesURLs);
}

private func sendPasteCallback(text: String, html: String, imagesURLs: [String]) {
let start = selectedRange.location
let end = selectedRange.location + selectedRange.length
onPaste?([
"currentContent": cleanHTML(),
"selectionStart": start,
Expand Down Expand Up @@ -570,8 +579,8 @@ class RCTAztecView: Aztec.TextView {
// MARK: UITextView Delegate Methods
extension RCTAztecView: UITextViewDelegate {

func textViewDidChangeSelection(_ textView: UITextView) {
guard isInsertingDictationResult == false else {
func textViewDidChangeSelection(_ textView: UITextView) {
guard isFirstResponder, isInsertingDictationResult == false else {
return
}

Expand Down Expand Up @@ -601,12 +610,19 @@ extension RCTAztecView: UITextViewDelegate {
onBlur?([:])
}

func textView(_ textView: UITextView, shouldInteractWith URL: URL, in characterRange: NSRange, interaction: UITextItemInteraction) -> Bool {
// Sergio Estevao: This shouldn't happen in an editable textView, but it looks we have a system bug in iOS13 so we need this workaround
let position = characterRange.location
textView.selectedRange = NSRange(location: position, length: 0)
textView.typingAttributes = textView.attributedText.attributes(at: position, effectiveRange: nil)
textView.delegate?.textViewDidChangeSelection?(textView)
func textView(_ textView: UITextView, shouldInteractWith URL: URL, in characterRange: NSRange, interaction: UITextItemInteraction) -> Bool {
if #available(iOS 13.1, *) {
return false
} else if #available(iOS 13.0.0, *) {
// Sergio Estevao: This shouldn't happen in an editable textView, but it looks we have a system bug in iOS13 so we need this workaround
let position = characterRange.location
textView.selectedRange = NSRange(location: position, length: 0)
textView.typingAttributes = textView.attributedText.attributes(at: position, effectiveRange: nil)
textView.delegate?.textViewDidChangeSelection?(textView)
} else {
return false
}

return false
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
import android.app.Application;
import android.content.Context;
import android.content.MutableContextWrapper;
import android.os.Build;
import android.os.Bundle;
import android.os.Handler;
import android.os.Looper;
Expand Down Expand Up @@ -521,7 +522,17 @@ public void appendMediaFile(int mediaId, final String mediaUrl, final boolean is
}
}

public void toggleEditorMode() {
public void toggleEditorMode(boolean htmlModeEnabled) {
// Turn off hardware acceleration for Oreo
// see https://github.com/wordpress-mobile/gutenberg-mobile/issues/1268#issuecomment-535887390
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O
&& Build.VERSION.SDK_INT <= Build.VERSION_CODES.O_MR1) {
if (htmlModeEnabled) {
mReactRootView.setLayerType(View.LAYER_TYPE_SOFTWARE, null);
} else {
mReactRootView.setLayerType(View.LAYER_TYPE_HARDWARE, null);
}
}
mRnReactNativeGutenbergBridgePackage.getRNReactNativeGutenbergBridgeModule().toggleEditorMode();
}

Expand Down
11 changes: 4 additions & 7 deletions src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
/**
* External dependencies
*/
import { AppRegistry, I18nManager, YellowBox } from 'react-native';
import { AppRegistry, I18nManager } from 'react-native';
import React from 'react';

/**
Expand All @@ -23,12 +23,8 @@ import { getTranslation } from '../i18n-cache';
import initialHtml from './initial-html';

const gutenbergSetup = () => {
const apiFetch = require( '@wordpress/api-fetch' ).default;
const wpData = require( '@wordpress/data' );

// wp-api-fetch
apiFetch.use( apiFetch.createRootURLMiddleware( 'https://public-api.wordpress.com/' ) );

// wp-data
const userId = 1;
const storageKey = 'WP_DATA_USER_' + userId;
Expand Down Expand Up @@ -82,8 +78,9 @@ export class RootComponent extends React.Component {
}

export function registerApp() {
// Disable require circle warnings showing up in the app (they will still be visible in the console)
YellowBox.ignoreWarnings( [ 'Require cycle:' ] );
// Disable warnings as they disrupt the user experience in dev mode
// eslint-disable-next-line no-console
console.disableYellowBox = true;

gutenbergSetup();

Expand Down
13 changes: 10 additions & 3 deletions src/index.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,18 +21,25 @@ describe( 'RootComponent', () => {
beforeAll( initializeEditor );

it( 'renders without crashing', () => {
jest.useFakeTimers();
const app = renderer.create( <RootComponent /> );
// Gutenberg store currently has some asynchronous parts in the store setup
// Need to run all ticks so `isReady` is true in the editor store
// See: https://github.com/wordpress-mobile/gutenberg-mobile/pull/1366#discussion_r326813061
renderer.act( () => {
jest.runAllTicks();
} );
const rendered = app.toJSON();
expect( rendered ).toBeTruthy();
app.unmount();
} );

it( 'renders without crashing with a block focused', () => {
const app = renderer.create( <RootComponent /> );
const blocks = select( 'core/block-editor' ).getBlocks();

// Methods that modify state are required to be called inside `act`
renderer.act( () => {
jest.runAllTicks();
const blocks = select( 'core/block-editor' ).getBlocks();
// Methods that modify state are required to be called inside `act`
dispatch( 'core/block-editor' ).selectBlock( blocks[ 0 ].clientId );
} );

Expand Down
1 change: 1 addition & 0 deletions symlinked-packages/@wordpress/block-directory