-
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
Post Editor: omit meta boxes on “design” type posts #64990
Conversation
Size Change: -8 B (0%) Total Size: 1.77 MB
ℹ️ View Unchanged
|
@@ -209,21 +209,19 @@ function Layout( { | |||
showIconLabels: get( 'core', 'showIconLabels' ), | |||
isDistractionFree: get( 'core', 'distractionFree' ), | |||
showMetaBoxes: | |||
! DESIGN_POST_TYPES.includes( currentPostType ) && |
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.
This and the change at L351 are the effectual changes, the rest are merely due to refactoring for reuse of the return value from useNavigateToEntityRecord
instead of selecting the current post type again from the editor store.
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: @smerriman, @ericdye, @laurelfulford. 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. |
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.
Everything in this PR appears to be working as expected 👍
Other than the scenario you mentioned, there should be no other scenarios where meta boxes would appear unintentionally.
Thanks for the review and testing Aki! |
432ce19
to
6ee4b7b
Compare
Unlinked contributors: smerriman, ericdye, laurelfulford. Co-authored-by: t-hamano <[email protected]> Co-authored-by: carolinan <[email protected]> Co-authored-by: youknowriad <[email protected]> Co-authored-by: lgladdy <[email protected]> Co-authored-by: MadtownLems <[email protected]>
I just cherry-picked this PR to the wp/6.7 branch to get it included in the next release: 9e14c39 |
Unlinked contributors: smerriman, ericdye, laurelfulford. Co-authored-by: t-hamano <[email protected]> Co-authored-by: carolinan <[email protected]> Co-authored-by: youknowriad <[email protected]> Co-authored-by: lgladdy <[email protected]> Co-authored-by: MadtownLems <[email protected]>
This reverts commit fe5a931.
What?
A fix to avoid a post’s Meta Boxes from showing up when the editor switches to edit other entities like synced patterns.
Why?
A post’s Meta Boxes should not appear to be associated with other entities. This was made to fix #64914 yet also should resolve #63143.
How?
Adds a condition that the post type is not one of the design types ('wp_template', 'wp_template_part', 'wp_block', 'wp_navigation') to the logic for rendering the Meta Boxes.
Testing Instructions
The linked issue is specifically about editing a synced pattern from a post but the same applies for similar scenarios. These instructions cover all relevant ones I can think of.
Testing Instructions for Keyboard
Screenshots or screencast