Skip to content

Commit

Permalink
WordPress 5.8.1 backports (#34393)
Browse files Browse the repository at this point in the history
* Fix API docs generation (#33384)

* Docs: use markdown headings instead of links for API declarations (#33381)

* Docs: Run Prettier after updating API in documentation (#33498)

(cherry picked from commit 626f233)

* Use tabs instead of spaces in block transform doc example (#33549)

(cherry picked from commit 8afca1e)

* Fix metabox reordering (#30617).

* Block editor: don't render layout and duotone styles in between blocks (#32083)

* Widgets: Allow HTML tags in description (#33814)

* Widgets: Allow HTML tags in description

* Use `dangerouslySetInnerHTML`

Avoid `<div />` inside the `<p />` tag

* Describe by dangerouslySetInnerHTML is used

* Use safeHTML

* Update comment

* Editor: Set 'hide_empty' for the most used terms query (#33457)

Don't include terms that aren't assigned to any posts as "most used" terms.

* Update widget editor help links to point to the new support article (#33482)

* If select-all fires in .editor-post-title__input, end the process.. (#33621)

* Writing flow: select all: remove early return for post title (#33699)

* Call onChangeSectionExpanded conditionally (#33618)

* FontSizePicker: Use number values when the initial value is a number (#33679)

* FontSizePicker: Don't use units if the value is a number
* Add unit tests
* Disable units when we have number values

* Fix justification for button block when selected (#33739)

* Remove margin setting, auto right conflict with justify buttons

* Per review, add little margin back

* Add error boundaries to widget screens (#33771)

* Add error boundary to edit widgets screen

* Add error boundary to customize widgets

* Refactor sidebar controls provider to application level so that its state is not lost when re-initializing

* Revert "Refactor sidebar controls provider to application level so that its state is not lost when re-initializing"

This reverts commit 7d607ff.

* Remove rebootability from customize widgets

* Remove debug code

* Fix insertion point in Widgets editors (#33802)

* Default batch processor: Respect the batch endpoint's maxItems (#34280)

This updates the default batch processor to make multiple batch requests
if the number of requests to process exceeds the number of requests that
the batch endpoint can handle.

We determine the number of requests that the batch endpoint can handle
by making a preflight OPTIONS request to /batch/v1. By default it is 25
requests.

See https://make.wordpress.org/core/2020/11/20/rest-api-batch-framework-in-wordpress-5-6/.

* Fix button block focus trap after a URL has been added (#34314)

* Rework button block link UI to match RichText format implementation

* Refine some more, determine visibility by selection and url state

* Add e2e test

* Also focus rich text when unlinking using a keyboard shortcut

* Text for dropdown fields within legacy widgets in the Customizer is off centered (#34076)

* Fix ESLint errors reported

* Regenerate autogenerated docs

* Update the `INSERTER_SEARCH_SELECTOR` path.

This is a partial cherry pick of 2356b2d in order to fix the performance tests.

Co-authored-by: André <[email protected]>
Co-authored-by: JuanMa <[email protected]>
Co-authored-by: Greg Ziółkowski <[email protected]>
Co-authored-by: Jeff Bowen <[email protected]>
Co-authored-by: Bruno Ribarić <[email protected]>
Co-authored-by: Ella van Durpe <[email protected]>
Co-authored-by: Petter Walbø Johnsgård <[email protected]>
Co-authored-by: George Mamadashvili <[email protected]>
Co-authored-by: Daniel Richards <[email protected]>
Co-authored-by: Hiroshi Urabe <[email protected]>
Co-authored-by: Kai Hao <[email protected]>
Co-authored-by: Marcus Kazmierczak <[email protected]>
Co-authored-by: Robert Anderson <[email protected]>
Co-authored-by: Anton Vlasenko <[email protected]>
  • Loading branch information
15 people authored Sep 1, 2021
1 parent 7fc3aa4 commit 70f5aaa
Show file tree
Hide file tree
Showing 94 changed files with 2,401 additions and 1,643 deletions.
8 changes: 4 additions & 4 deletions bin/api-docs/update-api-docs.js
Original file line number Diff line number Diff line change
Expand Up @@ -38,10 +38,7 @@ const PACKAGES_DIR = resolve( ROOT_DIR, 'packages' );
*
* @type {string}
*/
const DATA_DOCS_DIR = resolve(
ROOT_DIR,
'docs/designers-developers/developers/data'
);
const DATA_DOCS_DIR = resolve( ROOT_DIR, 'docs/reference-guides/data' );

/**
* Pattern matching start token of a README file.
Expand Down Expand Up @@ -235,6 +232,9 @@ glob.stream( [
{ shell: true }
);
}
await execa( 'npm', [ 'run', 'format', output ], {
shell: true,
} );
} catch ( error ) {
console.error( error );
process.exit( 1 );
Expand Down
20 changes: 10 additions & 10 deletions docs/how-to-guides/widgets/legacy-widget-block.md
Original file line number Diff line number Diff line change
Expand Up @@ -89,24 +89,24 @@ This is done by adding JavaScript code to your block's definition. In this examp

```js
transforms: {
from: [
{
type: 'block',
blocks: [ 'core/legacy-widget' ],
from: [
{
type: 'block',
blocks: [ 'core/legacy-widget' ],
isMatch: ( { idBase, instance } ) => {
if ( ! instance?.raw ) {
// Can't transform if raw instance is not shown in REST API.
return false;
}
return idBase === 'example_widget';
},
transform: ( { instance } ) => {
return createBlock( 'example/block', {
transform: ( { instance } ) => {
return createBlock( 'example/block', {
name: instance.raw.name,
} );
},
},
]
} );
},
},
]
},
```
Expand Down
8 changes: 4 additions & 4 deletions docs/reference-guides/data/data-core-annotations.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,16 +4,16 @@ Namespace: `core/annotations`.

## Selectors

<!-- START TOKEN(Autogenerated selectors|../../../../packages/annotations/src/store/selectors.js) -->
<!-- START TOKEN(Autogenerated selectors|../../../packages/annotations/src/store/selectors.js) -->

Nothing to document.

<!-- END TOKEN(Autogenerated selectors|../../../../packages/annotations/src/store/selectors.js) -->
<!-- END TOKEN(Autogenerated selectors|../../../packages/annotations/src/store/selectors.js) -->

## Actions

<!-- START TOKEN(Autogenerated actions|../../../../packages/annotations/src/store/actions.js) -->
<!-- START TOKEN(Autogenerated actions|../../../packages/annotations/src/store/actions.js) -->

Nothing to document.

<!-- END TOKEN(Autogenerated actions|../../../../packages/annotations/src/store/actions.js) -->
<!-- END TOKEN(Autogenerated actions|../../../packages/annotations/src/store/actions.js) -->
Loading

0 comments on commit 70f5aaa

Please sign in to comment.