Skip to content

Conversation

@kean
Copy link
Contributor

@kean kean commented Oct 27, 2025

What?

Fixes CMM-892: Add support for block variants

How?

  • Add id field to BlockType (renamed from EditorBlock to match Gutenberg terminology)
  • Inserter now uses the id (as oppose to non-unique name to identify the selected block)

Testing Instructions

  • Select on of the block variants, e.g. "Embed: Youtube"
  • Verify that it is added with the predefined arguments

Screenshots or screencast

Screenshot 2025-10-27 at 4 21 24 PM Screenshot 2025-10-27 at 4 21 28 PM

Known Issues

@kean kean requested a review from dcalhoun October 27, 2025 20:26
@kean kean requested a review from jkmassel October 27, 2025 22:30
Copy link
Member

@dcalhoun dcalhoun left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tested well for me. Changes make sense.

kean and others added 2 commits October 29, 2025 15:09
* Add a note about serializeBlocksForNative

* Remove now redundant core/missing check

* Move ordering to the JS land

* Further refactoring

* Pass displayName for Text

* Localize categories

* Extend most used blocks

* Add gbk-most-used as a separate section

* Add support for disabling blocks

* Collapse long sections

* Update the order of embeds

* Fix linter errors
@kean kean merged commit b22a52c into task/insert-block Oct 29, 2025
1 of 3 checks passed
@kean kean deleted the task/blocks-with-predefined-parameters branch October 29, 2025 19:20
kean added a commit that referenced this pull request Oct 29, 2025
* Implement block insertion

* Load bridge only if enabled

* Refactor the component that handles insertion

* Fix inserter not working when selected from tilte

* Fix an issue with editor not restoring focus when block inserter is dismissed

* Fix order of inserts

* Native Inserter: Add support for block variants (#204)

* Add support for block variants

* Rename BlockType

* Capitlize ID

* Update src/components/native-block-inserter-button/index.jsx

Co-authored-by: David Calhoun <[email protected]>

* Native Inserter: Improve ordering of blocks and more (#206)

* Add a note about serializeBlocksForNative

* Remove now redundant core/missing check

* Move ordering to the JS land

* Further refactoring

* Pass displayName for Text

* Localize categories

* Extend most used blocks

* Add gbk-most-used as a separate section

* Add support for disabling blocks

* Collapse long sections

* Update the order of embeds

* Fix linter errors

---------

Co-authored-by: David Calhoun <[email protected]>

---------

Co-authored-by: David Calhoun <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants