Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
33 commits
Select commit Hold shift + click to select a range
f29ee56
Tests: cover selection ownership when controllers share an entity
jeryj Sep 9, 2026
6a82ba8
Block Editor: Stop duplicate controllers from taking the selection
jeryj Sep 9, 2026
9eef576
Block Editor: Find the selection's controller without walking to the …
jeryj Sep 9, 2026
e8c5b61
Block Editor: Put each comment with the code it explains
jeryj Sep 9, 2026
84bbbb4
Tests: cover undo moving the caret within one controlled container
jeryj Sep 9, 2026
6dd564d
Tests: cover typing and undo in a container duplicated from one entity
jeryj Sep 10, 2026
d249639
Block Editor: Keep a typing run across ignored changes to other blocks
jeryj Sep 14, 2026
2c908b3
Block Editor: Update a controller's clones in place when only attribu…
jeryj Sep 14, 2026
d770b73
Tests: Pin undo across containers of different entities
jeryj Sep 14, 2026
5702de1
Block Editor: Find the selection's holder with getBlockParents
jeryj Oct 15, 2026
b06e294
Block Editor: Keep undo selection restore inside nested controllers
jeryj Nov 24, 2026
2990c41
Block Editor: Type the in-place update in useBlockSync
jeryj Nov 24, 2026
1c7cd8b
Tests: Write the duplicate Navigation selection spec in TypeScript
jeryj Nov 24, 2026
4c32696
Block Editor: Restore undo selection like the re-clone path does
jeryj Nov 24, 2026
1cc86f3
Tests: Cover undo restoring the caret into Post Content
jeryj Nov 24, 2026
eb3548d
Block Editor: Say which controllers the selection guard counts as copies
jeryj Nov 24, 2026
05af5ff
Tests: Wait for Post Content to be visible, not for a second
jeryj Nov 24, 2026
4537125
Tests: Undo once per edit between blocks of the same Post Content
jeryj Nov 24, 2026
af48aa9
Block Editor: Test the in-place update's reorder and undo cases
jeryj Nov 24, 2026
0a6b72d
Tests: Give the in-place update test's clones a real host block
jeryj Nov 24, 2026
3cddd7d
Tests: Pin the history and in-place checks of the duplicate fixes
jeryj Nov 24, 2026
907e332
Block Editor: Spell recognizes the American way in useBlockSync
jeryj Dec 1, 2026
9df1068
Block Editor: Name the duplicate fix helpers for what they compare
jeryj Dec 1, 2026
c41745e
Block Editor: Count a selected duplicate controller as holding the se…
jeryj Dec 1, 2026
2cc273c
Tests: Cover redo in a container duplicated from one entity
jeryj Dec 1, 2026
99e86da
Block Editor: Unlock an unsynced pattern's blocks when undo removes i…
jeryj Dec 2, 2026
7b654f3
Block Editor: Find duplicate controllers by what they render
jeryj Dec 1, 2026
04bb8c1
Block Library: Say what Navigation, Post Content and Template Part re…
jeryj Dec 1, 2026
472ca65
Tests: Cover undo from the Post Content of another post
jeryj Dec 1, 2026
d397db4
Block Editor: Point the duplicate controllers changelog entry at #87777
jeryj Dec 1, 2026
8c23ddc
Block Editor: Say the selection guard looks for copies
jeryj Dec 1, 2026
7b47014
Tests: Pin the entity each inner block controller records
jeryj Dec 1, 2026
5e3fa64
Block Editor: Take a controller's sync source as an inner blocks option
jeryj Dec 2, 2026
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
2 changes: 2 additions & 0 deletions packages/block-editor/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
- Add `getTransformClassesAndStyles()`, for blocks that apply transform styles to an inner element ([#86240](https://github.com/WordPress/gutenberg/pull/86240)).
- Add an Offset control with X and Y axes to the Transform panel, for the `transform.translate` block support ([#86282](https://github.com/WordPress/gutenberg/pull/86282)).
- Add a Scale control to the Transform panel, for the `transform.scale` block support ([#86727](https://github.com/WordPress/gutenberg/pull/86727)).
- `useInnerBlocksProps`, `InnerBlocks`: Add a `syncSource` option that names what controlled inner blocks render, such as the entity they sync with. Blocks that render the same source are treated as copies of each other ([#87777](https://github.com/WordPress/gutenberg/pull/87777)).

### Enhancements

Expand Down Expand Up @@ -43,6 +44,7 @@
- Inspector: Show the Styles tab for blocks whose only style controls are in the `background`, `filter` or `elements` groups ([#87403](https://github.com/WordPress/gutenberg/pull/87403)).
- RichText: Hide the slash inserter in a block that cannot be removed, instead of throwing when an item is picked ([#87152](https://github.com/WordPress/gutenberg/pull/87152)).
- Block toolbar: Return focus to the block with Tab or Escape after a toolbar action replaces the block's element, such as changing a heading's level ([#87360](https://github.com/WordPress/gutenberg/pull/87360)).
- Inner block controllers rendering the same entity, such as two Navigation blocks on the same menu, two Post Content blocks, or two Template Parts on the same slug, no longer move the selection into each other, lose keystrokes, or split typing in one of them into an undo level per character ([#87777](https://github.com/WordPress/gutenberg/pull/87777)).

### Internal

Expand Down
18 changes: 18 additions & 0 deletions packages/block-editor/src/components/inner-blocks/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -212,3 +212,21 @@ const DEFAULT_BLOCK = { name: 'core/paragraph', attributes: { content: 'Lorem ip
When `true`, the appender inserts `defaultBlock` directly and skips the inserter dropdown, **including any registered inserter variations** of that block type. Use this to opt out of the variation picker; otherwise leave unset.

Note: redundant when `allowedBlocks` resolves to a single block type with no variations, the appender already inserts directly.

### `syncSource`

- **Type:** `String`
- **Default:** `undefined`.

For inner blocks controlled with `value` and `onChange`: a name for what they render, such as the entity they sync with. Blocks that render one source in several places, such as two Navigation blocks on the same menu, pass the same `syncSource`, so that editing one copy doesn't move the selection into another.

```jsx
const innerBlocksProps = useInnerBlocksProps( blockProps, {
value: blocks,
onInput,
onChange,
syncSource: `postType/wp_navigation/${ menuId }`,
} );
```

Controlled inner blocks without a `syncSource` count as copies of any controlled inner blocks of the same block type.
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ export type DirectInsert = boolean | ( ( ...args: never[] ) => unknown );
*/
export interface InnerBlocksOptions extends Pick<
UseBlockSyncProps,
'value' | 'onChange' | 'onInput'
'value' | 'onChange' | 'onInput' | 'syncSource'
> {
/** Block names which are permitted in inner blocks. */
allowedBlocks?: boolean | string[];
Expand Down
Loading