Skip to content

docs: improvements and fixes to blocks documentation#13782

Merged
GermanJablo merged 2 commits intomainfrom
docs-blocks
Sep 12, 2025
Merged

docs: improvements and fixes to blocks documentation#13782
GermanJablo merged 2 commits intomainfrom
docs-blocks

Conversation

@GermanJablo
Copy link
Copy Markdown
Contributor

The information about the block field and the blocks themselves wasn't separated in the documentation, and in fact, there were times when they were confused and incorrectly mixed.

This caused confusion among our users.

This PR closes an issue, a discussion, and another PR that arose because it wasn't clear that the blockName could be programmatically modified with the block's content. This is possible through admin.components.Label, which isn't the best name, as it changes the label and the name of the block, two different concepts.

I've added a section to the documentation that I think will make all of this much clearer.

Before:

image

After:

image

Replaces #12135
Fixes #12112 & addresses #4648

Comment thread docs/fields/blocks.mdx
Comment on lines 85 to -88

| Option | Description |
| ---------------------- | -------------------------------------------------------------------------- |
| **`group`** | Text or localization object used to group this Block in the Blocks Drawer. |
| **`initCollapsed`** | Set the initial collapsed state |
| **`isSortable`** | Disable order sorting by setting this value to `false` |
| **`disableBlockName`** | Hide the blockName field by setting this value to `true` |
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

This is an example of how we were mixing up concepts. Two of these properties are part of the block field's admin config, while the other two are from the blocks' admin config.

Comment thread docs/fields/blocks.mdx
Comment on lines +167 to +173
| Option | Description |
| ---------------------- | -------------------------------------------------------------------------- |
| **`components.Block`** | Custom component for replacing the Block, including the header. |
| **`components.Label`** | Custom component for replacing the Block Label. |
| **`disableBlockName`** | Hide the blockName field by setting this value to `true`. |
| **`group`** | Text or localization object used to group this Block in the Blocks Drawer. |
| **`custom`** | Extension point for adding custom data (e.g. for plugins) |
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

I found another undocumented property in types: jsx. @AlessioGr Do you know anything about this?

@GermanJablo GermanJablo changed the title docs: Improvements and fixes to blocks documentation docs: improvements and fixes to blocks documentation Sep 11, 2025
@GermanJablo GermanJablo merged commit 3c5aa1b into main Sep 12, 2025
13 checks passed
@GermanJablo GermanJablo deleted the docs-blocks branch September 12, 2025 14:15
@github-actions
Copy link
Copy Markdown
Contributor

🚀 This is included in version v3.56.0

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Blocks Field - Components docs inaccurate

3 participants