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

Editor: Fix and align collapsing logic for "Save Draft" and "Saved" button states. #17506

Merged
merged 1 commit into from
Sep 20, 2019

Conversation

epiqueras
Copy link
Contributor

Fixes #17461

Description

#10552 introduced an issue where the breakpoints used for switching between the icon and text forms of the save, saving, and saved state buttons were not aligned.

There was a CSS breakpoint that hid the save button when the screen was wider than 600 pixels, but JS code would switch to rendering the text form only when the screen was wider than 800 pixels. This resulted in no save button being shown between those two breakpoints.

This PR fixes that by removing the 600 pixels CSS breakpoint, because JS now handles toggling between icon and text modes, so it's no longer needed. It also switches that JS breakpoint to 600 pixels so that it is aligned with the saving and saved state button breakpoints.

This makes me think that we really should have e2e tests also running in smaller screen sizes.

How has this been tested?

It was verified that when the screen is wider than 600 pixels, the long form text version of the buttons is rendered, and when the screen is narrower than 600 pixels, the icon version is rendered.

Screenshots

Long Form Save

Screen Shot 2019-09-20 at 11 18 04 AM

Long Form Saved

Screen Shot 2019-09-20 at 11 17 59 AM

Short Form Save

Screen Shot 2019-09-20 at 11 18 19 AM

Short Form Saved

Screen Shot 2019-09-20 at 11 18 23 AM

Types of Changes

Bug Fix: Show missing save button in small screen sizes.

Checklist:

  • My code is tested.
  • My code follows the WordPress code style.
  • My code follows the accessibility standards.
  • My code has proper inline documentation.
  • I've included developer documentation if appropriate.

@epiqueras epiqueras added [Type] Bug An existing feature does not function as intended [Priority] High Used to indicate top priority items that need quick attention [Feature] Saving Related to saving functionality labels Sep 20, 2019
@epiqueras epiqueras added this to the Future milestone Sep 20, 2019
@epiqueras epiqueras requested a review from talldan as a code owner September 20, 2019 18:24
@epiqueras epiqueras self-assigned this Sep 20, 2019
Copy link
Member

@jorgefilipecosta jorgefilipecosta left a comment

Choose a reason for hiding this comment

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

LGTM 👍

@epiqueras epiqueras merged commit 95e769d into master Sep 20, 2019
@epiqueras epiqueras deleted the fix/save-button-collapsing-logic branch September 20, 2019 19:24
@youknowriad youknowriad modified the milestones: Future, Gutenberg 6.6 Sep 30, 2019
youknowriad pushed a commit that referenced this pull request Sep 30, 2019
youknowriad pushed a commit that referenced this pull request Sep 30, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Feature] Saving Related to saving functionality [Priority] High Used to indicate top priority items that need quick attention [Type] Bug An existing feature does not function as intended
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Save draft icon disappears on screens between 600 & 800px wide.
3 participants