Skip to content

Commit

Permalink
Merge pull request #1 from WordPress/master
Browse files Browse the repository at this point in the history
merge master back into fork
  • Loading branch information
fabiankaegy authored Apr 2, 2019
2 parents 13334d7 + 30d3328 commit 45a7f5c
Show file tree
Hide file tree
Showing 597 changed files with 13,436 additions and 6,072 deletions.
5 changes: 5 additions & 0 deletions .eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ module.exports = {
'plugin:jest/recommended',
],
rules: {
'@wordpress/react-no-unsafe-timeout': 'error',
'no-restricted-syntax': [
'error',
// NOTE: We can't include the forward slash in our regex or
Expand Down Expand Up @@ -92,6 +93,10 @@ module.exports = {
selector: 'CallExpression[callee.name="withDispatch"] > :function > BlockStatement > :not(VariableDeclaration,ReturnStatement)',
message: 'withDispatch must return an object with consistent keys. Avoid performing logic in `mapDispatchToProps`.',
},
{
selector: 'LogicalExpression[operator="&&"][left.property.name="length"][right.type="JSXElement"]',
message: 'Avoid truthy checks on length property rendering, as zero length is rendered verbatim.',
},
],
'react/forbid-elements': [ 'error', {
forbid: [
Expand Down
30 changes: 17 additions & 13 deletions .github/CODEOWNERS
Validating CODEOWNERS rules …
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
# Documentation
/docs @youknowriad @chrisvanpatten @mkaz @ajitbohra @nosolosw @notnownikki
/docs/designers-developers/developers @youknowriad @gziolo @chrisvanpatten @mkaz @ajitbohra @nosolosw @notnownikki
/docs/designers-developers/designers @youknowriad @chrisvanpatten @mkaz @ajitbohra @nosolosw @notnownikki

# Data
/packages/api-fetch @youknowriad @aduth @nerrad @mmtr
/packages/core-data @youknowriad @gziolo @aduth @nerrad @noisysocks
Expand All @@ -8,13 +13,14 @@
/packages/block-library @youknowriad @gziolo @Soean @ajitbohra @jorgefilipecosta @talldan @noisysocks @notnownikki

# Editor
/packages/annotations @youknowriad @gziolo @aduth @atimmer
/packages/annotations @youknowriad @aduth @atimmer @ellatrix
/packages/autop @youknowriad @aduth
/packages/block-editor @youknowriad @gziolo @talldan @noisysocks @ellatrix
/packages/block-serialization-spec-parser @youknowriad @gziolo @aduth @dmsnell
/packages/block-serialization-default-parser @youknowriad @gziolo @aduth @dmsnell
/packages/blocks @youknowriad @gziolo @aduth @noisysocks
/packages/edit-post @youknowriad @gziolo @talldan @noisysocks
/packages/editor @youknowriad @gziolo @talldan @noisysocks
/packages/blocks @youknowriad @gziolo @aduth @noisysocks @ellatrix
/packages/edit-post @youknowriad @talldan @noisysocks
/packages/editor @youknowriad @talldan @noisysocks
/packages/list-reusable-blocks @youknowriad @aduth @noisysocks
/packages/shortcode @youknowriad @aduth

Expand All @@ -23,12 +29,13 @@

# Tooling
/bin @youknowriad @gziolo @aduth @ntwb @nerrad @ajitbohra
/docs/tool @youknowriad @gziolo @chrisvanpatten @mkaz @ajitbohra @nosolosw @notnownikki
/packages/babel-plugin-import-jsx-pragma @youknowriad @gziolo @aduth @ntwb @nerrad @ajitbohra @nosolosw
/packages/babel-plugin-makepot @youknowriad @gziolo @aduth @ntwb @nerrad @ajitbohra
/packages/babel-preset-default @youknowriad @gziolo @aduth @ntwb @nerrad @ajitbohra @nosolosw
/packages/browserslist-config @youknowriad @gziolo @aduth @ntwb @nerrad @ajitbohra
/packages/custom-templated-path-webpack-plugin @youknowriad @gziolo @aduth @ntwb @nerrad @ajitbohra
/packages/docgen @nosolosw @mkaz
/packages/docgen @nosolosw @mkaz @gziolo
/packages/e2e-test-utils @youknowriad @gziolo @aduth @ntwb @nerrad @ajitbohra
/packages/e2e-tests @youknowriad @gziolo @aduth @ntwb @nerrad @ajitbohra @talldan
/packages/eslint-plugin @youknowriad @gziolo @aduth @ntwb @nerrad @ajitbohra @nosolosw
Expand All @@ -53,13 +60,13 @@
/packages/blob @youknowriad @gziolo @aduth
/packages/date @youknowriad @gziolo @aduth
/packages/deprecated @youknowriad @gziolo @aduth
/packages/dom @youknowriad @gziolo @aduth @nosolosw
/packages/dom @youknowriad @gziolo @aduth @nosolosw @ellatrix
/packages/dom-ready @youknowriad @gziolo @aduth
/packages/escape-html @youknowriad @gziolo @aduth
/packages/html-entities @youknowriad @gziolo @aduth
/packages/i18n @youknowriad @aduth @swissspidy
/packages/is-shallow-equal @youknowriad @gziolo @aduth
/packages/keycodes @youknowriad @gziolo @aduth @talldan
/packages/keycodes @youknowriad @gziolo @aduth @talldan @ellatrix
/packages/priority-queue @youknowriad @gziolo @aduth
/packages/token-list @youknowriad @gziolo @aduth
/packages/url @youknowriad @gziolo @aduth @talldan
Expand All @@ -70,16 +77,13 @@
/packages/plugins @youknowriad @gziolo @aduth @adamsilverstein

# Rich Text
/packages/format-library @youknowriad @gziolo @aduth @iseulde @jorgefilipecosta
/packages/rich-text @youknowriad @aduth @iseulde @jorgefilipecosta
/packages/editor/src/components/rich-text @youknowriad @aduth @iseulde @jorgefilipecosta
/packages/format-library @youknowriad @aduth @ellatrix @jorgefilipecosta
/packages/rich-text @youknowriad @aduth @ellatrix @jorgefilipecosta
/packages/block-editor/src/components/rich-text @youknowriad @aduth @ellatrix @jorgefilipecosta

# PHP
/lib @youknowriad @gziolo @aduth

# Documentation
/docs @youknowriad @gziolo @chrisvanpatten @mkaz @ajitbohra @nosolosw @notnownikki

# Styles
*.scss @chrisvanpatten

Expand Down
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -12,3 +12,6 @@ phpcs.xml
yarn.lock
docker-compose.override.yml
/wordpress

playground/dist
.cache
20 changes: 16 additions & 4 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ jobs:
- ./bin/run-wp-unit-tests.sh

- name: E2E tests (Admin with plugins) (1/2)
env: WP_VERSION=latest POPULAR_PLUGINS=true
env: WP_VERSION=latest SCRIPT_DEBUG=false POPULAR_PLUGINS=true
install:
- ./bin/setup-local-env.sh
script:
Expand All @@ -74,7 +74,7 @@ jobs:
- npm run test-e2e -- --ci --cacheDirectory="$HOME/.jest-cache" --runTestsByPath $( awk 'NR % 2 == 0' < ~/.jest-e2e-tests )

- name: E2E tests (Admin with plugins) (2/2)
env: WP_VERSION=latest POPULAR_PLUGINS=true
env: WP_VERSION=latest SCRIPT_DEBUG=false POPULAR_PLUGINS=true
install:
- ./bin/setup-local-env.sh
script:
Expand All @@ -83,7 +83,7 @@ jobs:
- npm run test-e2e -- --ci --cacheDirectory="$HOME/.jest-cache" --runTestsByPath $( awk 'NR % 2 == 1' < ~/.jest-e2e-tests )

- name: E2E tests (Author without plugins) (1/2)
env: WP_VERSION=latest E2E_ROLE=author
env: WP_VERSION=latest SCRIPT_DEBUG=false E2E_ROLE=author
install:
- ./bin/setup-local-env.sh
script:
Expand All @@ -92,10 +92,22 @@ jobs:
- npm run test-e2e -- --ci --cacheDirectory="$HOME/.jest-cache" --runTestsByPath $( awk 'NR % 2 == 0' < ~/.jest-e2e-tests )

- name: E2E tests (Author without plugins) (2/2)
env: WP_VERSION=latest E2E_ROLE=author
env: WP_VERSION=latest SCRIPT_DEBUG=false E2E_ROLE=author
install:
- ./bin/setup-local-env.sh
script:
- $( npm bin )/wp-scripts test-e2e --config=./packages/e2e-tests/jest.config.js --listTests > ~/.jest-e2e-tests
- npm run build
- npm run test-e2e -- --ci --cacheDirectory="$HOME/.jest-cache" --runTestsByPath $( awk 'NR % 2 == 1' < ~/.jest-e2e-tests )
allow_failures:
- name: PHP unit tests (PHP 5.3)
env: WP_VERSION=latest SWITCH_TO_PHP=5.3
script:
- ./bin/run-wp-unit-tests.sh
if: branch = master and type != "pull_request"

- name: PHP unit tests (PHP 5.2)
env: WP_VERSION=latest SWITCH_TO_PHP=5.2
script:
- ./bin/run-wp-unit-tests.sh

16 changes: 14 additions & 2 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,8 @@ For another version of Windows, or if you prefer to set things up manually, be s
If you have an incompatible version of Node in your development environment, you can use [nvm](https://github.com/creationix/nvm) to change node versions on the command line:

```
npx nvm install
npx nvm use
nvm install
nvm use
```

You also should have the latest release of [npm installed][npm]. npm is a separate project from Node.js and is updated frequently. If you've just installed Node.js which includes a version of npm within the installation you most likely will need also to update your npm installation. To update npm, type this into your terminal: `npm install npm@latest -g`
Expand Down Expand Up @@ -79,6 +79,12 @@ Alternatively, you can use your own local WordPress environment and clone this r

Next, open a terminal (or if on Windows, a command prompt) and navigate to the repository you cloned. Now type `npm install` to get the dependencies all set up. Then you can type `npm run dev` in your terminal or command prompt to keep the plugin building in the background as you work on it.

WordPress comes with specific [debug systems](https://codex.wordpress.org/Debugging_in_WordPress) designed to simplify the process as well as standardize code across core, plugins and themes. It is possible to use environment variables (`WP_DEBUG` and `SCRIPT_DEBUG`) to update a site's configuration constants located in `wp-config.php` file. Both flags can be disabled at any time by running the following command:
```
SCRIPT_DEBUG=false WP_DEBUG=false ./bin/setup-local-env.sh
```
By default, both flags will be set to `true`.

### On A Remote Server

Open a terminal (or if on Windows, a command prompt) and navigate to the repository you cloned. Now type `npm install` to get the dependencies all set up. Once that finishes, you can type `npm run build`. You can now upload the entire repository to your `wp-content/plugins` directory on your web server and activate the plugin from the WordPress admin.
Expand Down Expand Up @@ -108,6 +114,12 @@ You can pick among all the <a href="https://github.com/WordPress/gutenberg/issue

The workflow is documented in greater detail in the [repository management](/docs/contributors/repository-management.md) document.

## Playground

The Gutenberg repository also includes a static Gutenberg playground that allows testing and developing in a WordPress-agnostic context. This is very helpful for developing reusable components and trying generic JavaScript modules without any backend dependency.

You can launch the playground by running `npm run playground:start` locally. The playground should be available on [http://localhost:1234](http://localhost:1234).

## Testing

Gutenberg contains both PHP and JavaScript code and encourages testing and code style linting for both. It also incorporates end-to-end testing using [Google Puppeteer](https://developers.google.com/web/tools/puppeteer/). You can find out more details in [Testing Overview document](/docs/contributors/testing-overview.md).
Expand Down
1 change: 1 addition & 0 deletions assets/stylesheets/_animations.scss
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,5 @@
@mixin edit-post__fade-in-animation($speed: 0.2s, $delay: 0s) {
animation: edit-post__fade-in-animation $speed ease-out $delay;
animation-fill-mode: forwards;
@include reduce-motion;
}
Loading

0 comments on commit 45a7f5c

Please sign in to comment.