-
Notifications
You must be signed in to change notification settings - Fork 4.3k
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
Fix navigation error in library #51589
Conversation
@@ -3,6 +3,11 @@ | |||
} | |||
|
|||
.edit-site-sidebar-navigation-screen-navigation-menus__content { | |||
// Escapes the padding from the parent block, when showing the navigation items. | |||
// Grid units aren't accurate enough to use here. | |||
margin-left: -10px; |
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.
Sneaky!
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.
🤣
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.
Thank you for catching this! Happy to approve but please remove the CSS change 😄
Size Change: +5 B (0%) Total Size: 1.4 MB
ℹ️ View Unchanged
|
Flaky tests detected in f1db8aa. 🔍 Workflow run URL: https://github.com/WordPress/gutenberg/actions/runs/5291294142
|
* Navigation: Browse Mode: Fix misaligned ellipsis * use a more accurate value * update comment * revert unrelated change * Navigation in Browse Mode: Fix error in Library * revert CSS change
What?
When a navigation has a title, when we try to show that navigation in a template part in the sidebar, the editor crashes. We should be accessing the rendered property of the title, not the whole object.
Why?
To display the correct title, rather than a WSOD.
How?
Access the correct property of the title object, if it exists.
Testing Instructions
This only seems to happen on some themes, I'm not sure why.
This is the direct URL: /wp-admin/site-editor.php?postType=wp_template_part&postId=scruffian-themes%2Fconsole%2F%2Fheader
Testing Instructions for Keyboard
As above