gutenberg icon indicating copy to clipboard operation
gutenberg copied to clipboard

Create Block: Add documentation for custom block namespace

Open Infinite-Null opened this issue 7 months ago • 2 comments

What?

Adds a brief section about block namespaces to the Create Block package documentation. Closes: #42854

Why?

When using @wordpress/create-block, the tool generates blocks with the default create-block namespace (e.g., create-block/my-block). This causes issues because:

  • Multiple plugins end up using the same namespace
  • Developers often don't realize they need to change it until after plugin submission

How?

Added a concise "Block Namespace" section under Usage that:

  • Explains that create-block is the default namespace
  • Shows how to specify a custom namespace using the --namespace option
  • Indicates where to update the namespace in existing blocks

Infinite-Null avatar May 26 '25 08:05 Infinite-Null

The following accounts have interacted with this PR and/or linked issues. I will continue to update these lists as activity occurs. You can also manually ask me to refresh this list by adding the props-bot label.

If you're merging code through a pull request on GitHub, copy and paste the following into the bottom of the merge commit message.

Co-authored-by: Infinite-Null <[email protected]>
Co-authored-by: gziolo <[email protected]>
Co-authored-by: mburridge <[email protected]>
Co-authored-by: jonathanbossenger <[email protected]>
Co-authored-by: ryanwelcher <[email protected]>
Co-authored-by: t-hamano <[email protected]>

To understand the WordPress project's expectations around crediting contributors, please review the Contributor Attribution page in the Core Handbook.

github-actions[bot] avatar May 26 '25 08:05 github-actions[bot]

Warning: Type of PR label mismatch

To merge this PR, it requires exactly 1 label indicating the type of PR. Other labels are optional and not being checked here.

  • Type-related labels to choose from: [Type] Automated Testing, [Type] Breaking Change, [Type] Bug, [Type] Build Tooling, [Type] Code Quality, [Type] Copy, [Type] Developer Documentation, [Type] Enhancement, [Type] Experimental, [Type] Feature, [Type] New API, [Type] Task, [Type] Technical Prototype, [Type] Performance, [Type] Project Management, [Type] Regression, [Type] Security, [Type] WP Core Ticket, Backport from WordPress Core, Gutenberg Plugin.
  • Labels found: .

Read more about Type labels in Gutenberg. Don't worry if you don't have the required permissions to add labels; the PR reviewer should be able to help with the task.

github-actions[bot] avatar May 26 '25 08:05 github-actions[bot]