Skip to content

Fix: Add isNavigationBlock utility to identify navigation blocks - #68647

Closed
yogeshbhutkar wants to merge 1 commit into
WordPress:trunkfrom
yogeshbhutkar:68646/update-nav-synced
Closed

yogeshbhutkar wants to merge 1 commit into
WordPress:trunkfrom
yogeshbhutkar:68646/update-nav-synced

Conversation

@yogeshbhutkar

@yogeshbhutkar yogeshbhutkar commented Jan 14, 2025 •

Copy link
Copy Markdown
Contributor

What, Why and How?

While determining the Block Information, the Navigation block is incorrectly excluded as a synced block. This PR addresses and resolves that issue.

Testing Instructions

  1. Navigate to the site editor.
  2. Create a Navigation block.
  3. Notice, the block's name is displayed in the Block Card.

Screenshots

Before
before
After
after

Closes: #68646

@Mamaduka

Copy link
Copy Markdown
Member

@yogeshbhutkar, as mentioned in the previous PR, it's better to create an issue and discuss possible solutions before moving on to code.

I also don't think there's a need to introduce another public method just to check the block's name.

@Mamaduka Mamaduka added [Type] Enhancement A suggestion for improvement. Needs Decision Needs a decision to be actionable or relevant [Package] Block editor /packages/block-editor labels Jan 14, 2025
@yogeshbhutkar
yogeshbhutkar marked this pull request as ready for review January 14, 2025 04:47
@github-actions

Copy link
Copy Markdown

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: yogeshbhutkar <yogeshbhutkar@git.wordpress.org>
Co-authored-by: Mamaduka <mamaduka@git.wordpress.org>

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

@yogeshbhutkar

yogeshbhutkar commented Jan 14, 2025 •

Copy link
Copy Markdown
Contributor Author

Apologies! Let's first discuss the possible approaches in the parent issue.

Maybe, we can also expose just a single method that checks whether a block is synced. Otherwise, the array iteration method tagged in the comment would work great as well. But, I believe we should first establish if this is intended.

@youknowriad

Copy link
Copy Markdown
Contributor

Thanks for working on this, @yogeshbhutkar! As discussed above, we'd rather not add a new public @wordpress/blocks API just to check a block name, and the underlying question is tracked in #49158. So I'm closing this PR. If you'd like to try the smaller approach of marking Navigation as synced in the block display information, a fresh PR linked to #49158 would be welcome.

@youknowriad youknowriad closed this Oct 7, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Needs Decision Needs a decision to be actionable or relevant [Package] Block editor /packages/block-editor [Type] Enhancement A suggestion for improvement.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Navigation Block: Treat Navigation Block as a synced block

3 participants