-
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: Show Meta Boxes at the bottom of the screen regardless of the current rendering mode #66508
Fix: Show Meta Boxes at the bottom of the screen regardless of the current rendering mode #66508
Conversation
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 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: +15 B (0%) Total Size: 1.81 MB
ℹ️ View Unchanged
|
4bea2ca
to
c5f4345
Compare
This was introduced in #65885. |
@Mamaduka I think the PR you share is unrelated. I'm not talking about the additional padding appender at the bottom but rather the metaboxes area which was refactored in the 6.7 cycle but already in 6.6 using the preview template hid the metaboxes. So this is not a new regression. |
@@ -426,7 +428,7 @@ function Layout( { | |||
isDistractionFree: get( 'core', 'distractionFree' ), | |||
showMetaBoxes: | |||
! DESIGN_POST_TYPES.includes( currentPostType ) && | |||
isRenderingPostOnly, | |||
( isRenderingPostOnly || isRenderingTemplateLocked ), |
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.
Can you refresh my memory here? Do we have rendering modes besides post-only
and template-locked
?
If not, then I think we can remove rendering mode checks from this condition.
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.
I am not a 100% certain but I thought that the "edit template" portion in the post editor technically uses template-only
as the rendering mode 🤔
@youknowriad may be able to help clarify this though :)
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.
Judging from the comment of the setRenderingMode
action, there should be no modes other than post-only
and template-locked
. The template-only
mode has been removed in #57700. I've tried searching Gutenberg in general for getRenderingMode()
or setRenderingMode(
, but I can't find any other modes.
Therefore, I think this check should be removable, but I will ping @stokesman to double check.
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.
Removing it looks safe to me. I quickly checked with "edit template" and its rendering mode is "post-only". The condition that matters in that case is the post type being "wp_template" so it will still not show the meta boxes.
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.
Thanks all! I just updated the code to remove the check entirely 👍 :)
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.
I tested and the meta boxes show with "show template" enabled. This makes sense to me. Maybe the title of this PR can be updated since the rendering mode is no longer factored in.
template-locked
rendering mode58c58d0
to
352983e
Compare
@youknowriad @ndiego @annezazu Wondering if we could consider this a fix we want to get into 6.7.1? With the new meta box styling here and more usage of the template preview this issue is much more prevalent in 6.7 than it was before 🤔 |
Let's give it a try. I added the flag. Not sure who's going to be leading that release though |
Agreed with Riad. Thanks for flagging this, Fabian! |
…rrent rendering mode (WordPress#66508) Co-authored-by: fabiankaegy <[email protected]> Co-authored-by: Mamaduka <[email protected]> Co-authored-by: t-hamano <[email protected]> Co-authored-by: stokesman <[email protected]>
Backported to |
What?
allow metaboxes to remain visible in
template-locked
rendering mode (closing #66507)Why?
Because in the
template-locked
rendering mode you are actively still editing a post. So any metaboxes should still be available. They should only disappear in thetemplate-only
mode.How?
By adding an additional check if the mode is either
post-only
ortemplate-locked
Testing Instructions
template-locked
mode