New issue
Advanced search Search tips

Issue 874094 link

Starred by 1 user

Issue metadata

Status: Assigned
Owner:
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Linux , Android , Windows , iOS , Chrome , Mac , Fuchsia
Pri: 3
Type: Bug



Sign in to add a comment

Add experiments support for the Autoview preview style

Project Member Reported by ftirelo@chromium.org, Aug 14

Issue description

We want to allow experiments with different preview styles for the Autofill dropdown. Today the style is hardcoded in https://chromium.googlesource.com/chromium/src/+/a1791069ef6ca5ad95aae5933193bbdd2f69123f/third_party/blink/renderer/core/css/html.css#558, and we will need to create a feature controlled by a flag to allow colors to be parameterized.

We may eventually extend that to experiment with animations and other field decorations. For the moment, we want support for the following alternatives shown in the attached image.
 
image.png
63.2 KB View Download
Project Member

Comment 1 by bugdroid1@chromium.org, Aug 15

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

commit 9b423c7bae3bee3ec8ea75fc623caa11279f7f20
Author: Fabio Tirelo <ftirelo@chromium.org>
Date: Wed Aug 15 14:32:18 2018

[Autofill Styles] Add feature and flag to allow style selection

This CL:
 - Creates a new feature/flag to allow customization of the text
   and background colors when a field shows an Autofill suggestion;
   Each color is defined by its own parameter in the study.
 - Moves the previous style from html.css and build the CSS rules
   instead in LayoutTheme::ExtraDefaultStyleSheet using either the
   colors defined by the parameters (when the feature is enabled)
   or the current preview colors as a fallback (default and
   invalid color cases).

Variations provided for the new chrome://flags entry correspond to
the experiment palletes proposed by UX (see details on the bug).

One alternative that I considered:
 - Define a single param in the study for the experiment group
   (so flag variations and param values would have a 1:1
   correspondence);
 - Define a separate CSS file for each variation, similar to what's
   currently done LayoutThemeDefault::ExtraDefaultStyleSheet.

That alternative would be less flexible, but it would be more
similar cases handled in blink (in fact, I couldn't find any place
where the CSS is built in the code). Please let me know if you think
that alternative should be used instead.

Bug: 874094
Change-Id: I257c72b9a3db32a2945ec4048e46b23e4b5dd2be
Reviewed-on: https://chromium-review.googlesource.com/1174710
Commit-Queue: Fabio Tirelo <ftirelo@chromium.org>
Reviewed-by: Kent Tamura <tkent@chromium.org>
Cr-Commit-Position: refs/heads/master@{#583243}
[modify] https://crrev.com/9b423c7bae3bee3ec8ea75fc623caa11279f7f20/chrome/browser/about_flags.cc
[modify] https://crrev.com/9b423c7bae3bee3ec8ea75fc623caa11279f7f20/chrome/browser/flag_descriptions.cc
[modify] https://crrev.com/9b423c7bae3bee3ec8ea75fc623caa11279f7f20/chrome/browser/flag_descriptions.h
[modify] https://crrev.com/9b423c7bae3bee3ec8ea75fc623caa11279f7f20/third_party/blink/common/features.cc
[modify] https://crrev.com/9b423c7bae3bee3ec8ea75fc623caa11279f7f20/third_party/blink/public/common/features.h
[modify] https://crrev.com/9b423c7bae3bee3ec8ea75fc623caa11279f7f20/third_party/blink/renderer/core/css/html.css
[modify] https://crrev.com/9b423c7bae3bee3ec8ea75fc623caa11279f7f20/third_party/blink/renderer/core/layout/layout_theme.cc
[modify] https://crrev.com/9b423c7bae3bee3ec8ea75fc623caa11279f7f20/tools/metrics/histograms/enums.xml

Status: Fixed (was: Assigned)
This is done.

To test it:
 - Have at least on address in chrome://settings/autofill
 - Enable one of the options in chrome://flags#autofill-preview-style (for example, you can choose "Enabled (GoogleBlue900 on GoogleBlue050)" and restart the browser
 - Navigate to https://dump-truck.appspot.com/usecase-address_and_cc_on_same_page/address_and_cc.html
 - At the top of the page, click on field "Name"
 - When the Autofill dropdown is shown hover on a suggestion

The suggestion preview on the input field will show up as dark blue on a light blue background, as opposed to black on a yellow blackground as we do today.
Project Member

Comment 3 by bugdroid1@chromium.org, Aug 16

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

commit 685952aa5199fdec0a75b2e0bc8f1b35340beb49
Author: Fabio Tirelo <ftirelo@chromium.org>
Date: Thu Aug 16 22:14:54 2018

[Autofill Styles] Fix typo in flag selection color

Bug: 874094
Change-Id: I246b33a817bb87357acb9b9426add41323cb2711
Reviewed-on: https://chromium-review.googlesource.com/1178748
Reviewed-by: Tommy Martino <tmartino@chromium.org>
Commit-Queue: Fabio Tirelo <ftirelo@chromium.org>
Cr-Commit-Position: refs/heads/master@{#583848}
[modify] https://crrev.com/685952aa5199fdec0a75b2e0bc8f1b35340beb49/chrome/browser/about_flags.cc

Project Member

Comment 4 by bugdroid1@chromium.org, Sep 28

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

commit 0ae16d2d5e2b1c23d872a44a0b79be598591ca46
Author: Fabio Tirelo <ftirelo@chromium.org>
Date: Fri Sep 28 19:31:49 2018

Add field trial config for AutofillPreviewStyleExperiment

Bug: 874094
Change-Id: Id80332c84f574b70ba0b0e50f54aebb681276082
Reviewed-on: https://chromium-review.googlesource.com/1251229
Reviewed-by: Jesse Doherty <jwd@chromium.org>
Commit-Queue: Fabio Tirelo <ftirelo@chromium.org>
Cr-Commit-Position: refs/heads/master@{#595179}
[modify] https://crrev.com/0ae16d2d5e2b1c23d872a44a0b79be598591ca46/testing/variations/fieldtrial_testing_config.json

Status: Assigned (was: Fixed)
We need more information in order for test team to test this feature, 
also we don't have access to chrome://settings/autofill.
shbarezer@: What information do you need? Which platform are you testing on? On Desktop, you can access chrome://settings/autofill by typing the URL on the omnibox.

On mobile, you can access from Settings > Addresses and more.
I am verifying the fix on iOS on 71.0.3568.0 Canary, and the missing information  is the chrome://flags mentioned in comment #2: #autofill-preview-style - I don't see that on my iOS device. 

Sign in to add a comment