-
Notifications
You must be signed in to change notification settings - Fork 4.7k
BlockBreadcrumb: Show custom block name #73690
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: trunk
Are you sure you want to change the base?
Conversation
4a93f96 to
ba93fa3
Compare
ba93fa3 to
a88f153
Compare
|
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 Unlinked AccountsThe following contributors have not linked their GitHub and WordPress.org accounts: @landwire. Contributors, please read how to link your accounts to ensure your work is properly credited in WordPress releases. If you're merging code through a pull request on GitHub, copy and paste the following into the bottom of the merge commit message. To understand the WordPress project's expectations around crediting contributors, please review the Contributor Attribution page in the Core Handbook. |
|
Size Change: +60 B (0%) Total Size: 2.58 MB
ℹ️ View Unchanged
|
|
This resonates insofar as the breadcrumbs have a direct relationship with the list view, and should be the same. Good PR. The one concern is that the crumb can be long if you insert patterns with long titles, such as "Two overlapping pictures and heading", but there should be room. |
The title is truncated at 35 chars - https://github.com/WordPress/gutenberg/pull/73690/files#diff-0b9cce589213e49c27e3109f5f5c4ae4347c239ef1ee833960a6f25b34735d45R118-R122. IMO, the same problem would apply to blocks with long titles. |
|
Flaky tests detected in 7772d3d. 🔍 Workflow run URL: https://github.com/WordPress/gutenberg/actions/runs/19889800150
|
Mamaduka
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me code-wise; I'll defer to the design team for final approval.

Fixes #56523 (I think)
See: #56523 (comment)
What? Why?
I think breadcrumbs should display custom block names just like the List View.
How?
For breadcrumbs, I add a dedicated
breadcrumbcontext. Thebreadcrumbcontext respects custom name, just like thelist-viewcontext, but with a few differences in some blocks:list-view: Custom name or summary contentbreadcrumb: Custom namelist-view: Custom name or contentbreadcrumb: Custom nameBreadcrumbs don't have block icons, so I avoided using content for breadcrumbs because it's hard to tell what a block is just from its content.
Testing Instructions
Use the following markup to confirm various blocks with custom names and contents.
Screenshots or screencast
Before
After