Skip to content

Commit

Permalink
Merge pull request #2025 from wordpress-mobile/release/1.24.0
Browse files Browse the repository at this point in the history
1.24.0 Release -> Master
  • Loading branch information
cameronvoell authored Mar 20, 2020
2 parents 4204479 + 462d971 commit d584f8d
Show file tree
Hide file tree
Showing 141 changed files with 3,236 additions and 2,696 deletions.
9 changes: 3 additions & 6 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ jobs:
type: boolean
default: false
docker:
- image: circleci/node:8
- image: circleci/node:10
steps:
- checkout
- checkout-gutenberg
Expand Down Expand Up @@ -118,8 +118,8 @@ jobs:
- dependencies-v3-{{ checksum "ios/Gemfile.lock" }}
- dependencies-v3-
- run:
name: Yarn preios (if needed)
command: test -e ios/build/gutenberg/Build/Products/Release-iphonesimulator/GutenbergDemo.app || yarn preios
name: Build (if needed)
command: test -e ios/build/gutenberg/Build/Products/Release-iphonesimulator/GutenbergDemo.app || SKIP_BUNDLING=true yarn test:e2e:build-app:ios
- save_cache:
name: Save Dependencies Cache
key: dependencies-v3-{{ checksum "ios/Gemfile.lock" }}-{{ checksum "ios/Podfile.lock" }}-{{
Expand All @@ -129,9 +129,6 @@ jobs:
- ~/Library/Caches/CocoaPods
- ~/.cocoapods/repos/trunk
- ios/vendor
- run:
name: Build (if needed)
command: test -e ios/build/gutenberg/Build/Products/Release-iphonesimulator/GutenbergDemo.app || yarn react-native run-ios --configuration Release --no-packager
- run:
name: Bundle iOS
command: yarn test:e2e:bundle:ios
Expand Down
1 change: 0 additions & 1 deletion .eslintignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,3 @@ symlinked-packages
symlinked-packages-in-parent
react-native-aztec
bundle
react-native-aztec-old-submodule
3 changes: 0 additions & 3 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -1,6 +1,3 @@
[submodule "gutenberg"]
path = gutenberg
url = ../../WordPress/gutenberg.git
[submodule "react-native-aztec"]
path = react-native-aztec-old-submodule
url = ../react-native-aztec.git
27 changes: 15 additions & 12 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,7 @@ For a developer experience closer to the one the project maintainers current hav
* yarn (`npm install -g yarn`)
* [AndroidStudio](https://developer.android.com/studio/) to be able to compile the Android version of the app
* [Xcode](https://developer.apple.com/xcode/) to be able to compile the iOS app
* [Carthage](https://github.com/Carthage/Carthage#installing-carthage) needed for fetching the Aztec dependency.

* CocoaPods(`sudo gem install cocoapods`) needed to fetch React and third-party dependencies.

Note that the OS platform used by the maintainers is macOS but the tools and setup should be usable in other platforms too.

Expand Down Expand Up @@ -81,7 +80,7 @@ yarn ios --simulator="iPhone Xs Max"

To see a list of all of your available iOS devices, use `xcrun simctl list devices`.

### When things seem crazy
### Troubleshooting

Some times, and especially when tweaking anything in the `package.json`, Babel configuration (`.babelrc`) or the Jest configuration (`jest.config.js`), your changes might seem to not take effect as expected. On those times, you might need to clean various caches before starting the packager. To do that, run the script: `yarn start:reset`. Other times, you might want to reinstall the NPM packages from scratch and the `yarn clean:install` script can be handy.

Expand Down Expand Up @@ -111,7 +110,7 @@ To run the tests with debugger support, start it with the following CLI command:
yarn test:debug
```

Then, open `chrome://inspect` in Chrome to attach the debugger (look into the "Remote Target" section). While testing/developing, feel free to springle `debugger` statements anywhere in the code that you'd like the debugger to break.
Then, open `chrome://inspect` in Chrome to attach the debugger (look into the "Remote Target" section). While testing/developing, feel free to sprinkle `debugger` statements anywhere in the code that you'd like the debugger to break.

## Writing and Running Unit Tests

Expand All @@ -121,21 +120,25 @@ This project is set up to use [jest](https://facebook.github.io/jest/) for tests

This repository uses Appium to run UI tests. The tests live in `__device-tests__` and are written using Appium to run tests against simulators and real devices. To run these you'll need to check off a few things:

* For now when running the tests you'll need to ensure the metro bundler is not running.
* [Appium cli](https://github.com/appium/appium/blob/master/docs/en/about-appium/getting-started.md) installed and available globally, I'd also recommend using [appium doctor](https://github.com/appium/appium-doctor) to ensure all of Appium's dependencies are good to go. You don't have to worry about starting the server yourself, the tests handle starting the server on port 4723, just be sure that the port is free or feel free to change the port number in the test file.
* When running the tests, you'll need to ensure the Metro bundler (`yarn start`) is not running.
* [Appium CLI](https://github.com/appium/appium/blob/master/docs/en/about-appium/getting-started.md) installed and available globally. We also recommend using [appium-doctor](https://github.com/appium/appium-doctor) to ensure all of Appium's dependencies are good to go. You don't have to worry about starting the server yourself, the tests handle starting the server on port 4723, just be sure that the port is free or feel free to change the port number in the test file.
* For iOS a simulator should automatically launch but for Android you'll need to have an emulator *with at least platform version 8.0* fired up and running.

After those are checked off to run the UI tests on iOS run
Then, to run the UI tests on iOS:

`yarn test:e2e:ios:local`

and for android run,
and for Android:

`yarn test:e2e:android:local`

Note, you might experience problems that seem to be related to the tests starting the Appium server, for example errors that say `Connection Refused`, `Connection Reset` or `The requested environment is not available`. Sorry about that this is still a WIP, you can manually start the Appium server via [appium desktop](https://github.com/appium/appium-desktop) or the cli, then change the port number in the tests while optionally commenting out related code in the `beforeAll` and `afterAll` block.
To run a single test instead of the entire suite, use `yarn device-tests:local`. Here's an example that runs only `gutenberg-editor-paragraph.test`:

`TEST_RN_PLATFORM=ios yarn device-tests:local gutenberg-editor-paragraph.test`

Note: You might experience problems that seem to be related to the tests starting the Appium server, e.g. errors that say `Connection Refused`, `Connection Reset` or `The requested environment is not available`. For now, you can manually start the Appium server via [appium desktop](https://github.com/appium/appium-desktop) or the CLI, then change the port number in the tests while (optionally) commenting out related code in the `beforeAll` and `afterAll` block.

For a more detailed outline of the UI tests and how to get started writing one please visit the [UI Test documentation](https://github.com/wordpress-mobile/gutenberg-mobile/blob/develop/__device-tests__/README.md) and our [contributing guide](https://github.com/wordpress-mobile/gutenberg-mobile/blob/develop/__device-tests__/CONTRIBUTING.md).
For a more detailed outline of the UI tests and how to get started writing one, please visit the [UI Test documentation](https://github.com/wordpress-mobile/gutenberg-mobile/blob/develop/__device-tests__/README.md) and our [contributing guide](https://github.com/wordpress-mobile/gutenberg-mobile/blob/develop/__device-tests__/CONTRIBUTING.md).

## Static analysis and code style

Expand All @@ -147,7 +150,7 @@ yarn lint

To have the linter also _fix_ the violations run: `yarn lint:fix`.

In parallel to `eslint` the project uses `Prettier` for codestyling. Run:
In parallel to `eslint`, the project uses `Prettier` for codestyling. Run:

```
yarn prettier
Expand All @@ -160,7 +163,7 @@ to enforce the style. This will modify the source files to make them conform to
yarn flow
```

You might want to use Visual Studio Code as an editor. The project includes the configuration needed to use the above codestyle and lint tools automatically.
You might want to use Visual Studio Code as an editor. The project includes the configuration needed to use the above codestyle and linting tools automatically.

## License

Expand Down
7 changes: 7 additions & 0 deletions RELEASE-NOTES.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
1.24.0
------
* New block: Latest Posts
* Fix Quote block's left border not being visible in Dark Mode
* Added Starter Page Templates: when you create a new page, we now show you a few templates to get started more quickly.
* Fix crash when pasting HTML content with embeded images on paragraphs

1.23.0
------
* New block: Group
Expand Down
2 changes: 1 addition & 1 deletion RNTAztecView.podspec
Original file line number Diff line number Diff line change
Expand Up @@ -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.16.0'
s.dependency 'WordPress-Aztec-iOS', '1.17.0'

end
18 changes: 15 additions & 3 deletions __device-tests__/helpers/caps.js
Original file line number Diff line number Diff line change
@@ -1,15 +1,27 @@
exports.ios = {
const ios = {
browserName: '',
platformName: 'iOS',
platformVersion: '13.0',
deviceName: 'iPhone 11 Simulator',
platformVersion: '13.3',
deviceName: 'iPhone 11',
os: 'iOS',
deviceOrientation: 'portrait',
automationName: 'XCUITest',
appiumVersion: '1.15.0', // SauceLabs requires appiumVersion to be specified.
app: undefined, // will be set later, locally this is relative to root of project
};

exports.iosLocal = {
...ios,
platformVersion: '13.3',
deviceName: 'iPhone 11',
};

exports.iosServer = {
...ios,
platformVersion: '13.0',
deviceName: 'iPhone 11 Simulator',
};

exports.android8 = {
browserName: '',
platformName: 'Android',
Expand Down
10 changes: 4 additions & 6 deletions __device-tests__/helpers/utils.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ import path from 'path';
* Internal dependencies
*/
import serverConfigs from './serverConfigs';
import { ios, android8 } from './caps';
import { iosServer, iosLocal, android8 } from './caps';
import AppiumLocal from './appium-local';
import _ from 'underscore';

Expand Down Expand Up @@ -92,13 +92,11 @@ const setupDriver = async () => {
desiredCaps.app = `sauce-storage:Gutenberg-${ safeBranchName }.apk`; // App should be preloaded to sauce storage, this can also be a URL
}
} else {
desiredCaps = _.clone( ios );
desiredCaps = _.clone( iosServer );
desiredCaps.app = `sauce-storage:Gutenberg-${ safeBranchName }.app.zip`; // App should be preloaded to sauce storage, this can also be a URL
if ( isLocalEnvironment() ) {
desiredCaps = _.clone( iosLocal );
desiredCaps.app = path.resolve( localIOSAppPath );
delete desiredCaps.platformVersion;
desiredCaps.deviceName = 'iPhone 11';
} else {
desiredCaps.app = `sauce-storage:Gutenberg-${ safeBranchName }.app.zip`; // App should be preloaded to sauce storage, this can also be a URL
}
}

Expand Down
5 changes: 5 additions & 0 deletions android/app/src/main/java/com/gutenberg/MainApplication.java
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@

import com.facebook.react.ReactApplication;
import com.BV.LinearGradient.LinearGradientPackage;
import com.facebook.react.bridge.ReadableMap;
import com.reactnativecommunity.slider.ReactSliderPackage;
import com.brentvatne.react.ReactVideoPackage;
import com.facebook.react.bridge.ReadableArray;
Expand Down Expand Up @@ -101,6 +102,10 @@ public void requestMediaEditor(MediaUploadCallback mediaUploadCallback, String m

}

@Override
public void logUserEvent(GutenbergUserEvent gutenbergUserEvent, ReadableMap eventProperties) {
}

@Override
public void editorDidEmitLog(String message, LogLevel logLevel) {
switch (logLevel) {
Expand Down
2,497 changes: 1,278 additions & 1,219 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.

Original file line number Diff line number Diff line change
@@ -0,0 +1,72 @@
{
"name": "core/latest-posts",
"category": "widgets",
"attributes": {
"align": {
"type": "string",
"enum": ["left", "center", "right", "wide", "full"]
},
"className": {
"type": "string"
},
"categories": {
"type": "array"
},
"postsToShow": {
"type": "number",
"default": 5
},
"displayPostContent": {
"type": "boolean",
"default": false
},
"displayPostContentRadio": {
"type": "string",
"default": "excerpt"
},
"excerptLength": {
"type": "number",
"default": 55
},
"displayPostDate": {
"type": "boolean",
"default": false
},
"postLayout": {
"type": "string",
"default": "list"
},
"columns": {
"type": "number",
"default": 3
},
"order": {
"type": "string",
"default": "desc"
},
"orderBy": {
"type": "string",
"default": "date"
},
"displayFeaturedImage": {
"type": "boolean",
"default": false
},
"featuredImageAlign": {
"type": "string",
"enum": ["left", "center", "right"]
},
"featuredImageSizeSlug": {
"type": "string",
"default":"thumbnail"
},
"featuredImageSizeWidth": {
"type": "number",
"default":null
},
"featuredImageSizeHeight": {
"type": "number",
"default":null
}
}
}
2 changes: 1 addition & 1 deletion bundle/android/raw/i18ncache_data_ar.json

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion bundle/android/raw/i18ncache_data_bg.json

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion bundle/android/raw/i18ncache_data_bo.json

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion bundle/android/raw/i18ncache_data_ca.json

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion bundle/android/raw/i18ncache_data_cs.json

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion bundle/android/raw/i18ncache_data_cy.json

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion bundle/android/raw/i18ncache_data_da.json

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion bundle/android/raw/i18ncache_data_de.json

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion bundle/android/raw/i18ncache_data_el.json

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion bundle/android/raw/i18ncache_data_enau.json

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion bundle/android/raw/i18ncache_data_enca.json

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion bundle/android/raw/i18ncache_data_engb.json

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion bundle/android/raw/i18ncache_data_ennz.json

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion bundle/android/raw/i18ncache_data_enza.json

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion bundle/android/raw/i18ncache_data_es.json

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion bundle/android/raw/i18ncache_data_esar.json

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion bundle/android/raw/i18ncache_data_escl.json

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion bundle/android/raw/i18ncache_data_escr.json

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion bundle/android/raw/i18ncache_data_fa.json

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion bundle/android/raw/i18ncache_data_fr.json

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion bundle/android/raw/i18ncache_data_gl.json

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion bundle/android/raw/i18ncache_data_he.json

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion bundle/android/raw/i18ncache_data_hr.json

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion bundle/android/raw/i18ncache_data_hu.json

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion bundle/android/raw/i18ncache_data_id.json

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion bundle/android/raw/i18ncache_data_is.json

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion bundle/android/raw/i18ncache_data_it.json

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion bundle/android/raw/i18ncache_data_ja.json

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion bundle/android/raw/i18ncache_data_ka.json

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion bundle/android/raw/i18ncache_data_ko.json

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion bundle/android/raw/i18ncache_data_nb.json

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion bundle/android/raw/i18ncache_data_nl.json

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion bundle/android/raw/i18ncache_data_nlbe.json

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion bundle/android/raw/i18ncache_data_pl.json

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion bundle/android/raw/i18ncache_data_pt.json

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion bundle/android/raw/i18ncache_data_ptbr.json

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion bundle/android/raw/i18ncache_data_ro.json

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion bundle/android/raw/i18ncache_data_ru.json

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion bundle/android/raw/i18ncache_data_sk.json

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion bundle/android/raw/i18ncache_data_sq.json

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion bundle/android/raw/i18ncache_data_sr.json

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion bundle/android/raw/i18ncache_data_sv.json

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion bundle/android/raw/i18ncache_data_th.json

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion bundle/android/raw/i18ncache_data_tr.json

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion bundle/android/raw/i18ncache_data_uk.json

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion bundle/android/raw/i18ncache_data_ur.json

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion bundle/android/raw/i18ncache_data_vi.json

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion bundle/android/raw/i18ncache_data_zhcn.json

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion bundle/android/raw/i18ncache_data_zhtw.json

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
@@ -0,0 +1,75 @@
{
"name": "react-native-url-polyfill",
"version": "1.1.2",
"description": "A lightweight and trustworthy URL polyfill for React Native",
"keywords": [
"URL",
"URLSearchParams",
"polyfill",
"react native",
"whatwg-url"
],
"bugs": {
"url": "https://github.com/charpeni/react-native-url-polyfill/issues"
},
"homepage": "https://github.com/charpeni/react-native-url-polyfill",
"readme": "https://github.com/charpeni/react-native-url-polyfill#readme",
"repository": {
"type": "git",
"url": "https://github.com/charpeni/react-native-url-polyfill.git"
},
"main": "index.js",
"scripts": {
"test": "jest",
"lint": "eslint .",
"bundle-size": "node scripts/bundle-size"
},
"author": "Nicolas Charpentier <[email protected]>",
"license": "MIT",
"dependencies": {
"buffer": "^5.4.3",
"whatwg-url-without-unicode": "8.0.0-1"
},
"devDependencies": {
"@react-native-community/eslint-config": "^0.0.7",
"chalk": "^3.0.0",
"eslint": "^6.6.0",
"eslint-plugin-prettier": "^3.1.1",
"execa": "^4.0.0",
"filesize": "^6.0.1",
"husky": ">=1",
"jest": "^25.1.0",
"lint-staged": ">=8",
"metro-react-native-babel-preset": "^0.58.0",
"ora": "^4.0.3",
"prepend-file": "^1.3.1",
"prettier": "^1.19.1",
"react": "^16.12.0",
"react-native": "^0.61.5",
"rmfr": "^2.0.0",
"source-map-explorer": "^2.1.1",
"tmp": "^0.1.0",
"uuid": "^7.0.2"
},
"peerDependencies": {
"react-native": "*"
},
"jest": {
"preset": "react-native",
"testPathIgnorePatterns": [
"/node_modules/",
"./detox/"
]
},
"husky": {
"hooks": {
"pre-commit": "lint-staged"
}
},
"lint-staged": {
"*.js": [
"eslint --fix",
"git add"
]
}
}
Loading

0 comments on commit d584f8d

Please sign in to comment.