New issue
Advanced search Search tips
Note: Color blocks (like or ) mean that a user may not be available. Tooltip shows the reason.

Issue 795031 link

Starred by 1 user

Issue metadata

Status: Fixed
Owner:
Closed: Jan 2018
Cc:
EstimatedDays: ----
NextAction: ----
OS: ----
Pri: 3
Type: Bug



Sign in to add a comment

[Autofill/Payment Request] In dropdown lists, show the hint at the top.

Project Member Reported by parastoog@chromium.org, Dec 14 2017

Issue description


Show the hint as the first item on the dropdown. This way, when the hint is clicked on, and we move on the items on the list, we see the items on the top first. This is specially important for the lists where the most relevant item is on the top.

 
Parastoo: Can you provide screenshots and/or video of before and after the patch to understand this change better?
Card Editor-new.mp4
3.7 MB View Download
Autofill-new.mp4
3.1 MB View Download
This is the older one, this one includes a previous change as well (crrev.com/c/826005). 
video.mp4
3.6 MB View Download
Cc: se...@chromium.org rouslan@chromium.org durgapandey@google.com
Looks fine to me, except we might want to distinguish hint from the options.

One more question: Can we hide 'Select' hint from the dropdown list but display it if no option is selected in collapse mode? This looks better to me. The user should have no reason to select hint from the dropdown list since the selection must be valid when clicking 'Done'.

cc'ed sebsg@ for any concern from the previous implementation and durgapandey@ for the new UI.
> The user should have no reason to select hint from the dropdown list since the selection must be valid when clicking 'Done'.

The user may want to select the hint in order to clear the dropdown value. This is valid for a non-required field. For example, county for Ireland is a non-required field that is a dropdown.

Comment 6 by se...@chromium.org, Jan 3 2018

That looks good to me. It would be great if there was some way to make the "Select" stand out (less) that the rest, but it's not necessary. 

Thanks for taking this on!
Cc: bklmn@chromium.org
For records: reply comment #5, why the user would like to clear existing data (instead of leave it or correct it)? we prefer more complete information?
Project Member

Comment 9 by bugdroid1@chromium.org, Jan 4 2018

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

commit 139821304bddcd45835b7d9d55f31f523ec1d644
Author: Parastoo Geranmayeh <parastoog@google.com>
Date: Thu Jan 04 00:53:05 2018

[Payment Request] Improve the Dropdown Adapters.

Show the hint as the first item on the dropdown.
This way, when the hint is clicked on, and we move
on the items on the list, we see the items on the top
first. This is specially important for the Billing Addresses
on the Card Editor, where the most relevant item is on the
top.


Refactor:

Use two different adapters for hinted adapters:
1. The ones with '+' icon for their last item,
2. The ones without an icon.

Tests were modified for the Card Editor, because now
the first item on the dropdown list is the "Select" option,
and not the first address.

Bug:  795031 
Change-Id: Ibccdd1256aa093e661890ea6ef11949c7d074766
Reviewed-on: https://chromium-review.googlesource.com/826005
Commit-Queue: Parastoo Geranmayeh <parastoog@google.com>
Reviewed-by: Ganggui Tang <gogerald@chromium.org>
Cr-Commit-Position: refs/heads/master@{#526874}
[modify] https://crrev.com/139821304bddcd45835b7d9d55f31f523ec1d644/chrome/android/java/src/org/chromium/chrome/browser/payments/CardEditor.java
[delete] https://crrev.com/92740fc4137bf725b50727b32b6462bca61d672d/chrome/android/java/src/org/chromium/chrome/browser/payments/ui/AddressDropDownAdapter.java
[modify] https://crrev.com/139821304bddcd45835b7d9d55f31f523ec1d644/chrome/android/java/src/org/chromium/chrome/browser/payments/ui/EditorDropdownField.java
[modify] https://crrev.com/139821304bddcd45835b7d9d55f31f523ec1d644/chrome/android/java/src/org/chromium/chrome/browser/payments/ui/EditorFieldModel.java
[add] https://crrev.com/139821304bddcd45835b7d9d55f31f523ec1d644/chrome/android/java/src/org/chromium/chrome/browser/payments/ui/HintedDropDownAdapter.java
[add] https://crrev.com/139821304bddcd45835b7d9d55f31f523ec1d644/chrome/android/java/src/org/chromium/chrome/browser/payments/ui/HintedDropDownAdapterWithPlusIcon.java
[modify] https://crrev.com/139821304bddcd45835b7d9d55f31f523ec1d644/chrome/android/java_sources.gni
[modify] https://crrev.com/139821304bddcd45835b7d9d55f31f523ec1d644/chrome/android/javatests/src/org/chromium/chrome/browser/payments/PaymentRequestBillingAddressTest.java
[modify] https://crrev.com/139821304bddcd45835b7d9d55f31f523ec1d644/chrome/android/javatests/src/org/chromium/chrome/browser/payments/PaymentRequestBillingAddressWithoutPhoneTest.java
[modify] https://crrev.com/139821304bddcd45835b7d9d55f31f523ec1d644/chrome/android/javatests/src/org/chromium/chrome/browser/payments/PaymentRequestCanMakePaymentMetricsTest.java
[modify] https://crrev.com/139821304bddcd45835b7d9d55f31f523ec1d644/chrome/android/javatests/src/org/chromium/chrome/browser/payments/PaymentRequestExpiredLocalCardTest.java
[modify] https://crrev.com/139821304bddcd45835b7d9d55f31f523ec1d644/chrome/android/javatests/src/org/chromium/chrome/browser/payments/PaymentRequestIncompleteServerCardTest.java
[modify] https://crrev.com/139821304bddcd45835b7d9d55f31f523ec1d644/chrome/android/javatests/src/org/chromium/chrome/browser/payments/PaymentRequestJourneyLoggerTest.java
[modify] https://crrev.com/139821304bddcd45835b7d9d55f31f523ec1d644/chrome/android/javatests/src/org/chromium/chrome/browser/payments/PaymentRequestNoShippingTest.java
[modify] https://crrev.com/139821304bddcd45835b7d9d55f31f523ec1d644/chrome/android/javatests/src/org/chromium/chrome/browser/payments/PaymentRequestTestCommon.java

Status: Fixed (was: Started)
Reply to comment #8: the information could be wrong, for instance. 

There were more UI changes required by PM, but the details were not cleared yet. More UI changes would come in the following CLs.

Sign in to add a comment