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

[Tiny PR] Editor: Friendlier Offline Message #17961

Merged
merged 6 commits into from Nov 27, 2019
Merged

Conversation

@ellatrix
Copy link
Member

ellatrix commented Oct 15, 2019

Description

Currently the message displayed when saving fails if there is not network connection is inappropriate. We should catch fetch errors early and display a friendlier message.

I also removed the "Error Message" string, because it seems obvious that an error occurred if saving failed.

How has this been tested?

You can test in Chrome by using the Network tab and switching to offline.

Screenshots

Screenshot 2019-11-27 at 08 42 58

Before:

Screenshot 2019-10-15 at 21 59 27

Types of changes

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.
@ellatrix ellatrix force-pushed the try/friendly-offline-message branch from 107d5f1 to 944b8f8 Oct 15, 2019
@ellatrix ellatrix requested review from ajitbohra, gziolo and ntwb as code owners Oct 16, 2019
@ellatrix ellatrix changed the title Editor: Friendlier Offline Message [Tiny PR] Editor: Friendlier Offline Message Oct 16, 2019
@melchoyce

This comment has been minimized.

Copy link
Contributor

melchoyce commented Nov 26, 2019

Chatted about this in today's Design Team triage. Looks good to us! :shipit:

@youknowriad

This comment has been minimized.

Copy link
Contributor

youknowriad commented Nov 27, 2019

@melchoyce in case this wasn't clear, this uses Snackbars for all errors in the editor, not just the offline message. I just want to make sure we're aware of this before committing.

@ellatrix

This comment has been minimized.

Copy link
Member Author

ellatrix commented Nov 27, 2019

@youknowriad @melchoyce No, it only uses the snackbar for save related errors.

@ellatrix ellatrix force-pushed the try/friendly-offline-message branch from 113b949 to 7b35c18 Nov 27, 2019
@youknowriad

This comment has been minimized.

Copy link
Contributor

youknowriad commented Nov 27, 2019

yes, but not just "offline error"

@ellatrix

This comment has been minimized.

Copy link
Member Author

ellatrix commented Nov 27, 2019

Right. Just saying it's not changing all errors in the editor to use snackbar. :)

@ellatrix

This comment has been minimized.

Copy link
Member Author

ellatrix commented Nov 27, 2019

@youknowriad I've reverted the change to snackbar so we can move this forward quicker. :)

Copy link
Contributor

youknowriad left a comment

LGTM 👍

packages/api-fetch/src/index.js Show resolved Hide resolved
ellatrix added 2 commits Nov 27, 2019
@ellatrix ellatrix merged commit fa2d29f into master Nov 27, 2019
2 checks passed
2 checks passed
pull-request-automation
Details
Travis CI - Pull Request Build Passed
Details
@ellatrix ellatrix deleted the try/friendly-offline-message branch Nov 27, 2019
@youknowriad youknowriad added this to the Gutenberg 7.1 milestone Dec 9, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.