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
Global styles revisions: refactor sticky pagination footer to use CSS #57294
Conversation
We can now delete the Slot Container, which is not used elsewhere.
Size Change: -151 B (0%) Total Size: 1.71 MB
ℹ️ View Unchanged
|
Just double-checking while testing, but it looks like the screengrabs in the PR description are the wrong way around? (I.e. the screengrab for Trunk is actually the screengrab for this PR?) |
Flaky tests detected in a0fa769. 🔍 Workflow run URL: https://github.com/WordPress/gutenberg/actions/runs/7283379749
|
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.
Tests well for me across Chrome, Safari, FF, and Edge!
Because the footer now sits within a scrollable container, the width of the pagination will be affected by the browser's scrollbar. See the screencasts below. So, one option is to forget about this PR.
I actually don't mind it. It only really affects the final page of the results, and only in browser windows short enough for a scrollbar to be present, so doesn't sound like a blocker to me. But I'm not a designer!
I think overall, going with a CSS approach keeps things simpler, which seems worthwhile to me in this case. LGTM ✨
Thanks @andrewserong! |
You are right. Good quality control! Fixed. |
What?
A follow up to:
Let's fix the pagination to the bottom of the sidebar panel using CSS.
We can now delete the Slot Container, which is not used elsewhere.
Warning
Because the footer now sits within a scrollable container, the width of the pagination will be affected by the browser's scrollbar. See the screencasts below. So, one option is to forget about this PR.
Why?
CSS.
How?
Making the footer sticky.
And relying on the convenient fact that
.edit-site-global-styles-sidebar__navigator-screen
has adisplay: flex
rule.Testing Instructions
Open up the site editor, ensuring you have plenty of Global styles revisions (more than 10 to enable pagination).
Check that the pagination:
Screenshots or screencast
Trunk
2023-12-21.13.34.50.mp4
This PR
2023-12-21.13.33.17.mp4