Skip to content
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

Try: Show metaboxes peeking in even on tiny screens. #20262

Merged
merged 2 commits into from
Feb 21, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -50,11 +50,12 @@ describe.each( [
if ( ! isUnifiedToolbar ) {
it( 'should not scroll page', async () => {
while (
await page.evaluate(
() =>
wp.dom.getScrollContainer( document.activeElement )
.scrollTop === 0
)
await page.evaluate( () => {
const scrollable = wp.dom.getScrollContainer(
document.activeElement
);
return ! scrollable || scrollable.scrollTop === 0;
} )
) {
await page.keyboard.press( 'Enter' );
}
Expand Down
2 changes: 1 addition & 1 deletion packages/edit-post/src/components/visual-editor/style.scss
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@

.edit-post-visual-editor .block-editor-writing-flow__click-redirect {
// Allow the page to be scrolled with the last block in the middle.
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just wanted to document with a screenshot, that this is still the case:

Screenshot 2020-02-17 at 15 38 20

min-height: 50vh;
min-height: 40vh;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This feels like a random number used to give some space for meta boxes. I'm not sure if we can do better though.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We can, but not without a biggish refactor of the component. There's an argument that it was a bit random before as well — 50vh is half of the entire viewport. But it should have been half of the viewport, minus header, footer and optionally the adminbar if not fullscreen, with extra rules for mobile contexts.

width: 100%;
}

Expand Down