Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[pull] trunk from WordPress:trunk #98

Merged
merged 2 commits into from
Dec 19, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions docs/reference-guides/data/data-core-block-editor.md
Original file line number Diff line number Diff line change
Expand Up @@ -448,7 +448,7 @@ Determines the items that appear in the available block transforms list.

Each item object contains what's necessary to display a menu item in the transform list and handle its selection.

The 'frecency' property is a heuristic (<https://en.wikipedia.org/wiki/Frecency>) that combines block usage frequenty and recency.
The 'frecency' property is a heuristic (<https://en.wikipedia.org/wiki/Frecency>) that combines block usage frequency and recency.

Items are returned ordered descendingly by their 'frecency'.

Expand Down Expand Up @@ -521,7 +521,7 @@ _Properties_

- _name_ `string`: The type of block.
- _attributes_ `?Object`: Attributes to pass to the newly created block.
- _attributesToCopy_ `?Array<string>`: Attributes to be copied from adjecent blocks when inserted.
- _attributesToCopy_ `?Array<string>`: Attributes to be copied from adjacent blocks when inserted.

### getDraggedBlockClientIds

Expand Down Expand Up @@ -580,7 +580,7 @@ Determines the items that appear in the inserter. Includes both static items (e.

Each item object contains what's necessary to display a button in the inserter and handle its selection.

The 'frecency' property is a heuristic (<https://en.wikipedia.org/wiki/Frecency>) that combines block usage frequenty and recency.
The 'frecency' property is a heuristic (<https://en.wikipedia.org/wiki/Frecency>) that combines block usage frequency and recency.

Items are returned ordered descendingly by their 'utility' and 'frecency'.

Expand Down
6 changes: 6 additions & 0 deletions packages/block-editor/src/hooks/background.js
Original file line number Diff line number Diff line change
Expand Up @@ -177,6 +177,11 @@ export function BackgroundImagePanel( {
},
};

const defaultControls = getBlockSupport( name, [
BACKGROUND_SUPPORT_KEY,
'defaultControls',
] );

return (
<StylesBackgroundPanel
inheritedValue={ inheritedValue }
Expand All @@ -185,6 +190,7 @@ export function BackgroundImagePanel( {
defaultValues={ BACKGROUND_BLOCK_DEFAULT_VALUES }
settings={ updatedSettings }
onChange={ onChange }
defaultControls={ defaultControls }
value={ style }
/>
);
Expand Down
8 changes: 4 additions & 4 deletions packages/block-editor/src/store/selectors.js
Original file line number Diff line number Diff line change
Expand Up @@ -1992,7 +1992,7 @@ const getItemFromVariation = ( state, item ) => ( variation ) => {
* Returns the calculated frecency.
*
* 'frecency' is a heuristic (https://en.wikipedia.org/wiki/Frecency)
* that combines block usage frequenty and recency.
* that combines block usage frequency and recency.
*
* @param {number} time When the last insert occurred as a UNIX epoch
* @param {number} count The number of inserts that have occurred.
Expand Down Expand Up @@ -2080,7 +2080,7 @@ const buildBlockTypeItem =
* inserter and handle its selection.
*
* The 'frecency' property is a heuristic (https://en.wikipedia.org/wiki/Frecency)
* that combines block usage frequenty and recency.
* that combines block usage frequency and recency.
*
* Items are returned ordered descendingly by their 'utility' and 'frecency'.
*
Expand Down Expand Up @@ -2236,7 +2236,7 @@ export const getInserterItems = createRegistrySelector( ( select ) =>
* transform list and handle its selection.
*
* The 'frecency' property is a heuristic (https://en.wikipedia.org/wiki/Frecency)
* that combines block usage frequenty and recency.
* that combines block usage frequency and recency.
*
* Items are returned ordered descendingly by their 'frecency'.
*
Expand Down Expand Up @@ -2400,7 +2400,7 @@ export const __experimentalGetAllowedBlocks = createSelector(
* @typedef {Object} WPDirectInsertBlock
* @property {string} name The type of block.
* @property {?Object} attributes Attributes to pass to the newly created block.
* @property {?Array<string>} attributesToCopy Attributes to be copied from adjecent blocks when inserted.
* @property {?Array<string>} attributesToCopy Attributes to be copied from adjacent blocks when inserted.
*/
export function getDirectInsertBlock( state, rootClientId = null ) {
if ( ! rootClientId ) {
Expand Down
Loading