-
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
Redo zoom out expand empty entry content #66388
base: trunk
Are you sure you want to change the base?
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: -127 B (-0.01%) Total Size: 1.81 MB
ℹ️ View Unchanged
|
Thanks for the PR! I'll defer to other reviewers, Ella and Rich, on some of the nuance in this, make sure it's captured. For the moment, the thing I took a look at here was the issue that was merged as a bugfix, the margin collapsing that happens when "Show template" is off. That appears to be the same in trunk and this branch. Trunk: This branch: |
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 for the PR! I'll defer to other reviewers, Ella and Rich, on some of the nuance in this, make sure it's captured.
+1, I'm not too sure what the desired size was in the initial implementation, but to me this is testing pretty well!
The main difference I notice is that the canvas extends with this PR applied, but it doesn't go as high as it used to. I'm not sure if that's an issue, though, but just thought I'd mention it and share a couple screenshots:
Before (canvas extends but the content area doesn't) | After (canvas extends not as far, but the content area does extend) |
---|---|
a9acfc3
to
dc341bd
Compare
Thanks for highlighting this Andrew. I’d meant to myself. The height the canvas extends to in trunk Here’s this branch without the commit which reduces the canvas height expansion (can be tested with min-height-as-in-trunk.mp4Here’s this branch again with all commits. When the post isn’t empty and still shortish, then there’s a much more fluid transition. min-height-100vh.mp4 |
}}${ | ||
// Vertically expands the top-level post content block when zoomed out on an empty post. | ||
isEditedPostEmpty && isZoomedOut | ||
? '.entry-content {min-height: 33vh;}' |
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'm so sorry, but I don't like this. This is pseudo-expanding. :) Either it will push the footer beyond the fold, or it will never reach the bottom. The previous implementation expanded the content exactly to the bottom and pushed the footer down. Let's restore that
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.
Either it will push the footer beyond the fold,
In the interest of this being a functional feature providing a larger drop zone, that seems like the right thing to do. If the feature is meant purely as a visual effect I see your point. Though, I think that could be considered a shortcoming of the prior version.
or it will never reach the bottom.
The footer always reaches the bottom of the canvas in this PR, but I guess you are talking about the canvas reaching the bottom of the viewport. There is still expansion so this would seem to boil down to an argument about what looks better. Any expansion creates some layout shift and perhaps less shift is a slight advantage. On the other hand, full expansion makes the canvas look like it does when it has overflow yet I'm not sure that’s actually a good thing.
I'm so sorry
Please don’t be 🤗. Thank you for the feedback. For me, this is an improvement beyond just a restoration for two reasons:
- There is some expansion even for short viewports.
- This creates an improved zoom transition for non-empty posts with little to no overflow.
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 guess a middle ground could be to restore the full canvas and content expansion but only on empty posts.
What?
Expands the main content area when zoomed out. A redo of #59512.
Why?
Since #66041, the content area no longer expands when zooming out and makes it harder to hit the drop zone over an empty post.
How?
min-height
applied to thebody
when zoomed out and removes code that had been required for thatTesting Instructions
Screenshots or screencast
Trunk
trunk-no-expand-entry-content.mp4
This branch
redone-expand-entry-content.mp4