-
Notifications
You must be signed in to change notification settings - Fork 4.2k
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
Navigation Submenu Block: Make block name affect list view #58296
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
t-hamano
added
[Type] Bug
An existing feature does not function as intended
[Feature] List View
Menu item in the top toolbar to select blocks from a list of links.
[Block] Submenu
Affects the Submenu Block - for submenus in navigation
labels
Jan 26, 2024
Size Change: +39 B (0%) Total Size: 1.7 MB
ℹ️ View Unchanged
|
getdave
approved these changes
Jan 26, 2024
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.
LGTM
@getdave Thanks for the review! I found that in order to fully maintain the original logic, we needed to always return the label when there was no context. Now the E2E tests that are failing should also pass. |
3 tasks
westonruter
added a commit
that referenced
this pull request
Jan 26, 2024
…zy-hydration * origin/trunk: (47 commits) Interactivity API: Break up long hydration task in interactivity init (#58227) Add supports.interactivity to Query block (#58316) Font Library: Make notices more consistent (#58180) Fix Global styles text settings bleeding into placeholder component (#58303) Fix the position and size of the Options menu, (#57515) DataViews: Fix safari grid row height issue (#58302) Try a fix (#58282) Navigation Submenu Block: Make block name affect list view (#58296) Apply custom scroll style to fixed header block toolbar (#57444) Add support for transform and letter spacing controls in Global Styles > Typography > Elements (#58142) DataViews: Fix table view cell wrapper and BlockPreviews (#58062) Workflows: Add 'Technical Prototype' to the type-related labels list (#58163) Block Editor: Optimize the 'useBlockDisplayTitle' hook (#58250) Remove noahtallen from .wp-env codeowners (#58283) Global styles revisions: fix is-selected rules from affecting other areas of the editor (#58228) Try: Disable text selection for post content placeholder block. (#58169) Remove `template-only` mode from editor and edit-post packages (#57700) Refactored download/upload logic to support font faces with multiple src assets (#58216) Components: Expand theming support in COLORS (#58097) Implementing new UX for invoking rich text Link UI (#57986) ...
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
[Block] Submenu
Affects the Submenu Block - for submenus in navigation
[Feature] List View
Menu item in the top toolbar to select blocks from a list of links.
[Type] Bug
An existing feature does not function as intended
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Closes #57954
Same as #57955, #58160
What?
This PR fixes an issue where the block name is not reflected in the list view for the Navigation Submenu block.
Why?
If that block has opted into
__experimentLabel
, the list view will display the default block name unless we explicitly returnmetadata.name
when the context islist-view
.For a more detailed analysis, please refer to #57954.
How?
This block can be set with a label. According to the current specifications, if the label has text, that text is displayed in the list view, and if the label is empty, the block name (Submenu) is displayed in the list view.
Update this logic, similar to the Heading block, to the following logic:
Testing Instructions
Screenshots or screencast
694f628b12826703bd06b287cbd60178.mp4