Skip to content

Home Link: Add missing controls#76672

Merged
juanfra merged 12 commits into
WordPress:trunkfrom
prasadkarmalkar:feat/issue-76589
May 14, 2026
Merged

Home Link: Add missing controls#76672
juanfra merged 12 commits into
WordPress:trunkfrom
prasadkarmalkar:feat/issue-76589

Conversation

@prasadkarmalkar
Copy link
Copy Markdown
Contributor

What?

Closes #76589

  • Add the missing controls from other blocks, like Page Link

Why?

  • Make the navigation blocks consistent in settings.

How?

  • Add following controls for Home Link Block
  1. TEXT input
  2. Open in new Tab checkbox
  3. View button
  4. Description input
  5. Rel attribute input

Testing Instructions

  1. Edit navigation in site editor
  2. Add Home Link Block in navigation
  3. Check their controls

Screenshots or screencast

Before After
Screenshot 2026-03-19 at 3 12 57 PM Screenshot 2026-03-19 at 3 12 23 PM

@github-actions github-actions Bot added the [Package] Block library /packages/block-library label Mar 19, 2026
@im3dabasia im3dabasia added [Type] Enhancement A suggestion for improvement. [Block] Home Link Affects the Home Link Block labels Mar 19, 2026
@prasadkarmalkar prasadkarmalkar marked this pull request as ready for review March 19, 2026 13:03
@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: prasadkarmalkar <[email protected]>
Co-authored-by: juanfra <[email protected]>

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

Copy link
Copy Markdown
Member

@juanfra juanfra left a comment

Choose a reason for hiding this comment

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

Thanks so much for the PR! I left a few comments. The edit button is missing.

I also updated the issue, as we are staying conservative with the rel option and we're keeping that as is.

Comment thread packages/block-library/src/home-link/edit.js Outdated
}
/>
</ToolsPanelItem>
{ homeUrl && (
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

To be consistent with the other navigation blocks, we need to include the link to edit the front/home page before the "View".

We probably want to get all the data we need from the useSelect above, as there are more things we need to implement the edit. We likely want the front-page data, and we can also leverage onNavigateToEntityRecord so that we can navigate directly to edit the home/front-page. Here's a reference of how it's done in other places.

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.

Updated it with the Edit button and removed rel option and keeping it as it is

@prasadkarmalkar prasadkarmalkar requested a review from juanfra April 22, 2026 05:39
Copy link
Copy Markdown
Member

@juanfra juanfra left a comment

Choose a reason for hiding this comment

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

Thanks for the changes @prasadkarmalkar! Code looks good and it is testing well.

Can you please check the failing tests? It seems that we need to update the fixture.

@prasadkarmalkar prasadkarmalkar requested a review from juanfra May 4, 2026 12:49
@prasadkarmalkar
Copy link
Copy Markdown
Contributor Author

Hi @juanfra , Fixed the issue with failing tests

Copy link
Copy Markdown
Member

@juanfra juanfra left a comment

Choose a reason for hiding this comment

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

Thanks for working on this, @prasadkarmalkar! LGTM

@juanfra juanfra merged commit 82810d5 into WordPress:trunk May 14, 2026
40 checks passed
@github-actions github-actions Bot added this to the Gutenberg 23.3 milestone May 14, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

[Block] Home Link Affects the Home 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.

Home Link: Add missing controls

3 participants