Skip to content

Navigation Link, Navigation Submenu: Hide title UI controls while keeping attribute support#70234

Merged
t-hamano merged 2 commits into
WordPress:trunkfrom
Infinite-Null:enhancement/navigation-title-code-editor-only
May 29, 2025
Merged

Navigation Link, Navigation Submenu: Hide title UI controls while keeping attribute support#70234
t-hamano merged 2 commits into
WordPress:trunkfrom
Infinite-Null:enhancement/navigation-title-code-editor-only

Conversation

@Infinite-Null

@Infinite-Null Infinite-Null commented May 28, 2025

Copy link
Copy Markdown
Contributor

What?

This PR removes the title attribute input field from the Navigation Link and Navigation Submenu block UI while maintaining full programmatic support. Users can no longer set the title through the WordPress editor interface, but the attribute remains functional when set via code editor, programmatic block creation, or existing content.
Part of: #69663

How?

  • Removed title input field from Navigation Link block inspector
  • Removed title input field from Navigation Submenu block inspector
  • Title attribute no longer appears in the visual editing interface

✅ title attribute still defined in block.json schemas
✅ Server-side rendering continues to output the title when present

Testing:

  1. Add Navigation Link block
  2. Verify UI no longer shows title input fields
  3. Add following block markup via code editor:
<!-- wp:navigation-link {"label":"Example","url":"https://example.com","title":"Tooltip text"} /-->
  1. Save and look in frontend the block added promatically via code editor have title attribute

Screencast:

Screen.Recording.2025-05-29.at.11.47.05.AM.mov

@t-hamano t-hamano added Backwards Compatibility Issues or PRs that impact backwards compatability [Block] Navigation Link Affects the Navigation Link Block [Type] Enhancement A suggestion for improvement. labels May 29, 2025
@Infinite-Null Infinite-Null marked this pull request as ready for review May 29, 2025 06:24
@github-actions

github-actions Bot commented May 29, 2025

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: Infinite-Null <ankitkumarshah@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.

@Infinite-Null

Copy link
Copy Markdown
Contributor Author

Hi @t-hamano, I have opened the PR with the solution. Can you please review it at your convenience.
Thank you!

@t-hamano t-hamano left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

LGTM👍

@t-hamano t-hamano added the props-bot Manually triggers Props Bot to ensure the list of props is up to date. label May 29, 2025
@github-actions github-actions Bot removed the props-bot Manually triggers Props Bot to ensure the list of props is up to date. label May 29, 2025
@t-hamano t-hamano merged commit 952cd4c into WordPress:trunk May 29, 2025
76 of 78 checks passed
@github-actions github-actions Bot added this to the Gutenberg 21.0 milestone May 29, 2025
@Mamaduka

Copy link
Copy Markdown
Member

Note for the future: This is a follow-up to #69689.

chriszarate pushed a commit to chriszarate/gutenberg that referenced this pull request Jul 1, 2025
…ping attribute support (WordPress#70234)

* Revert the changes from PR WordPress#69689

* Remove title attribute from Controls in Navigation Link and Submenu blocks

Co-authored-by: Infinite-Null <ankitkumarshah@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

Backwards Compatibility Issues or PRs that impact backwards compatability [Block] Navigation Link Affects the Navigation Link Block [Type] Enhancement A suggestion for improvement.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants