Automattic / wp-calypso

The JavaScript and API powered WordPress.com
https://developer.wordpress.com
GNU General Public License v2.0
12.42k stars 1.99k forks source link

People: Update error pattern on invite screen #32397

Open sixhours opened 5 years ago

sixhours commented 5 years ago
Screen_Shot_2019-03-06_at_11 23 19

Weird error pattern when trying to invite a user that already exists in that role.

Steps to reproduce:

  1. Have a user added to your site as any role
  2. Click invite to add a new user
  3. Type the email address of the existing user in the same role
  4. Note the bright red text, weird red error pop-up.
sixhours commented 5 years ago

It looks like the tooltip and error behavior is the TokenField component's default behavior, which is used elsewhere in Calypso. We should evaluate the impact of a component-level change on all areas.

Flagging Muriel for this as well. Tokens behave somewhat like Chips in Material guidelines. Perhaps we can use this as inspiration for a new error state design:

Screen Shot 2019-04-22 at 3 10 36 PM
scalarbane2 commented 5 years ago

Hello There! Here are the ideas I came up with for this screen Email invite error

At this point, Any email or username that has an error will be red, when the user hovers over that field, the error message comes up as shown in the second screen. On Hover

I also tried removing the boxes around the field and this is what it looks like Email invite error 2 On Hover

While on mobile, the message shows by default Email Invite Error mobile 1 Email Invite Error mobile

Let me know what you think: @cburton4 @drw158

cburton4 commented 5 years ago

Hey @scalarbane2,

These are great explorations. I agree with @sixhours that in this specific instance following the chip pattern would create the cleanest user experience for customers as the container around the content gives clear visual definition where one input ends and another begins.

For consistency the spacing between the text and the icon should remain the same regardless of the text length.

All components should align to an 8dp square grid for mobile, tablet, and desktop. Most measurements should use an increment of 8dp to determine spacing, but the 4dp grid can be used in some instances for tighter spacing.

Spacing

This is a visual example of what I mean when I say consistent spacing regardless of line length. Chips

Let me know if you have questions or want additional clarification. Looking forward to this update 🙌

scalarbane2 commented 5 years ago

Email invite error On Hover

@cburton4, I made the corrections you highlighted.

davewhitley commented 5 years ago

Also agree on following the Chip guidance from Material as close as possible. We should remove the hover tooltip in favor of placing the error message in the helper text (area below input field). You can see how it creates a not ideal experience for mobile with the tooltip floating above other text. We can also put the error icon next to the helper text.

Removing the hover tooltip I think would be best, but also the biggest change that might have the biggest unintended impact for areas that uses this component.

scalarbane2 commented 5 years ago

Hello! So I tried taking the hover tip to the top and also explored another type of solution.

On Hover

For this second one, I brought the error below the field. I personally don't feel right about this, but let me know what you think.

On Hover-1

sixhours commented 5 years ago

I'm guessing this is not on Muriel's radar right now since it's not specific to Gutenberg. That said, I think we have enough here to start reworking the component with small steps forward. Moving to Development To-Do's.

davewhitley commented 5 years ago

@scalarbane2 The second screenshot is currently the closest to Material. Our suggestion is to just follow that unless there is a good reason to deviate. I personally would deviate a little bit by adding an error icon to the left of the error text in this screenshot. That'll help color blind folks.

Screen Shot 2019-07-01 at 9 21 30 AM
github-actions[bot] commented 3 years ago

This issue is stale because it has been 180 days with no activity. You can keep the issue open by adding a comment. If you do, please provide additional context and explain why you’d like it to remain open. You can also close the issue yourself — if you do, please add a brief explanation and apply one of relevant issue close labels.

github-actions[bot] commented 3 years ago

This issue is stale because it has been 180 days with no activity. You can keep the issue open by adding a comment. If you do, please provide additional context and explain why you’d like it to remain open. You can also close the issue yourself — if you do, please add a brief explanation and apply one of relevant issue close labels.