Skip to content

Commit

Permalink
Merge branch 'trunk' into replace/confirm-et-al
Browse files Browse the repository at this point in the history
* trunk: (494 commits)
  remove consecutive rc warning (#35855)
  Update Changelog for 11.8.0-rc.2
  Bump plugin version to 11.8.0-rc.2
  [RNMobile] Disable React Native E2E Tests (iOS) (#35844)
  Add section about using the schema during development (#35835)
  Add a method to disable auto-accepting dialogs (#35828)
  Wrap NavigationContainer with SafeAreaView. (#35570)
  Update Appium to 1.22.0 (#35829)
  Post Comment: Handle the case where a comment does not exist (#35810)
  Clear selected block when clicking on the gray background (#35816)
  Post excerpt: Don't print the wrapper when there is no excerpt (#35749)
  [Block] Navigation: Fix padding for social links on mobile (#35824)
  Fix issue with responsive navigation causing wrapping. (#35820)
  [Block Editor]: Fix displaying only `none` alignment option (#35822)
  Add API to access global settings, styles, and stylesheet (#34843)
  Mobile Release v1.64.1 (#35804)
  Add resizer to template part focus mode (#35728)
  Update Changelog for 11.7.1
  Gallery block: Only show the gallery upload error message if mixed multiple files uploaded (#35790)
  Update Changelog for 11.8.0-rc.1
  ...
  • Loading branch information
fullofcaffeine committed Oct 21, 2021
2 parents 414ab15 + ff468f2 commit 49eaa0e
Show file tree
Hide file tree
Showing 1,261 changed files with 29,928 additions and 20,107 deletions.
21 changes: 13 additions & 8 deletions .github/CODEOWNERS
Validating CODEOWNERS rules …
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,10 @@
/packages/block-library/src/gallery @mkevins
/packages/block-library/src/social-links @mkaz
/packages/block-library/src/social-link @mkaz
/packages/block-library/src/navigation @tellthemachines
/packages/block-library/src/navigation-link @tellthemachines
/packages/block-library/src/navigation-submenu @tellthemachines
/packages/block-library/src/page-list @tellthemachines

# Duotone
/lib/block-supports/duotone.php @ajlende
Expand Down Expand Up @@ -51,8 +55,8 @@

# Tooling
/bin @ntwb @nerrad @ajitbohra
/bin/api-docs @ntwb @nerrad @ajitbohra @nosolosw
/docs/tool @chrisvanpatten @ajitbohra @nosolosw
/bin/api-docs @ntwb @nerrad @ajitbohra @oandregal
/docs/tool @chrisvanpatten @ajitbohra @oandregal
/packages/babel-plugin-import-jsx-pragma @ntwb @nerrad @ajitbohra
/packages/babel-plugin-makepot @ntwb @nerrad @ajitbohra
/packages/babel-preset-default @gziolo @ntwb @nerrad @ajitbohra
Expand All @@ -61,7 +65,7 @@
/packages/create-block-tutorial-template @gziolo
/packages/custom-templated-path-webpack-plugin @ntwb @nerrad @ajitbohra
/packages/dependency-extraction-webpack-plugin @gziolo
/packages/docgen @nosolosw
/packages/docgen @oandregal
/packages/e2e-test-utils @ntwb @nerrad @ajitbohra
/packages/e2e-tests @ntwb @nerrad @ajitbohra
/packages/eslint-plugin @gziolo @ntwb @nerrad @ajitbohra
Expand Down Expand Up @@ -123,12 +127,13 @@

# PHP
/lib @timothybjacobs @spacedmonkey
/lib/global-styles.php @timothybjabocs @spacedmonkey @nosolosw
/lib/theme.json @timothybjabocs @spacedmonkey @nosolosw
/lib/class-wp-theme-json-gutenberg.php @timothybjabocs @spacedmonkey @nosolosw
/lib/class-wp-theme-json-resolver-gutenberg.php @timothybjabocs @spacedmonkey @nosolosw
/lib/global-styles.php @timothybjabocs @spacedmonkey @oandregal
/lib/theme.json @timothybjabocs @spacedmonkey @oandregal
/lib/theme-i18n.json @timothybjabocs @spacedmonkey @oandregal
/lib/class-wp-theme-json-gutenberg.php @timothybjabocs @spacedmonkey @oandregal
/lib/class-wp-theme-json-resolver-gutenberg.php @timothybjabocs @spacedmonkey @oandregal
/lib/full-site-editing @janw-me
/phpunit/class-wp-theme-json-test.php @nosolosw
/phpunit/class-wp-theme-json-test.php @oandregal

# Web App
/packages/admin-manifest @ellatrix
Expand Down
53 changes: 53 additions & 0 deletions .github/workflows/build-plugin-zip.yml
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,8 @@ jobs:
old_version: ${{ steps.get_version.outputs.old_version }}
new_version: ${{ steps.get_version.outputs.new_version }}
release_branch: ${{ steps.get_version.outputs.release_branch }}
release_branch_commit: ${{ steps.commit_version_bump_to_release_branch.outputs.version_bump_commit }}
trunk_commit: ${{ steps.commit_version_bump_to_trunk.outputs.version_bump_commit }}

steps:
- name: Checkout code
Expand Down Expand Up @@ -125,23 +127,27 @@ jobs:
sed -i "s/${{ steps.get_version.outputs.old_version }}/${VERSION}/g" readme.txt
- name: Commit the version bump to the release branch
id: commit_version_bump_to_release_branch
run: |
git add gutenberg.php package.json package-lock.json readme.txt
git commit -m "Bump plugin version to ${{ steps.get_version.outputs.new_version }}"
git push --set-upstream origin "${{ steps.get_version.outputs.release_branch }}"
echo "::set-output name=version_bump_commit::$(git rev-parse --verify --short HEAD)"
- name: Fetch trunk
if: ${{ github.ref != 'refs/heads/trunk' }}
run: git fetch --depth=1 origin trunk

- name: Cherry-pick the version bump commit to trunk
id: commit_version_bump_to_trunk
run: |
git checkout trunk
git pull
TRUNK_VERSION=$(jq --raw-output '.version' package.json)
if [[ ${{ steps.get_version.outputs.old_version }} == "$TRUNK_VERSION" ]]; then
git cherry-pick "${{ steps.get_version.outputs.release_branch }}"
git push
echo "::set-output name=version_bump_commit::$(git rev-parse --verify --short HEAD)"
fi
build:
Expand All @@ -154,6 +160,8 @@ jobs:
github.event_name == 'workflow_dispatch' ||
github.repository == 'WordPress/gutenberg'
)
outputs:
job_status: ${{ job.status }}

steps:
- name: Checkout code
Expand Down Expand Up @@ -201,6 +209,51 @@ jobs:
name: release-notes
path: ./release-notes.txt

revert-version-bump:
name: Revert version bump if build failed
needs: [bump-version, build]
runs-on: ubuntu-latest
if: |
always() &&
( needs.build.outputs.job_status == 'failure' ) &&
needs.bump-version.outputs.release_branch_commit
steps:
- name: Checkout code
uses: actions/checkout@5a4ac9002d0be2fb38bd78e4b4dbde5606d7042f # v2.3.4
with:
fetch-depth: 2
ref: ${{ needs.bump-version.outputs.release_branch }}
token: ${{ secrets.GUTENBERG_TOKEN }}

- name: Configure git user name and email
run: |
git config user.name "Gutenberg Repository Automation"
git config user.email [email protected]
- name: Revert version bump commit on release branch
if: |
github.event.inputs.version == 'stable' ||
contains( needs.bump-version.outputs.old_version, 'rc' )
run: |
git revert --no-edit ${{ needs.bump-version.outputs.release_branch_commit }}
git push --set-upstream origin "${{ needs.bump-version.outputs.release_branch }}"
- name: Delete release branch if it was only just created for the RC
if: |
github.event.inputs.version == 'rc' &&
! contains( needs.bump-version.outputs.old_version, 'rc' )
run: |
git push origin :"${{ needs.bump-version.outputs.release_branch }}"
- name: Revert version bump on trunk
if: ${{ needs.bump-version.outputs.trunk_commit }}
run: |
git fetch --depth=2 origin trunk
git checkout trunk
git revert --no-edit ${{ needs.bump-version.outputs.trunk_commit }}
git push --set-upstream origin trunk
create-release:
name: Create Release Draft and Attach Asset
needs: [bump-version, build]
Expand Down
3 changes: 2 additions & 1 deletion .github/workflows/end2end-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -51,10 +51,11 @@ jobs:
- name: Archive debug artifacts (screenshots, HTML snapshots)
uses: actions/upload-artifact@e448a9b857ee2131e752b06002bf0e093c65e571 # v2.2.2
if: failure()
if: always()
with:
name: failures-artifacts
path: artifacts
if-no-files-found: ignore

- name: Archive flaky tests report
uses: actions/upload-artifact@e448a9b857ee2131e752b06002bf0e093c65e571 # v2.2.2
Expand Down
7 changes: 4 additions & 3 deletions .github/workflows/rnmobile-ios-runner.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,12 @@ concurrency:

jobs:
test:
runs-on: macos-latest
if: ${{ github.repository == 'WordPress/gutenberg' || github.event_name == 'pull_request' }}
runs-on: macos-11
# if: ${{ github.repository == 'WordPress/gutenberg' || github.event_name == 'pull_request' }}
if: ${{ false }} # Skip the job until we manage to fix the unavailable environment error when running the E2E tests.
strategy:
matrix:
xcode: [12.2]
xcode: [12.5.1]
native-test-name: [gutenberg-editor-initial-html]
node: ['14']

Expand Down
6 changes: 3 additions & 3 deletions .vscode/launch-example.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,17 +7,17 @@
"request": "launch",
"port": 9003,
"pathMappings": {
"/var/www/html/wp-content/plugins/gutenberg": "${workspaceRoot}/"
"/var/www/html/wp-content/plugins/gutenberg": "${workspaceFolder}"
}
},
{
"type": "node",
"request": "launch",
"name": "Debug current e2e test",
"program": "${workspaceRoot}/node_modules/@wordpress/scripts/bin/wp-scripts.js",
"program": "${workspaceFolder}/node_modules/@wordpress/scripts/bin/wp-scripts.js",
"args": [
"test-e2e",
"--config=${workspaceRoot}/packages/e2e-tests/jest.config.js",
"--config=${workspaceFolder}/packages/e2e-tests/jest.config.js",
"--verbose=true",
"--runInBand",
"--watch",
Expand Down
4 changes: 2 additions & 2 deletions bin/build-plugin-zip.sh
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,7 @@ done

# Run the build.
status "Installing dependencies... 📦"
npm cache verify
npm ci
status "Generating build... 👷‍♀️"
npm run build
Expand All @@ -113,8 +114,7 @@ build_files=$(
ls build/*/*.{js,css,asset.php} \
build/block-library/blocks/*.php \
build/block-library/blocks/*/block.json \
build/block-library/blocks/*/*.css \
build/block-library/blocks/*/*.js \
build/block-library/blocks/*/*.{js,css,asset.php} \
build/edit-widgets/blocks/*/block.json \
build/widgets/blocks/*.php \
build/widgets/blocks/*/block.json \
Expand Down
83 changes: 59 additions & 24 deletions bin/plugin/commands/performance.js
Original file line number Diff line number Diff line change
Expand Up @@ -29,33 +29,43 @@ const config = require( '../config' );
/**
* @typedef WPRawPerformanceResults
*
* @property {number[]} load Load Time.
* @property {number[]} type Average type time.
* @property {number[]} focus Average block selection time.
* @property {number[]} inserterOpen Average time to open global inserter.
* @property {number[]} inserterSearch Average time to search the inserter.
* @property {number[]} inserterHover Average time to move mouse between two block item in the inserter.
* @property {number[]} serverResponse Represents the time the server takes to respond.
* @property {number[]} firstPaint Represents the time when the user agent first rendered after navigation.
* @property {number[]} domContentLoaded Represents the time immediately after the document's DOMContentLoaded event completes.
* @property {number[]} loaded Represents the time when the load event of the current document is completed.
* @property {number[]} firstContentfulPaint Represents the time when the browser first renders any text or media.
* @property {number[]} firstBlock Represents the time when Puppeteer first sees a block selector in the DOM.
* @property {number[]} type Average type time.
* @property {number[]} focus Average block selection time.
* @property {number[]} inserterOpen Average time to open global inserter.
* @property {number[]} inserterSearch Average time to search the inserter.
* @property {number[]} inserterHover Average time to move mouse between two block item in the inserter.
*/

/**
* @typedef WPPerformanceResults
*
* @property {number=} load Load Time.
* @property {number=} type Average type time.
* @property {number=} minType Minium type time.
* @property {number=} maxType Maximum type time.
* @property {number=} focus Average block selection time.
* @property {number=} minFocus Min block selection time.
* @property {number=} maxFocus Max block selection time.
* @property {number=} inserterOpen Average time to open global inserter.
* @property {number=} minInserterOpen Min time to open global inserter.
* @property {number=} maxInserterOpen Max time to open global inserter.
* @property {number=} inserterSearch Average time to open global inserter.
* @property {number=} minInserterSearch Min time to open global inserter.
* @property {number=} maxInserterSearch Max time to open global inserter.
* @property {number=} inserterHover Average time to move mouse between two block item in the inserter.
* @property {number=} minInserterHover Min time to move mouse between two block item in the inserter.
* @property {number=} maxInserterHover Max time to move mouse between two block item in the inserter.
* @property {number=} serverResponse Represents the time the server takes to respond.
* @property {number=} firstPaint Represents the time when the user agent first rendered after navigation.
* @property {number=} domContentLoaded Represents the time immediately after the document's DOMContentLoaded event completes.
* @property {number=} loaded Represents the time when the load event of the current document is completed.
* @property {number=} firstContentfulPaint Represents the time when the browser first renders any text or media.
* @property {number=} firstBlock Represents the time when Puppeteer first sees a block selector in the DOM.
* @property {number=} type Average type time.
* @property {number=} minType Minium type time.
* @property {number=} maxType Maximum type time.
* @property {number=} focus Average block selection time.
* @property {number=} minFocus Min block selection time.
* @property {number=} maxFocus Max block selection time.
* @property {number=} inserterOpen Average time to open global inserter.
* @property {number=} minInserterOpen Min time to open global inserter.
* @property {number=} maxInserterOpen Max time to open global inserter.
* @property {number=} inserterSearch Average time to open global inserter.
* @property {number=} minInserterSearch Min time to open global inserter.
* @property {number=} maxInserterSearch Max time to open global inserter.
* @property {number=} inserterHover Average time to move mouse between two block item in the inserter.
* @property {number=} minInserterHover Min time to move mouse between two block item in the inserter.
* @property {number=} maxInserterHover Max time to move mouse between two block item in the inserter.
*/

/**
Expand Down Expand Up @@ -105,7 +115,12 @@ function formatTime( number ) {
*/
function curateResults( results ) {
return {
load: average( results.load ),
serverResponse: average( results.serverResponse ),
firstPaint: average( results.firstPaint ),
domContentLoaded: average( results.domContentLoaded ),
loaded: average( results.loaded ),
firstContentfulPaint: average( results.firstContentfulPaint ),
firstBlock: average( results.firstBlock ),
type: average( results.type ),
minType: Math.min( ...results.type ),
maxType: Math.max( ...results.type ),
Expand Down Expand Up @@ -314,7 +329,22 @@ async function runPerformanceTests( branches, options ) {
for ( const branch of branches ) {
const medians = mapValues(
{
load: rawResults.map( ( r ) => r[ branch ].load ),
serverResponse: rawResults.map(
( r ) => r[ branch ].serverResponse
),
firstPaint: rawResults.map(
( r ) => r[ branch ].firstPaint
),
domContentLoaded: rawResults.map(
( r ) => r[ branch ].domContentLoaded
),
loaded: rawResults.map( ( r ) => r[ branch ].loaded ),
firstContentfulPaint: rawResults.map(
( r ) => r[ branch ].firstContentfulPaint
),
firstBlock: rawResults.map(
( r ) => r[ branch ].firstBlock
),
type: rawResults.map( ( r ) => r[ branch ].type ),
minType: rawResults.map( ( r ) => r[ branch ].minType ),
maxType: rawResults.map( ( r ) => r[ branch ].maxType ),
Expand Down Expand Up @@ -359,6 +389,11 @@ async function runPerformanceTests( branches, options ) {

// 5- Formatting the results.
log( '\n>> 🎉 Results.\n' );

log(
'\nPlease note that client side metrics EXCLUDE the server response time.\n'
);

for ( const testSuite of testSuites ) {
log( `\n>> ${ testSuite }\n` );

Expand Down
Loading

0 comments on commit 49eaa0e

Please sign in to comment.