Skip to content

Commit

Permalink
Merge branch 'trunk' into rnmobile/add/reusable-block-capability
Browse files Browse the repository at this point in the history
  • Loading branch information
fluiddot committed May 20, 2021
2 parents d4c2e1a + 4060caa commit 233e227
Show file tree
Hide file tree
Showing 532 changed files with 8,505 additions and 4,420 deletions.
1 change: 1 addition & 0 deletions .eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -168,6 +168,7 @@ module.exports = {
'import/no-extraneous-dependencies': 'off',
'import/no-unresolved': 'off',
'import/named': 'off',
'@wordpress/data-no-store-string-literals': 'off',
},
},
{
Expand Down
7 changes: 7 additions & 0 deletions .github/workflows/build-plugin-zip.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,13 @@ on:
description: 'rc or stable?'
required: true

# Cancels all previous workflow runs for pull requests that have not completed.
concurrency:
# The concurrency group contains the workflow name and the branch name for pull requests
# or the commit hash for any other events.
group: ${{ github.workflow }}-${{ github.event_name == 'pull_request' && github.head_ref || github.sha }}
cancel-in-progress: true

jobs:
bump-version:
name: Bump version
Expand Down
7 changes: 7 additions & 0 deletions .github/workflows/bundle-size.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,13 @@ name: Compressed Size

on: [pull_request]

# Cancels all previous workflow runs for pull requests that have not completed.
concurrency:
# The concurrency group contains the workflow name and the branch name for pull requests
# or the commit hash for any other events.
group: ${{ github.workflow }}-${{ github.event_name == 'pull_request' && github.head_ref || github.sha }}
cancel-in-progress: true

jobs:
build:
name: Check
Expand Down
15 changes: 0 additions & 15 deletions .github/workflows/cancel.yml

This file was deleted.

7 changes: 7 additions & 0 deletions .github/workflows/create-block.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,13 @@ on:
push:
branches: [trunk, wp/trunk]

# Cancels all previous workflow runs for pull requests that have not completed.
concurrency:
# The concurrency group contains the workflow name and the branch name for pull requests
# or the commit hash for any other events.
group: ${{ github.workflow }}-${{ github.event_name == 'pull_request' && github.head_ref || github.sha }}
cancel-in-progress: true

jobs:
checks:
name: Checks
Expand Down
7 changes: 7 additions & 0 deletions .github/workflows/end2end-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,13 @@ on:
- 'release/**'
- 'wp/**'

# Cancels all previous workflow runs for pull requests that have not completed.
concurrency:
# The concurrency group contains the workflow name and the branch name for pull requests
# or the commit hash for any other events.
group: ${{ github.workflow }}-${{ github.event_name == 'pull_request' && github.head_ref || github.sha }}
cancel-in-progress: true

jobs:
admin:
name: Admin - ${{ matrix.part }}
Expand Down
7 changes: 7 additions & 0 deletions .github/workflows/performance.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,13 @@ on:
release:
types: [published]

# Cancels all previous workflow runs for pull requests that have not completed.
concurrency:
# The concurrency group contains the workflow name and the branch name for pull requests
# or the commit hash for any other events.
group: ${{ github.workflow }}-${{ github.event_name == 'pull_request' && github.head_ref || github.sha }}
cancel-in-progress: true

jobs:
performance:
name: Run performance tests
Expand Down
7 changes: 7 additions & 0 deletions .github/workflows/rnmobile-android-runner.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,13 @@ on:
push:
branches: [trunk]

# Cancels all previous workflow runs for pull requests that have not completed.
concurrency:
# The concurrency group contains the workflow name and the branch name for pull requests
# or the commit hash for any other events.
group: ${{ github.workflow }}-${{ github.event_name == 'pull_request' && github.head_ref || github.sha }}
cancel-in-progress: true

jobs:
test:
runs-on: macos-latest
Expand Down
7 changes: 7 additions & 0 deletions .github/workflows/rnmobile-ios-runner.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,13 @@ on:
push:
branches: [trunk]

# Cancels all previous workflow runs for pull requests that have not completed.
concurrency:
# The concurrency group contains the workflow name and the branch name for pull requests
# or the commit hash for any other events.
group: ${{ github.workflow }}-${{ github.event_name == 'pull_request' && github.head_ref || github.sha }}
cancel-in-progress: true

jobs:
test:
runs-on: macos-latest
Expand Down
7 changes: 7 additions & 0 deletions .github/workflows/static-checks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,13 @@ on:
- 'release/**'
- 'wp/**'

# Cancels all previous workflow runs for pull requests that have not completed.
concurrency:
# The concurrency group contains the workflow name and the branch name for pull requests
# or the commit hash for any other events.
group: ${{ github.workflow }}-${{ github.event_name == 'pull_request' && github.head_ref || github.sha }}
cancel-in-progress: true

jobs:
check:
name: All
Expand Down
7 changes: 7 additions & 0 deletions .github/workflows/unit-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,13 @@ on:
- 'release/**'
- 'wp/**'

# Cancels all previous workflow runs for pull requests that have not completed.
concurrency:
# The concurrency group contains the workflow name and the branch name for pull requests
# or the commit hash for any other events.
group: ${{ github.workflow }}-${{ github.event_name == 'pull_request' && github.head_ref || github.sha }}
cancel-in-progress: true

jobs:
unit-js:
name: JavaScript
Expand Down
4 changes: 1 addition & 3 deletions .github/workflows/upload-release-to-plugin-repo.yml
Original file line number Diff line number Diff line change
Expand Up @@ -104,9 +104,7 @@ jobs:

- name: Get previous stable version
id: get_previous_stable_version
env:
STABLE_TAG_REGEX: 'Stable tag: \K${{ env.STABLE_VERSION_REGEX }}'
run: echo ::set-output name=stable_version::$(grep -oP "${STABLE_TAG_REGEX}" ./trunk/readme.txt)
run: echo ::set-output name=stable_version::$(awk -F ':\ ' '$1 == "Stable tag" {print $2}' ./trunk/readme.txt)

- name: Delete everything
working-directory: ./trunk
Expand Down
File renamed without changes.
2 changes: 1 addition & 1 deletion bin/plugin/commands/performance.js
Original file line number Diff line number Diff line change
Expand Up @@ -262,7 +262,7 @@ async function runPerformanceTests( branches, options ) {
log( '>> Starting the WordPress environment' );
await runShellScript( 'npm run wp-env start', environmentDirectory );

const testSuites = [ 'post-editor', 'i18n-filters', 'site-editor' ];
const testSuites = [ 'post-editor', 'site-editor' ];

/** @type {Record<string,Record<string, WPFormattedPerformanceResults>>} */
let results = {};
Expand Down
28 changes: 28 additions & 0 deletions changelog.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,33 @@
== Changelog ==

= 10.6.2 =



### Bug Fixes

- Workflows: Fix "Stable tag:" readme.txt field in SVN upload. ([31897](https://github.com/WordPress/gutenberg/pull/31897))
- Gallery: Fix Image Size regression. ([31884](https://github.com/WordPress/gutenberg/pull/31884))

### Various

- Plugin: Guard `construct_wp_query_args` with check if implemented in WordPress Core. ([32008](https://github.com/WordPress/gutenberg/pull/32008))




= 10.6.1 =

### Bug Fixes

- Revert "components: Promote VisuallyHidden from ui into full components (#31244)". ([31882](https://github.com/WordPress/gutenberg/pull/31882))
- Allow more complex contentWidth & wideWidth values. ([31740](https://github.com/WordPress/gutenberg/pull/31740))
- Fix link color selector. ([31820](https://github.com/WordPress/gutenberg/pull/31820))
- Register template part variations server side. ([31761](https://github.com/WordPress/gutenberg/pull/31761))
- Do not provide a default value for the link color property. ([31755](https://github.com/WordPress/gutenberg/pull/31755))
- Fixes FSE Navigation sub-menu item styling regression. ([31754](https://github.com/WordPress/gutenberg/pull/31754))


= 10.6.0 =

### New Features
Expand Down
25 changes: 25 additions & 0 deletions docs/contributors/code/getting-started-with-code-contribution.md
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,31 @@ The WordPress installation should now be available at `http://localhost:8888`

You can access the Dashboard at: `http://localhost:8888/wp-admin/` using **Username**: `admin`, **Password**: `password`. You'll notice the Gutenberg plugin installed and activated, this is your local build.

#### Accessing the MySQL Database

To access the MySQL database on the `wp-env` instance you will first need the connection details. To do this:

1. In a terminal, navigate to your local Gutenberg repo.
2. Run `npm run wp-env start` - various information about the `wp-env` environment should be logged into the terminal.
3. In the output from step 2, look for information about the _MySQL_ port:
For example:

> MySQL is listening on port {MYSQL_PORT_NUMBER}
4. Copy / make a note of this port number (note this will change each time `wp-env` restarts).
5. You can now connect to the MySQL instance using the following details (being sure to replace `{MYSQL_PORT_NUMBER}` with the port number from step three):

```
Host: 127.0.0.1
Username: root
Database: wordpress
Port: {MYSQL_PORT_NUMBER}
```

**Please note**: the MySQL port number will change each time `wp-env` restarts. If you find you can no longer access your database, simply repeat the steps above to find the new port number and restore your connection.

**Tip**: [Sequel Ace](https://sequel-ace.com/) is a useful GUI tool for accessing a MySQL database. Other tools are available and documented in this [article on accessing the WordPress database](https://wordpress.org/support/article/creating-database-for-wordpress/).

#### Troubleshooting

If you run into an issue, check the [troubleshooting section in `wp-env` documentation](/packages/env/README.md#troubleshooting-common-problems).
Expand Down
4 changes: 2 additions & 2 deletions docs/getting-started/tutorials/create-block/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,10 @@ The `@wordpress/create-block` package exists to create the necessary block scaff
From your plugins directory, to create your block run:

```sh
npx @wordpress/create-block starter-block
npx @wordpress/create-block gutenpride
```

The above command creates a new directory called `starter-block`, installs the necessary files, and builds the block plugin. If you want an interactive mode that prompts you for details, run the command without the `starter-block` name.
The above command creates a new directory called `gutenpride`, installs the necessary files, and builds the block plugin. If you want an interactive mode that prompts you for details, run the command without the `gutenpride` name.

You now need to activate the plugin from inside wp-admin plugins page.

Expand Down
4 changes: 4 additions & 0 deletions docs/how-to-guides/backward-compatibility/deprecations.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,10 @@

For features included in the Gutenberg plugin, the deprecation policy is intended to support backward compatibility for two minor plugin releases, when possible. Features and code included in a stable release of WordPress are not included in this deprecation timeline, and are instead subject to the [versioning policies of the WordPress project](https://make.wordpress.org/core/handbook/about/release-cycle/version-numbering/). The current deprecations are listed below and are grouped by _the version at which they will be removed completely_. If your plugin depends on these behaviors, you must update to the recommended alternative before the noted version.

## 11.0.0

- `wp.blocks.registerBlockTypeFromMetadata` method has been removed. Use `wp.blocks.registerBlockType` method instead.

## 10.3.0

- Passing a tuple of components with `as` prop to `ActionItem.Slot` component is no longer supported. Please pass a component with `as` prop instead. Example:
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
# Applying Styles From a Stylesheet

In the previous step, the block had applied its own styles by an inline `style` attribute. While this might be adequate for very simple components, you will quickly find that it becomes easier to write your styles by extracting them to a separate stylesheet file.
In the [previous section](/docs/how-to-guides/block-tutorial/writing-your-first-block-type.md), the block had applied its own styles by an inline `style` attribute. While this might be adequate for very simple components, you will quickly find that it becomes easier to write your styles by extracting them to a separate stylesheet file.

The editor will automatically generate a class name for each block type to simplify styling. It can be accessed from the object argument passed to the edit and save functions. In step 2, we will create a stylesheet to use that class name.
The editor will automatically generate a class name for each block type to simplify styling. It can be accessed from the object argument passed to the edit and save functions. In this section, we will create a stylesheet to use that class name.

{% codetabs %}
{% ESNext %}
Expand All @@ -13,31 +13,25 @@ import { useBlockProps } from '@wordpress/block-editor';

registerBlockType( 'gutenberg-examples/example-02-stylesheets', {
apiVersion: 2,

title: 'Example: Stylesheets',

icon: 'universal-access-alt',

category: 'design',

example: {},

edit() {
const blockProps = useBlockProps();

return (
<p { ...blockProps }>
Hello World, step 2 (from the editor, in green).
Hello World (from the editor, in green).
</p>
);
},

save() {
const blockProps = useBlockProps.save();

return (
<p { ...blockProps }>
Hello World, step 2 (from the frontend, in red).
Hello World (from the frontend, in red).
</p>
);
},
Expand All @@ -61,15 +55,15 @@ registerBlockType( 'gutenberg-examples/example-02-stylesheets', {
return el(
'p',
blockProps,
'Hello World, step 2 (from the editor, in green).'
'Hello World (from the editor, in green).'
);
},
save: function () {
var blockProps = blockEditor.useBlockProps.save();
return el(
'p',
blockProps,
'Hello World, step 2 (from the frontend, in red).'
'Hello World (from the frontend, in red).'
);
},
} );
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -70,15 +70,15 @@ registerBlockType( 'gutenberg-examples/example-01-basic-esnext', {
const blockProps = useBlockProps( { style: blockStyle } );

return (
<div { ...blockProps }>Hello World, step 1 (from the editor).</div>
<div { ...blockProps }>Hello World (from the editor).</div>
);
},
save() {
const blockProps = useBlockProps.save( { style: blockStyle } );

return (
<div { ...blockProps }>
Hello World, step 1 (from the frontend).
Hello World (from the frontend).
</div>
);
},
Expand Down Expand Up @@ -109,15 +109,15 @@ registerBlockType( 'gutenberg-examples/example-01-basic-esnext', {
return el(
'p',
blockProps,
'Hello World, step 1 (from the editor).'
'Hello World (from the editor).'
);
},
save: function () {
var blockProps = useBlockProps.save( { style: blockStyle } );
return el(
'p',
blockProps,
'Hello World, step 1 (from the frontend).'
'Hello World (from the frontend).'
);
},
} );
Expand All @@ -126,7 +126,7 @@ registerBlockType( 'gutenberg-examples/example-01-basic-esnext', {

{% end %}

_By now you should be able to see `Hello World, step 1 (from the editor).` in the admin side and `Hello World, step 1 (from the frontend).` on the frontend side._
_By now you should be able to see `Hello World (from the editor).` in the admin side and `Hello World (from the frontend).` on the frontend side._

Once a block is registered, you should immediately see that it becomes available as an option in the editor inserter dialog, using values from `title`, `icon`, and `category` to organize its display. You can choose an icon from any included in the built-in [Dashicons icon set](https://developer.wordpress.org/resource/dashicons/), or provide a [custom svg element](/docs/reference-guides/block-api/block-registration.md#icon-optional).

Expand Down
Loading

0 comments on commit 233e227

Please sign in to comment.