Skip to content

Commit

Permalink
Merge branch 'master' into feature/accessible-autocomplete
Browse files Browse the repository at this point in the history
# Conflicts:
#	package.json
  • Loading branch information
Adam Silverstein committed Feb 28, 2019
2 parents 5ba93d1 + 03fc448 commit aa4bbcc
Show file tree
Hide file tree
Showing 800 changed files with 22,475 additions and 16,747 deletions.
71 changes: 0 additions & 71 deletions .eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -32,77 +32,6 @@ module.exports = {
selector: 'ImportDeclaration[source.value=/^@wordpress\\u002F.+\\u002F/]',
message: 'Path access on WordPress dependencies is not allowed.',
},
{
selector: 'ImportDeclaration[source.value=/^api-fetch(\\u002F|$)/]',
message: 'Use @wordpress/api-fetch as import path instead.',
},
{
selector: 'ImportDeclaration[source.value=/^blob(\\u002F|$)/]',
message: 'Use @wordpress/blob as import path instead.',
},
{
selector: 'ImportDeclaration[source.value=/^block-serialization-spec-parser(\\u002F|$)/]',
message: 'Use @wordpress/block-serialization-spec-parser as import path instead.',
},
{
selector: 'ImportDeclaration[source.value=/^blocks(\\u002F|$)/]',
message: 'Use @wordpress/blocks as import path instead.',
},{
selector: 'ImportDeclaration[source.value=/^components(\\u002F|$)/]',
message: 'Use @wordpress/components as import path instead.',
},
{
selector: 'ImportDeclaration[source.value=/^data(\\u002F|$)/]',
message: 'Use @wordpress/data as import path instead.',
},
{
selector: 'ImportDeclaration[source.value=/^date(\\u002F|$)/]',
message: 'Use @wordpress/date as import path instead.',
},
{
selector: 'ImportDeclaration[source.value=/^deprecated(\\u002F|$)/]',
message: 'Use @wordpress/deprecated as import path instead.',
},
{
selector: 'ImportDeclaration[source.value=/^dom(\\u002F|$)/]',
message: 'Use @wordpress/dom as import path instead.',
},
{
selector: 'ImportDeclaration[source.value=/^editor(\\u002F|$)/]',
message: 'Use @wordpress/editor as import path instead.',
},
{
selector: 'ImportDeclaration[source.value=/^element(\\u002F|$)/]',
message: 'Use @wordpress/element as import path instead.',
},
{
selector: 'ImportDeclaration[source.value=/^keycodes(\\u002F|$)/]',
message: 'Use @wordpress/keycodes as import path instead.',
},
{
selector: 'ImportDeclaration[source.value=/^nux(\\u002F|$)/]',
message: 'Use @wordpress/nux as import path instead.',
},
{
selector: 'ImportDeclaration[source.value=/^edit-post(\\u002F|$)/]',
message: 'Use @wordpress/edit-post as import path instead.',
},
{
selector: 'ImportDeclaration[source.value=/^viewport(\\u002F|$)/]',
message: 'Use @wordpress/viewport as import path instead.',
},
{
selector: 'ImportDeclaration[source.value=/^plugins(\\u002F|$)/]',
message: 'Use @wordpress/plugins as import path instead.',
},
{
"selector": "ImportDeclaration[source.value=/^core-data$/]",
"message": "Use @wordpress/core-data as import path instead."
},
{
"selector": "ImportDeclaration[source.value=/^block-library$/]",
"message": "Use @wordpress/block-library as import path instead."
},
{
selector: 'CallExpression[callee.name="deprecated"] Property[key.name="version"][value.value=/' + majorMinorRegExp + '/]',
message: 'Deprecated functions must be removed before releasing this version.',
Expand Down
31 changes: 20 additions & 11 deletions .github/CODEOWNERS
Validating CODEOWNERS rules …
Original file line number Diff line number Diff line change
Expand Up @@ -10,14 +10,17 @@
# Editor
/packages/annotations @youknowriad @gziolo @aduth @atimmer
/packages/autop @youknowriad @aduth
/packages/block-serialization-spec-parser @youknowriad @gziolo @aduth
/packages/block-serialization-default-parser @youknowriad @gziolo @aduth
/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/list-reusable-blocks @youknowriad @aduth @noisysocks
/packages/shortcode @youknowriad @aduth

# Widgets
/packages/edit-widgets @youknowriad

# Tooling
/bin @youknowriad @gziolo @aduth @ntwb @nerrad @ajitbohra
/packages/babel-plugin-import-jsx-pragma @youknowriad @gziolo @aduth @ntwb @nerrad @ajitbohra
Expand All @@ -34,15 +37,15 @@
/packages/library-export-default-webpack-plugin @youknowriad @gziolo @aduth @ntwb @nerrad @ajitbohra
/packages/npm-package-json-lint-config @youknowriad @gziolo @aduth @ntwb @nerrad @ajitbohra
/packages/postcss-themes @youknowriad @gziolo @aduth @ntwb @nerrad @ajitbohra
/packages/scripts @youknowriad @gziolo @aduth @ntwb @nerrad @ajitbohra @nosolosw
/packages/scripts @youknowriad @gziolo @aduth @ntwb @nerrad @ajitbohra @nosolosw @mkaz

# UI Components
/packages/components @youknowriad @gziolo @aduth @chrisvanpatten @ajitbohra @jaymanpandya @jorgefilipecosta @talldan @noisysocks
/packages/compose @youknowriad @gziolo @aduth @chrisvanpatten @ajitbohra @jaymanpandya @jorgefilipecosta @talldan @noisysocks
/packages/element @youknowriad @gziolo @aduth @chrisvanpatten @ajitbohra @jaymanpandya @jorgefilipecosta @talldan @noisysocks
/packages/notices @youknowriad @gziolo @aduth @chrisvanpatten @ajitbohra @jaymanpandya @jorgefilipecosta @talldan @noisysocks
/packages/nux @youknowriad @gziolo @aduth @chrisvanpatten @ajitbohra @jaymanpandya @jorgefilipecosta @talldan @noisysocks
/packages/viewport @youknowriad @gziolo @aduth @chrisvanpatten @ajitbohra @jaymanpandya @jorgefilipecosta @talldan @noisysocks
/packages/components @youknowriad @gziolo @aduth @ajitbohra @jaymanpandya @jorgefilipecosta @talldan @noisysocks @chrisvanpatten
/packages/compose @youknowriad @gziolo @aduth @ajitbohra @jaymanpandya @jorgefilipecosta @talldan @noisysocks
/packages/element @youknowriad @gziolo @aduth @ajitbohra @jaymanpandya @jorgefilipecosta @talldan @noisysocks
/packages/notices @youknowriad @gziolo @aduth @ajitbohra @jaymanpandya @jorgefilipecosta @talldan @noisysocks
/packages/nux @youknowriad @gziolo @aduth @ajitbohra @jaymanpandya @jorgefilipecosta @talldan @noisysocks
/packages/viewport @youknowriad @gziolo @aduth @ajitbohra @jaymanpandya @jorgefilipecosta @talldan @noisysocks

# Utilities
/packages/a11y @youknowriad @gziolo @aduth
Expand All @@ -67,19 +70,25 @@

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

# PHP
/lib @youknowriad @gziolo @aduth

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

# Styles
*.scss @chrisvanpatten

# Native (Unowned)
*.native.js @ghost
*.android.js @ghost
*.ios.js @ghost
*.native.scss @ghost
*.android.scss @ghost
*.ios.scss @ghost

# Project Management
/.github @youknowriad @mapk @karmatosed
7 changes: 4 additions & 3 deletions assets/stylesheets/_mixins.scss
Original file line number Diff line number Diff line change
Expand Up @@ -195,8 +195,8 @@

@mixin square-style__focus() {
color: $dark-gray-900;
outline: 1px solid $dark-gray-300;
box-shadow: none;
outline-offset: -1px;
outline: 1px dotted $dark-gray-500;
}

// Menu items.
Expand All @@ -209,6 +209,7 @@
color: $dark-gray-900;
border: none;
box-shadow: none;
background: $light-gray-200;
}

@mixin menu-style__focus() {
Expand All @@ -226,7 +227,7 @@
}

@mixin block-style__hover {
background: $light-gray-100;
background: $light-gray-200;
color: $dark-gray-900;
}

Expand Down
9 changes: 5 additions & 4 deletions assets/stylesheets/_z-index.scss
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,8 @@ $z-layers: (
".editor-block-list__layout .reusable-block-indicator": 1,
".editor-block-list__breadcrumb": 2,
".components-form-toggle__input": 1,
".components-panel__header.edit-post-sidebar__panel-tabs": 1,
".components-panel__header.edit-post-sidebar__panel-tabs": -1,
".edit-post-sidebar .components-panel": -2,
".editor-inserter__tabs": 1,
".editor-inserter__tab.is-active": 1,
".components-panel__header": 1,
Expand Down Expand Up @@ -70,9 +71,9 @@ $z-layers: (
// but bellow #adminmenuback { z-index: 100 }
".edit-post-sidebar {greater than small}": 90,

// Show notices below expanded wp-admin submenus:
// #adminmenuwrap { z-index: 9990 }
".components-notice-list": 9989,
// Show notices below expanded editor bar
// .edit-post-header { z-index: 30 }
".components-notice-list": 29,

// Show modal under the wp-admin menus and the popover
".components-modal__screen-overlay": 100000,
Expand Down
10 changes: 0 additions & 10 deletions babel.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,16 +3,6 @@ module.exports = function( api ) {

return {
presets: [ '@wordpress/babel-preset-default' ],
plugins: [
[
'@wordpress/babel-plugin-import-jsx-pragma',
{
scopeVariable: 'createElement',
source: '@wordpress/element',
isDefault: false,
},
],
],
env: {
production: {
plugins: [
Expand Down
10 changes: 5 additions & 5 deletions bin/get-server-blocks.php
Original file line number Diff line number Diff line change
Expand Up @@ -24,10 +24,10 @@
require_once ABSPATH . WPINC . '/functions.php';
wp_load_translations_early();
wp_set_lang_dir();
require_once dirname( dirname( __FILE__ ) ) . '/lib/blocks.php';
require_once dirname( dirname( __FILE__ ) ) . '/lib/class-wp-block-type-registry.php';
require_once dirname( dirname( __FILE__ ) ) . '/lib/class-wp-block-type.php';
require_once dirname( dirname( __FILE__ ) ) . '/lib/client-assets.php';
require_once ABSPATH . WPINC . '/blocks.php';
require_once ABSPATH . WPINC . '/class-wp-block-type-registry.php';
require_once ABSPATH . WPINC . '/class-wp-block-type.php';
require_once ABSPATH . '/wp-admin/includes/post.php';

// Register server-side code for individual blocks.
foreach ( glob( dirname( dirname( __FILE__ ) ) . '/packages/block-library/src/*/index.php' ) as $block_logic ) {
Expand All @@ -36,4 +36,4 @@

do_action( 'init' );

echo json_encode( gutenberg_prepare_blocks_for_js() );
echo json_encode( get_block_editor_server_block_settings() );
2 changes: 2 additions & 0 deletions bin/install-wordpress.sh
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,8 @@ if [ "$WP_VERSION" == "latest" ]; then
# Check for WordPress updates, to make sure we're running the very latest version.
echo -e $(status_message "Updating WordPress to the latest version...")
docker-compose $DOCKER_COMPOSE_FILE_OPTIONS run --rm -u 33 $CLI core update --quiet
echo -e $(status_message "Updating The WordPress Database...")
docker-compose $DOCKER_COMPOSE_FILE_OPTIONS run --rm -u 33 $CLI core update-db --quiet
fi

# If the 'wordpress' volume wasn't during the down/up earlier, but the post port has changed, we need to update it.
Expand Down
13 changes: 3 additions & 10 deletions bin/packages/get-babel-config.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,14 +10,7 @@ const babel = require( '@babel/core' );
const { options: babelDefaultConfig } = babel.loadPartialConfig( {
configFile: '@wordpress/babel-preset-default',
} );
const plugins = babelDefaultConfig.plugins;
if ( ! process.env.SKIP_JSX_PRAGMA_TRANSFORM ) {
plugins.push( [ '@wordpress/babel-plugin-import-jsx-pragma', {
scopeVariable: 'createElement',
source: '@wordpress/element',
isDefault: false,
} ] );
}
const { plugins, presets } = babelDefaultConfig;

const overrideOptions = ( target, targetName, options ) => {
if ( get( target, [ 'file', 'request' ] ) === targetName ) {
Expand All @@ -37,7 +30,7 @@ const babelConfigs = {
{
plugins,
presets: map(
babelDefaultConfig.presets,
presets,
( preset ) => overrideOptions( preset, '@babel/preset-env', {
modules: 'commonjs',
} )
Expand All @@ -55,7 +48,7 @@ const babelConfigs = {
} )
),
presets: map(
babelDefaultConfig.presets,
presets,
( preset ) => overrideOptions( preset, '@babel/preset-env', {
modules: false,
} )
Expand Down
38 changes: 2 additions & 36 deletions bin/packages/get-packages.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
*/
const fs = require( 'fs' );
const path = require( 'path' );
const { overEvery, compact, includes, negate } = require( 'lodash' );
const { overEvery } = require( 'lodash' );

/**
* Absolute path to packages directory.
Expand All @@ -12,36 +12,6 @@ const { overEvery, compact, includes, negate } = require( 'lodash' );
*/
const PACKAGES_DIR = path.resolve( __dirname, '../../packages' );

const {
/**
* Comma-separated string of packages to include in build.
*
* @type {string}
*/
INCLUDE_PACKAGES,

/**
* Comma-separated string of packages to exclude from build.
*
* @type {string}
*/
EXCLUDE_PACKAGES,
} = process.env;

/**
* Given a comma-separated string, returns a filter function which returns true
* if the item is contained within as a comma-separated entry.
*
* @param {Function} filterFn Filter function to call with item to test.
* @param {string} list Comma-separated list of items.
*
* @return {Function} Filter function.
*/
const createCommaSeparatedFilter = ( filterFn, list ) => {
const listItems = list.split( ',' );
return ( item ) => filterFn( listItems, item );
};

/**
* Returns true if the given base file name for a file within the packages
* directory is itself a directory.
Expand All @@ -62,11 +32,7 @@ function isDirectory( file ) {
*
* @return {boolean} Whether to include file in build.
*/
const filterPackages = overEvery( compact( [
isDirectory,
INCLUDE_PACKAGES && createCommaSeparatedFilter( includes, INCLUDE_PACKAGES ),
EXCLUDE_PACKAGES && createCommaSeparatedFilter( negate( includes ), EXCLUDE_PACKAGES ),
] ) );
const filterPackages = overEvery( isDirectory );

/**
* Returns the absolute path of all WordPress packages
Expand Down
4 changes: 2 additions & 2 deletions docs/contributors/coding-guidelines.md
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ Example:
/**
* External dependencies
*/
import TinyMCE from 'tinymce';
import moment from 'moment';
```

#### WordPress Dependencies
Expand Down Expand Up @@ -142,7 +142,7 @@ const name = 'Matt';

// Bad:
const pet = 'Matt\'s dog';
// Also bad (not using an apostrophe):
// Also bad (not using an apostrophe):
const pet = "Matt's dog";
// Good:
const pet = 'Matt’s dog';
Expand Down
2 changes: 1 addition & 1 deletion docs/contributors/copy-guide.md
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ Here, every line has different phrasing (some start with a verb, some with a nou

Reading this list takes more work because the reader has to parse each bullet anew. They can’t assume each bullet will contain similar information.

Note: this doesn't mean every bullet has to be super short and start with an action verb! “Predicable” doesn’t have to mean “simple.” It just means that each bullet should have the same sentence structure. This list would also be fine:
Note: this doesn't mean every bullet has to be super short and start with an action verb! “Predictable” doesn’t have to mean “simple.” It just means that each bullet should have the same sentence structure. This list would also be fine:

> What can you do with this block? Lots of things!
> * Try adding a quote. Sometimes someone else said things best!
Expand Down
2 changes: 1 addition & 1 deletion docs/contributors/readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ The following guidelines are in place to create consistency across the project a

## Philosophy

* [Architecturial and UX Principles of Gutenberg](/docs/contributors/principles.md)
* [Architectural and UX Principles of Gutenberg](/docs/contributors/principles.md)

## Sections

Expand Down
Loading

0 comments on commit aa4bbcc

Please sign in to comment.