block-directory icon indicating copy to clipboard operation
block-directory copied to clipboard

Design Explorations: Error States

Open melchoyce opened this issue 5 years ago • 17 comments

We need to figure out all the potential errors and where there can be points of failure:

  • Block can’t install (your internet craps out, etc.)
  • What happens if you don’t have permissions
  • What else?

Related: #8

melchoyce avatar Jul 10 '19 19:07 melchoyce

If we can't preview the block for some reason, like a WordPress.org outage:

image

@ck3lee do you know if we have existing error strings for something like this? If not, we'll want to write one.

If the installation fails (but the block can preview):

image


Is there any other point in this flow that might produce an error?

melchoyce avatar Jul 10 '19 20:07 melchoyce

Permissions

If you don't have administrative permissions (or any custom permission that allows installation of new plugins), let's show the existing message for search results:

melchoyce avatar Jul 10 '19 20:07 melchoyce

In the last case, is it possible to show the blocks but greyed out, with a message saying: "Your current role doesn't allow installing new blocks. Contact your website's administrator."

boemedia avatar Jul 11 '19 06:07 boemedia

Maybe like:

image

melchoyce avatar Jul 11 '19 19:07 melchoyce

I like that as an option over having greyed out. I feel if we showed greyed out blocks it could taunt the user.

karmatosed avatar Jul 11 '19 19:07 karmatosed

do you know if we have existing error strings for something like this?

No, I couldn't find any existing error strings. I only found a couple that are generic and technical like The response is not a valid JSON response.. So, we might need to write them.

ck-lee avatar Jul 11 '19 22:07 ck-lee

LGTM! I think the two scenarios: "can't preview the block" and "installation fails" should capture all the unexpected failure points. I will drop a comment here if I can think of anything else.

ck-lee avatar Jul 11 '19 22:07 ck-lee

@melchoyce, I'm finding it very tricky to implement the actions in the notice bar. I am finding out more from the Gutenberg dev team now.

In case, it is a mission to add the actions like "Retry" or "Remove block", is it OK to remove them?

ck-lee avatar Jul 15 '19 03:07 ck-lee

As long as we can add them to a later roadmap and follow up, I think it's okay to drop from the v1.

melchoyce avatar Jul 15 '19 23:07 melchoyce

Thank you @melchoyce. Looks like we can do a "Retry". 😄

By default all "non-url actions" in the notice are rendered as buttons instead of links. I think it might be semantically more appropriate for a11y. But happy to re-style that as a link too.

Still a WIP. But here is what is looks like: screencast 2019-07-18 10-55-16

ck-lee avatar Jul 17 '19 23:07 ck-lee

And for user without permission to install a block.

This is how it looks like:

screencast 2019-07-18 10-57-12

ck-lee avatar Jul 17 '19 23:07 ck-lee

@melchoyce I wonder if the 'no blocks' could be an opportunity for a cute little graphic? Like a sad block. It's just an idea.

karmatosed avatar Jul 22 '19 17:07 karmatosed

Just checking back on this, could it be in v1 to explore a little visual variation beyond text?

karmatosed avatar Aug 20 '19 12:08 karmatosed

Should we explore this in Gutenberg core? We're hooking in to the core "no results" pattern.

melchoyce avatar Aug 20 '19 14:08 melchoyce

Sure, I will make issue for this also.

karmatosed avatar Aug 20 '19 17:08 karmatosed

Thanks, feel free to assign it to me.

melchoyce avatar Aug 20 '19 17:08 melchoyce

@melchoyce https://github.com/WordPress/gutenberg/issues/17122 is where started that issue.

karmatosed avatar Aug 21 '19 10:08 karmatosed