New issue
Advanced search Search tips

Issue 650875 link

Starred by 1 user

Issue metadata

Status: Fixed
Owner:
Closed: Oct 2016
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Linux , Windows , Chrome , Mac
Pri: 2
Type: Bug

Blocked on:
issue 649815

Blocking:
issue 649367



Sign in to add a comment

Harmony - textfield "red" state incorrect

Project Member Reported by shrike@chromium.org, Sep 27 2016

Issue description

Version: 55.0.2873.4
OS: 10.11

What steps will reproduce the problem?
(1) Click the bookmark star
(2) Click Edit
(3) Clear the text from the URL field

What is the expected output?
The URL textfield should show a red focus ring, per the Harmony spec.

What do you see instead?
The URL textfield has a blue "focus ring" (really, blue stroked border), and a red fill.

The textfields need to draw the correct (revised) focus ring before this bug can be fixed.

 

Comment 1 by shrike@chromium.org, Sep 27 2016

Screen Shot 2016-09-27 at 4.14.07 PM.png
9.9 KB View Download
Labels: -Pri-3 M-56 Pri-2
Owner: shrike@chromium.org
Labels: Proj-HarmonyControls
Cc: est...@chromium.org
Owner: bettes@chromium.org
estade@ - can you also look at this one?

bettes@ - According to the spec a textfield in the error state should draw a red focus ring - so far so good. But when the user switches to a different textfield, the textfield with the error state will no longer show a focus ring. If we want the textfield to continue to indicate its error state, we have to do it some other way when the textfield is not focused. Perhaps that is the time for stroking in red?
unless I'm misreading the spec or the mocks are out of date, the error state is the same thing as the border, just red, i.e. it's not a focus ring. So it shouldn't be an issue to have the red border when the textfield isn't focused. That said, I don't see any mocks for what it should look like when focused AND in an error state. Does the border disappear (as in the non-error case) or does it persist so that we have a red border and a blue halo at the same time?
Perhaps I am reading too much into the spec.

Previously focus was indicated by a blue stroke of the border, and error by a red stroke. Now that textfields indicate focus with a blue ring I assumed the error state would be a red ring.

So questions for bettes@:

Should a focused textfield in the error state show a red focus ring? If so, what should it show to indicate the error state when it's not focused (if anything)?

or

Should a focused textfield in the error state show a blue focus ring and a red stroke? If so, does that red stroke continue to appear when the textfield is not focused?


Cc: -est...@chromium.org
Owner: est...@chromium.org
>> Should a focused textfield in the error state show a red focus ring? If so, what should it show to indicate the error state when it's not focused (if anything)?

What do we do on CrOS today? 


as far as I know there are two places where we have a textfield in error state, and they each do it their own way :) One is the bookmark url field as pictured above. The other is a field asking for CVC in the autofill/google wallet credit card dialog. That one just turns the border red (like your current mocks).

If there are others somewhere in Chrome I'm unaware of them.
Cc: est...@chromium.org
Owner: bettes@chromium.org
Cc: -est...@chromium.org bettes@chromium.org
Owner: est...@chromium.org
Thanks for the clarification. Let's consolidate error styles with the same 2pt focus ring, colored with #DB4437 at 0.4a

https://folio.googleplex.com/chrome-ux-specs-and-sources/Chrome%20browser%20(MD)/Secondary%20UI%20Previews%20and%20specs%20(exports)/Spec#%2FSPEC-secondary-UI-06-dropdown-textfields.png%3Fz=width
Screen Shot 2016-10-10 at 2.49.58 PM.png
21.8 KB View Download
Hmmm, this seems a bit confusing, because now you can't tell if the textfield is invalid and focused, or invalid and unfocused. (I guess you can sorta tell it's focused based on the presence of the cursor.) This is not a problem the current non-harmony implementation suffers from because the blue border and the red background can coexist.

When it's both invalid and focused, is the color red or blue?
Just talked to bettes@ about this. The plan is the following for the error state:

When focused: soft red focus ring
When not-focused: red border stroke

Project Member

Comment 13 by bugdroid1@chromium.org, Oct 14 2016

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/f874b12b12f0778a453b5cd37cfe2f29d3df1c6e

commit f874b12b12f0778a453b5cd37cfe2f29d3df1c6e
Author: estade <estade@chromium.org>
Date: Fri Oct 14 16:03:02 2016

Update appearance of invalid textfields in Harmony.

BUG= 650875 

Review-Url: https://codereview.chromium.org/2406363003
Cr-Commit-Position: refs/heads/master@{#425341}

[modify] https://crrev.com/f874b12b12f0778a453b5cd37cfe2f29d3df1c6e/chrome/browser/ui/BUILD.gn
[modify] https://crrev.com/f874b12b12f0778a453b5cd37cfe2f29d3df1c6e/chrome/browser/ui/views/autofill/card_unmask_prompt_views.cc
[modify] https://crrev.com/f874b12b12f0778a453b5cd37cfe2f29d3df1c6e/chrome/browser/ui/views/autofill/card_unmask_prompt_views.h
[delete] https://crrev.com/c5f8cecf5b533e47ed882e71aeacd63c966e3622/chrome/browser/ui/views/autofill/decorated_textfield.cc
[delete] https://crrev.com/c5f8cecf5b533e47ed882e71aeacd63c966e3622/chrome/browser/ui/views/autofill/decorated_textfield.h
[modify] https://crrev.com/f874b12b12f0778a453b5cd37cfe2f29d3df1c6e/chrome/browser/ui/views/bookmarks/bookmark_editor_view.cc
[modify] https://crrev.com/f874b12b12f0778a453b5cd37cfe2f29d3df1c6e/ui/views/controls/combobox/combobox.cc
[modify] https://crrev.com/f874b12b12f0778a453b5cd37cfe2f29d3df1c6e/ui/views/controls/focus_ring.cc
[modify] https://crrev.com/f874b12b12f0778a453b5cd37cfe2f29d3df1c6e/ui/views/controls/focus_ring.h
[modify] https://crrev.com/f874b12b12f0778a453b5cd37cfe2f29d3df1c6e/ui/views/controls/focusable_border.cc
[modify] https://crrev.com/f874b12b12f0778a453b5cd37cfe2f29d3df1c6e/ui/views/controls/focusable_border.h
[modify] https://crrev.com/f874b12b12f0778a453b5cd37cfe2f29d3df1c6e/ui/views/controls/textfield/textfield.cc
[modify] https://crrev.com/f874b12b12f0778a453b5cd37cfe2f29d3df1c6e/ui/views/controls/textfield/textfield.h
[modify] https://crrev.com/f874b12b12f0778a453b5cd37cfe2f29d3df1c6e/ui/views/examples/textfield_example.cc
[modify] https://crrev.com/f874b12b12f0778a453b5cd37cfe2f29d3df1c6e/ui/views/examples/textfield_example.h

Status: Fixed (was: Assigned)

Sign in to add a comment