Skip to content

Conversation

Infinite-Null
Copy link
Contributor

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

Copy link

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 <ankitkumarshah@git.wordpress.org>
Co-authored-by: gziolo <gziolo@git.wordpress.org>
Co-authored-by: mburridge <mburridge@git.wordpress.org>
Co-authored-by: jonathanbossenger <psykro@git.wordpress.org>
Co-authored-by: ryanwelcher <welcher@git.wordpress.org>
Co-authored-by: t-hamano <wildworks@git.wordpress.org>

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

Copy link

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.

@t-hamano t-hamano added [Type] Developer Documentation Documentation for developers [Tool] Create Block /packages/create-block labels May 27, 2025
Copy link
Contributor

@ryanwelcher ryanwelcher left a comment

Choose a reason for hiding this comment

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

LGTM! A nice addition to the docs. Thanks!

@t-hamano t-hamano merged commit 9e0ef94 into WordPress:trunk Jun 4, 2025
59 checks passed
@github-actions github-actions bot added this to the Gutenberg 21.1 milestone Jun 4, 2025
chriszarate pushed a commit to chriszarate/gutenberg that referenced this pull request Jul 1, 2025
…#70215)

* Add documentation for custom block namespace in `create-block` tool

* Change section title from "Block Namespace" to "namespace" for consistency

Co-authored-by: Infinite-Null <ankitkumarshah@git.wordpress.org>
Co-authored-by: gziolo <gziolo@git.wordpress.org>
Co-authored-by: mburridge <mburridge@git.wordpress.org>
Co-authored-by: jonathanbossenger <psykro@git.wordpress.org>
Co-authored-by: ryanwelcher <welcher@git.wordpress.org>
Co-authored-by: t-hamano <wildworks@git.wordpress.org>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Tool] Create Block /packages/create-block [Type] Developer Documentation Documentation for developers
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Create Block: consider not using 'create-block' for namespace
3 participants