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

Publish button not visible for existing Gutenberg posts on Mobile #5987

Closed
crunnells opened this issue Apr 4, 2018 · 2 comments
Closed

Publish button not visible for existing Gutenberg posts on Mobile #5987

crunnells opened this issue Apr 4, 2018 · 2 comments
Labels
Mobile Web Viewport sizes for mobile and tablet devices

Comments

@crunnells
Copy link

crunnells commented Apr 4, 2018

Issue Overview

On Gutenberg 2.5, if you edit an existing Gutenberg post on a mobile device (or in my case, Firefox with Responsive Design Mode enabled, viewport 320px wide) the only button visible up top is a "Switch to Draft" button (which doesn't seem to work).

Steps to Reproduce

  1. Install Gutenberg 2.5
  2. On a mobile phone, write a new post, click Publish.
  3. Navigate back to All Posts, then edit the post you just created
  4. Notice the "Publish" button is missing from the header

Expected Behavior

Publish/Update button should be available on mobile for all posts, not just new.

Possible Solution

There's some CSS above that hides the buttons unless the viewport is > 600px. Ideally, editing existing posts should match editing new posts (with the exception that "Publish" is changed to "Update"). This is the cause of the issue, but probably not related to the fix.

Screenshots / Video

screen shot 2018-04-04 at 11 54 09 am

@mtias mtias added the Mobile Web Viewport sizes for mobile and tablet devices label Apr 5, 2018
@rahulsprajapati
Copy link
Contributor

Here is some background of this issue, needed to be considered while adding a fix:

This button removed because of space issue in mobile to support better ui in all languages. But doing so I think now we don't have option to update post in mobile view.
Issue: #4231
PR: #5329
https://github.com/WordPress/gutenberg/pull/5329/files#diff-b983d291fe6562507995c8a9288eedbeR30

I think we can keep Preview button hidden but show the Update button and that should work for us. But we need to provide some option to see the preview of updated content as we have it in desktop view.

.editor-post-switch-to-draft + .editor-post-preview,
.editor-post-switch-to-draft + .editor-post-preview + .editor-post-publish-button {
display: none;
@include break-small {
display: inline-block;
}
}

We just need to remove this css for publish/update button, but I think even after this we might face issue in other languages. Need some better solution.

Remove L31:

.editor-post-switch-to-draft + .editor-post-preview + .editor-post-publish-button

@jasmussen
Copy link
Contributor

Pretty sure this issue was fixed recently when an Update button was unhidden on mobile (the fact that it was hidden was the bug). Closing as fixed, but please chime in if it wasn't, and we'll reopen.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Mobile Web Viewport sizes for mobile and tablet devices
Projects
None yet
Development

No branches or pull requests

4 participants