Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/trunk' into update/improve-page-…
Browse files Browse the repository at this point in the history
…panels-performance
  • Loading branch information
noisysocks committed Jun 13, 2023
2 parents 8d84d9c + 941842e commit e0e70c4
Show file tree
Hide file tree
Showing 245 changed files with 2,154 additions and 1,441 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/performance.yml
Original file line number Diff line number Diff line change
Expand Up @@ -59,13 +59,13 @@ jobs:
- name: Compare performance with base branch
if: github.event_name == 'push'
# The base hash used here need to be a commit that is compatible with the current WP version
# The current one is debd225d007f4e441ceec80fbd6fa96653f94737 and it needs to be updated every WP major release.
# The current one is 843a3053aca918bb10b939be28e676f8e71b751b and it needs to be updated every WP major release.
# It is used as a base comparison point to avoid fluctuation in the performance metrics.
run: |
WP_VERSION=$(awk -F ': ' '/^Tested up to/{print $2}' readme.txt)
IFS=. read -ra WP_VERSION_ARRAY <<< "$WP_VERSION"
WP_MAJOR="${WP_VERSION_ARRAY[0]}.${WP_VERSION_ARRAY[1]}"
./bin/plugin/cli.js perf $GITHUB_SHA debd225d007f4e441ceec80fbd6fa96653f94737 --tests-branch $GITHUB_SHA --wp-version "$WP_MAJOR"
./bin/plugin/cli.js perf $GITHUB_SHA 843a3053aca918bb10b939be28e676f8e71b751b --tests-branch $GITHUB_SHA --wp-version "$WP_MAJOR"
- name: Compare performance with custom branches
if: github.event_name == 'workflow_dispatch'
Expand All @@ -88,7 +88,7 @@ jobs:
CODEHEALTH_PROJECT_TOKEN: ${{ secrets.CODEHEALTH_PROJECT_TOKEN }}
run: |
COMMITTED_AT=$(git show -s $GITHUB_SHA --format="%ct")
./bin/log-performance-results.js $CODEHEALTH_PROJECT_TOKEN trunk $GITHUB_SHA debd225d007f4e441ceec80fbd6fa96653f94737 $COMMITTED_AT
./bin/log-performance-results.js $CODEHEALTH_PROJECT_TOKEN trunk $GITHUB_SHA 843a3053aca918bb10b939be28e676f8e71b751b $COMMITTED_AT
- name: Archive debug artifacts (screenshots, HTML snapshots)
uses: actions/upload-artifact@0b7f8abb1508181956e8e162db84b466c27e18ce # v3.1.2
Expand Down
65 changes: 65 additions & 0 deletions bin/list-experimental-api-matches.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,65 @@
#!/bin/sh

# Generate a Markdown-formatted list of experimental APIs found across our
# packages and lib, providing GitHub search links for each match.
#
# Experimental APIs must be regularly audited, particularly in the context of
# major WordPress releases. This script allows release leads to generate a list
# to share in release issues.
#
# @see example audit issue for WordPress 6.2:
# https://github.com/WordPress/gutenberg/issues/47196

# Exit if any command fails.
set -e

# Change to the root directory.
cd "$(dirname "$0")"
cd ..

# POSIX: prefer standard grep over rg. Git is assumed present (ls-files), but
# could be replaced with find.
grep_experimental_apis() {
git ls-files packages/* lib \
| grep -E '\.(js|ts|jsx|tsx|php)$' \
| grep -v __tests__ \
| xargs grep -Eo '__experimental\w+'
}

# For each line as `<filepath>:<match>`, rewrite as `<package> <match>`.
namespace() {
awk -F: '
{ print module($1), $2 }
function module(path) {
n = split(path, parts, "/")
if (parts[1] == "lib") return "lib"
return parts[1] "/" parts[2]
}'
}

# Like uniq, but applied across packages: if `__experimentalFoo` appears in
# packages A and B, only keep the occurrence under A.
compact() {
sort | uniq | awk '{
if (known_api[$2]) next
known_api[$2] = 1
print
}'
}

# Output a heading for each package and a link for each experimental API.
format() {
awk '{
if (prev_dir != $1) {
if (NR > 1) print ""
printf "## `%s`\n", $1
prev_dir = $1
}
printf "[`%s`](/WordPress/gutenberg/search?q=%s)\n", $2, $2
}'
}

grep_experimental_apis \
| namespace \
| compact \
| format
83 changes: 83 additions & 0 deletions changelog.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,88 @@
== Changelog ==

= 16.0.0-rc.4 =



## Changelog

### Various

- Post title: Fix autofocus when iframed. ([51367](https://github.com/WordPress/gutenberg/pull/51367))




## Contributors

The following contributors merged PRs in this release:

@ellatrix


= 16.0.0-rc.3 =



## Changelog

### Bug Fixes

#### Block Library
- Post Template: Output number of columns as classname for backwards compatibility. ([51358](https://github.com/WordPress/gutenberg/pull/51358))
- Query: Fix deprecation error when migrating layout. ([51311](https://github.com/WordPress/gutenberg/pull/51311))

#### Global Styles
- Global styles revisions: Ensure redirect runs once for back button. ([51316](https://github.com/WordPress/gutenberg/pull/51316))

### Code Quality

#### Site Editor
- Rename 'page content lock' to 'page content focus'. ([51280](https://github.com/WordPress/gutenberg/pull/51280))


## Contributors

The following contributors merged PRs in this release:

@andrewserong @noisysocks @ramonjd


= 16.0.0-rc.2 =



## Changelog

### Bug Fixes

#### Global Styles
- Global styles revisions: Ensure redirect runs once for back button. ([51316](https://github.com/WordPress/gutenberg/pull/51316))

#### Block Library
- Query: Fix deprecation error when migrating layout. ([51311](https://github.com/WordPress/gutenberg/pull/51311))


### Code Quality

#### Site Editor
- Rename 'page content lock' to 'page content focus'. ([51280](https://github.com/WordPress/gutenberg/pull/51280))


### Various

- Post title: Fix autofocus when iframed. ([51331](https://github.com/WordPress/gutenberg/pull/51331))




## Contributors

The following contributors merged PRs in this release:

@andrewserong @ellatrix @noisysocks @ramonjd


= 16.0.0-rc.1 =

## Changelog
Expand Down
16 changes: 8 additions & 8 deletions docs/contributors/code/coding-guidelines.md
Original file line number Diff line number Diff line change
Expand Up @@ -211,7 +211,7 @@ import { privateHasContentRoleAttribute, ...selectors } from './selectors';
import { privateToggleFeature, ...actions } from './selectors';
// The `lock` function is exported from the internal private-apis.js file where
// the opt-in function was called.
import { lock, unlock } from './private-apis';
import { lock, unlock } from './lock-unlock';

export const store = registerStore(/* ... */);
// Attach a private action to the exported store:
Expand All @@ -230,7 +230,7 @@ import { store } from '@wordpress/package1';
import { useSelect } from '@wordpress/data';
// The `unlock` function is exported from the internal private-apis.js file where
// the opt-in function was called.
import { unlock } from './private-apis';
import { unlock } from './lock-unlock';

function MyComponent() {
const hasRole = useSelect( ( select ) => (
Expand All @@ -251,7 +251,7 @@ function MyComponent() {

```js
// In packages/package1/index.js:
import { lock } from './private-apis';
import { lock } from './lock-unlock';

export const privateApis = {};
/* Attach private data to the exported object */
Expand All @@ -266,7 +266,7 @@ lock( privateApis, {

// In packages/package2/index.js:
import { privateApis } from '@wordpress/package1';
import { unlock } from './private-apis';
import { unlock } from './lock-unlock';

const {
privateCallback,
Expand Down Expand Up @@ -314,7 +314,7 @@ inside it:

```js
// In @wordpress/package1/index.js:
import { lock } from './private-apis';
import { lock } from './lock-unlock';

// A private function contains all the logic
function privateValidateBlocks( formula, privateIsStrict ) {
Expand All @@ -339,7 +339,7 @@ lock( privateApis, { privateValidateBlocks } );

// In @wordpress/package2/index.js:
import { privateApis as package1PrivateApis } from '@wordpress/package1';
import { unlock } from './private-apis';
import { unlock } from './lock-unlock';

// The private function may be "unlocked" given the stable function:
const { privateValidateBlocks } = unlock( package1PrivateApis );
Expand All @@ -355,7 +355,7 @@ inside it:

```js
// In @wordpress/package1/index.js:
import { lock } from './private-apis';
import { lock } from './lock-unlock';

// The private component contains all the logic
const PrivateMyButton = ( { title, privateShowIcon = true } ) => {
Expand All @@ -379,7 +379,7 @@ lock( privateApis, { PrivateMyButton } );

// In @wordpress/package2/index.js:
import { privateApis } from '@wordpress/package1';
import { unlock } from './private-apis';
import { unlock } from './lock-unlock';

// The private component may be "unlocked" given the stable component:
const { PrivateMyButton } = unlock(privateApis);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ 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:

- When running the tests, you'll need to ensure the Metro bundler (`npm run native start`) is not running.
- [Appium CLI](https://appium.io/docs/en/about-appium/getting-started/) 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.
- [Appium CLI](https://github.com/appium/appium/blob/1.x/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.

Then, to run the UI tests on iOS:
Expand Down
2 changes: 1 addition & 1 deletion docs/explanations/architecture/entities.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ The editor keeps track of all these modifications and orchestrates the saving of
To be able to edit an entity, you need to first fetch it and load it into the `core-data` store. For example, the following code loads the post with ID 1 into the store. (The entity is the post, the post 1 is the entity record).

````js
wp.data.dispatch( 'core' ).getEntityRecord( 'postType', 'post', 1 );
wp.data.select( 'core' ).getEntityRecord( 'postType', 'post', 1 );
````

Once the entity is loaded, you can edit it. For example, the following code sets the title of the post to "Hello World". For each fetched entity record, the `core-data` store keeps track of:
Expand Down
4 changes: 2 additions & 2 deletions docs/reference-guides/block-api/block-supports.md
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ function render_block() {
- Type: `boolean`
- Default value: `false`

Anchors let you link directly to a specific block on a page. This property adds a field to define an id for the block and a button to copy the direct link.
Anchors let you link directly to a specific block on a page. This property adds a field to define an id for the block and a button to copy the direct link. _Important: It doesn't work with dynamic blocks yet._

```js
// Declare support for anchor links.
Expand Down Expand Up @@ -232,7 +232,7 @@ When the block declares support for `color.background`, the attributes definitio

_**Note:** Deprecated since WordPress 6.3._

This property has been replaced by [`filter.duotone`](#filter-duotone).
This property has been replaced by [`filter.duotone`](#filter-duotone).

### color.gradients

Expand Down
Loading

0 comments on commit e0e70c4

Please sign in to comment.