Skip to content

Navigation: Add block search and insertion from Link UI#78345

Open
sarthaknagoshe2002 wants to merge 3 commits into
WordPress:trunkfrom
sarthaknagoshe2002:fix/issue-77074
Open

Navigation: Add block search and insertion from Link UI#78345
sarthaknagoshe2002 wants to merge 3 commits into
WordPress:trunkfrom
sarthaknagoshe2002:fix/issue-77074

Conversation

@sarthaknagoshe2002
Copy link
Copy Markdown
Contributor

@sarthaknagoshe2002 sarthaknagoshe2002 commented May 15, 2026

What?

Closes #77074

This PR enables users to search for and insert allowed inner blocks (such as Site Logo, Search, or Home link) directly from the Navigation block's Link UI popover.

Why?

Previously, adding inner blocks to the Navigation block required a separate workflow from adding standard links. By integrating block search into the Link UI, we streamline the user experience.

How?

Uses useSelect to gather all available block types and check their insertion permissions. It then filters this list in real-time based on the user's search input and whether the blocks are actually allowed within the Navigation menu. Finally, it passes these matching blocks down into the LinkUITools component, which loops through the results to display clickable insertion buttons for the user.

Testing Instructions

  1. Hover over navigation block to get the "+" appender icon.
  2. Click on the "+" to open the Link UI popover.
  3. Type "Home" into the focused search input field.
  4. Verify the relevant block appear in the list.

Screenshots or screencast

Before After
image image

@github-actions github-actions Bot added the [Package] Block library /packages/block-library label May 15, 2026
@sarthaknagoshe2002 sarthaknagoshe2002 changed the title Feat: Add block suggestion in navigation appender Navigation: Add block search and insertion from Link UI May 15, 2026
@sarthaknagoshe2002 sarthaknagoshe2002 marked this pull request as ready for review May 15, 2026 14:07
@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: sarthaknagoshe2002 <sarthaknagoshe2002@git.wordpress.org>
Co-authored-by: jeryj <jeryj@git.wordpress.org>

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

@t-hamano t-hamano added [Type] Enhancement A suggestion for improvement. [Block] Navigation Link Affects the Navigation Link Block labels May 16, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

[Block] Navigation Link Affects the Navigation Link Block [Package] Block library /packages/block-library [Type] Enhancement A suggestion for improvement.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Allow adding a Home link in navigation item creation

2 participants