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

Improve mobile inserter and post settings #1089

Merged
merged 5 commits into from
Jun 9, 2017
Merged

Conversation

jasmussen
Copy link
Contributor

This PR does a number of things:

  • It fixes an issue where floated images would overlap the modal sidebar on mobile
  • It makes the inserter completely full size and modal on mobile, this fixes Inserter: optimize for mobile #859
  • It hides the little mode switcher dropdown on mobile. We'll need to do more work on this one regardless
  • It let's you open the post settings sidebar on mobile, and not experience scroll bleed. Additionally the positioning is tuned, there was a gap before.

The only downside to this PR is that if you are on mobile, and are editing a long document, then open post settings, you lose your place (i.e. you are scrolled to the top). This is actually the same behavior that's on WordPress.com, and it's not really a regression from the current editor where you'd have to scroll to the bottom where the metaboxes live regardless.

But depending on how we deal with the inspector on mobile, we might want to separately address this positioning issue using JS. Potentially we could do that as part of fixing #656.

jasmussen added 4 commits June 9, 2017 10:25
This fixes scroll bleed when post settings is open on mobile. It also fixes the vertical position of it.

The downside here is that you lose your place in the editor when you open modal. This is similar behavior to WordPress.com, and it's an improvement on the old editor where you'd have to scroll to the metaboxes below the editor regardless. But it might be worth looking into fixing this with JS down the road.
@jasmussen jasmussen self-assigned this Jun 9, 2017
@@ -27,7 +32,27 @@

/* Visual and Text editor both */
.editor-layout.is-sidebar-opened .editor-layout__content {
margin-right: $sidebar-width;
margin-left: -200%;
float: left;
Copy link
Contributor

Choose a reason for hiding this comment

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

Mixed spaces/tabs indentation :)

@youknowriad
Copy link
Contributor

Works great aside a small gap at the bottom of the inserter
screen shot 2017-06-09 at 11 56 31

@jasmussen
Copy link
Contributor Author

The gap at the end is due to some sticky positioning combined with vw units. Basically when you're scrolled to the top, you won't see the gap. When you're scrolled a bit, the admin bar disappears and the editor bar sticks to the top, thus creating an adminbar sized gap.

I think this is best addressed separately, as part of #656.

Copy link
Contributor

@youknowriad youknowriad left a comment

Choose a reason for hiding this comment

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

LGTM 👍

@jasmussen
Copy link
Contributor Author

Thank you!

@jasmussen jasmussen merged commit 7940244 into master Jun 9, 2017
@jasmussen jasmussen deleted the update/mobile-inserter branch June 9, 2017 11:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Inserter: optimize for mobile
2 participants