Repository navigation
Update icons for off-canvas navigation - #47337
Conversation
|
Size Change: -121 B (0%) Total Size: 1.33 MB
ℹ️ View Unchanged
|
|
Flaky tests detected in ef85348. 🔍 Workflow run URL: https://github.com/WordPress/gutenberg/actions/runs/3982718753
|
|
I dig it! Thank you! I would note, however, that IMO we don't need two icons here: The back icon and the block icon, it just adds noise. I think we can do with just the back button. It will essentially be replacing the block icon when on a subpage. Doesn't have to be part of this PR, it's some feedback I think I've left in other threads as well, but in case it's an easy fix :) |
Yes, let's follow-up with not showing the submenu block's icon when in the context of the navigation block. And just use the < icon, which takes you back to the list. |
@jasmussen Do you think all nested blocks in the off-canvas view should work this way? |
No, for the time being this should be reserved for the navigation inspector, where I imagine that the inspector itself will be animated a bit like how Global Styles animates its inspector. That makes it feel more like a single block, and conceptually I think we use that same interface for contentOnly locked blocks as well: If the interface proves itself well for those two cases, I think we could look at it again! |
| if ( context === 'list-view' ) { | ||
| return page; |
There was a problem hiding this comment.
Just noting this will apply in all list views not just the Nav offcanvas. Just being sure that's your intention.
There was a problem hiding this comment.
Just discovered this peculiarity. Why would it always be a page, even when the submenu points to an external link?
The original issue said:
This feels a little awkward because it breaks the convention where the icon communicates the relationship between the menu item and the destination entity.
I think this PR broke that relationship even more.
|
Thanks for taking care of this! |



What?
Polishes the Page List, Page List Item, and Navigation Submenu blocks icons for off-canvas navigation. The Navigation Submenu icon is only changed within the list-view context.
Closes #47283
Closes #47267
Why?
Cleaning up the off-canvas navigation icons.
Testing Instructions
Screenshot
Before:
After:
Standalone submenu block still uses its existing icon: