-
Notifications
You must be signed in to change notification settings - Fork 4.5k
Site Editor Sidebar: Fix header scrolling in mobile layout #69413
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
Conversation
Size Change: -43 B (0%) Total Size: 1.84 MB
ℹ️ View Unchanged
|
height: calc(100% - #{$header-height}); | ||
height: 100%; |
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.
If we do not change this to 100%, there will be space at the bottom of the page screen:
Originally, this height was added to prevent unintended scrolling in the mobile layout.
However, now that the mobile layout matches its desktop counterpart, it's no longer necessary to subtract the header height. See #64844 (review)
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. |
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.
@stokesman Thanks for the review! |
Co-authored-by: t-hamano <wildworks@git.wordpress.org> Co-authored-by: stokesman <presstoke@git.wordpress.org> Co-authored-by: Mayank-Tripathi32 <mayanktripathi32@git.wordpress.org>
I just cherry-picked this PR to the wp/6.8 branch to get it included in the next release: 1c7d109 |
…#69413) Co-authored-by: t-hamano <wildworks@git.wordpress.org> Co-authored-by: stokesman <presstoke@git.wordpress.org> Co-authored-by: Mayank-Tripathi32 <mayanktripathi32@git.wordpress.org>
What?
Closes #69328
This PR separates the
SidebarContent
component from the context provider.This will bring the sidebar HTML structure closer to consistency between desktop and mobile. As a result, this should ideally resolve the issue reported in #69328.
How?
Separate the context provider from
SidebarContent
and extract it into a standalone component. This results in the following HTML structure in the mobile layout:This structure closely matches the desktop one:
Note
This is a fix for 6.8. In the future the context may not be needed at all. See #69172
Testing Instructions
Screenshots or screencast
GIFs to confirm that #69328 has been fixed: