diff --git a/.github/ISSUE_TEMPLATE/Bug_report.md b/.github/ISSUE_TEMPLATE/Bug_report.md
index 20aa7016d17e90..0c5bcb7b300122 100644
--- a/.github/ISSUE_TEMPLATE/Bug_report.md
+++ b/.github/ISSUE_TEMPLATE/Bug_report.md
@@ -20,6 +20,11 @@ A clear and concise description of what you expected to happen.
**Screenshots**
If applicable, add screenshots to help explain your problem.
+**Editor version (please complete the following information):**
+- WordPress version: [e.g: 5.3.2]
+- Does the website has Gutenberg plugin installed, or is it using the block editor that comes by default? [e.g: "gutenberg plugin", "default"]
+- If the Gutenberg plugin is installed, which version is it? [e.g., 7.6]
+
**Desktop (please complete the following information):**
- OS: [e.g. iOS]
- Browser [e.g. chrome, safari]
@@ -32,5 +37,4 @@ If applicable, add screenshots to help explain your problem.
- Version [e.g. 22]
**Additional context**
-- Please add the version of Gutenberg you are using in the description.
- To report a security issue, please visit the WordPress HackerOne program: https://hackerone.com/wordpress.
diff --git a/.travis.yml b/.travis.yml
index baf9a3bb3d4318..b39f8565c5683a 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -24,10 +24,8 @@ branches:
env:
global:
- - PUPPETEER_SKIP_CHROMIUM_DOWNLOAD: true
- WP_DEVELOP_DIR: ./wordpress
- LOCAL_SCRIPT_DEBUG: false
- - INSTALL_COMPOSER: false
- INSTALL_WORDPRESS: true
# Make sure NodeGit gets the correct C libs.
@@ -89,10 +87,6 @@ install:
npm run env connect
npm run env cli plugin activate gutenberg
fi
- - |
- if [[ "$INSTALL_COMPOSER" = "true" ]]; then
- npm run env docker-run -- php composer install --no-interaction
- fi
- |
if [[ "$E2E_ROLE" = "author" ]]; then
npm run env cli -- user create author author@example.com --role=author --user_pass=authpass
@@ -159,59 +153,58 @@ jobs:
- npm run test-unit:native -- --ci --maxWorkers=2 --cacheDirectory="$HOME/.jest-cache"
- name: PHP unit tests
- env: INSTALL_COMPOSER=true
script:
- npm run test-php && npm run test-unit-php-multisite
- name: PHP unit tests (PHP 5.6)
- env: INSTALL_COMPOSER=true LOCAL_PHP=5.6-fpm
+ env: LOCAL_PHP=5.6-fpm
script:
- npm run test-php && npm run test-unit-php-multisite
- name: E2E tests (Admin) (1/4)
- env: FORCE_REDUCED_MOTION=true PUPPETEER_SKIP_CHROMIUM_DOWNLOAD=
+ env: FORCE_REDUCED_MOTION=true
script:
- $( npm bin )/wp-scripts test-e2e --config=./packages/e2e-tests/jest.config.js --listTests > ~/.jest-e2e-tests
- $( npm bin )/wp-scripts test-e2e --config=./packages/e2e-tests/jest.config.js --cacheDirectory="$HOME/.jest-cache" --runTestsByPath $( awk 'NR % 4 == 0' < ~/.jest-e2e-tests )
- name: E2E tests (Admin) (2/4)
- env: FORCE_REDUCED_MOTION=true PUPPETEER_SKIP_CHROMIUM_DOWNLOAD=
+ env: FORCE_REDUCED_MOTION=true
script:
- $( npm bin )/wp-scripts test-e2e --config=./packages/e2e-tests/jest.config.js --listTests > ~/.jest-e2e-tests
- $( npm bin )/wp-scripts test-e2e --config=./packages/e2e-tests/jest.config.js --cacheDirectory="$HOME/.jest-cache" --runTestsByPath $( awk 'NR % 4 == 1' < ~/.jest-e2e-tests )
- name: E2E tests (Admin) (3/4)
- env: FORCE_REDUCED_MOTION=true PUPPETEER_SKIP_CHROMIUM_DOWNLOAD=
+ env: FORCE_REDUCED_MOTION=true
script:
- $( npm bin )/wp-scripts test-e2e --config=./packages/e2e-tests/jest.config.js --listTests > ~/.jest-e2e-tests
- $( npm bin )/wp-scripts test-e2e --config=./packages/e2e-tests/jest.config.js --cacheDirectory="$HOME/.jest-cache" --runTestsByPath $( awk 'NR % 4 == 2' < ~/.jest-e2e-tests )
- name: E2E tests (Admin) (4/4)
- env: FORCE_REDUCED_MOTION=true PUPPETEER_SKIP_CHROMIUM_DOWNLOAD=
+ env: FORCE_REDUCED_MOTION=true
script:
- $( npm bin )/wp-scripts test-e2e --config=./packages/e2e-tests/jest.config.js --listTests > ~/.jest-e2e-tests
- $( npm bin )/wp-scripts test-e2e --config=./packages/e2e-tests/jest.config.js --cacheDirectory="$HOME/.jest-cache" --runTestsByPath $( awk 'NR % 4 == 3' < ~/.jest-e2e-tests )
- name: E2E tests (Author) (1/4)
- env: E2E_ROLE=author FORCE_REDUCED_MOTION=true PUPPETEER_SKIP_CHROMIUM_DOWNLOAD=
+ env: E2E_ROLE=author FORCE_REDUCED_MOTION=true
script:
- $( npm bin )/wp-scripts test-e2e --config=./packages/e2e-tests/jest.config.js --listTests > ~/.jest-e2e-tests
- $( npm bin )/wp-scripts test-e2e --config=./packages/e2e-tests/jest.config.js --cacheDirectory="$HOME/.jest-cache" --runTestsByPath $( awk 'NR % 4 == 0' < ~/.jest-e2e-tests )
- name: E2E tests (Author) (2/4)
- env: E2E_ROLE=author FORCE_REDUCED_MOTION=true PUPPETEER_SKIP_CHROMIUM_DOWNLOAD=
+ env: E2E_ROLE=author FORCE_REDUCED_MOTION=true
script:
- $( npm bin )/wp-scripts test-e2e --config=./packages/e2e-tests/jest.config.js --listTests > ~/.jest-e2e-tests
- $( npm bin )/wp-scripts test-e2e --config=./packages/e2e-tests/jest.config.js --cacheDirectory="$HOME/.jest-cache" --runTestsByPath $( awk 'NR % 4 == 1' < ~/.jest-e2e-tests )
- name: E2E tests (Author) (3/4)
- env: E2E_ROLE=author FORCE_REDUCED_MOTION=true PUPPETEER_SKIP_CHROMIUM_DOWNLOAD=
+ env: E2E_ROLE=author FORCE_REDUCED_MOTION=true
script:
- $( npm bin )/wp-scripts test-e2e --config=./packages/e2e-tests/jest.config.js --listTests > ~/.jest-e2e-tests
- $( npm bin )/wp-scripts test-e2e --config=./packages/e2e-tests/jest.config.js --cacheDirectory="$HOME/.jest-cache" --runTestsByPath $( awk 'NR % 4 == 2' < ~/.jest-e2e-tests )
- name: E2E tests (Author) (4/4)
- env: E2E_ROLE=author FORCE_REDUCED_MOTION=true PUPPETEER_SKIP_CHROMIUM_DOWNLOAD=
+ env: E2E_ROLE=author FORCE_REDUCED_MOTION=true
script:
- $( npm bin )/wp-scripts test-e2e --config=./packages/e2e-tests/jest.config.js --listTests > ~/.jest-e2e-tests
- $( npm bin )/wp-scripts test-e2e --config=./packages/e2e-tests/jest.config.js --cacheDirectory="$HOME/.jest-cache" --runTestsByPath $( awk 'NR % 4 == 3' < ~/.jest-e2e-tests )
diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md
index bb46ac5f3a2385..9381a3cd9f2af5 100644
--- a/CONTRIBUTING.md
+++ b/CONTRIBUTING.md
@@ -12,7 +12,7 @@ To learn all about contributing to the Gutenberg project, see the [Contributor G
- Documentation? See the [documentation section](/docs/contributors/document.md).
-- Triage? We need help reviewing existing issues to make sure they’re relevant and actionable. Triage is an important contribution because it allows us to work on the highest priority issues. To learn more, please see the [triaging issues section](docs/contributors/repository-management.md#triaging-issues).
+- Triage? We need help reviewing existing issues to make sure they’re relevant and actionable. Triage is an important contribution because it allows us to work on the highest priority issues. To learn more, please see the [triaging issues section](docs/contributors/triage.md).
## Guidelines
diff --git a/CONTRIBUTORS.md b/CONTRIBUTORS.md
index e1ed7443bbf027..9a845864a4a459 100644
--- a/CONTRIBUTORS.md
+++ b/CONTRIBUTORS.md
@@ -145,3 +145,4 @@ This list is manually curated to include valuable contributions by volunteers th
| @akkspros | @passoniate |
| @anthonyledesma | @paranoia1906 |
| @richtabor | @richtabor |
+| @mikehaydon | @intelliwolf |
diff --git a/bin/api-docs/update-api-docs.js b/bin/api-docs/update-api-docs.js
index fd09b901a5ab39..985ff462ba0c22 100755
--- a/bin/api-docs/update-api-docs.js
+++ b/bin/api-docs/update-api-docs.js
@@ -203,16 +203,31 @@ glob.stream( [
// so the tokens must be replaced in sequence to prevent the processes
// from overriding each other.
for ( const [ token, path ] of tokens ) {
- await execa(
- join( __dirname, '..', '..', 'node_modules', '.bin', 'docgen' ),
- [
- relative( ROOT_DIR, resolve( dirname( file ), path ) ),
- `--output ${ output }`,
- '--to-token',
- `--use-token "${ token }"`,
- '--ignore "/unstable|experimental/i"',
- ],
- { shell: true }
- );
+ try {
+ await execa(
+ join(
+ __dirname,
+ '..',
+ '..',
+ 'node_modules',
+ '.bin',
+ 'docgen'
+ ),
+ [
+ relative( ROOT_DIR, resolve( dirname( file ), path ) ),
+ `--output ${ output }`,
+ '--to-token',
+ `--use-token "${ token }"`,
+ '--ignore "/unstable|experimental/i"',
+ ],
+ { shell: true }
+ );
+ } catch ( error ) {
+ // Disable reason: Errors should log to console.
+
+ // eslint-disable-next-line no-console
+ console.error( error );
+ process.exit( 1 );
+ }
}
} );
diff --git a/bin/build-plugin-zip.sh b/bin/build-plugin-zip.sh
index 4aea6ac016c1e8..26ef45f7b337f4 100755
--- a/bin/build-plugin-zip.sh
+++ b/bin/build-plugin-zip.sh
@@ -99,7 +99,7 @@ done
# Run the build.
status "Installing dependencies... 📦"
-PUPPETEER_SKIP_CHROMIUM_DOWNLOAD=true npm install
+npm install
status "Generating build... 👷♀️"
npm run build
diff --git a/changelog.txt b/changelog.txt
index d2002de99fb165..db0125253dfa72 100644
--- a/changelog.txt
+++ b/changelog.txt
@@ -1,6 +1,166 @@
== Changelog ==
-= 7.9.0-rc.1 =
+= 8.0.0 =
+
+### Features
+
+- Add subscript and superscript formatting options. ([21819](https://github.com/WordPress/gutenberg/pull/21819))
+- Move the Block Patterns UI to the inserter. ([20951](https://github.com/WordPress/gutenberg/pull/20951))
+- Improve layout and usability of code editor. ([21643](https://github.com/WordPress/gutenberg/pull/21643))
+
+### Enhancements
+
+- Add inserter previews to more blocks. ([21740](https://github.com/WordPress/gutenberg/pull/21740))
+- Performance improvements:
+ - Import from individual react-dates component. ([21914](https://github.com/WordPress/gutenberg/pull/21914))
+ - Upgrade showdown Markdown processor library. ([21862](https://github.com/WordPress/gutenberg/pull/21862))
+- Allow title and button-based appender to inherit styles. ([21749](https://github.com/WordPress/gutenberg/pull/21749))
+- Output float clearing for all centered blocks. ([21608](https://github.com/WordPress/gutenberg/pull/21608))
+- Update 'Welcome Guide' illustrations. ([21515](https://github.com/WordPress/gutenberg/pull/21515))
+
+### New APIs
+
+- A new [Block Context API](https://github.com/WordPress/gutenberg/blob/master/docs/designers-developers/developers/block-api/block-context.md) has been partially implemented, currently limited to block settings and editor APIs. PHP APIs will be implemented in the next plugin releases. ([21467](https://github.com/WordPress/gutenberg/pull/21467), [21868](https://github.com/WordPress/gutenberg/pull/21868), [21921](https://github.com/WordPress/gutenberg/pull/21921))
+- Add new "G2"-styled icons to the Icons package. ([21209](https://github.com/WordPress/gutenberg/pull/21209))
+
+### Bug Fixes
+
+- Change `wp_make_content_images_responsive` to `wp_filter_content_tags` to resolve warnings in WordPress 5.5-alpha. ([21514](https://github.com/WordPress/gutenberg/pull/21514))
+- Collapse selection to end after link insertion. ([17126](https://github.com/WordPress/gutenberg/pull/17126))
+- Fix selected category on existing Latest Posts blocks. ([21359](https://github.com/WordPress/gutenberg/pull/21359))
+- Fix overlapping column contents for embeds. ([21570](https://github.com/WordPress/gutenberg/pull/21570))
+- Fix focus styling for date picker calendar days. ([21600](https://github.com/WordPress/gutenberg/pull/21600))
+- NPM Packages
+ - Fix "Cannot find module '../utils'" error. ([21609](https://github.com/WordPress/gutenberg/pull/21609))
+ - Types: Hide element, primitives, icons declarations. ([21613](https://github.com/WordPress/gutenberg/pull/21613), [21784](https://github.com/WordPress/gutenberg/pull/21784))
+- Inherit font styles in block appender placeholder. ([21725](https://github.com/WordPress/gutenberg/pull/21725))
+- Allow default pasting behavior in FontSizePicker. ([21812](https://github.com/WordPress/gutenberg/pull/21812))
+- Prevent negative custom text sizes. ([21815](https://github.com/WordPress/gutenberg/pull/21815))
+- Fix image center alignment behavior. ([21911](https://github.com/WordPress/gutenberg/pull/21911))
+- Fix centered buttons margins. ([21947](https://github.com/WordPress/gutenberg/pull/21947))
+- Revert the button block to the previous markup. ([21923](https://github.com/WordPress/gutenberg/pull/21923))
+- Avoid using inline RichText element for navigation link. ([21856](https://github.com/WordPress/gutenberg/pull/21856))
+- Ensure `resetEditorBlocks` is synchronous. ([21839](https://github.com/WordPress/gutenberg/pull/21839))
+- Fix the button outline style for the old button markup. ([21816](https://github.com/WordPress/gutenberg/pull/21816))
+- Fix default attribute on audio preload. ([21735](https://github.com/WordPress/gutenberg/pull/21735))
+- Fix gradient picker double-click bug. ([21732](https://github.com/WordPress/gutenberg/pull/21732))
+- Fix broken links in handbook. ([21686](https://github.com/WordPress/gutenberg/pull/21686))
+- Make `useMediaQuery` return the correct value on the first render. ([21682](https://github.com/WordPress/gutenberg/pull/21682))
+- Fix visual issue on windows with 782px. ([21661](https://github.com/WordPress/gutenberg/pull/21661))
+- Allow wrapping for Navigation block links. ([21632](https://github.com/WordPress/gutenberg/pull/21632))
+- Remove redundant margins from the columns block. ([21615](https://github.com/WordPress/gutenberg/pull/21615))
+- Fix media Text padding on inner blocks. ([21612](https://github.com/WordPress/gutenberg/pull/21612))
+- Restore floated image margins. ([21500](https://github.com/WordPress/gutenberg/pull/21500))
+- Fix URL display for scheduled posts. ([21410](https://github.com/WordPress/gutenberg/pull/21410))
+- Test keycode modifiers for keyboard event as exclusive set. ([20733](https://github.com/WordPress/gutenberg/pull/20733))
+- Fix focus loss for Guide "Finish" button in Internet Explorer. ([20599](https://github.com/WordPress/gutenberg/pull/20599))
+- Replace incorrect Snackbar `label` attribute with `aria-label`. ([20540](https://github.com/WordPress/gutenberg/pull/20540))
+
+### Experiments
+
+- Add experimental `useEditorFeature` hook to simplify access to editor features. ([21646](https://github.com/WordPress/gutenberg/pull/21646))
+- Navigation menu page:
+ - Try a fixed toolbar in the navigation page. ([21340](https://github.com/WordPress/gutenberg/pull/21340))
+ - Fix panel collapsing in navigation page. ([21633](https://github.com/WordPress/gutenberg/pull/21633))
+ - Fix mobile layout for navigation menu page. ([21638](https://github.com/WordPress/gutenberg/pull/21638))
+ - Delete empty spaces in menu REST API endpoint strings. ([21453](https://github.com/WordPress/gutenberg/pull/21453))
+- Edit site:
+ - Add current theme to template switcher. ([21578](https://github.com/WordPress/gutenberg/pull/21578), [21768](https://github.com/WordPress/gutenberg/pull/21768))
+ - Declare attributes for Template Part block in `block.json`. ([21796](https://github.com/WordPress/gutenberg/pull/21796))
+ - Update end-to-end test for multi-entity saving in site editor. ([21363](https://github.com/WordPress/gutenberg/pull/21363))
+ - Add preview options component. ([21309](https://github.com/WordPress/gutenberg/pull/21309))
+ - Improve template parts resolution and saving behavior. ([21766](https://github.com/WordPress/gutenberg/pull/21766))
+ - Support REST API meta queries. ([21851](https://github.com/WordPress/gutenberg/pull/21851))
+ - Add extra validation when loading template parts. ([21636](https://github.com/WordPress/gutenberg/pull/21636))
+- Block directory:
+ - Add InserterPanel around block directory results. ([21748](https://github.com/WordPress/gutenberg/pull/21748))
+- Widgets:
+ - Fix legacy widgets z-index issue. ([21586](https://github.com/WordPress/gutenberg/pull/21586))
+ - Fix legacy widgets visual issues. ([21585](https://github.com/WordPress/gutenberg/pull/21585))
+
+### Deprecations
+
+- Add deprecation notice to `useApiFetch` hook. ([21723](https://github.com/WordPress/gutenberg/pull/21723))
+
+### Code Quality
+
+- Remove nested breakpoint in fullscreen mode CSS. ([21496](https://github.com/WordPress/gutenberg/pull/21496))
+- Update npm-package-json-lint from 4.0.3 to 5.0.0. ([21597](https://github.com/WordPress/gutenberg/pull/21597))
+- Update npm dependencies that warn. ([21596](https://github.com/WordPress/gutenberg/pull/21596))
+- Fix license check script to ignore sub-dependencies of ignored packages. ([21606](https://github.com/WordPress/gutenberg/pull/21606))
+- Package TypeScript types improvements:
+ - Mark addQueryArgs arguments parameter as optional. ([21926](https://github.com/WordPress/gutenberg/pull/21926))
+ - Relax i18n sprintf arguments type. ([21919](https://github.com/WordPress/gutenberg/pull/21919))
+- Update PHPCS to latest version. ([21680](https://github.com/WordPress/gutenberg/pull/21680))
+- Unify how editor alignments are applied across blocks. ([21822](https://github.com/WordPress/gutenberg/pull/21822))
+- Remove obsolete editor alignment classes. ([21906](https://github.com/WordPress/gutenberg/pull/21906))
+- Remove old icons. ([21821](https://github.com/WordPress/gutenberg/pull/21821))
+- Implement `block.json` for blocks. ([21794](https://github.com/WordPress/gutenberg/pull/21794), [21783](https://github.com/WordPress/gutenberg/pull/21783), [21782](https://github.com/WordPress/gutenberg/pull/21782), [21775](https://github.com/WordPress/gutenberg/pull/21775), [21787](https://github.com/WordPress/gutenberg/pull/21787), [21774](https://github.com/WordPress/gutenberg/pull/21774), [21792](https://github.com/WordPress/gutenberg/pull/21792))
+- Use `register_block_type_from_metadata` in Latest Posts block. ([21788](https://github.com/WordPress/gutenberg/pull/21788))
+- Polish RSS block code. ([21773](https://github.com/WordPress/gutenberg/pull/21773))
+- Move `camelCaseDash` to the package where it is consumed. ([21736](https://github.com/WordPress/gutenberg/pull/21736))
+- Improve URLPopover code from review comments. ([21621](https://github.com/WordPress/gutenberg/pull/21621))
+
+### Documentation
+
+- Remove duplicate sentence in glossary documentation. ([21565](https://github.com/WordPress/gutenberg/pull/21565))
+- Update `wp-env` docs to reflect current functionality of package. ([21809](https://github.com/WordPress/gutenberg/pull/21809))
+- Extract Block Transforms into its own handbook page. ([21734](https://github.com/WordPress/gutenberg/pull/21734))
+- Update the index of Block API to reflect current contents. ([21726](https://github.com/WordPress/gutenberg/pull/21726))
+- Clarify attribute type documentation. ([21694](https://github.com/WordPress/gutenberg/pull/21694))
+- Add location for components `style.css`. ([21654](https://github.com/WordPress/gutenberg/pull/21654))
+- Fix the JSDoc return type for `getEntityRecords`. ([21630](https://github.com/WordPress/gutenberg/pull/21630))
+- Update triage links to new document. ([21629](https://github.com/WordPress/gutenberg/pull/21629))
+- Update Getting Started instructions for remote server. ([21625](https://github.com/WordPress/gutenberg/pull/21625))
+- Update the "patterns" to reflect "user interface" instead. ([21562](https://github.com/WordPress/gutenberg/pull/21562))
+- Create document for contributing with triage. ([21350](https://github.com/WordPress/gutenberg/pull/21350))
+- Update triage.md to add more clarity and relevant links. ([21802](https://github.com/WordPress/gutenberg/pull/21802))
+
+### Project Management
+
+- Update bug report template to help identify the editor version. ([21564](https://github.com/WordPress/gutenberg/pull/21564))
+
+### Various
+
+- End-to-end tests:
+ - Add test for template part block creation and insertion. ([21849](https://github.com/WordPress/gutenberg/pull/21849))
+ - Add test that template part block customizations are loaded from slug and theme attributes. ([21852](https://github.com/WordPress/gutenberg/pull/21852))
+ - Fix tests by removing unnecessary assertions and properly install dependencies in `@wordpress/api-fetch`. ([21780](https://github.com/WordPress/gutenberg/pull/21780))
+ - Add end-to-end test for pinned sidebar items. ([21652](https://github.com/WordPress/gutenberg/pull/21652))
+ - Add test which verifies reusable block after refresh. ([20605](https://github.com/WordPress/gutenberg/pull/20605))
+- Update cleanForSlug() to remove additional non-word characters. ([21007](https://github.com/WordPress/gutenberg/pull/21007))
+- `@wordpress/scripts`:
+ - Support debugging with `test-unit-js`. ([21631](https://github.com/WordPress/gutenberg/pull/21631), [21861](https://github.com/WordPress/gutenberg/pull/21861))
+ - Install Chromium on demand together with `test-e2e` script. ([20215](https://github.com/WordPress/gutenberg/pull/20215))
+- `@wordpress/create-block` block scaffold tool:
+ - Make it easier to provide most popular CLI options. ([21751](https://github.com/WordPress/gutenberg/pull/21751))
+ - Split JavaScript source files into parts for ESNext template. ([21750](https://github.com/WordPress/gutenberg/pull/21750))
+- `@wordpress/env` development environment:
+ - Expose port 3306 of MySQL container. ([21545](https://github.com/WordPress/gutenberg/pull/21545))
+- `@wordpress/eslint-plugin`:
+ - Add the recommended Prettier config to enforce WP coding styles. ([21602](https://github.com/WordPress/gutenberg/pull/21602))
+ - Fix `no-unused-vars-before-return` JSX identifier reference. ([21358](https://github.com/WordPress/gutenberg/pull/21358))
+- Navigation block:
+ - Revert changes to data fetching mechanics. ([21721](https://github.com/WordPress/gutenberg/pull/21721))
+- Bundle the block autocompleter in the block-editor package. ([21534](https://github.com/WordPress/gutenberg/pull/21534))
+- Storybook:
+ - Add FormToggle component. ([18085](https://github.com/WordPress/gutenberg/pull/18085))
+- Simplify Reusable Block description. ([21470](https://github.com/WordPress/gutenberg/pull/21470))
+- Build tooling:
+ - Install Composer dependencies as pre-lint step. ([21537](https://github.com/WordPress/gutenberg/pull/21537))
+ - Configure Webpack to watch only build files. ([21489](https://github.com/WordPress/gutenberg/pull/21489))
+ - Exit with non-zero status on docgen failed parse. ([21690](https://github.com/WordPress/gutenberg/pull/21690))
+
+
+= 7.9.1 =
+
+### Bug Fixes
+
+ - Make sidebar plugins pinned by default.
+ - Fix the button styles for old content.
+
+
+= 7.9.0 =
### Features
@@ -25,8 +185,8 @@
- Update all block previews to use the auto-height behavior. [21014](https://github.com/WordPress/gutenberg/pull/21014)
- Disable autocomplete for custom class name inputs. [21110](https://github.com/WordPress/gutenberg/pull/21110)
- Several small tweaks to the new Block UI. [21476](https://github.com/WordPress/gutenberg/pull/21476)
-- Unify the focus styles across the UI. [21141](https://github.com/WordPress/gutenberg/pull/21141)
-- Improve block focus style. [21498](https://github.com/WordPress/gutenberg/pull/21498)
+- Unify the focus styles across the UI. [21141](https://github.com/WordPress/gutenberg/pull/21141)
+- Improve block focus style. [21498](https://github.com/WordPress/gutenberg/pull/21498)
- Remove the post permalink UI from the post title. [21099](https://github.com/WordPress/gutenberg/pull/21099)
- Style the default toolbar buttons. [21252](https://github.com/WordPress/gutenberg/pull/21252)
- Style tweaks to the patterns library sidebar. [21263](https://github.com/WordPress/gutenberg/pull/21263)
@@ -166,7 +326,7 @@
- Exclude native files from type checking. [21491](https://github.com/WordPress/gutenberg/pull/21491)
- docgen: Optimize README update script. [18840](https://github.com/WordPress/gutenberg/pull/18840)
- Check Latest NPM on npm install. [21521](https://github.com/WordPress/gutenberg/pull/21521)
-- E2E Tests:
+- E2E Tests:
- Improve stability of image block test [21174](https://github.com/WordPress/gutenberg/pull/21174)
- Improve Allowed Inner Blocks test stability [21175](https://github.com/WordPress/gutenberg/pull/21175)
- Use waitForSelector to wait for sidebar presence [21180](https://github.com/WordPress/gutenberg/pull/21180)
@@ -197,6 +357,7 @@
- Build: Add TypeScript version validation [21208](https://github.com/WordPress/gutenberg/pull/21208)
+
= 7.8.1 =
@@ -357,60 +518,60 @@
### Enhancements
-- Update the Block and editor UI. [19344](https://github.com/WordPress/gutenberg/pull/19344)
- - New icons. [20464](https://github.com/WordPress/gutenberg/pull/20464)
+- Update the Block and editor UI. [19344](https://github.com/WordPress/gutenberg/pull/19344)
+ - New icons. [20464](https://github.com/WordPress/gutenberg/pull/20464)
- Avoid empty menu groups. [20495](https://github.com/WordPress/gutenberg/pull/20495)
- Block Placeholders. [20441](https://github.com/WordPress/gutenberg/pull/20441), [20676](https://github.com/WordPress/gutenberg/pull/20676).
- Various tweaks [20679](https://github.com/WordPress/gutenberg/pull/20679), [20578](https://github.com/WordPress/gutenberg/pull/20578).
-- Improve the Back to WP Admin button in Fullscreen Mode. [20603](https://github.com/WordPress/gutenberg/pull/20603)
-- Make the editor Fullscreen by default. [20611](https://github.com/WordPress/gutenberg/pull/20611)
-- Remove template locking from the columns block [20465](https://github.com/WordPress/gutenberg/pull/20465)
-- Make the inserter full height. [20526](https://github.com/WordPress/gutenberg/pull/20526)
+- Improve the Back to WP Admin button in Fullscreen Mode. [20603](https://github.com/WordPress/gutenberg/pull/20603)
+- Make the editor Fullscreen by default. [20611](https://github.com/WordPress/gutenberg/pull/20611)
+- Remove template locking from the columns block [20465](https://github.com/WordPress/gutenberg/pull/20465)
+- Make the inserter full height. [20526](https://github.com/WordPress/gutenberg/pull/20526)
### Bug Fixes
-- A11y:
- - Deselect first/last gallery images on blur. [14930](https://github.com/WordPress/gutenberg/pull/14930)
- - Revert top toolbar tab order [20571](https://github.com/WordPress/gutenberg/pull/20571)
-- Add an overlay to the html block preview to fix block selection in Firefox. [20425](https://github.com/WordPress/gutenberg/pull/20425)
+- A11y:
+ - Deselect first/last gallery images on blur. [14930](https://github.com/WordPress/gutenberg/pull/14930)
+ - Revert top toolbar tab order [20571](https://github.com/WordPress/gutenberg/pull/20571)
+- Add an overlay to the html block preview to fix block selection in Firefox. [20425](https://github.com/WordPress/gutenberg/pull/20425)
- Add missing accessibility attributes in the SVG icons. [20538](https://github.com/WordPress/gutenberg/pull/20538)
- Fix invalid syntax error on Safari 12. [20507](https://github.com/WordPress/gutenberg/pull/20507)
-- Use a consistent width for the link suggetions. [20448](https://github.com/WordPress/gutenberg/pull/20448)
-- Use full labels for directional block movers. [20664](https://github.com/WordPress/gutenberg/pull/20664)
+- Use a consistent width for the link suggetions. [20448](https://github.com/WordPress/gutenberg/pull/20448)
+- Use full labels for directional block movers. [20664](https://github.com/WordPress/gutenberg/pull/20664)
- Columns block: Force 50% column width at mid-range viewport. [20597](https://github.com/WordPress/gutenberg/pull/20597)
- Media & Text block: Fix frontend styles when "Crop image to fill" is selected [20539](https://github.com/WordPress/gutenberg/pull/20539)
-- Latest Post block:
+- Latest Post block:
- Fix the excerpt length. [20313](https://github.com/WordPress/gutenberg/pull/20313)
- Don't trim manual exerptts [20432](https://github.com/WordPress/gutenberg/pull/20432)
-- Fix sidebar scroll issue on small viewports. [20491](https://github.com/WordPress/gutenberg/pull/20491)
-- Social Link block:
- - Escape generated class name. [20479](https://github.com/WordPress/gutenberg/pull/20479)
- - Fix label attribute type as string. [20468](https://github.com/WordPress/gutenberg/pull/20468)
- - i18n: Use placeholder for the default label [20475](https://github.com/WordPress/gutenberg/pull/20475)
+- Fix sidebar scroll issue on small viewports. [20491](https://github.com/WordPress/gutenberg/pull/20491)
+- Social Link block:
+ - Escape generated class name. [20479](https://github.com/WordPress/gutenberg/pull/20479)
+ - Fix label attribute type as string. [20468](https://github.com/WordPress/gutenberg/pull/20468)
+ - i18n: Use placeholder for the default label [20475](https://github.com/WordPress/gutenberg/pull/20475)
- Simulated Queries (Device previews):
- - Check for match in stylesheet host and protocol to prevent Chrome breakage. [20673](https://github.com/WordPress/gutenberg/pull/20673)
- - Fix IE11 editor breakage. [20226](https://github.com/WordPress/gutenberg/pull/20226)
- - Fix incorrectly displayed preview option for private post types. [20604](https://github.com/WordPress/gutenberg/pull/20604)
+ - Check for match in stylesheet host and protocol to prevent Chrome breakage. [20673](https://github.com/WordPress/gutenberg/pull/20673)
+ - Fix IE11 editor breakage. [20226](https://github.com/WordPress/gutenberg/pull/20226)
+ - Fix incorrectly displayed preview option for private post types. [20604](https://github.com/WordPress/gutenberg/pull/20604)
- Focus preview button after opening preview. [20570](https://github.com/WordPress/gutenberg/pull/20570)
- Fix isURL regex to take account file urls. [20435](https://github.com/WordPress/gutenberg/pull/20435)
-- Fix error when deleting empty paragraphs in IE11. [20594](https://github.com/WordPress/gutenberg/pull/20594)
-- Fix hidden inserter toggle behind the popover. [20663](https://github.com/WordPress/gutenberg/pull/20663)
+- Fix error when deleting empty paragraphs in IE11. [20594](https://github.com/WordPress/gutenberg/pull/20594)
+- Fix hidden inserter toggle behind the popover. [20663](https://github.com/WordPress/gutenberg/pull/20663)
- Fix block registration shared defaults reuse across blocks. [20565](https://github.com/WordPress/gutenberg/pull/20565)
- Shim meta attributes for early block registrations. [20544](https://github.com/WordPress/gutenberg/pull/20544)
-- Fix bouncing Custom color formatter. [20612](https://github.com/WordPress/gutenberg/pull/20612)
+- Fix bouncing Custom color formatter. [20612](https://github.com/WordPress/gutenberg/pull/20612)
- Fix Gallery block styles in Edge causing editor breakage. [20690](https://github.com/WordPress/gutenberg/pull/20690)
### New APIs:
-- @wordpress/env: Add support for ZIP URL sources. [20426](https://github.com/WordPress/gutenberg/pull/20426)
+- @wordpress/env: Add support for ZIP URL sources. [20426](https://github.com/WordPress/gutenberg/pull/20426)
### Experiments
-- Lighter Block DOM: allow block types to render their own wrapper [19701](https://github.com/WordPress/gutenberg/pull/19701)
- - Lighter InnerBlocks. [19910](https://github.com/WordPress/gutenberg/pull/19910)
- - Automatically add block class. [20658](https://github.com/WordPress/gutenberg/pull/20658)
-- BlockPreview: Add __experimentalOnReady prop. [17242](https://github.com/WordPress/gutenberg/pull/17242)
-- Edit Site:
+- Lighter Block DOM: allow block types to render their own wrapper [19701](https://github.com/WordPress/gutenberg/pull/19701)
+ - Lighter InnerBlocks. [19910](https://github.com/WordPress/gutenberg/pull/19910)
+ - Automatically add block class. [20658](https://github.com/WordPress/gutenberg/pull/20658)
+- BlockPreview: Add __experimentalOnReady prop. [17242](https://github.com/WordPress/gutenberg/pull/17242)
+- Edit Site:
- Update template navigation to use new link control. [20366](https://github.com/WordPress/gutenberg/pull/20366)
- Update the edit site save modal UI. [20608](https://github.com/WordPress/gutenberg/pull/20608)
- Fix the block toolbar in the Widgets and Site Edit screens. [20458](https://github.com/WordPress/gutenberg/pull/20458)
@@ -418,55 +579,55 @@
### Documentation
-- Add tutorial for creating a custom block editor instance. [20410](https://github.com/WordPress/gutenberg/pull/20410)
-- Create a new "Gutenberg as a Platform" page. [20666](https://github.com/WordPress/gutenberg/pull/20666)
+- Add tutorial for creating a custom block editor instance. [20410](https://github.com/WordPress/gutenberg/pull/20410)
+- Create a new "Gutenberg as a Platform" page. [20666](https://github.com/WordPress/gutenberg/pull/20666)
- Typos and tweaks: [20382](https://github.com/WordPress/gutenberg/pull/20382), [20386](https://github.com/WordPress/gutenberg/pull/20386), [20517](https://github.com/WordPress/gutenberg/pull/20517), [20662](https://github.com/WordPress/gutenberg/pull/20662), [20454](https://github.com/WordPress/gutenberg/pull/20454), [20659](https://github.com/WordPress/gutenberg/pull/20659).
### Code Quality
- Refactoring to existing blocks to use a lighter DOM:
- - List block. [20498](https://github.com/WordPress/gutenberg/pull/20498)
- - Image block. [20576](https://github.com/WordPress/gutenberg/pull/20576)
- - Heading. [20493](https://github.com/WordPress/gutenberg/pull/20493)
+ - List block. [20498](https://github.com/WordPress/gutenberg/pull/20498)
+ - Image block. [20576](https://github.com/WordPress/gutenberg/pull/20576)
+ - Heading. [20493](https://github.com/WordPress/gutenberg/pull/20493)
- Consistent block focus behaviour on mount. [20577](https://github.com/WordPress/gutenberg/pull/20577)
-- Cleanup CSS variables. [20529](https://github.com/WordPress/gutenberg/pull/20529)
+- Cleanup CSS variables. [20529](https://github.com/WordPress/gutenberg/pull/20529)
- Use the EditorSkeleton component in the widgets and Edit Site pages. [20440](https://github.com/WordPress/gutenberg/pull/20440), [20431](https://github.com/WordPress/gutenberg/pull/20431).
- Refactor SlotFill components. [19242](https://github.com/WordPress/gutenberg/pull/19242)
- Remove useless style override for floats. [20501](https://github.com/WordPress/gutenberg/pull/20501)
-- Block popover: remove data-type. [20531](https://github.com/WordPress/gutenberg/pull/20531)
+- Block popover: remove data-type. [20531](https://github.com/WordPress/gutenberg/pull/20531)
- Resizable editor improvements. [20259](https://github.com/WordPress/gutenberg/pull/20259)
### Various
- @wordpress/env:
- Save the database as a volume. [20648](https://github.com/WordPress/gutenberg/pull/20648)
- - Fix accidental quotes in Site Title. [20520](https://github.com/WordPress/gutenberg/pull/20520)
- - Set owner of wp-content to www-data. [20406](https://github.com/WordPress/gutenberg/pull/20406)
-- @wordpress/create-block:
+ - Fix accidental quotes in Site Title. [20520](https://github.com/WordPress/gutenberg/pull/20520)
+ - Set owner of wp-content to www-data. [20406](https://github.com/WordPress/gutenberg/pull/20406)
+- @wordpress/create-block:
- Fix system requirements checks. [20461](https://github.com/WordPress/gutenberg/pull/20461) [20456](https://github.com/WordPress/gutenberg/pull/20456)
-- Fix React warning triggered by the BlockToolbar component. [20546](https://github.com/WordPress/gutenberg/pull/20546)
+- Fix React warning triggered by the BlockToolbar component. [20546](https://github.com/WordPress/gutenberg/pull/20546)
- Skip the Type Writer effect component in IE 11. [20485](https://github.com/WordPress/gutenberg/pull/20485)
-- Update browserslist to fix out-of-date caniuse-lite messages [20709](https://github.com/WordPress/gutenberg/pull/20709)
+- Update browserslist to fix out-of-date caniuse-lite messages [20709](https://github.com/WordPress/gutenberg/pull/20709)
- Add storybook stories:
- TextControl [20467](https://github.com/WordPress/gutenberg/pull/20467)
- - TextAreaControl [20472](https://github.com/WordPress/gutenberg/pull/20472)
- - SelectControl [20482](https://github.com/WordPress/gutenberg/pull/20482)
+ - TextAreaControl [20472](https://github.com/WordPress/gutenberg/pull/20472)
+ - SelectControl [20482](https://github.com/WordPress/gutenberg/pull/20482)
- Tooltip [20322](https://github.com/WordPress/gutenberg/pull/20322)
- E2E Tests:
- Add test for the Image block. [20622](https://github.com/WordPress/gutenberg/pull/20622)
- - More stable embed test. [20668](https://github.com/WordPress/gutenberg/pull/20668)
- - Fix intermittent RichText e2e test failure. [20457](https://github.com/WordPress/gutenberg/pull/20457)
-- Travis: Avoid skipping Puppeteer download. [20547](https://github.com/WordPress/gutenberg/pull/20547)
-- Plugin: Bump minimum WordPress version to 5.3 [20628](https://github.com/WordPress/gutenberg/pull/20628)
-- @wordrpess/priority-queue: Fix for environments that don't have `window` defined. [20486](https://github.com/WordPress/gutenberg/pull/20486)
-- Update jest configuration to only ignore tests from /wordpress/ as a subdirectory [20420](https://github.com/WordPress/gutenberg/pull/20420)
+ - More stable embed test. [20668](https://github.com/WordPress/gutenberg/pull/20668)
+ - Fix intermittent RichText e2e test failure. [20457](https://github.com/WordPress/gutenberg/pull/20457)
+- Travis: Avoid skipping Puppeteer download. [20547](https://github.com/WordPress/gutenberg/pull/20547)
+- Plugin: Bump minimum WordPress version to 5.3 [20628](https://github.com/WordPress/gutenberg/pull/20628)
+- @wordrpess/priority-queue: Fix for environments that don't have `window` defined. [20486](https://github.com/WordPress/gutenberg/pull/20486)
+- Update jest configuration to only ignore tests from /wordpress/ as a subdirectory [20420](https://github.com/WordPress/gutenberg/pull/20420)
= 7.6.0 =
## Features
-- Add a rotating list of tips to the inserter help panel [20163](https://github.com/WordPress/gutenberg/pull/20163)
+- Add a rotating list of tips to the inserter help panel [20163](https://github.com/WordPress/gutenberg/pull/20163)
## Enhancements
- Improve find-ability for social/video embeds [20224](https://github.com/WordPress/gutenberg/pull/20224)
@@ -475,7 +636,7 @@
- Ensure packages-update wp-scripts command works with missing dependencies [20408](https://github.com/WordPress/gutenberg/pull/20408)
- Add new option in dependencies webpack plugin to combine assets files into one file [20330](https://github.com/WordPress/gutenberg/pull/20330)
- Environment:
- - Add custom port numbers to .wp-env.json [20158](https://github.com/WordPress/gutenberg/pull/20158)
+ - Add custom port numbers to .wp-env.json [20158](https://github.com/WordPress/gutenberg/pull/20158)
- Add support for local override files. [20341](https://github.com/WordPress/gutenberg/pull/20341)
- Add debug mode. [20348](https://github.com/WordPress/gutenberg/pull/20348)
@@ -493,42 +654,42 @@
- Show error when resolved block template is empty [20239](https://github.com/WordPress/gutenberg/pull/20239)
## Bug Fixes
-- Overflowing `LinkControl` block editor component. [20154](https://github.com/WordPress/gutenberg/pull/20154)
-- Broken gallery to image transform and inconsistent types used in the gallery block [20084](https://github.com/WordPress/gutenberg/pull/20084)
-- Missing label on heading toolbar. [20248](https://github.com/WordPress/gutenberg/pull/20248)
-- Sidebar jumpiness. [20355](https://github.com/WordPress/gutenberg/pull/20355)
-- Fix wrong imports in PluginBlockSettingsMenuItem [20356](https://github.com/WordPress/gutenberg/pull/20356)
-- Color formatter appears when color choosing is not possible [20222](https://github.com/WordPress/gutenberg/pull/20222)
-- Crash when updating a post with the latest post block [20289](https://github.com/WordPress/gutenberg/pull/20289)
-- Inconsistency on Import from JSON button look [20416](https://github.com/WordPress/gutenberg/pull/20416)
-- Inline image width pop-up 'wanders' down page [20232](https://github.com/WordPress/gutenberg/pull/20232)
-- Styling problem on vertically aligned blocks [20368](https://github.com/WordPress/gutenberg/pull/20368)
-- Remove unnecessary aria-label from link formatter [18742](https://github.com/WordPress/gutenberg/pull/18742)
-- Make navigation button expand to fit longer nav link text [20230](https://github.com/WordPress/gutenberg/pull/20230)
+- Overflowing `LinkControl` block editor component. [20154](https://github.com/WordPress/gutenberg/pull/20154)
+- Broken gallery to image transform and inconsistent types used in the gallery block [20084](https://github.com/WordPress/gutenberg/pull/20084)
+- Missing label on heading toolbar. [20248](https://github.com/WordPress/gutenberg/pull/20248)
+- Sidebar jumpiness. [20355](https://github.com/WordPress/gutenberg/pull/20355)
+- Fix wrong imports in PluginBlockSettingsMenuItem [20356](https://github.com/WordPress/gutenberg/pull/20356)
+- Color formatter appears when color choosing is not possible [20222](https://github.com/WordPress/gutenberg/pull/20222)
+- Crash when updating a post with the latest post block [20289](https://github.com/WordPress/gutenberg/pull/20289)
+- Inconsistency on Import from JSON button look [20416](https://github.com/WordPress/gutenberg/pull/20416)
+- Inline image width pop-up 'wanders' down page [20232](https://github.com/WordPress/gutenberg/pull/20232)
+- Styling problem on vertically aligned blocks [20368](https://github.com/WordPress/gutenberg/pull/20368)
+- Remove unnecessary aria-label from link formatter [18742](https://github.com/WordPress/gutenberg/pull/18742)
+- Make navigation button expand to fit longer nav link text [20230](https://github.com/WordPress/gutenberg/pull/20230)
- Flow for gallery creation and editing [20287](https://github.com/WordPress/gutenberg/pull/20287)
-- Fix background color for dark themes on the spacer block [20296](https://github.com/WordPress/gutenberg/pull/20296)
-- Show metaboxes peeking in even on tiny screens. [20262](https://github.com/WordPress/gutenberg/pull/20262)
+- Fix background color for dark themes on the spacer block [20296](https://github.com/WordPress/gutenberg/pull/20296)
+- Show metaboxes peeking in even on tiny screens. [20262](https://github.com/WordPress/gutenberg/pull/20262)
- Add an edit state to media frames to fix an issue when opening a new tab. [17642](https://github.com/WordPress/gutenberg/pull/17642)
## Documentation
-- Add a basic storybook story listing all the @wordpress/icons [20266](https://github.com/WordPress/gutenberg/pull/20266)
-- Add docs for variations in the block registration section [20145](https://github.com/WordPress/gutenberg/pull/20145)
-- Improve README for `` component. [19677](https://github.com/WordPress/gutenberg/pull/19677)
-- Remove the devhub manifest file [20175](https://github.com/WordPress/gutenberg/pull/20175)
+- Add a basic storybook story listing all the @wordpress/icons [20266](https://github.com/WordPress/gutenberg/pull/20266)
+- Add docs for variations in the block registration section [20145](https://github.com/WordPress/gutenberg/pull/20145)
+- Improve README for `` component. [19677](https://github.com/WordPress/gutenberg/pull/19677)
+- Remove the devhub manifest file [20175](https://github.com/WordPress/gutenberg/pull/20175)
- Several documentation improvements and typo fixes: [20385](https://github.com/WordPress/gutenberg/pull/20385), [20378](https://github.com/WordPress/gutenberg/pull/20378), [20392](https://github.com/WordPress/gutenberg/pull/20392), [20381](https://github.com/WordPress/gutenberg/pull/20381), [20388](https://github.com/WordPress/gutenberg/pull/20388), [20371](https://github.com/WordPress/gutenberg/pull/20371), [20380](https://github.com/WordPress/gutenberg/pull/20380), [20384](https://github.com/WordPress/gutenberg/pull/20384), [20379](https://github.com/WordPress/gutenberg/pull/20379), [20391](https://github.com/WordPress/gutenberg/pull/20391), [20251](https://github.com/WordPress/gutenberg/pull/20251)
## Various
- Create block: Add support for `format:js` to ESNext template [20335](https://github.com/WordPress/gutenberg/pull/20335)
- Add check for minimum system requirements on create block [20398](https://github.com/WordPress/gutenberg/pull/20398)
-- Conditionally apply Editor Skeleton html element styles [20245](https://github.com/WordPress/gutenberg/pull/20245)
+- Conditionally apply Editor Skeleton html element styles [20245](https://github.com/WordPress/gutenberg/pull/20245)
- Environment:
- Check for legacy installs and provide the option to delete them. [20340](https://github.com/WordPress/gutenberg/pull/20340)
- Fix testsPath on local sources [20353](https://github.com/WordPress/gutenberg/pull/20353)
- Use user with UID=33 to run WP CLI commands [20403](https://github.com/WordPress/gutenberg/pull/20403)
- - Fix issue where docker & wp had different URLs [20228](https://github.com/WordPress/gutenberg/pull/20228)
+ - Fix issue where docker & wp had different URLs [20228](https://github.com/WordPress/gutenberg/pull/20228)
- No longer show error message twice [20157](https://github.com/WordPress/gutenberg/pull/20157)
- - Support wp-config.php overrides. [20352](https://github.com/WordPress/gutenberg/pull/20352)
- - Support overwriting generated file directory with an environment variable [20253](https://github.com/WordPress/gutenberg/pull/20253)
+ - Support wp-config.php overrides. [20352](https://github.com/WordPress/gutenberg/pull/20352)
+ - Support overwriting generated file directory with an environment variable [20253](https://github.com/WordPress/gutenberg/pull/20253)
= 7.5.0 =
@@ -552,7 +713,7 @@
- Improve colors handling [20022](https://github.com/WordPress/gutenberg/pull/20022)
- Rename background color CSS class [20018](https://github.com/WordPress/gutenberg/pull/20018)
- Block Library: Avoid column width auto-adjustment when sibling width changes [19515](https://github.com/WordPress/gutenberg/pull/19515) [20169](https://github.com/WordPress/gutenberg/pull/20169)
-- A11y:
+- A11y:
- Incorporate settings in the edit state of the LinkControl component [20052](https://github.com/WordPress/gutenberg/pull/20052)
- Announce all Notice components messages [15745](https://github.com/WordPress/gutenberg/pull/15745)
- Button block: Remove title attribute [19735](https://github.com/WordPress/gutenberg/pull/19735)
@@ -918,7 +1079,7 @@
- Use tabs for gradient and color. [#19133](https://github.com/wordpress/gutenberg/pull/19133)
- Add "download" keyword to the File block. [#18995](https://github.com/wordpress/gutenberg/pull/18995)
- Add "poem" keyword to the Verse block. [#19355](https://github.com/wordpress/gutenberg/pull/19355)
-- Convert to blocks:
+- Convert to blocks:
- preserve text alignment. [#19097](https://github.com/wordpress/gutenberg/pull/19097)
- Skip shortcode if not on its own line. [#19059](https://github.com/wordpress/gutenberg/pull/19059)
- Writing flow: Improve tabbing for Edit mode. [#19235](https://github.com/wordpress/gutenberg/pull/19235)
@@ -928,7 +1089,7 @@
- Use the default cursor for Select Tool [#19157](https://github.com/wordpress/gutenberg/pull/19157)
- Round position attributes on cover focal point save. [#19183](https://github.com/wordpress/gutenberg/pull/19183)
- Remove block inserter shortcuts. [#19045](https://github.com/wordpress/gutenberg/pull/19045)
-- Navigation block:
+- Navigation block:
- Clarify the placeholder label. [#19105](https://github.com/wordpress/gutenberg/pull/19105)
- Removes the reusable block option from the items. [#19250](https://github.com/wordpress/gutenberg/pull/19250)
- Sub-items white background adjustment. [#18976](https://github.com/wordpress/gutenberg/pull/18976)
@@ -938,7 +1099,7 @@
- Block examples: concatenate strings and add translators notes. [#19048](https://github.com/wordpress/gutenberg/pull/19048)
- Show the trash button as a link. [#19131](https://github.com/wordpress/gutenberg/pull/19131)
- Removed the bottom-margin for the RadioControl component. [#19340](https://github.com/wordpress/gutenberg/pull/19340)
-- Copy:
+- Copy:
- Capitalize "Manager" in Block Manager. [#19375](https://github.com/wordpress/gutenberg/pull/19375)
- Expand on sentence case usage. [#18758](https://github.com/wordpress/gutenberg/pull/18758) [#19377](https://github.com/wordpress/gutenberg/pull/19377)
- Update the copy of the Experiments page [#18233](https://github.com/wordpress/gutenberg/pull/18233)
@@ -952,7 +1113,7 @@
### Bugs:
-- A11y:
+- A11y:
- Make text alignment items radio menu items. [#19233](https://github.com/wordpress/gutenberg/pull/19233)
- Add group role to the block wrapper element. [#19213](https://github.com/wordpress/gutenberg/pull/19213)
- Prevent tabbing to the block drag handle. [#19211](https://github.com/wordpress/gutenberg/pull/19211)
@@ -965,7 +1126,7 @@
- Remove windows paste markers. [#19040](https://github.com/wordpress/gutenberg/pull/19040)
- Strip HTML formatting space for inline text. [#19043](https://github.com/wordpress/gutenberg/pull/19043)
- Apply active formats when pasting inline. [#14815](https://github.com/wordpress/gutenberg/pull/14815)
-- Rich Text:
+- Rich Text:
- Fix applying a format across 2 other formats. [#19053](https://github.com/wordpress/gutenberg/pull/19053)
- Fix using composed characters on Safari. [#19171](https://github.com/wordpress/gutenberg/pull/19171)
- Fix block navigation using the up arrow key. [#19135](https://github.com/wordpress/gutenberg/pull/19135)
@@ -992,7 +1153,7 @@
- Translate block example strings. [#18162](https://github.com/wordpress/gutenberg/pull/18162)
- Writing flow: simplify & fix tabbing out of block. [#19312](https://github.com/wordpress/gutenberg/pull/19312)
-### New APIs:
+### New APIs:
- Button component:
- Support the icon prop and use a consistent button height. [#19193](https://github.com/wordpress/gutenberg/pull/19193) [#19366](https://github.com/wordpress/gutenberg/pull/19366) [#19123](https://github.com/wordpress/gutenberg/pull/19123) [#19058](https://github.com/wordpress/gutenberg/pull/19058)
@@ -1018,7 +1179,7 @@
- Fix Drag & Drop not working on the widgets screen. [#19029](https://github.com/wordpress/gutenberg/pull/19029)
- Allow parent Block to consume child Block's toolbar. [#18440](https://github.com/wordpress/gutenberg/pull/18440)
- Allow disabling the Block UI. [#18173](https://github.com/wordpress/gutenberg/pull/18173)
-- Block Directory:
+- Block Directory:
- Update the regular expression that determines whether the plugin is using an img URL or an icon slug. [#19316](https://github.com/wordpress/gutenberg/pull/19316)
- Use the block's title for alt text on block directory plugin items. [#19263](https://github.com/wordpress/gutenberg/pull/19263)
@@ -1054,7 +1215,7 @@
- Popover: remove buffer options [#19283](https://github.com/wordpress/gutenberg/pull/19283)
- Refactor the MediaReplaceFlow component to use Dropdown. [#19126](https://github.com/wordpress/gutenberg/pull/19126)
- Remove unused is-hovered class from the block wrapper. [#19390](https://github.com/wordpress/gutenberg/pull/19390)
-- RichText:
+- RichText:
- Rewrite withFilters with hooks. [#19117](https://github.com/wordpress/gutenberg/pull/19117)
- split out boundary style calculation. [#19319](https://github.com/wordpress/gutenberg/pull/19319)
- WritingFlow: rewrite with hooks. [#19393](https://github.com/wordpress/gutenberg/pull/19393)
@@ -1676,14 +1837,14 @@ Add knobs to the [ColorIndicator Story](https://github.com/WordPress/gutenberg/p
* Update the [Post Schedule label](https://github.com/WordPress/gutenberg/pull/15757) to correctly reflect the date and time display settings.
* Clean up the [block toolbar position](https://github.com/WordPress/gutenberg/pull/17197) for wide full blocks.
* Fix the [cropped focus indicator](https://github.com/WordPress/gutenberg/pull/17215) in the block inserter.
-* Browser incompatibilities:
+* Browser incompatibilities:
* [Fallback to setTimeout in RichText](https://github.com/WordPress/gutenberg/pull/17213) if no requestIdleCallback is not supported.
* [Block toolbar fixes](https://github.com/WordPress/gutenberg/pull/17214) for IE11.
* Fix [Backspace usage in RichText](https://github.com/WordPress/gutenberg/pull/17256) for IE11.
* Prevent clicking the [next/previous month in the Post Schedule](https://github.com/WordPress/gutenberg/pull/17201) popover from closing it.
* Prevent the [private posts from triggering the unsaved changes](https://github.com/WordPress/gutenberg/pull/17210) [warnings](https://github.com/WordPress/gutenberg/pull/17257) after saving.
* Fix the usage of the [useReducedMotion hook in Node.js](https://github.com/WordPress/gutenberg/pull/17165) context.
-* A11y:
+* A11y:
* Use [darker form field borders](https://github.com/WordPress/gutenberg/pull/17218).
* Fix the [modal escape key propagation](https://github.com/WordPress/gutenberg/pull/17297).
* [Move focus back from the Modal to the More Menu](https://github.com/WordPress/gutenberg/pull/16964) when it was used to open the Modal.
@@ -1748,20 +1909,20 @@ Add knobs to the [ColorIndicator Story](https://github.com/WordPress/gutenberg/p
- Add the option to [resize Cover Block ](https://github.com/WordPress/gutenberg/pull/17143).
- Allow directly setting a [solid background color on Cover](https://github.com/WordPress/gutenberg/pull/17041) block.
- Add [list start, reversed settings](https://github.com/WordPress/gutenberg/pull/15113).
-- Add a [help panel to the inserter available in all blocks](https://github.com/WordPress/gutenberg/pull/16813).
-- [Typewriter experience](https://github.com/WordPress/gutenberg/pull/16460).
+- Add a [help panel to the inserter available in all blocks](https://github.com/WordPress/gutenberg/pull/16813).
+- [Typewriter experience](https://github.com/WordPress/gutenberg/pull/16460).
- Add [circle-crop variation](https://github.com/WordPress/gutenberg/pull/16475) to Image block.
### Enhancements
-- Add [overflow support inside block switcher](https://github.com/WordPress/gutenberg/pull/16984).
-- Update [GitHub action exit codes.](https://github.com/WordPress/gutenberg/pull/17002)
-- Core Data: [return updated record in saveEntityRecord](https://github.com/WordPress/gutenberg/pull/17030).
-- Latest Posts Block: [(no title) instead of (Untitled) for a post without a title](https://github.com/WordPress/gutenberg/pull/17074).
-- [Remove borders around inserter items for blocks with children blocks](https://github.com/WordPress/gutenberg/pull/17083).
-- Add [disabled block count](https://github.com/WordPress/gutenberg/pull/17103) in the block manager.
-- Writing Flow:
- - Add [splitting in the quote block](https://github.com/WordPress/gutenberg/pull/17121).
- - Allow [undoing of patterns with BACKSPACE and ESC.](https://github.com/WordPress/gutenberg/pull/14776)
+- Add [overflow support inside block switcher](https://github.com/WordPress/gutenberg/pull/16984).
+- Update [GitHub action exit codes.](https://github.com/WordPress/gutenberg/pull/17002)
+- Core Data: [return updated record in saveEntityRecord](https://github.com/WordPress/gutenberg/pull/17030).
+- Latest Posts Block: [(no title) instead of (Untitled) for a post without a title](https://github.com/WordPress/gutenberg/pull/17074).
+- [Remove borders around inserter items for blocks with children blocks](https://github.com/WordPress/gutenberg/pull/17083).
+- Add [disabled block count](https://github.com/WordPress/gutenberg/pull/17103) in the block manager.
+- Writing Flow:
+ - Add [splitting in the quote block](https://github.com/WordPress/gutenberg/pull/17121).
+ - Allow [undoing of patterns with BACKSPACE and ESC.](https://github.com/WordPress/gutenberg/pull/14776)
### Experiments
- Widgets Screen:
@@ -1769,10 +1930,10 @@ Add knobs to the [ColorIndicator Story](https://github.com/WordPress/gutenberg/p
- Add [Button block appender](https://github.com/WordPress/gutenberg/pull/16971).
### New APIs
-- Add [callbacks to ServerSideRenderer](https://github.com/WordPress/gutenberg/pull/16512) to handle failures with custom renderers.
+- Add [callbacks to ServerSideRenderer](https://github.com/WordPress/gutenberg/pull/16512) to handle failures with custom renderers.
- Add the [block example API](https://github.com/WordPress/gutenberg/pull/17124) and use it for inserter and switcher previews.
- Enable an [optional namespace parameter for hasAction & hasFilter ](https://github.com/WordPress/gutenberg/pull/15362).
-
+
### Bug Fixes
- The [duplicate button appears even if the block is not allowed](https://github.com/WordPress/gutenberg/pull/17007).
@@ -1794,14 +1955,14 @@ Add knobs to the [ColorIndicator Story](https://github.com/WordPress/gutenberg/p
### Various
-- Update [re-resizable dependency](https://github.com/WordPress/gutenberg/pull/17011)
-- Use [mixins in button styles instead of media queries.](https://github.com/WordPress/gutenberg/pull/17012)
-- [Fix performance tests with the introduction of the navigation mode](https://github.com/WordPress/gutenberg/pull/17034)
+- Update [re-resizable dependency](https://github.com/WordPress/gutenberg/pull/17011)
+- Use [mixins in button styles instead of media queries.](https://github.com/WordPress/gutenberg/pull/17012)
+- [Fix performance tests with the introduction of the navigation mode](https://github.com/WordPress/gutenberg/pull/17034)
- RichText code improvements: [#16905](https://github.com/WordPress/gutenberg/pull/16905), [#16962](https://github.com/WordPress/gutenberg/pull/16962).
- Scripts:
- Improve the way [test files are discovered](https://github.com/WordPress/gutenberg/pull/17033).
- Improve [recommended settings](https://github.com/WordPress/gutenberg/pull/17027) included in the package.
- - Use [the SCSS shared stylelint-config-wordpress config](https://github.com/WordPress/gutenberg/pull/17060).
+ - Use [the SCSS shared stylelint-config-wordpress config](https://github.com/WordPress/gutenberg/pull/17060).
- [Ignore the WordPress directory](https://github.com/WordPress/gutenberg/pull/16243) in stylelint.
- Fix: [edit post sets some default block appender styles](https://github.com/WordPress/gutenberg/pull/16943).
- Build: [remove global install of latest npm](https://github.com/WordPress/gutenberg/pull/17134).
@@ -1810,7 +1971,7 @@ Add knobs to the [ColorIndicator Story](https://github.com/WordPress/gutenberg/p
- Fix: [Add first-time contributor label](https://github.com/WordPress/gutenberg/pull/17156).
- Fix: [Add milestone](https://github.com/WordPress/gutenberg/pull/17157).
- Remove [unused CSS from ColorPalette](https://github.com/WordPress/gutenberg/pull/17152) component.
-
+
### Documentation
- Add [examples for the lockPostSaving and unlockPostSaving](https://github.com/WordPress/gutenberg/pull/16713)actions.
@@ -1818,7 +1979,7 @@ Add knobs to the [ColorIndicator Story](https://github.com/WordPress/gutenberg/p
- Add section about [updating package after new releases](https://github.com/WordPress/gutenberg/pull/17026).
- Add [ESNext examples to format API](https://github.com/WordPress/gutenberg/pull/16804) tutorial.
- Document [server-side functions that allow registering block styles](https://github.com/WordPress/gutenberg/pull/16997).
-
+
### Mobile
- [Reset toolbar scroll on content change](https://github.com/WordPress/gutenberg/pull/16945).
@@ -1942,13 +2103,13 @@ Add knobs to the [ColorIndicator Story](https://github.com/WordPress/gutenberg/p
### Mobile
-- Refactor [BlockToolbar out of](https://github.com/WordPress/gutenberg/pull/16677) [BlockList](https://github.com/WordPress/gutenberg/pull/16906).
+- Refactor [BlockToolbar out of](https://github.com/WordPress/gutenberg/pull/16677) [BlockList](https://github.com/WordPress/gutenberg/pull/16906).
- Fix [toolbar bottom inset for iPhone X](https://github.com/WordPress/gutenberg/pull/16961) devices.
= 6.2.0 =
### Enhancements
-- Introduce [Link Target](https://github.com/WordPress/gutenberg/pull/10128) [support](https://github.com/WordPress/gutenberg/pull/16497) in Button block.
+- Introduce [Link Target](https://github.com/WordPress/gutenberg/pull/10128) [support](https://github.com/WordPress/gutenberg/pull/16497) in Button block.
- Limit the [maximum height of the HTML block](https://github.com/WordPress/gutenberg/pull/16187).
- Show the [preview button on mobile viewports](http://update/show-post-preview-button-on-mobile).
- [Remove nested block restrictions](https://github.com/WordPress/gutenberg/pull/16751) from the Cover and Media & Text blocks.
@@ -2347,7 +2508,7 @@ Add knobs to the [ColorIndicator Story](https://github.com/WordPress/gutenberg/p
- Support the all hook in non-production environments.
- Expose hasResolver property on the data module selectors.
- Support multiple pattern replacement for the custom-templated-path-webpack-plugin package.
-- Update node-sass dependency to support the latest Node.js version.
+- Update node-sass dependency to support the latest Node.js version.
- Fix React warning showing when loading the editor (Fill component).
- Fix React warning message when using the Image block.
- Refactor the popover component using React Hooks.
@@ -2357,8 +2518,8 @@ Add knobs to the [ColorIndicator Story](https://github.com/WordPress/gutenberg/p
- Rewrite Node.js packages to use CommonJS exports.
- Speed up Docker and e2e tests setup Travis.
- Extracted the deprecated block version declarations to their own files.
-- Add missing file from the published @wordpress/dependency-extraction-webpack-plugin-files package.
-- Upgrade package dependencies: Lerna and Webpack Bundle Analyzer.
+- Add missing file from the published @wordpress/dependency-extraction-webpack-plugin-files package.
+- Upgrade package dependencies: Lerna and Webpack Bundle Analyzer.
# Mobile
diff --git a/composer.json b/composer.json
index 3d3098abaff758..f94b3c18e89fd6 100644
--- a/composer.json
+++ b/composer.json
@@ -11,11 +11,11 @@
"issues": "https://github.com/WordPress/gutenberg/issues"
},
"require-dev": {
- "dealerdirect/phpcodesniffer-composer-installer": "^0.5.0",
- "squizlabs/php_codesniffer": "^3.4.2",
- "phpcompatibility/php-compatibility": "^9.2.0",
- "wp-coding-standards/wpcs": "^2.1.1",
- "sirbrillig/phpcs-variable-analysis": "^2.7"
+ "dealerdirect/phpcodesniffer-composer-installer": "^0.6",
+ "squizlabs/php_codesniffer": "^3.5",
+ "phpcompatibility/php-compatibility": "^9.3",
+ "wp-coding-standards/wpcs": "^2.2",
+ "sirbrillig/phpcs-variable-analysis": "^2.8"
},
"require": {
"composer/installers": "~1.0"
diff --git a/composer.lock b/composer.lock
index 594d8bb48c929d..3ac63fed05df15 100644
--- a/composer.lock
+++ b/composer.lock
@@ -1,35 +1,38 @@
{
"_readme": [
"This file locks the dependencies of your project to a known state",
- "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#composer-lock-the-lock-file",
+ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies",
"This file is @generated automatically"
],
- "content-hash": "f802871495ce4d7ed5928e17524d0cdb",
+ "content-hash": "9745a2b1c8d1005bf9f7617061e4fc7d",
"packages": [
{
"name": "composer/installers",
- "version": "v1.6.0",
+ "version": "v1.9.0",
"source": {
"type": "git",
"url": "https://github.com/composer/installers.git",
- "reference": "cfcca6b1b60bc4974324efb5783c13dca6932b5b"
+ "reference": "b93bcf0fa1fccb0b7d176b0967d969691cd74cca"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/composer/installers/zipball/cfcca6b1b60bc4974324efb5783c13dca6932b5b",
- "reference": "cfcca6b1b60bc4974324efb5783c13dca6932b5b",
+ "url": "https://api.github.com/repos/composer/installers/zipball/b93bcf0fa1fccb0b7d176b0967d969691cd74cca",
+ "reference": "b93bcf0fa1fccb0b7d176b0967d969691cd74cca",
"shasum": ""
},
"require": {
- "composer-plugin-api": "^1.0"
+ "composer-plugin-api": "^1.0 || ^2.0"
},
"replace": {
"roundcube/plugin-installer": "*",
"shama/baton": "*"
},
"require-dev": {
- "composer/composer": "1.0.*@dev",
- "phpunit/phpunit": "^4.8.36"
+ "composer/composer": "1.6.* || 2.0.*@dev",
+ "composer/semver": "1.0.* || 2.0.*@dev",
+ "phpunit/phpunit": "^4.8.36",
+ "sebastian/comparator": "^1.2.4",
+ "symfony/process": "^2.3"
},
"type": "composer-plugin",
"extra": {
@@ -65,6 +68,7 @@
"Kanboard",
"Lan Management System",
"MODX Evo",
+ "MantisBT",
"Mautic",
"Maya",
"OXID",
@@ -73,6 +77,7 @@
"RadPHP",
"SMF",
"Thelia",
+ "Whmcs",
"WolfCMS",
"agl",
"aimeos",
@@ -95,6 +100,7 @@
"installer",
"itop",
"joomla",
+ "known",
"kohana",
"laravel",
"lavalite",
@@ -117,6 +123,7 @@
"shopware",
"silverstripe",
"sydes",
+ "sylius",
"symfony",
"typo3",
"wordpress",
@@ -124,22 +131,22 @@
"zend",
"zikula"
],
- "time": "2018-08-27T06:10:37+00:00"
+ "time": "2020-04-07T06:57:05+00:00"
}
],
"packages-dev": [
{
"name": "dealerdirect/phpcodesniffer-composer-installer",
- "version": "v0.5.0",
+ "version": "v0.6.2",
"source": {
"type": "git",
"url": "https://github.com/Dealerdirect/phpcodesniffer-composer-installer.git",
- "reference": "e749410375ff6fb7a040a68878c656c2e610b132"
+ "reference": "8001af8eb107fbfcedc31a8b51e20b07d85b457a"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/Dealerdirect/phpcodesniffer-composer-installer/zipball/e749410375ff6fb7a040a68878c656c2e610b132",
- "reference": "e749410375ff6fb7a040a68878c656c2e610b132",
+ "url": "https://api.github.com/repos/Dealerdirect/phpcodesniffer-composer-installer/zipball/8001af8eb107fbfcedc31a8b51e20b07d85b457a",
+ "reference": "8001af8eb107fbfcedc31a8b51e20b07d85b457a",
"shasum": ""
},
"require": {
@@ -192,20 +199,20 @@
"stylecheck",
"tests"
],
- "time": "2018-10-26T13:21:45+00:00"
+ "time": "2020-01-29T20:22:20+00:00"
},
{
"name": "phpcompatibility/php-compatibility",
- "version": "9.2.0",
+ "version": "9.3.5",
"source": {
"type": "git",
"url": "https://github.com/PHPCompatibility/PHPCompatibility.git",
- "reference": "3db1bf1e28123fd574a4ae2e9a84072826d51b5e"
+ "reference": "9fb324479acf6f39452e0655d2429cc0d3914243"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/PHPCompatibility/PHPCompatibility/zipball/3db1bf1e28123fd574a4ae2e9a84072826d51b5e",
- "reference": "3db1bf1e28123fd574a4ae2e9a84072826d51b5e",
+ "url": "https://api.github.com/repos/PHPCompatibility/PHPCompatibility/zipball/9fb324479acf6f39452e0655d2429cc0d3914243",
+ "reference": "9fb324479acf6f39452e0655d2429cc0d3914243",
"shasum": ""
},
"require": {
@@ -228,10 +235,6 @@
"LGPL-3.0-or-later"
],
"authors": [
- {
- "name": "Contributors",
- "homepage": "https://github.com/PHPCompatibility/PHPCompatibility/graphs/contributors"
- },
{
"name": "Wim Godden",
"homepage": "https://github.com/wimg",
@@ -241,6 +244,10 @@
"name": "Juliette Reinders Folmer",
"homepage": "https://github.com/jrfnl",
"role": "lead"
+ },
+ {
+ "name": "Contributors",
+ "homepage": "https://github.com/PHPCompatibility/PHPCompatibility/graphs/contributors"
}
],
"description": "A set of sniffs for PHP_CodeSniffer that checks for PHP cross-version compatibility.",
@@ -250,32 +257,32 @@
"phpcs",
"standards"
],
- "time": "2019-06-27T19:58:56+00:00"
+ "time": "2019-12-27T09:44:58+00:00"
},
{
"name": "sirbrillig/phpcs-variable-analysis",
- "version": "v2.7.0",
+ "version": "v2.8.1",
"source": {
"type": "git",
"url": "https://github.com/sirbrillig/phpcs-variable-analysis.git",
- "reference": "1b1b2b503a19bb56fa75f4a2d959b12c8ed28c12"
+ "reference": "5be26b4d719acaf7a433d1cad469159cbf034f2a"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/sirbrillig/phpcs-variable-analysis/zipball/1b1b2b503a19bb56fa75f4a2d959b12c8ed28c12",
- "reference": "1b1b2b503a19bb56fa75f4a2d959b12c8ed28c12",
+ "url": "https://api.github.com/repos/sirbrillig/phpcs-variable-analysis/zipball/5be26b4d719acaf7a433d1cad469159cbf034f2a",
+ "reference": "5be26b4d719acaf7a433d1cad469159cbf034f2a",
"shasum": ""
},
"require": {
- "php": ">=5.6.0"
+ "php": ">=5.6.0",
+ "squizlabs/php_codesniffer": "^3.1"
},
"require-dev": {
- "dealerdirect/phpcodesniffer-composer-installer": "^0.4.4",
+ "dealerdirect/phpcodesniffer-composer-installer": "^0.4.4 || ^0.5 || ^0.6",
"limedeck/phpunit-detailed-printer": "^3.1",
"phpstan/phpstan": "^0.11.8",
- "phpunit/phpunit": "^6.5",
- "sirbrillig/phpcs-import-detection": "^1.1",
- "squizlabs/php_codesniffer": "^3.1"
+ "phpunit/phpunit": "^5.0 || ^6.5",
+ "sirbrillig/phpcs-import-detection": "^1.1"
},
"type": "phpcodesniffer-standard",
"autoload": {
@@ -288,30 +295,30 @@
"BSD-2-Clause"
],
"authors": [
- {
- "name": "Payton Swick",
- "email": "payton@foolord.com"
- },
{
"name": "Sam Graham",
"email": "php-codesniffer-variableanalysis@illusori.co.uk"
+ },
+ {
+ "name": "Payton Swick",
+ "email": "payton@foolord.com"
}
],
"description": "A PHPCS sniff to detect problems with variables.",
- "time": "2019-06-24T23:57:11+00:00"
+ "time": "2020-02-11T22:18:48+00:00"
},
{
"name": "squizlabs/php_codesniffer",
- "version": "3.4.2",
+ "version": "3.5.5",
"source": {
"type": "git",
"url": "https://github.com/squizlabs/PHP_CodeSniffer.git",
- "reference": "b8a7362af1cc1aadb5bd36c3defc4dda2cf5f0a8"
+ "reference": "73e2e7f57d958e7228fce50dc0c61f58f017f9f6"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/squizlabs/PHP_CodeSniffer/zipball/b8a7362af1cc1aadb5bd36c3defc4dda2cf5f0a8",
- "reference": "b8a7362af1cc1aadb5bd36c3defc4dda2cf5f0a8",
+ "url": "https://api.github.com/repos/squizlabs/PHP_CodeSniffer/zipball/73e2e7f57d958e7228fce50dc0c61f58f017f9f6",
+ "reference": "73e2e7f57d958e7228fce50dc0c61f58f017f9f6",
"shasum": ""
},
"require": {
@@ -349,20 +356,20 @@
"phpcs",
"standards"
],
- "time": "2019-04-10T23:49:02+00:00"
+ "time": "2020-04-17T01:09:41+00:00"
},
{
"name": "wp-coding-standards/wpcs",
- "version": "2.1.1",
+ "version": "2.2.1",
"source": {
"type": "git",
"url": "https://github.com/WordPress/WordPress-Coding-Standards.git",
- "reference": "bd9c33152115e6741e3510ff7189605b35167908"
+ "reference": "b5a453203114cc2284b1a614c4953456fbe4f546"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/WordPress/WordPress-Coding-Standards/zipball/bd9c33152115e6741e3510ff7189605b35167908",
- "reference": "bd9c33152115e6741e3510ff7189605b35167908",
+ "url": "https://api.github.com/repos/WordPress/WordPress-Coding-Standards/zipball/b5a453203114cc2284b1a614c4953456fbe4f546",
+ "reference": "b5a453203114cc2284b1a614c4953456fbe4f546",
"shasum": ""
},
"require": {
@@ -370,12 +377,12 @@
"squizlabs/php_codesniffer": "^3.3.1"
},
"require-dev": {
- "dealerdirect/phpcodesniffer-composer-installer": "^0.5.0",
+ "dealerdirect/phpcodesniffer-composer-installer": "^0.5 || ^0.6",
"phpcompatibility/php-compatibility": "^9.0",
"phpunit/phpunit": "^4.0 || ^5.0 || ^6.0 || ^7.0"
},
"suggest": {
- "dealerdirect/phpcodesniffer-composer-installer": "^0.5.0 || This Composer plugin will sort out the PHPCS 'installed_paths' automatically."
+ "dealerdirect/phpcodesniffer-composer-installer": "^0.6 || This Composer plugin will sort out the PHPCS 'installed_paths' automatically."
},
"type": "phpcodesniffer-standard",
"notification-url": "https://packagist.org/downloads/",
@@ -385,7 +392,7 @@
"authors": [
{
"name": "Contributors",
- "homepage": "https://github.com/WordPress-Coding-Standards/WordPress-Coding-Standards/graphs/contributors"
+ "homepage": "https://github.com/WordPress/WordPress-Coding-Standards/graphs/contributors"
}
],
"description": "PHP_CodeSniffer rules (sniffs) to enforce WordPress coding conventions",
@@ -394,7 +401,7 @@
"standards",
"wordpress"
],
- "time": "2019-05-21T02:50:00+00:00"
+ "time": "2020-02-04T02:52:06+00:00"
}
],
"aliases": [],
diff --git a/docs/contributors/getting-started.md b/docs/contributors/getting-started.md
index 46938b11f75847..a4414814ed3491 100644
--- a/docs/contributors/getting-started.md
+++ b/docs/contributors/getting-started.md
@@ -56,9 +56,13 @@ See the [relevant section in `wp-env` docs](https://github.com/WordPress/gutenbe
## 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.
+You can use a remote server in development by building locally and then uploading the built files as a plugin to the remote server.
-You can also type `npm run package-plugin` which will run the two commands above and create a zip file automatically for you which you can use to install Gutenberg through the WordPress admin.
+To build: 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`.
+
+After building the cloned gutenberg directory contains the complete plugin, you can upload the entire repository to your `wp-content/plugins` directory and activate the plugin from the WordPress admin.
+
+Another way to upload after building is to run `npm run package-plugin` to create a plugin zip file — this requires `bash` and `php` to run. The script creates `gutenberg.zip` that you can use to install Gutenberg through the WordPress admin.
[npm]: https://www.npmjs.com/
[nvm]: https://github.com/creationix/nvm
diff --git a/docs/contributors/managing-packages.md b/docs/contributors/managing-packages.md
index 7b38b811054c85..9032af8cf3acbe 100644
--- a/docs/contributors/managing-packages.md
+++ b/docs/contributors/managing-packages.md
@@ -1,8 +1,8 @@
# Managing Packages
-This repository uses [lerna] to manage Gutenberg modules and publish them as packages to [npm]. This enforces certain steps in the workflow which are described in details in [packages](/packages/README.md) documentation.
+This repository uses [lerna] to manage Gutenberg modules and publish them as packages to [npm]. This enforces certain steps in the workflow which are described in details in [packages](https://github.com/WordPress/gutenberg/blob/master/packages/README.md) documentation.
-Maintaining dozens of npm packages is difficult—it can be tough to keep track of changes. That's why we use `CHANGELOG.md` files for each package to simplify the release process. As a contributor, you should add an entry to the aforementioned file each time you contribute adding production code as described in [Maintaining Changelogs](/packages/README.md#maintaining-changelogs) section.
+Maintaining dozens of npm packages is difficult—it can be tough to keep track of changes. That's why we use `CHANGELOG.md` files for each package to simplify the release process. As a contributor, you should add an entry to the aforementioned file each time you contribute adding production code as described in [Maintaining Changelogs](https://github.com/WordPress/gutenberg/blob/master/packages/README.md#maintaining-changelogs) section.
[lerna]: https://lerna.js.org
[npm]: https://www.npmjs.com/
diff --git a/docs/contributors/readme.md b/docs/contributors/readme.md
index b04de2a382c606..e51702b7248424 100644
--- a/docs/contributors/readme.md
+++ b/docs/contributors/readme.md
@@ -14,7 +14,7 @@ Find the section below based on what you are looking to contribute:
- **Documentation?** See the [documentation section](/docs/contributors/document.md)
-- **Triage Support?** See the [triaging issues section](/docs/contributors/repository-management/#triaging-issues)
+- **Triage Support?** See the [triaging issues section](/docs/contributors/triage.md)
- **Internationalization?** See the [localizing and translating section](/docs/contributors/localizing.md)
diff --git a/docs/contributors/repository-management.md b/docs/contributors/repository-management.md
index cf7dbcee1b25eb..e9149f033204bf 100644
--- a/docs/contributors/repository-management.md
+++ b/docs/contributors/repository-management.md
@@ -23,7 +23,7 @@ Any issues that are irrelevant or not actionable should be closed, because they
### Labels
-All issues should have [one or more labels](https://github.com/WordPress/gutenberg/labels).
+All issues should have [one or more labels](https://github.com/WordPress/gutenberg/labels).
Workflow labels start with “Needs” and may be applied as needed. Ideally, each workflow label will have a group that follows it, such as the Accessibility Team for `Needs Accessibility Feedback`, the Testing Team for `Needs Testing`, etc.
@@ -60,32 +60,7 @@ To keep the issue list healthy, it needs to be triaged regularly. *Triage* is th
Anyone can help triage, although you’ll need contributor permission on the Gutenberg repository to modify an issue’s labels or edit its title.
-To start simply choose from one of these filtered lists of issues:
-
-- [All Gutenberg issues without an assigned label](https://github.com/wordpress/gutenberg/issues?q=is%3Aissue+is%3Aopen+sort%3Aupdated-asc+no%3Alabel). Triaging by simply adding labels helps people focused on certain aspects of Gutenberg find relevant issues easier and start working on them.
-- [The least recently updated Gutenberg issues](https://github.com/WordPress/gutenberg/issues?q=is%3Aissue+is%3Aopen+sort%3Aupdated-asc). Triaging issues that are getting old and possibly out of date keeps important work from being overlooked.
-- [All Gutenberg issues with no comments](https://github.com/WordPress/gutenberg/issues?q=is%3Aopen+is%3Aissue+sort%3Acomments-asc) Triaging this list helps make sure all issues are acknowledged, and can help identify issues that may need more information or discussion before they are actionable.
-- [The least commented on issues](https://github.com/WordPress/gutenberg/issues?q=is%3Aopen+is%3Aissue+sort%3Acomments-asc) Triaging this list helps the community figure out things like traction for certain proposals.
-
-You can also create your own custom set of filters on GitHub. If you have a filter you think might be useful for the community, feel free to submit a PR to add it to this list.
-
-When triaging, either one of the lists above or issues in general, here are some steps you can perform:
-
-- First search for duplicates. If the issue is duplicate, close it by commenting with “Duplicate of #” and add any relevant new details to the existing issue.
-- If the issue is missing labels, add some to better categorize it (requires proper permissions).
-- If the title doesn’t communicate the issue, edit it for clarity (requires proper permissions).
-- If it’s a bug report, test to confirm the report or add the `Needs Testing` label. If there is not enough information to confirm the report, add the `[Status] Needs More Info` label and ask for the details needed.
-- Remove the `[Status] Needs More Info` if the author of the issue has responded with enough details.
-- Close the issue with a note if it has a `[Status] Needs More Info` label but the author didn't respond in 2+ weeks.
-- If there was conversation on the issue but no actionable steps identified, follow up with the participants to see what’s actionable.
-- If you feel comfortable triaging the issue further, then you can also:
- - Check that the bug report is valid by debugging it to see if you can track down the technical specifics.
- - Check if the issue is missing some detail and see if you can fill in those details. For instance, if a bug report is missing visual detail, it’s helpful to reproduce the issue locally and upload a screenshot or GIF.
-
-For triaging there are some labels which are very useful:
-- `Needs Technical Feedback` - you can apply them when you see new features or API changes proposed
-- `Needs More Info` - when it’s not clear what the issue is or it would help to provide additional details
-- `Needs Testing` - it’s useful for old bugs where it seems like they are no longer relevant
+See the [Triage Contributors guide](/docs/contributors/triage.md) for details.
## Pull Requests
diff --git a/docs/contributors/testing-overview.md b/docs/contributors/testing-overview.md
index 5c7d2a642b81b8..8a84aa20de12eb 100644
--- a/docs/contributors/testing-overview.md
+++ b/docs/contributors/testing-overview.md
@@ -344,12 +344,6 @@ test( 'should contain mars if planets is true', () => {
It's tempting to snapshot deep renders, but that makes for huge snapshots. Additionally, deep renders no longer test a single component, but an entire tree. With `shallow`, we snapshot just the components that are directly rendered by the component we want to test.
-### StoryShots
-
-> [StoryShots](https://www.npmjs.com/package/@storybook/addon-storyshots) adds automatic Jest Snapshot Testing for [Storybook](https://storybook.js.org/).
-
-Whenever a new story is added to Storybook, `npm run test-unit` needs to be executed to generate the corresponding snapshots. In the case when the existing story gets updated or removed, please refer to [Working with snapshots](#working-with-snapshots) section.
-
#### Troubleshooting
Sometimes we need to mock refs for some stories which use them. Check the following documents to learn more:
@@ -357,6 +351,11 @@ Sometimes we need to mock refs for some stories which use them. Check the follow
- [Using createNodeMock to mock refs](https://github.com/storybookjs/storybook/tree/master/addons/storyshots/storyshots-core#using-createnodemock-to-mock-refs) with StoryShots.
In that case, you might see test failures and `TypeError` reported by Jest in the lines which try to access a property from `ref.current`. If this happens, search for `initStoryshots` method call, which contains all necessary configurations to adjust.
+
+### Debugging Jest unit tests
+
+Running `npm run test-unit:debug` will start the tests in debug mode so a [node inspector client](https://nodejs.org/en/docs/guides/debugging-getting-started/#inspector-clients) can connect to the process and inspect the execution. Instructions for using Google Chrome or Visual Studio Code as an inspector client can be found in the [wp-scripts documentation](/packages/scripts/README.md#debugging-jest-unit-tests).
+
## Native mobile testing
Part of the unit-tests suite is a set of Jest tests run exercise native-mobile codepaths, developed in React Native. Since those tests run on Node, they can be launched locally on your development machine without the need for specific native Android or iOS dev tools or SDKs. It also means that they can be debugged using typical dev tools. Read on for instructions how to debug.
@@ -421,7 +420,7 @@ Related: https://chromedevtools.github.io/devtools-protocol/tot/Network#method-e
### Core Block Testing
-Every core block is required to have at least one set of fixture files for its main save function and one for each deprecation. These fixtures test the parsing and serialization of the block. See [the e2e tests fixtures readme](/packages/e2e-tests/fixtures/blocks/README.md) for more information and instructions.
+Every core block is required to have at least one set of fixture files for its main save function and one for each deprecation. These fixtures test the parsing and serialization of the block. See [the e2e tests fixtures readme](https://github.com/wordpress/gutenberg/blob/master/packages/e2e-tests/fixtures/blocks/README.md) for more information and instructions.
## PHP Testing
diff --git a/docs/contributors/triage.md b/docs/contributors/triage.md
new file mode 100644
index 00000000000000..c1155bdfd8086c
--- /dev/null
+++ b/docs/contributors/triage.md
@@ -0,0 +1,68 @@
+## Get involved in triage
+To keep the issue list healthy, it needs to be triaged regularly. Triage is the practice of reviewing existing issues to make sure they’re relevant, actionable, and have all the information they need. Anyone can help triage, although you’ll need to be a member of the triage team for the Gutenberg repository to modify an issue’s labels or edit its title.
+
+## Join the triage team
+The triage team is an open group of people with a particular role of making sure triage is done consistently across the Gutenberg repo. There are various types of triage which happen:
+
+* Regular self triage sessions done by members on their own time.
+* Organised triage sessions done as a group at a set time. You can [review the meetings page](https://make.wordpress.org/meetings/) to find these triage sessions and appropriate slack channels.
+* Focused triage sessions on a specific board, label or feature.
+
+These are the expectations of being a triage team member:
+
+* You are expected to do some triage even if it is self triage at least once a week.
+* As you can, try to join organized triage sessions.
+* If you join the triage team to focus on a specific label or board, the expectation is that your focus will be there. Please make this known to fellow triage team members.
+
+If you would like to join this team, simply ask in #core-editor [Slack](https://make.wordpress.org/chat/) at any time.
+
+## Getting started
+To start simply choose from one of these filtered lists of issues below. Note: You can find these filters by selecting the “Sort” option from the [overall Issues page](https://github.com/wordpress/gutenberg/issues).
+
+* All Gutenberg issues [without an assigned label](https://github.com/WordPress/gutenberg/issues?q=is%3Aopen+is%3Aissue+no%3Alabel+sort%3Aupdated-asc). Triaging by simply adding labels helps people focused on certain aspects of Gutenberg find relevant issues easier and start working on them.
+* [The least recently updated](https://github.com/WordPress/gutenberg/issues?q=is%3Aopen+is%3Aissue+sort%3Aupdated-asc) Gutenberg issues. Triaging issues that are getting old and possibly out of date keeps important work from being overlooked.
+* All Gutenberg issues [with no comments](https://github.com/wordpress/gutenberg/issues?q=is%3Aissue+is%3Aopen+comments%3A0+). Triaging this list helps make sure all issues are acknowledged, and can help identify issues that may need more information or discussion before they are actionable.
+* [The least commented](https://github.com/wordpress/gutenberg/issues?q=is%3Aissue+is%3Aopen+sort%3Acomments-asc) on Gutenberg issues. Triaging this list helps the community figure out what things might still need traction for certain proposals.
+* You can also create your own custom set of filters on GitHub. If you have a filter you think might be useful for the community, feel free to submit a PR to add it to this list.
+
+
+### General triage process
+When triaging, either one of the lists above or issues in general, work through issues one-by-one. Here are some steps you can perform for each issue:
+
+* First search for duplicates. If the issue is duplicate, close it by commenting with “Duplicate of #” and add any relevant new details to the existing issue. (Don’t forget to search for duplicates among closed issues as well!).
+* If the issue is missing labels, add some to better categorize it (requires proper permissions given after joining the triage team). A good starting place when adding labels is to apply one of the labels prefixed [Type] (e.g. [Type] Enhancement or [Type] Bug) to indicate what kind of issue it is. After that consider adding more descriptive labels. If the issue concerns a particular core block, add one of the labels prefixed [Block]. Or if the issue affects a particular feature there are [Feature] labels. Finally, there are labels that affect particular interest areas, like Accessibility and Internationalization. You can view all possible labels [here](https://github.com/WordPress/gutenberg/labels).
+* Consider adding priority if you can confidently determine what the likely level should be:
+ * Priority OMGWTFBBQ: Major issues that are causing failures and are reported frequently. Typically, these are issues that are critical because they break important behaviour or functionality. An example might be, “Unable to remove a block after it is added to the editor”.
+ * Priority: High: Fits one of the current focuses and is causing a major broken experience (including flow, visual bugs and blocks).
+ * Priority: Low: Enhancements that aren’t part of focuses, iche bugs, problems with old browsers.
+ * Note that it’s on purpose that no priority label infers a normal level.
+* If the title doesn’t communicate the issue clearly enough, edit it for clarity (requires proper permissions). Specifically, we’d recommend having the main feature the issue relates to in the beginning of the title ([example](https://github.com/WordPress/gutenberg/issues/6193)) and for the title to generally be as succinct yet descriptive as possible ([example](https://github.com/WordPress/gutenberg/issues/6193)).
+* If it’s a bug report, test to confirm the report or add the Needs Testing label. If there is not enough information to confirm the report, add the [Status] Needs More Info label and ask for the details needed. It’s particularly beneficial when a bug report has steps for reproduction so ask the reporter to add those if they’re missing.
+* Remove the [Status] Needs More Info if the author of the issue has responded with enough details.
+* Close the issue with a note if it has a [Status] Needs More Info label but the author didn't respond in 2+ weeks.
+* If there was a conversation on the issue but no actionable steps identified, follow up with the participants to see what’s actionable. Make sure to @ each participant when responding in a comment.
+* If you feel comfortable triaging the issue further, then you can also:
+ * Check that the bug report is valid by debugging it to see if you can track down the technical specifics.
+ * Check if the issue is missing some detail and see if you can fill in those details. For instance, if a bug report is missing visual detail, it’s helpful to reproduce the issue locally and upload a screenshot or GIF.
+ * Consider adding the Good First Issue label if you believe this is a relatively easy issue for a first-time contributor to try to solve.
+
+Generally speaking, the following labels are very useful for triaging issues and will likely be the ones you use the most consistently:
+* Needs Technical Feedback - when you see new features or API changes proposed.
+* Needs More Info - when it’s not clear what the issue is or it would help to provide additional details.
+* Needs Testing - when old bugs seem like they are no longer relevant.
+* [Type] Help Request - when someone is asking for general help with setup/implementation.
+
+## Design specific triage
+Along with the general triage flows listed previously, there are some specific additions to the flows for more design-centric triage for design minded folks participating in triage.
+
+* PR testing and reviews: this should be your first stop for daily self triage.
+* Needs design feedback: check if the issue does need design feedback and, if possible, give it. You can organise this by priority, project boards or by least commented. Once there are enough opinions, please remove this label and decide on next steps (ie adding the Needs Design label).
+* Needs design: Does it really need a design? Does this fit a focus? If it has a design mark as ‘needs design feedback’ to better categorize the issue.
+
+Reminders:
+* Ask for screenshots as needed.
+* Ask for iterations and note any changes before merging.
+* If the issue isn’t in a board, check to see if it doesn’t fit in a specific focus.
+* If the issue/pull has not been prioritized yet, consider adding a priority to help move the issue forward.
+
+For more detailed information about weekly design triage and to join in, please [review this guide](https://make.wordpress.org/design/handbook/workflows/weekly-gutenberg-design-triage/).
diff --git a/docs/designers-developers/designers/block-design.md b/docs/designers-developers/designers/block-design.md
index 93660a307eb9fe..b1f73d30c959d1 100644
--- a/docs/designers-developers/designers/block-design.md
+++ b/docs/designers-developers/designers/block-design.md
@@ -76,7 +76,7 @@ Avoid long, multi-line block names.
Every block should include a description that clearly explains the block's function. The description will display in the Settings Sidebar.
-You can add a description by using the description attribute in the [registerBlockType function](/docs/designers-developers/developers/block-api/block-registration/).
+You can add a description by using the description attribute in the [registerBlockType function](/docs/designers-developers/developers/block-api/block-registration.md).
Stick to a single imperative sentence with an action + subject format. Examples:
diff --git a/docs/designers-developers/designers/design-patterns.md b/docs/designers-developers/designers/user-interface.md
similarity index 72%
rename from docs/designers-developers/designers/design-patterns.md
rename to docs/designers-developers/designers/user-interface.md
index bf06df6da5e9df..1d688e27838d64 100644
--- a/docs/designers-developers/designers/design-patterns.md
+++ b/docs/designers-developers/designers/user-interface.md
@@ -1,18 +1,18 @@
-# Patterns
+# User Interface
-## Basic Editor Interface
+## The Block Editor
-The block editor’s general layout uses on a bar at the top, with content below.
+The block editor’s general layout uses a bar at the top, with content below.
![Editor Interface](https://cldup.com/VWA_jMcIRw-3000x3000.png)
-The **Toolbar** contains document-level actions: Editor mode, save status, global actions for undo/redo/insert, the settings toggle, and publish options.
+The **Toolbar** contains document-level actions: Editor/Select modes, save status, global actions for undo/redo/insert, the settings toggle, and publish options.
The **Content Area** contains the document itself.
The **Settings Sidebar** contains additional settings for the document (tags, categories, schedule etc.) and for blocks in the “Block” tab. A cog button in the toolbar hides the Settings Sidebar, allowing the user to enjoy a more immersive writing experience. On small screens, the sidebar is hidden by default.
-## The Block Interface
+## The Block
The block itself is the most basic unit of the editor. Generally speaking, everything is a block. Users build posts and pages using blocks, mimicking the vertical flow of the underlying HTML markup.
@@ -24,11 +24,11 @@ A selected block shows a number of contextual actions:
The block interface has basic actions. The block editor aims for good, common defaults, so users should be able to create a complete document without actually needing the advanced actions in the Settings Sidebar.
-**The Block Toolbar** highlights commonly-used actions. The **Block Chip** lives in the block toolbar, and contains high-level controls for the selected block. It primarily allows users to transform a block into another type of compatible block. Some blocks also use the block chip to users to choose from a set of alternate block styles.
+**The Block Toolbar** highlights commonly-used actions. The **Block Icon** lives in the block toolbar, and contains high-level controls for the selected block. It primarily allows users to transform a block into another type of compatible block. Some blocks also use the block icon for users to choose from a set of alternate block styles.
The **Block Formatting** options let users adjust block-level settings, and the **Inline Formatting** options allow adjustments to elements inside the block. When a block is long, the block toolbar pins itself to the top of the screen as the user scrolls down the page.
-Blocks can be moved up and down via the **Block Mover** icons on the left. Additional block actions are available on the right via an ellipsis menu: deleting and duplicating blocks, as well as **advanced actions** like “Edit as HTML” and “Convert to Reusable Block.”
+Blocks can be moved up and down via the **Block Mover** icons. Additional block actions are available via an ellipsis menu: deleting and duplicating blocks, as well as **advanced actions** like “Edit as HTML” and “Convert to Reusable Block.”
An unselected block does not show the block toolbar or any other contextual controls. In effect, an unselected block is a preview of the content itself:
@@ -47,7 +47,7 @@ The sidebar has two tabs, Document and Block:
Each tab has sets of editable fields (**Sidebar Sections**) that users can toggle open or closed.
-If a block requires advanced configuration, those settings should live in the Settings sidebar (Editor block settings can also be reached directly by clicking the cog icon next to a block). Don’t put anything in the sidebar block tab that is necessary for the basic operation of your block; your user might dismiss the sidebar for an immersive writing experience. Pick good defaults, and make important actions available in the block toolbar.
+If a block requires advanced configuration, those settings should live in the Settings Sidebar. Don’t put anything in the sidebar block tab that is necessary for the basic operation of your block; your user might dismiss the sidebar for an immersive writing experience. Pick good defaults, and make important actions available in the block toolbar.
Actions that could go in the block tab of the sidebar could be:
@@ -60,6 +60,4 @@ Actions that could go in the block tab of the sidebar could be:
![Block Library](https://cldup.com/7QoQIoLk-A-3000x3000.png)
-The **Block Library** appears when someone inserts a block, whether via the toolbar, or contextually within the content area. Inside, blocks are organized into expandable sections. The block library’s search bar auto-filters the list of blocks as the user types. Users can choose a block by selecting the **Block Button** or the **Block Name**.
-
-**Parent Blocks** (Blocks that contain children blocks) are represented by a layered block button.
+The **Block Library** appears when someone inserts a block, whether via the toolbar, or contextually within the content area. Inside, blocks are organized into expandable sections. The block library’s search bar auto-filters the list of blocks as the user types. Users can choose a block by selecting the **Block Button** or the **Block Name**.
diff --git a/docs/designers-developers/developers/backward-compatibility/deprecations.md b/docs/designers-developers/developers/backward-compatibility/deprecations.md
index cf721c44875c6c..9947d262b243cb 100644
--- a/docs/designers-developers/developers/backward-compatibility/deprecations.md
+++ b/docs/designers-developers/developers/backward-compatibility/deprecations.md
@@ -241,11 +241,11 @@ For features included in the Gutenberg plugin, the deprecation policy is intende
## 3.0.0
- `wp.blocks.registerCoreBlocks` function removed. Please use `wp.coreBlocks.registerCoreBlocks` instead.
- - Raw TinyMCE event handlers for `RichText` have been deprecated. Please use [documented props](/packages/editor/src/components/rich-text/README.md), ancestor event handler, or onSetup access to the internal editor instance event hub instead.
+ - Raw TinyMCE event handlers for `RichText` have been deprecated. Please use [documented props](https://github.com/WordPress/gutenberg/blob/v3.0.0/editor/components/rich-text/README.md), ancestor event handler, or onSetup access to the internal editor instance event hub instead.
## 2.8.0
- - `Original autocompleter interface in wp.components.Autocomplete` updated. Please use `latest autocompleter interface` instead. See [autocomplete](/packages/components/src/autocomplete/README.md) for more info.
+ - `Original autocompleter interface in wp.components.Autocomplete` updated. Please use `latest autocompleter interface` instead. See [autocomplete](https://github.com/WordPress/gutenberg/blob/v2.8.0/components/autocomplete/README.md) for more info.
- `getInserterItems`: the `allowedBlockTypes` argument is now mandatory.
- `getFrecentInserterItems`: the `allowedBlockTypes` argument is now mandatory.
diff --git a/docs/designers-developers/developers/block-api/README.md b/docs/designers-developers/developers/block-api/README.md
index 52ed3a17a4493b..13dbd344bc89fa 100644
--- a/docs/designers-developers/developers/block-api/README.md
+++ b/docs/designers-developers/developers/block-api/README.md
@@ -2,10 +2,13 @@
Blocks are the fundamental element of the editor. They are the primary way in which plugins and themes can register their own functionality and extend the capabilities of the editor.
-## Registering a block
-
-All blocks must be registered before they can be used in the editor. You can learn about block registration, and the available options, in the [block registration](/docs/designers-developers/developers/block-api/block-registration.md) documentation.
-
-## Block `edit` and `save`
-
-The `edit` function defines the components for the block in the editor interface the user interacts with. The `save` function defines the markup to be serialized back when a post is saved. They are the heart of how a block operates, so they are [covered separately](/docs/designers-developers/developers/block-api/block-edit-save.md).
+The following sections will walk you through the existing block APIs:
+
+- [Block registration](/docs/designers-developers/developers/block-api/block-registration.md).
+- [Edit and Save](/docs/designers-developers/developers/block-api/block-edit-save.md)
+- [Attributes](/docs/designers-developers/developers/block-api/block-attributes.md)
+- [Deprecated blocks](/docs/designers-developers/developers/block-api/block-deprecation.md)
+- [Transformations](./docs/designers-developers/developers/block-transforms.md)
+- [Templates](/docs/designers-developers/developers/block-api/block-templates.md)
+- [Annotations](/docs/designers-developers/developers/block-api/block-annotations.md)
+- [Patterns (experimental)](/docs/designers-developers/developers/block-api/block-patterns.md)
diff --git a/docs/designers-developers/developers/block-api/block-attributes.md b/docs/designers-developers/developers/block-api/block-attributes.md
index 386210c6e998ac..5d60dbc9306b7b 100644
--- a/docs/designers-developers/developers/block-api/block-attributes.md
+++ b/docs/designers-developers/developers/block-api/block-attributes.md
@@ -1,5 +1,21 @@
# Attributes
+## Type Validation
+
+The only required field for an attribute is the `type` field. It indicates the type of data that is stored within the attribute.
+
+Accepted values in the `type` field MUST be one of the following:
+
+* null
+* boolean
+* object
+* array
+* number
+* string
+* integer
+
+See [WordPress's REST API documentation](https://developer.wordpress.org/rest-api/extending-the-rest-api/schema/) for additional details.
+
## Common Sources
Attribute sources are used to define how the block attribute values are extracted from saved post content. They provide a mechanism to map from the saved markup to a JavaScript representation of a block.
@@ -33,19 +49,33 @@ _Example_: Extract the `src` attribute from an image found in the block's markup
// { "url": "https://lorempixel.com/1200/800/" }
```
-#### `attribute` Type Validation
+Most attributes from markup will be of type `string`. Numeric attributes in HTML are still stored as strings, and are not converted automatically.
-Accepted values in the `type` field of an `attribute` MUST be one of the following:
+```js
+{
+ width: {
+ type: 'string',
+ source: 'attribute',
+ selector: 'img',
+ attribute: 'width',
+ }
+}
+// { "width": "50" }
+```
-* null
-* boolean
-* object
-* array
-* number
-* string
-* integer
+The only exception is when checking for the existence of an attribute (for example, the `disabled` attribute on a `button`). In that case type `boolean` can be used and the stored value will be a boolean.
-See [WordPress's REST API documentation](https://developer.wordpress.org/rest-api/extending-the-rest-api/schema/) for additional details.
+```js
+{
+ disabled: {
+ type: 'boolean',
+ source: 'attribute',
+ selector: 'button',
+ attribute: 'disabled',
+ }
+}
+// { "disabled": true }
+```
### `text`
diff --git a/docs/designers-developers/developers/block-api/block-context.md b/docs/designers-developers/developers/block-api/block-context.md
new file mode 100644
index 00000000000000..0b95807ffc24ee
--- /dev/null
+++ b/docs/designers-developers/developers/block-api/block-context.md
@@ -0,0 +1,66 @@
+# Block Context
+
+Block context is a feature which enables ancestor blocks to provide values which can be consumed by descendent blocks within its own hierarchy. Those descendent blocks can inherit these values without resorting to hard-coded values and without an explicit awareness of the block which provides those values.
+
+This is especially useful in full-site editing where, for example, the contents of a block may depend on the context of the post in which it is displayed. A blogroll template may show excerpts of many different posts. Using block context, there can still be one single "Post Excerpt" block which displays the contents of the post based on an inherited post ID.
+
+If you are familiar with [React Context](https://reactjs.org/docs/context.html), block context adopts many of the same ideas. In fact, the client-side block editor implementation of block context is a very simple application of React Context. Block context is also supported in server-side `render_callback` implementations, demonstrated in the examples below.
+
+## Defining Block Context
+
+Block context is defined in the registered settings of a block. A block can provide a context value, or consume a value it seeks to inherit.
+
+### Providing Block Context
+
+A block can provide a context value by assigning a `providesContext` property in its registered settings. This is an object which maps a context name to one of the block's own attribute. The value corresponding to that attribute value is made available to descendent blocks and can be referenced by the same context name. Currently, block context only supports values derived from the block's own attributes. This could be enhanced in the future to support additional sources of context values.
+
+`record/block.json`
+
+```json
+{
+ "name": "my-plugin/record",
+ "attributes": {
+ "recordId": {
+ "type": "number"
+ }
+ },
+ "providesContext": {
+ "my-plugin/recordId": "recordId"
+ }
+}
+```
+
+As seen in the above example, it is recommended that you include a namespace as part of the name of the context key so as to avoid potential conflicts with other plugins or default context values provided by WordPress. The context namespace should be specific to your plugin, and in most cases can be the same as used in the name of the block itself.
+
+### Consuming Block Context
+
+A block can inherit a context value from an ancestor provider by assigning a `context` property in its registered settings. This should be assigned as an array of the context names the block seeks to inherit.
+
+`record-title/block.json`
+
+```json
+{
+ "name": "my-plugin/record-title",
+ "context": [ "my-plugin/recordId" ]
+}
+```
+
+## Using Block Context
+
+Once a block has defined the context it seeks to inherit, this can be accessed in the implementation of `edit` (JavaScript) and `render_callback` (PHP). It is provided as an object (JavaScript) or associative array (PHP) of the context values which have been defined for the block. Note that a context value will only be made available if the block explicitly defines a desire to inherit that value.
+
+### JavaScript
+
+`record-title/index.js`
+
+```js
+registerBlockType( 'my-plugin/record-title', {
+ edit( { context } ) {
+ return 'The current record ID is: ' + context[ 'my-plugin/recordId' ];
+ },
+} );
+```
+
+### PHP
+
+_The PHP implementation of block context is currently experimental and subject to breaking changes. It will be documented in the future once the API has stabilized._
diff --git a/docs/designers-developers/developers/block-api/block-deprecation.md b/docs/designers-developers/developers/block-api/block-deprecation.md
index b07ae89e1a0a7c..067885f0708efd 100644
--- a/docs/designers-developers/developers/block-api/block-deprecation.md
+++ b/docs/designers-developers/developers/block-api/block-deprecation.md
@@ -277,4 +277,4 @@ registerBlockType( 'gutenberg/block-with-deprecated-version', {
In the example above we updated the block to use an inner Paragraph block with a title instead of a title attribute.
-*Above are example cases of block deprecation. For more, real-world examples, check for deprecations in the [core block library](/packages/block-library/src/README.md). Core blocks have been updated across releases and contain simple and complex deprecations.*
+*Above are example cases of block deprecation. For more, real-world examples, check for deprecations in the [core block library](https://github.com/WordPress/gutenberg/tree/master/packages/block-library/src). Core blocks have been updated across releases and contain simple and complex deprecations.*
diff --git a/docs/designers-developers/developers/block-api/block-registration.md b/docs/designers-developers/developers/block-api/block-registration.md
index e2c9f6ff71afcb..6a64ecd165e4a0 100644
--- a/docs/designers-developers/developers/block-api/block-registration.md
+++ b/docs/designers-developers/developers/block-api/block-registration.md
@@ -267,402 +267,9 @@ An object describing a variation defined for the block type can contain the foll
#### transforms (optional)
-- **Type:** `Array`
-
-Transforms provide rules for what a block can be transformed from and what it can be transformed to. A block can be transformed from another block, a shortcode, a regular expression, a file or a raw DOM node.
-
-For example, a Paragraph block can be transformed into a Heading block. This uses the `createBlock` function from the [`wp-blocks` package](/packages/blocks/README.md#createBlock).
-
-{% codetabs %}
-{% ES5 %}
-
-```js
-transforms: {
- from: [
- {
- type: 'block',
- blocks: [ 'core/paragraph' ],
- transform: function ( attributes ) {
- return createBlock( 'core/heading', {
- content: attributes.content,
- } );
- },
- },
- ]
-},
-```
-
-{% ESNext %}
-
-```js
-transforms: {
- from: [
- {
- type: 'block',
- blocks: [ 'core/paragraph' ],
- transform: ( { content } ) => {
- return createBlock( 'core/heading', {
- content,
- } );
- },
- },
- ]
-},
-```
-
-{% end %}
-
-An existing shortcode can be transformed into its block counterpart.
-
-{% codetabs %}
-{% ES5 %}
-
-```js
-transforms: {
- from: [
- {
- type: 'shortcode',
- // Shortcode tag can also be an array of shortcode aliases
- tag: 'caption',
- attributes: {
- // An attribute can be source from a tag attribute in the shortcode content
- url: {
- type: 'string',
- source: 'attribute',
- attribute: 'src',
- selector: 'img',
- },
- // An attribute can be source from the shortcode attributes
- align: {
- type: 'string',
- shortcode: function( attributes ) {
- var align = attributes.named.align ? attributes.named.align : 'alignnone';
- return align.replace( 'align', '' );
- },
- },
- },
- },
- ]
-},
-```
-
-{% ESNext %}
-
-```js
-transforms: {
- from: [
- {
- type: 'shortcode',
- // Shortcode tag can also be an array of shortcode aliases
- tag: 'caption',
- attributes: {
- // An attribute can be source from a tag attribute in the shortcode content
- url: {
- type: 'string',
- source: 'attribute',
- attribute: 'src',
- selector: 'img',
- },
- // An attribute can be source from the shortcode attributes
- align: {
- type: 'string',
- shortcode: ( { named: { align = 'alignnone' } } ) => {
- return align.replace( 'align', '' );
- },
- },
- },
- },
- ]
-},
-
-```
-
-{% end %}
-
-A block can also be transformed into another block type. For example, a Heading block can be transformed into a Paragraph block.
-
-{% codetabs %}
-{% ES5 %}
-
-```js
-transforms: {
- to: [
- {
- type: 'block',
- blocks: [ 'core/paragraph' ],
- transform: function( attributes ) {
- return createBlock( 'core/paragraph', {
- content: attributes.content,
- } );
- },
- },
- ],
-},
-```
-
-{% ESNext %}
-
-```js
-transforms: {
- to: [
- {
- type: 'block',
- blocks: [ 'core/paragraph' ],
- transform: ( { content } ) => {
- return createBlock( 'core/paragraph', {
- content,
- } );
- },
- },
- ],
-},
-```
-
-{% end %}
-
-In addition to accepting an array of known block types, the `blocks` option also accepts a "wildcard" (`"*"`). This allows for transformations which apply to _all_ block types (eg: all blocks can transform into `core/group`):
-
-{% codetabs %}
-{% ES5 %}
-
-```js
-transforms: {
- from: [
- {
- type: 'block',
- blocks: [ '*' ], // wildcard - match any block
- transform: function( attributes, innerBlocks ) {
- // transform logic here
- },
- },
- ],
-},
-```
-
-{% ESNext %}
-
-```js
-transforms: {
- from: [
- {
- type: 'block',
- blocks: [ '*' ], // wildcard - match any block
- transform: ( attributes, innerBlocks ) => {
- // transform logic here
- },
- },
- ],
-},
-```
-
-{% end %}
-
-A block with InnerBlocks can also be transformed from and to another block with InnerBlocks.
-
-{% codetabs %}
-{% ES5 %}
-
-```js
-transforms: {
- to: [
- {
- type: 'block',
- blocks: [ 'some/block-with-innerblocks' ],
- transform: function( attributes, innerBlocks ) {
- return createBlock( 'some/other-block-with-innerblocks', attributes, innerBlocks );
- },
- },
- ],
-},
-```
-
-{% ESNext %}
-
-```js
-transforms: {
- to: [
- {
- type: 'block',
- blocks: [ 'some/block-with-innerblocks' ],
- transform: ( attributes, innerBlocks ) => {
- return createBlock( 'some/other-block-with-innerblocks', attributes, innerBlocks);
- },
- },
- ],
-},
-```
-
-{% end %}
-
-An optional `isMatch` function can be specified on a transform object. This provides an opportunity to perform additional checks on whether a transform should be possible. Returning `false` from this function will prevent the transform from being displayed as an option to the user.
-
-{% codetabs %}
-{% ES5 %}
-
-```js
-transforms: {
- to: [
- {
- type: 'block',
- blocks: [ 'core/paragraph' ],
- isMatch: function( attributes ) {
- return attributes.isText;
- },
- transform: function( attributes ) {
- return createBlock( 'core/paragraph', {
- content: attributes.content,
- } );
- },
- },
- ],
-},
-```
-
-{% ESNext %}
-
-```js
-transforms: {
- to: [
- {
- type: 'block',
- blocks: [ 'core/paragraph' ],
- isMatch: ( { isText } ) => isText,
- transform: ( { content } ) => {
- return createBlock( 'core/paragraph', {
- content,
- } );
- },
- },
- ],
-},
-```
-
-{% end %}
-
-In the case of shortcode transforms, `isMatch` receives shortcode attributes per the [Shortcode API](https://codex.wordpress.org/Shortcode_API):
-
-{% codetabs %}
-{% ES5 %}
-
-```js
-isMatch: function( attributes ) {
- return attributes.named.id === 'my-id';
-},
-```
-
-{% ESNext %}
-
-```js
-isMatch( { named: { id } } ) {
- return id === 'my-id';
-},
-```
-
-{% end %}
-
-To control the priority with which a transform is applied, define a `priority` numeric property on your transform object, where a lower value will take precedence over higher values. This behaves much like a [WordPress hook](https://codex.wordpress.org/Plugin_API#Hook_to_WordPress). Like hooks, the default priority is `10` when not otherwise set.
-
-A file can be dropped into the editor and converted into a block with a matching transform.
-
-{% codetabs %}
-{% ES5 %}
-
-```js
-transforms: {
- from: [
- {
- type: 'files',
- isMatch: function( files ) {
- return files.length === 1;
- },
- // We define a lower priority (higher number) than the default of 10. This
- // ensures that the File block is only created as a fallback.
- priority: 15,
- transform: function( files ) {
- var file = files[ 0 ];
- var blobURL = createBlobURL( file );
-
- // File will be uploaded in componentDidMount()
- return createBlock( 'core/file', {
- href: blobURL,
- fileName: file.name,
- textLinkHref: blobURL,
- } );
- },
- },
- ];
-}
-```
-
-{% ESNext %}
-
-```js
-transforms: {
- from: [
- {
- type: 'files',
- isMatch: ( files ) => files.length === 1,
- // We define a lower priority (higher number) than the default of 10. This
- // ensures that the File block is only created as a fallback.
- priority: 15,
- transform: ( files ) => {
- const file = files[ 0 ];
- const blobURL = createBlobURL( file );
-
- // File will be uploaded in componentDidMount()
- return createBlock( 'core/file', {
- href: blobURL,
- fileName: file.name,
- textLinkHref: blobURL,
- } );
- },
- },
- ];
-}
-```
-
-{% end %}
-
-A prefix transform is a transform that will be applied if the user prefixes some text in e.g. the Paragraph block with a given pattern and a trailing space.
-
-{% codetabs %}
-{% ES5 %}
-
-```js
-transforms: {
- from: [
- {
- type: 'prefix',
- prefix: '?',
- transform: function( content ) {
- return createBlock( 'my-plugin/question', {
- content,
- } );
- },
- },
- ];
-}
-```
-
-{% ESNext %}
-
-```js
-transforms: {
- from: [
- {
- type: 'prefix',
- prefix: '?',
- transform( content ) {
- return createBlock( 'my-plugin/question', {
- content,
- } );
- },
- },
- ];
-}
-```
+- **Type:** `Object`
-{% end %}
+Transforms provide rules for what a block can be transformed from and what it can be transformed to. A block can be transformed from another block, a shortcode, a regular expression, a file or a raw DOM node. Take a look at the [Block Transforms API](./block-transforms.md) for more info about each available transformation.
#### parent (optional)
diff --git a/docs/designers-developers/developers/block-api/block-templates.md b/docs/designers-developers/developers/block-api/block-templates.md
index 49279a86595ed1..ad961e8f8066d1 100644
--- a/docs/designers-developers/developers/block-api/block-templates.md
+++ b/docs/designers-developers/developers/block-api/block-templates.md
@@ -32,7 +32,7 @@ function myplugin_register_template() {
add_action( 'init', 'myplugin_register_template' );
```
-The following example in JavaScript creates a new block using [InnerBlocks](/packages/block-editor/src/components/inner-blocks/README.md) and templates, when inserted creates a set of blocks based off the template.
+The following example in JavaScript creates a new block using [InnerBlocks](https://github.com/WordPress/gutenberg/blob/master/packages/block-editor/src/components/inner-blocks/README.md) and templates, when inserted creates a set of blocks based off the template.
```js
const el = wp.element.createElement;
diff --git a/docs/designers-developers/developers/block-api/block-transforms.md b/docs/designers-developers/developers/block-api/block-transforms.md
new file mode 100644
index 00000000000000..cd3a88e2be252e
--- /dev/null
+++ b/docs/designers-developers/developers/block-api/block-transforms.md
@@ -0,0 +1,462 @@
+# Block Transforms
+
+Block Transforms is the API that allows a block to be transformed _from_ and _to_ other blocks, as well as _from_ other entities. Existing entities that work with this API include shortcodes, files, regular expressions, and raw DOM nodes.
+
+## Transform direction: `to` and `from`
+
+A block declares which transformations it supports via the optional `transforms` key of the block configuration, whose subkeys `to` and `from` hold an array of available transforms for every direction. Example:
+
+```js
+export const settings = {
+ title: 'My Block Title',
+ description: 'My block description',
+ /* ... */
+ transforms: {
+ from: [ /* supported from transforms */ ],
+ to: [ /* supported to transforms */ ],
+ }
+}
+```
+
+## Transformations Types
+
+This section goes through the existing types of transformations blocks support:
+
+* block
+* enter
+* files
+* prefix
+* raw
+* shortcode
+
+### Block
+
+This type of transformations support both _from_ and _to_ directions, allowing blocks to be converted into a different one. It has a corresponding UI control within the block toolbar.
+
+A transformation of type `block` is an object that takes the following parameters:
+
+- **type** _(string)_: the value `block`.
+- **blocks** _(array)_: a list of known block types. It also accepts the wildcard value (`"*"`), meaning that the transform is available to _all_ block types (eg: all blocks can transform into `core/group`).
+- **transform** _(function)_: a callback that receives the attributes and inner blocks of the block being processed. It should return a block object or an array of block objects.
+- **isMatch** _(function, optional)_: a callback that receives the block attributes and should return a boolean. Returning `false` from this function will prevent the transform from being available and displayed as an option to the user.
+- **priority** _(number, optional)_: controls the priority with which a transformation is applied, where a lower value will take precedence over higher values. This behaves much like a [WordPress hook](https://codex.wordpress.org/Plugin_API#Hook_to_WordPress). Like hooks, the default priority is `10` when not otherwise set.
+
+**Example: from Paragraph block to Heading block**
+
+To declare this transformation we add the following code into the heading block configuration, which uses the `createBlock` function from the [`wp-blocks` package](/packages/blocks/README.md#createBlock).
+
+{% codetabs %}
+{% ES5 %}
+
+```js
+transforms: {
+ from: [
+ {
+ type: 'block',
+ blocks: [ 'core/paragraph' ],
+ transform: function ( attributes ) {
+ return createBlock( 'core/heading', {
+ content: attributes.content,
+ } );
+ },
+ },
+ ]
+},
+```
+
+{% ESNext %}
+
+```js
+transforms: {
+ from: [
+ {
+ type: 'block',
+ blocks: [ 'core/paragraph' ],
+ transform: ( { content } ) => {
+ return createBlock( 'core/heading', {
+ content,
+ } );
+ },
+ },
+ ]
+},
+```
+
+{% end %}
+
+**Example: blocks that have InnerBlocks**
+
+A block with InnerBlocks can also be transformed from and to another block with InnerBlocks.
+
+{% codetabs %}
+{% ES5 %}
+
+```js
+transforms: {
+ to: [
+ {
+ type: 'block',
+ blocks: [ 'some/block-with-innerblocks' ],
+ transform: function( attributes, innerBlocks ) {
+ return createBlock(
+ 'some/other-block-with-innerblocks',
+ attributes,
+ innerBlocks
+ );
+ },
+ },
+ ],
+},
+```
+
+{% ESNext %}
+
+```js
+transforms: {
+ to: [
+ {
+ type: 'block',
+ blocks: [ 'some/block-with-innerblocks' ],
+ transform: ( attributes, innerBlocks ) => {
+ return createBlock(
+ 'some/other-block-with-innerblocks',
+ attributes,
+ innerBlocks
+ );
+ },
+ },
+ ],
+},
+```
+
+{% end %}
+
+### Enter
+
+This type of transformations support the _from_ direction, allowing blocks to be created from some content introduced by the user. They're applied in a new block line after the user has introduced some content and hit the ENTER key.
+
+A transformation of type `enter` is an object that takes the following parameters:
+
+- **type** _(string)_: the value `enter`.
+- **regExp** _(RegExp)_: the Regular Expression to use as a matcher. If the value matches, the transformation will be applied.
+- **transform** _(function)_: a callback that receives the value that has been entered. It should return a block object or an array of block objects.
+- **priority** _(number, optional)_: controls the priority with which a transform is applied, where a lower value will take precedence over higher values. This behaves much like a [WordPress hook](https://codex.wordpress.org/Plugin_API#Hook_to_WordPress). Like hooks, the default priority is `10` when not otherwise set.
+
+**Example: from --- to Separator block**
+
+To create a separator block when the user types the hypen three times and then hits the ENTER key we can use the following code:
+
+{% codetabs %}
+
+{% ES5 %}
+
+```js
+transforms = {
+ from: [
+ {
+ type: 'enter',
+ regExp: /^-{3,}$/,
+ transform: function( value ) {
+ return createBlock( 'core/separator' );
+ },
+ },
+ ]
+}
+```
+
+{% ESNext %}
+
+```js
+transforms = {
+ from: [
+ {
+ type: 'enter',
+ regExp: /^-{3,}$/,
+ transform: () => createBlock( 'core/separator' ),
+ },
+ ]
+}
+```
+
+{% end %}
+
+### Files
+
+This type of transformations support the _from_ direction, allowing blocks to be created from files dropped into the editor.
+
+A transformation of type `files` is an object that takes the following parameters:
+
+- **type** _(string)_: the value `files`.
+- **transform** _(function)_: a callback that receives the array of files being processed. It should return a block object or an array of block objects.
+- **isMatch** _(function, optional)_: a callback that receives the array of files being processed and should return a boolean. Returning `false` from this function will prevent the transform from being applied.
+- **priority** _(number, optional)_: controls the priority with which a transform is applied, where a lower value will take precedence over higher values. This behaves much like a [WordPress hook](https://codex.wordpress.org/Plugin_API#Hook_to_WordPress). Like hooks, the default priority is `10` when not otherwise set.
+
+**Example: from file to File block**
+
+To create a File block when the user drops a file into the editor we can use the following code:
+
+{% codetabs %}
+{% ES5 %}
+
+```js
+transforms: {
+ from: [
+ {
+ type: 'files',
+ isMatch: function( files ) {
+ return files.length === 1;
+ },
+ // By defining a lower priority than the default of 10,
+ // we make that the File block to be created as a fallback,
+ // if no other transform is found.
+ priority: 15,
+ transform: function( files ) {
+ var file = files[ 0 ];
+ var blobURL = createBlobURL( file );
+ // File will be uploaded in componentDidMount()
+ return createBlock( 'core/file', {
+ href: blobURL,
+ fileName: file.name,
+ textLinkHref: blobURL,
+ } );
+ },
+ },
+ ];
+}
+```
+
+{% ESNext %}
+
+```js
+transforms: {
+ from: [
+ {
+ type: 'files',
+ isMatch: ( files ) => files.length === 1,
+ // By defining a lower priority than the default of 10,
+ // we make that the File block to be created as a fallback,
+ // if no other transform is found.
+ priority: 15,
+ transform: ( files ) => {
+ const file = files[ 0 ];
+ const blobURL = createBlobURL( file );
+ // File will be uploaded in componentDidMount()
+ return createBlock( 'core/file', {
+ href: blobURL,
+ fileName: file.name,
+ textLinkHref: blobURL,
+ } );
+ },
+ },
+ ];
+}
+```
+
+{% end %}
+
+### Prefix
+
+This type of transformations support the _from_ direction, allowing blocks to be created from some text typed by the user. They're applied when, in a new block line, the user types some text and then adds a trailing space.
+
+A transformation of type `prefix` is an object that takes the following parameters:
+
+- **type** _(string)_: the value `files`.
+- **prefix** _(string)_: the character or sequence of characters that match this transfrom.
+- **transform** _(function)_: a callback that receives the content introduced. It should return a block object or an array of block objects.
+- **priority** _(number, optional)_: controls the priority with which a transform is applied, where a lower value will take precedence over higher values. This behaves much like a [WordPress hook](https://codex.wordpress.org/Plugin_API#Hook_to_WordPress). Like hooks, the default priority is `10` when not otherwise set.
+
+**Example: from text to custom block**
+
+If we want to create a custom block when the user types the question mark, we could use this code:
+
+{% codetabs %}
+{% ES5 %}
+
+```js
+transforms: {
+ from: [
+ {
+ type: 'prefix',
+ prefix: '?',
+ transform: function( content ) {
+ return createBlock( 'my-plugin/question', {
+ content,
+ } );
+ },
+ },
+ ];
+}
+```
+
+{% ESNext %}
+
+```js
+transforms: {
+ from: [
+ {
+ type: 'prefix',
+ prefix: '?',
+ transform( content ) {
+ return createBlock( 'my-plugin/question', {
+ content,
+ } );
+ },
+ },
+ ];
+}
+```
+
+{% end %}
+
+### Raw
+
+This type of transformations support the _from_ direction, allowing blocks to be created from raw HTML nodes. They're applied when the user executes the "Convert to Blocks" action frow within the block setting UI menu, as well as when some content is pasted or dropped into the editor.
+
+A transformation of type `raw` is an object that takes the following parameters:
+
+- **type** _(string)_: the value `raw`.
+- **transform** _(function, optional)_: a callback that receives the node being processed. It should return a block object or an array of block objects.
+- **schema** _(object|function, optional)_: it defines the attributes and children of the node that will be preserved on paste, according to its [HTML content model](https://html.spec.whatwg.org/multipage/dom.html#content-models). Take a look at [pasteHandler](/packages/blocks/README.md#pasteHandler) for more info.
+- **selector** _(string, optional)_: a CSS selector string to determine whether the element matches according to the [element.matches](https://developer.mozilla.org/en-US/docs/Web/API/Element/matches) method. The transform won't be executed if the element doesn't match. This is a shorthand and alternative to using `isMatch`, which, if present, will take precedence.
+- **isMatch** _(function, optional)_: a callback that receives the node being processed and should return a boolean. Returning `false` from this function will prevent the transform from being applied.
+- **priority** _(number, optional)_: controls the priority with which a transform is applied, where a lower value will take precedence over higher values. This behaves much like a [WordPress hook](https://codex.wordpress.org/Plugin_API#Hook_to_WordPress). Like hooks, the default priority is `10` when not otherwise set.
+
+**Example: from URLs to Embed block**
+
+If we want to create an Embed block when the user pastes some URL in the editor, we could use this code:
+
+{% codetabs %}
+{% ES5 %}
+
+```js
+transforms: {
+ from: [
+ {
+ type: 'raw',
+ isMatch: function( node ) {
+ return node.nodeName === 'P' &&
+ /^\s*(https?:\/\/\S+)\s*$/i.test( node.textContent );
+ },
+ transform: function( node ) {
+ return createBlock( 'core/embed', {
+ url: node.textContent.trim(),
+ } );
+ },
+ },
+ ],
+}
+```
+
+{% ESNext %}
+
+```js
+transforms: {
+ from: [
+ {
+ type: 'raw',
+ isMatch: ( node ) =>
+ node.nodeName === 'P' &&
+ /^\s*(https?:\/\/\S+)\s*$/i.test( node.textContent ),
+ transform: ( node ) => {
+ return createBlock( 'core/embed', {
+ url: node.textContent.trim(),
+ } );
+ },
+ },
+ ],
+}
+```
+
+{% end %}
+
+### Shortcode
+
+This type of transformations support the _from_ direction, allowing blocks to be created from shortcodes. It's applied as part of the `raw` transformation process.
+
+A transformation of type `shortcode` is an object that takes the following parameters:
+
+- **type** _(string)_: the value `shortcode`.
+- **tag** _(string|array)_: the shortcode tag or list of shortcode aliases this transform can work with.
+- **attributes** _(object)_: object representing where the block attributes should be sourced from, according to the attributes shape defined by the [block configuration object](./block-registration.md). If a particular attribute contains a `shortcode` key, it should be a function that receives the shortcode attributes as the first arguments and the [WPShortcodeMatch](/packages/shortcode/README.md#next) as second, and returns a value for the attribute that will be sourced in the block's comment.
+- **isMatch** _(function, optional)_: a callback that receives the shortcode attributes per the [Shortcode API](https://codex.wordpress.org/Shortcode_API) and should return a boolean. Returning `false` from this function will prevent the shortcode to be transformed into this block.
+- **priority** _(number, optional)_: controls the priority with which a transform is applied, where a lower value will take precedence over higher values. This behaves much like a [WordPress hook](https://codex.wordpress.org/Plugin_API#Hook_to_WordPress). Like hooks, the default priority is `10` when not otherwise set.
+
+**Example: from shortcode to block**
+
+An existing shortcode can be transformed into its block counterpart.
+
+{% codetabs %}
+{% ES5 %}
+
+```js
+transforms: {
+ from: [
+ {
+ type: 'shortcode',
+ tag: 'caption',
+ attributes: {
+ url: {
+ type: 'string',
+ source: 'attribute',
+ attribute: 'src',
+ selector: 'img',
+ },
+ align: {
+ type: 'string',
+ // The shortcode function will extract
+ // the shortcode atts into a value
+ // to be sourced in the block's comment.
+ shortcode: function( attributes ) {
+ var align = attributes.named.align ? attributes.named.align : 'alignnone';
+ return align.replace( 'align', '' );
+ },
+ },
+ },
+ // Prevent the shortcode to be converted
+ // into this block when it doesn't
+ // have the proper ID.
+ isMatch: function( attributes ) {
+ return attributes.named.id === 'my-id';
+ },
+ },
+ ]
+},
+```
+
+{% ESNext %}
+
+```js
+transforms: {
+ from: [
+ {
+ type: 'shortcode',
+ tag: 'caption',
+ attributes: {
+ url: {
+ type: 'string',
+ source: 'attribute',
+ attribute: 'src',
+ selector: 'img',
+ },
+ align: {
+ type: 'string',
+ // The shortcode function will extract
+ // the shortcode atts into a value
+ // to be sourced in the block's comment.
+ shortcode: ( { named: { align = 'alignnone' } } ) => {
+ return align.replace( 'align', '' );
+ },
+ },
+ },
+ // Prevent the shortcode to be converted
+ // into this block when it doesn't
+ // have the proper ID.
+ isMatch( { named: { id } } ) {
+ return id === 'my-id';
+ },
+ },
+ ]
+},
+```
+
+{% end %}
diff --git a/docs/designers-developers/developers/data/data-core.md b/docs/designers-developers/developers/data/data-core.md
index 54ab79f95f1e54..142538c6354687 100644
--- a/docs/designers-developers/developers/data/data-core.md
+++ b/docs/designers-developers/developers/data/data-core.md
@@ -71,6 +71,18 @@ _Returns_
- `?Array`: An array of autosaves for the post, or undefined if there is none.
+# **getCurrentTheme**
+
+Return the current theme.
+
+_Parameters_
+
+- _state_ `Object`: Data state.
+
+_Returns_
+
+- `Object`: The current theme.
+
# **getCurrentUser**
Returns the current user.
@@ -200,7 +212,7 @@ _Parameters_
_Returns_
-- `Array`: Records.
+- `?Array`: Records.
# **getLastEntitySaveError**
@@ -491,6 +503,18 @@ _Returns_
- `Object`: Action object.
+# **receiveCurrentTheme**
+
+Returns an action object used in signalling that the current theme has been received.
+
+_Parameters_
+
+- _currentTheme_ `Object`: The current theme.
+
+_Returns_
+
+- `Object`: Action object.
+
# **receiveCurrentUser**
Returns an action used in signalling that the current user has been received.
diff --git a/docs/designers-developers/developers/platform/README.md b/docs/designers-developers/developers/platform/README.md
index dae0944cb1ef0d..5bd14bbb2bd18c 100644
--- a/docs/designers-developers/developers/platform/README.md
+++ b/docs/designers-developers/developers/platform/README.md
@@ -5,7 +5,7 @@ The Gutenberg Project is not only building a better editor for WordPress, but al
## UI Components
-The [WordPress Components package](/docs/components/) contains a set of UI components you can use in your project. See the [WordPress Storybook site](https://wordpress.github.io/gutenberg/) for an interactive guide to the available components and settings.
+The [WordPress Components package](/packages/components/README.md) contains a set of UI components you can use in your project. See the [WordPress Storybook site](https://wordpress.github.io/gutenberg/) for an interactive guide to the available components and settings.
Here is a quick example, how to use components in your project.
@@ -27,6 +27,8 @@ function MyApp() {
}
```
+Many components include CSS to add style, you will need to include for the components to appear correctly. The component stylesheet can be found in `node_modules/@wordpress/components/build-style/style.css`, you can link directly or copy and include it in your project.
+
## Development Scripts
The [wp-scripts package](https://developer.wordpress.org/block-editor/packages/packages-scripts/) is a collection of reusable scripts for JavaScript development — includes scripts for building, linting, and testing — all with no additional configuration files.
diff --git a/docs/designers-developers/developers/tutorials/block-tutorial/creating-dynamic-blocks.md b/docs/designers-developers/developers/tutorials/block-tutorial/creating-dynamic-blocks.md
index d481c5e3f0d627..c48315515e5b4a 100644
--- a/docs/designers-developers/developers/tutorials/block-tutorial/creating-dynamic-blocks.md
+++ b/docs/designers-developers/developers/tutorials/block-tutorial/creating-dynamic-blocks.md
@@ -99,7 +99,7 @@ Because it is a dynamic block it doesn't need to override the default `save` imp
* Plugin Name: Gutenberg examples dynamic
*/
-function gutenberg_examples_dynamic_render_callback( $attributes, $content ) {
+function gutenberg_examples_dynamic_render_callback( $block_attributes, $content ) {
$recent_posts = wp_get_recent_posts( array(
'numberposts' => 1,
'post_status' => 'publish',
@@ -141,11 +141,11 @@ There are a few things to notice:
* The `edit` function still shows a representation of the block in the editor's context (this could be very different from the rendered version, it's up to the block's author)
* The built-in `save` function just returns `null` because the rendering is performed server-side.
-* The server-side rendering is a function taking the block attributes and the block inner content as arguments, and returning the markup (quite similar to shortcodes)
+* The server-side rendering is a function taking the block and the block inner content as arguments, and returning the markup (quite similar to shortcodes)
## Live rendering in the block editor
-Gutenberg 2.8 added the [``](/packages/components/src/server-side-render) block which enables rendering to take place on the server using PHP rather than in JavaScript.
+Gutenberg 2.8 added the [``](/packages/server-side-render/README.md) block which enables rendering to take place on the server using PHP rather than in JavaScript.
*Server-side render is meant as a fallback; client-side rendering in JavaScript is always preferred (client rendering is faster and allows better editor manipulation).*
diff --git a/docs/designers-developers/developers/tutorials/block-tutorial/nested-blocks-inner-blocks.md b/docs/designers-developers/developers/tutorials/block-tutorial/nested-blocks-inner-blocks.md
index 8807f02596e242..41748c56995bfe 100644
--- a/docs/designers-developers/developers/tutorials/block-tutorial/nested-blocks-inner-blocks.md
+++ b/docs/designers-developers/developers/tutorials/block-tutorial/nested-blocks-inner-blocks.md
@@ -1,6 +1,6 @@
# Nested Blocks: Using InnerBlocks
-You can create a single block that nests other blocks using the [InnerBlocks](/packages/block-editor/src/components/inner-blocks) component. This is used in the Columns block, Social Links block, or any block you want to contain other blocks.
+You can create a single block that nests other blocks using the [InnerBlocks](https://github.com/WordPress/gutenberg/tree/master/packages/block-editor/src/components/inner-blocks/README.md) component. This is used in the Columns block, Social Links block, or any block you want to contain other blocks.
Note: A single block can only contain one `InnerBlock` component.
@@ -125,7 +125,7 @@ const MY_TEMPLATE = [
```
{% end %}
-Use the `templateLock` property to lock down the template. Using `all` locks the template complete, no changes can be made. Using `insert` prevents additional blocks to be inserted, but existing blocks can be reorderd. See [templateLock documentation](/packages/block-editor/src/components/inner-blocks#templatelock) for additional information.
+Use the `templateLock` property to lock down the template. Using `all` locks the template complete, no changes can be made. Using `insert` prevents additional blocks to be inserted, but existing blocks can be reorderd. See [templateLock documentation](https://github.com/WordPress/gutenberg/tree/master/packages/block-editor/src/components/inner-blocks/README.md#templatelock) for additional information.
### Post Template
diff --git a/docs/designers-developers/developers/tutorials/format-api/2-toolbar-button.md b/docs/designers-developers/developers/tutorials/format-api/2-toolbar-button.md
index a3ded1c493bfea..88840f1059020a 100644
--- a/docs/designers-developers/developers/tutorials/format-api/2-toolbar-button.md
+++ b/docs/designers-developers/developers/tutorials/format-api/2-toolbar-button.md
@@ -1,6 +1,6 @@
# Add a Button to the Toolbar
-Now that the format is available, the next step is to surface it to the UI. You can make use of the [`RichTextToolbarButton`](/packages/editor/src/components/rich-text/README.md#RichTextToolbarButton) component to extend the format toolbar.
+Now that the format is available, the next step is to surface it to the UI. You can make use of the [`RichTextToolbarButton`](https://github.com/WordPress/gutenberg/tree/master/packages/block-editor/src/components/rich-text#richtexttoolbarbutton) component to extend the format toolbar.
Paste this code in `my-custom-format.js`:
diff --git a/docs/designers-developers/developers/tutorials/metabox/meta-block-3-add.md b/docs/designers-developers/developers/tutorials/metabox/meta-block-3-add.md
index 1804a346f052c9..9d5eaf2e403e5c 100644
--- a/docs/designers-developers/developers/tutorials/metabox/meta-block-3-add.md
+++ b/docs/designers-developers/developers/tutorials/metabox/meta-block-3-add.md
@@ -2,7 +2,7 @@
With the meta field registered in the previous step, next you will create a new block used to display the field value to the user. See the [Block Tutorial](/docs/designers-developers/developers/tutorials/block-tutorial/readme.md) for a deeper understanding of creating custom blocks.
-For this block, you will use the TextControl component, which is similar to an HTML input text field. For additional components, check out the [components](/packages/components/src) and [editor](/packages/editor/src/components) packages repositories.
+For this block, you will use the TextControl component, which is similar to an HTML input text field. For additional components, check out the [Component Reference](/packages/components/README.md).
The hook `useEntityProp` can be used by the blocks to get or change meta values.
diff --git a/docs/designers-developers/developers/tutorials/metabox/meta-block-4-use-data.md b/docs/designers-developers/developers/tutorials/metabox/meta-block-4-use-data.md
index 6e7d5b92d4d405..e0f5ccd5f15905 100644
--- a/docs/designers-developers/developers/tutorials/metabox/meta-block-4-use-data.md
+++ b/docs/designers-developers/developers/tutorials/metabox/meta-block-4-use-data.md
@@ -25,7 +25,7 @@ You can also use the post meta data in other blocks. For this example the data i
In PHP, use the [register_block_type](https://developer.wordpress.org/reference/functions/register_block_type/) function to set a callback when the block is rendered to include the meta value.
```php
-function myguten_render_paragraph( $attributes, $content ) {
+function myguten_render_paragraph( $block_attributes, $content ) {
$value = get_post_meta( get_the_ID(), 'myguten_meta_block_field', true );
// check value is set before outputting
if ( $value ) {
diff --git a/docs/designers-developers/glossary.md b/docs/designers-developers/glossary.md
index 876bd077e75547..5a53c51bf2f5fb 100644
--- a/docs/designers-developers/glossary.md
+++ b/docs/designers-developers/glossary.md
@@ -19,8 +19,8 @@
Block name
A unique identifier for a block type, consisting of a plugin-specific namespace and a short label describing the block's intent. e.g. core/image
-
Block patterns
-
Block patterns are predefined layouts of blocks that can be inserted as starter content that are meant to be changed by the user every time. Once inserted, they exist as a local save and are not global.
+
Patterns
+
Patterns are predefined layouts of blocks that can be inserted as starter content that are meant to be changed by the user every time. Once inserted, they exist as a local save and are not global.
Block type
In contrast with the blocks composing a particular post, a block type describes the blueprint by which any block of that type should behave. So while there may be many images within a post, each behaves consistent with a unified image block type definition.
@@ -59,7 +59,7 @@
A set of button controls. In the context of a block, usually referring to the toolbar of block controls shown above the selected block.
Template
-
A template is a pre-defined arrangement of blocks, possibly with predefined attributes or placeholder content. You can provide a template for a post type, to give users a starting point when creating a new piece of content, or inside a custom block with the InnerBlocks component. See the templates documentation for more information. See templates documentation for more information.
+
A template is a pre-defined arrangement of blocks, possibly with predefined attributes or placeholder content. You can provide a template for a post type, to give users a starting point when creating a new piece of content, or inside a custom block with the InnerBlocks component. See the templates documentation for more information.
Template part
Template parts are equivalent – in blocks – of theme template parts. They are generally defined by a theme first. They carry some semantic meaning (could be swapped between themes such as a header) and can only be inserted in the site editor context (within “templates”). They are primarily site structure and are never to be mixed with the post content editor.
+
);
}
diff --git a/packages/block-editor/src/components/inserter/library.js b/packages/block-editor/src/components/inserter/library.js
new file mode 100644
index 00000000000000..a5e7094f54d4a7
--- /dev/null
+++ b/packages/block-editor/src/components/inserter/library.js
@@ -0,0 +1,47 @@
+/**
+ * External dependencies
+ */
+import { noop } from 'lodash';
+
+/**
+ * WordPress dependencies
+ */
+import { useSelect } from '@wordpress/data';
+
+/**
+ * Internal dependencies
+ */
+import InserterMenu from './menu';
+
+function InserterLibrary( {
+ rootClientId,
+ clientId,
+ isAppender,
+ showInserterHelpPanel,
+ __experimentalSelectBlockOnInsert: selectBlockOnInsert,
+ onSelect = noop,
+} ) {
+ const { destinationRootClientId } = useSelect( ( select ) => {
+ const { getBlockRootClientId } = select( 'core/block-editor' );
+
+ rootClientId =
+ rootClientId || getBlockRootClientId( clientId ) || undefined;
+
+ return {
+ rootClientId,
+ };
+ } );
+
+ return (
+
+ );
+}
+
+export default InserterLibrary;
diff --git a/packages/block-editor/src/components/inserter/menu.js b/packages/block-editor/src/components/inserter/menu.js
index 5698b278e211dd..6e446717f37517 100644
--- a/packages/block-editor/src/components/inserter/menu.js
+++ b/packages/block-editor/src/components/inserter/menu.js
@@ -1,13 +1,17 @@
/**
* External dependencies
*/
-import { includes } from 'lodash';
+import { includes, pick } from 'lodash';
/**
* WordPress dependencies
*/
import { useState } from '@wordpress/element';
import { LEFT, RIGHT, UP, DOWN, BACKSPACE, ENTER } from '@wordpress/keycodes';
+import { TabPanel } from '@wordpress/components';
+import { __ } from '@wordpress/i18n';
+import { useSelect, useDispatch } from '@wordpress/data';
+import { isUnmodifiedDefaultBlock } from '@wordpress/blocks';
/**
* Internal dependencies
@@ -16,6 +20,7 @@ import Tips from './tips';
import InserterSearchForm from './search-form';
import InserterPreviewPanel from './preview-panel';
import InserterBlockList from './block-list';
+import BlockPatterns from './block-patterns';
const stopKeyPropagation = ( event ) => event.stopPropagation();
@@ -29,6 +34,49 @@ function InserterMenu( {
} ) {
const [ filterValue, setFilterValue ] = useState( '' );
const [ hoveredItem, setHoveredItem ] = useState( null );
+ const {
+ destinationRootClientId,
+ patterns,
+ getSelectedBlock,
+ getBlockIndex,
+ getBlockSelectionEnd,
+ getBlockOrder,
+ } = useSelect( ( select ) => {
+ const {
+ getSettings,
+ getBlockRootClientId,
+ getBlockSelectionEnd: _getBlockSelectionEnd,
+ } = select( 'core/block-editor' );
+
+ let destRootClientId = rootClientId;
+ if ( ! destRootClientId && ! clientId && ! isAppender ) {
+ const end = _getBlockSelectionEnd();
+ if ( end ) {
+ destRootClientId = getBlockRootClientId( end ) || undefined;
+ }
+ }
+ return {
+ patterns: getSettings().__experimentalBlockPatterns,
+ destinationRootClientId: destRootClientId,
+ ...pick( select( 'core/block-editor' ), [
+ 'getSelectedBlock',
+ 'getBlockIndex',
+ 'getBlockSelectionEnd',
+ 'getBlockOrder',
+ ] ),
+ };
+ }, [] );
+ const {
+ replaceBlocks,
+ insertBlocks,
+ showInsertionPoint,
+ hideInsertionPoint,
+ } = useDispatch( 'core/block-editor' );
+ const hasPatterns =
+ ! destinationRootClientId &&
+ !! patterns &&
+ !! patterns.length &&
+ ! filterValue;
const onKeyDown = ( event ) => {
if (
includes(
@@ -41,6 +89,86 @@ function InserterMenu( {
}
};
+ // To avoid duplication, getInsertionIndex is extracted and used in two event handlers
+ // This breaks the withDispatch not containing any logic rule.
+ // Since it's a function only called when the event handlers are called,
+ // it's fine to extract it.
+ // eslint-disable-next-line no-restricted-syntax
+ function getInsertionIndex() {
+ // If the clientId is defined, we insert at the position of the block.
+ if ( clientId ) {
+ return getBlockIndex( clientId, destinationRootClientId );
+ }
+
+ // If there a selected block, we insert after the selected block.
+ const end = getBlockSelectionEnd();
+ if ( ! isAppender && end ) {
+ return getBlockIndex( end, destinationRootClientId ) + 1;
+ }
+
+ // Otherwise, we insert at the end of the current rootClientId
+ return getBlockOrder( destinationRootClientId ).length;
+ }
+
+ const onInsertBlocks = ( blocks ) => {
+ const selectedBlock = getSelectedBlock();
+ if (
+ ! isAppender &&
+ selectedBlock &&
+ isUnmodifiedDefaultBlock( selectedBlock )
+ ) {
+ replaceBlocks( selectedBlock.clientId, blocks );
+ } else {
+ insertBlocks(
+ blocks,
+ getInsertionIndex(),
+ destinationRootClientId,
+ __experimentalSelectBlockOnInsert
+ );
+ }
+
+ onSelect();
+ };
+
+ const onHover = ( item ) => {
+ setHoveredItem( item );
+ if ( item ) {
+ const index = getInsertionIndex();
+ showInsertionPoint( destinationRootClientId, index );
+ } else {
+ hideInsertionPoint();
+ }
+ };
+
+ const blocksTab = (
+ <>
+
+
+
+
+
+ { showInserterHelpPanel && (
+
+
+
+ ) }
+ >
+ );
+
+ const patternsTab = (
+
+
+
+ );
+
// Disable reason (no-autofocus): The inserter menu is a modal display, not one which
// is always visible, and one which already incurs this behavior of autoFocus via
// Popover's focusOnMount.
@@ -55,25 +183,36 @@ function InserterMenu( {
>