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

Issue 629689 link

Starred by 4 users

Issue metadata

Status: Fixed
Owner:
Last visit > 30 days ago
Closed: Apr 2017
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Linux , Android , Windows , Chrome , Mac
Pri: 2
Type: Feature

Blocking:
issue 604105
issue 651633


Show other hotlists

Hotlists containing this issue:
web-bluetooth


Sign in to add a comment

Add signal strength indicator to WebBluetooth chooser

Project Member Reported by juncai@chromium.org, Jul 19 2016

Issue description

It would be nice to add signal strength indicator (or possibly sort the Bluetooth devices in the chooser according to its signal strength) to the WebBluetooth chooser.
 

Comment 1 by ortuno@chromium.org, Jul 19 2016

fyi: we don't have support for tx power or rssi on macOS or Android.
Cc: rolfe@chromium.org bettes@chromium.org
screenshot for signal strength indicator example in the chooser on non-Mac.
signal_strength_indicator.png
89.0 KB View Download

Comment 3 by rolfe@chromium.org, Aug 10 2016

Thanks. For some reason I thought strength indicator wasn't possible quite yet. It's just non-Mac where we can do it, and do it now?

Will defer to bettes@ on the visuals. I like that this matches CrOS wi-fi connection. Is that where you got the icons? Will it work just like CrOS (dynamically animating connection state?)

Were you also envisioning this showing up in conjunction with "Connected" on the right side?

Comment 4 by juncai@chromium.org, Aug 10 2016

Status: Started (was: Assigned)

Comment 5 by juncai@chromium.org, Aug 10 2016

I think we can also do it on Mac and on Android.

Yes, I used the CrOS icons at:
https://cs.chromium.org/chromium/src/ui/chromeos/resources/default_100_percent/network/statusbar_network_bars_dark.png?cl=GROK

I think the icon is static, and it has sub-icons for different strength levels, and we need to get part of the image according to level.

There are material design version:
https://cs.chromium.org/chromium/src/ui/chromeos/network/network_icon.cc?cl=GROK&gsn=GetImageForNetwork&rcl=1470626560&l=443

For simplicity, I just used the static icon for now.

For the "Connected/Paired", we are thinking to display it in a new line in the same row entry, such as:
--------------------------------
|icon|  device_name_1
        Connected
--------------------------------
|icon|  device_name_2
        Connected
--------------------------------
        device_name_3
        Paired
--------------------------------

Comment 6 by rolfe@chromium.org, Aug 11 2016

OK - I thought there was some issue with having a second line?
https://bugs.chromium.org/p/chromium/issues/detail?id=543466#c23

Comment 7 by juncai@chromium.org, Aug 11 2016

ah, yes, we were discussing some possible ways to display the "Connected/Paired" status along with the device name. And it seems that using multiple lines is better than using some extra columns. For the implementation, we may start from Mac and Android, since these platforms already have support for multiple lines for one row entry in the table/list view. For non-Mac desktop, we may need refactoring the current TableView to support that. 

Comment 8 by juncai@chromium.org, Aug 11 2016

Hi Rebecca, in the screenshot I posted, I used the icon from ChromeOS to display the signal strength:
https://cs.chromium.org/chromium/src/ui/chromeos/resources/default_100_percent/network/statusbar_network_bars_dark.png

Since we need to use the same icon at ChromeOS, Linux, Windows, and possibly Mac too, I am wondering if the UI team is building some new icons for the signal strength?

If not, does it make sense to move that file to:
https://cs.chromium.org/chromium/src/ui/resources/default_100_percent/common/?

Comment 9 by bettes@chromium.org, Aug 11 2016

Using these icons across platform SGTM in the interim. 

Long term, with crbug.com/630357, we'll be looking to revisit this UI to conform to Harmony standards and best practices which will in turn update the icons to the MD ones listed here. https://icons.googleplex.com/#signal
Updated signal strength icons by using icons from:
https://icons.googleplex.com/#signal

Uploaded the screenshot.
signal_strength_indicator_2.png
77.0 KB View Download
Here is the screenshot from Mac.
chooser_with_signal_strengh_icon_Mac.png
194 KB View Download
Here is a screenshot for android. WDYT?
rssi_indicator.png
784 KB View Download

Comment 13 by rolfe@chromium.org, Aug 19 2016

I'm OK with it. bettes@ can you weigh in for images in comments 10-12?
Project Member

Comment 14 by bugdroid1@chromium.org, Aug 23 2016

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

commit 3ecef4e6dc7a93987930c1a5a1ad146c3bba58e8
Author: juncai <juncai@chromium.org>
Date: Tue Aug 23 00:10:16 2016

Add signal strength indicator icon to WebBluetooth chooser on non-Mac desktops

I uploaded a screenshot on the issue page.

BUG= 629689 

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

[modify] https://crrev.com/3ecef4e6dc7a93987930c1a5a1ad146c3bba58e8/chrome/browser/chooser_controller/chooser_controller.cc
[modify] https://crrev.com/3ecef4e6dc7a93987930c1a5a1ad146c3bba58e8/chrome/browser/chooser_controller/chooser_controller.h
[modify] https://crrev.com/3ecef4e6dc7a93987930c1a5a1ad146c3bba58e8/chrome/browser/ui/android/bluetooth_chooser_android.cc
[modify] https://crrev.com/3ecef4e6dc7a93987930c1a5a1ad146c3bba58e8/chrome/browser/ui/android/bluetooth_chooser_android.h
[modify] https://crrev.com/3ecef4e6dc7a93987930c1a5a1ad146c3bba58e8/chrome/browser/ui/bluetooth/bluetooth_chooser_controller.cc
[modify] https://crrev.com/3ecef4e6dc7a93987930c1a5a1ad146c3bba58e8/chrome/browser/ui/bluetooth/bluetooth_chooser_controller.h
[modify] https://crrev.com/3ecef4e6dc7a93987930c1a5a1ad146c3bba58e8/chrome/browser/ui/bluetooth/bluetooth_chooser_desktop.cc
[modify] https://crrev.com/3ecef4e6dc7a93987930c1a5a1ad146c3bba58e8/chrome/browser/ui/bluetooth/bluetooth_chooser_desktop.h
[modify] https://crrev.com/3ecef4e6dc7a93987930c1a5a1ad146c3bba58e8/chrome/browser/ui/bluetooth/chrome_extension_bluetooth_chooser.cc
[modify] https://crrev.com/3ecef4e6dc7a93987930c1a5a1ad146c3bba58e8/chrome/browser/ui/bluetooth/chrome_extension_bluetooth_chooser.h
[modify] https://crrev.com/3ecef4e6dc7a93987930c1a5a1ad146c3bba58e8/chrome/browser/ui/views/chooser_content_view.cc
[modify] https://crrev.com/3ecef4e6dc7a93987930c1a5a1ad146c3bba58e8/chrome/browser/ui/views/chooser_content_view.h
[modify] https://crrev.com/3ecef4e6dc7a93987930c1a5a1ad146c3bba58e8/content/browser/bluetooth/bluetooth_device_chooser_controller.cc
[modify] https://crrev.com/3ecef4e6dc7a93987930c1a5a1ad146c3bba58e8/content/browser/bluetooth/bluetooth_device_chooser_controller.h
[add] https://crrev.com/3ecef4e6dc7a93987930c1a5a1ad146c3bba58e8/content/browser/bluetooth/bluetooth_device_chooser_controller_unittest.cc
[modify] https://crrev.com/3ecef4e6dc7a93987930c1a5a1ad146c3bba58e8/content/content_tests.gypi
[modify] https://crrev.com/3ecef4e6dc7a93987930c1a5a1ad146c3bba58e8/content/public/browser/bluetooth_chooser.h
[modify] https://crrev.com/3ecef4e6dc7a93987930c1a5a1ad146c3bba58e8/content/shell/browser/layout_test/layout_test_bluetooth_chooser_factory.cc
[modify] https://crrev.com/3ecef4e6dc7a93987930c1a5a1ad146c3bba58e8/content/shell/browser/layout_test/layout_test_first_device_bluetooth_chooser.cc
[modify] https://crrev.com/3ecef4e6dc7a93987930c1a5a1ad146c3bba58e8/content/shell/browser/layout_test/layout_test_first_device_bluetooth_chooser.h
[add] https://crrev.com/3ecef4e6dc7a93987930c1a5a1ad146c3bba58e8/ui/resources/default_100_percent/common/signal_0_bar.png
[add] https://crrev.com/3ecef4e6dc7a93987930c1a5a1ad146c3bba58e8/ui/resources/default_100_percent/common/signal_1_bar.png
[add] https://crrev.com/3ecef4e6dc7a93987930c1a5a1ad146c3bba58e8/ui/resources/default_100_percent/common/signal_2_bar.png
[add] https://crrev.com/3ecef4e6dc7a93987930c1a5a1ad146c3bba58e8/ui/resources/default_100_percent/common/signal_3_bar.png
[add] https://crrev.com/3ecef4e6dc7a93987930c1a5a1ad146c3bba58e8/ui/resources/default_100_percent/common/signal_4_bar.png
[add] https://crrev.com/3ecef4e6dc7a93987930c1a5a1ad146c3bba58e8/ui/resources/default_200_percent/common/signal_0_bar.png
[add] https://crrev.com/3ecef4e6dc7a93987930c1a5a1ad146c3bba58e8/ui/resources/default_200_percent/common/signal_1_bar.png
[add] https://crrev.com/3ecef4e6dc7a93987930c1a5a1ad146c3bba58e8/ui/resources/default_200_percent/common/signal_2_bar.png
[add] https://crrev.com/3ecef4e6dc7a93987930c1a5a1ad146c3bba58e8/ui/resources/default_200_percent/common/signal_3_bar.png
[add] https://crrev.com/3ecef4e6dc7a93987930c1a5a1ad146c3bba58e8/ui/resources/default_200_percent/common/signal_4_bar.png
[modify] https://crrev.com/3ecef4e6dc7a93987930c1a5a1ad146c3bba58e8/ui/resources/ui_resources.grd

Project Member

Comment 15 by bugdroid1@chromium.org, Aug 26 2016

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

commit 8b985248b1ce2570d6ec84b211b1de14247127d1
Author: juncai <juncai@chromium.org>
Date: Fri Aug 26 00:35:29 2016

Add signal strength indicator icon to WebBluetooth chooser on Mac

I uploaded a screenshot on the issue page.

BUG= 629689 

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

[modify] https://crrev.com/8b985248b1ce2570d6ec84b211b1de14247127d1/chrome/browser/chooser_controller/mock_chooser_controller.cc
[modify] https://crrev.com/8b985248b1ce2570d6ec84b211b1de14247127d1/chrome/browser/chooser_controller/mock_chooser_controller.h
[modify] https://crrev.com/8b985248b1ce2570d6ec84b211b1de14247127d1/chrome/browser/ui/cocoa/chooser_content_view_cocoa.h
[modify] https://crrev.com/8b985248b1ce2570d6ec84b211b1de14247127d1/chrome/browser/ui/cocoa/chooser_content_view_cocoa.mm
[modify] https://crrev.com/8b985248b1ce2570d6ec84b211b1de14247127d1/chrome/browser/ui/cocoa/extensions/chooser_dialog_cocoa_controller.mm
[modify] https://crrev.com/8b985248b1ce2570d6ec84b211b1de14247127d1/chrome/browser/ui/cocoa/extensions/chooser_dialog_cocoa_controller_unittest.mm
[modify] https://crrev.com/8b985248b1ce2570d6ec84b211b1de14247127d1/chrome/browser/ui/cocoa/website_settings/chooser_bubble_ui_cocoa.mm
[modify] https://crrev.com/8b985248b1ce2570d6ec84b211b1de14247127d1/chrome/browser/ui/views/chooser_content_view_unittest.cc
[modify] https://crrev.com/8b985248b1ce2570d6ec84b211b1de14247127d1/chrome/browser/ui/views/extensions/chooser_dialog_view_unittest.cc

Per juncai's request here is a screenshot with an item selected.
selected.png
1.1 MB View Download
Looks good! Thanks.
If a device doesn't have an icon should we still indent the name? I know mac does but I just want to be sure that's the expected behavior. Screenshots for the two options attached.
Mixed row types.png
897 KB View Download
Single row type.png
903 KB View Download
FWIW, I prefer when name is also indented. 
On Mac, if there is a row that has an icon, then the text in all the rows are indented. If there is no row that has an icon, then the text is not indented.

Comment 21 by rolfe@chromium.org, Sep 22 2016

Yes let's consistently indent.
Blocking: 604105
Blocking: 651633
Cc: -ortuno@chromium.org juncai@chromium.org
Owner: ortuno@chromium.org
Labels: Type-Feature
Project Member

Comment 26 by bugdroid1@chromium.org, Oct 21 2016

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

commit af8b667fa26cc740acd20d13fa56ce9fce8a4ad6
Author: ortuno <ortuno@chromium.org>
Date: Fri Oct 21 03:37:29 2016

bluetooth-chooser: Refactor and clean up bluetooth chooser

In preparation for adding icons, this patch:

 1. No longer creates a new object for each update, instead passes the
    information directly to ItemChooserDialog.
 2. Sets choice mode to CHOICE_MODE_SINGLE.
 3. Uses color sets to control text and background color.
 4. Uses RelativeLayout for rows in preparation of adding an ImageView to the layout.

BUG= 629689 

Review-Url: https://chromiumcodereview.appspot.com/2426573005
Cr-Commit-Position: refs/heads/master@{#426710}

[add] https://crrev.com/af8b667fa26cc740acd20d13fa56ce9fce8a4ad6/chrome/android/java/res/color/item_chooser_row_text_color.xml
[add] https://crrev.com/af8b667fa26cc740acd20d13fa56ce9fce8a4ad6/chrome/android/java/res/drawable/item_chooser_row_background.xml
[modify] https://crrev.com/af8b667fa26cc740acd20d13fa56ce9fce8a4ad6/chrome/android/java/res/layout/item_chooser_dialog_row.xml
[modify] https://crrev.com/af8b667fa26cc740acd20d13fa56ce9fce8a4ad6/chrome/android/java/src/org/chromium/chrome/browser/BluetoothChooserDialog.java
[modify] https://crrev.com/af8b667fa26cc740acd20d13fa56ce9fce8a4ad6/chrome/android/java/src/org/chromium/chrome/browser/ItemChooserDialog.java
[modify] https://crrev.com/af8b667fa26cc740acd20d13fa56ce9fce8a4ad6/chrome/android/java/src/org/chromium/chrome/browser/UsbChooserDialog.java
[modify] https://crrev.com/af8b667fa26cc740acd20d13fa56ce9fce8a4ad6/chrome/android/javatests/src/org/chromium/chrome/browser/ItemChooserDialogTest.java
[modify] https://crrev.com/af8b667fa26cc740acd20d13fa56ce9fce8a4ad6/chrome/browser/ui/android/usb_chooser_dialog_android.cc

Project Member

Comment 27 by bugdroid1@chromium.org, Dec 13 2016

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

commit 085fd9524d8369206beaddeed429c0a2f7e0738b
Author: scheib <scheib@chromium.org>
Date: Tue Dec 13 03:01:15 2016

bluetooth: web: Chooser RSSI indicator now based on percentile buckets

This change updates the mapping from RSSI values into signal strength
icon levels. It is made after reviewing a month of recorded UMA
data for RSSI values encountered by users.

A new design of how we map values to displayed levels is documented
in the change.

See these charts for measured data:
https://goo.gl/photos/pCoAkF7mPyza9B1k7

BUG= 629689 

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

[modify] https://crrev.com/085fd9524d8369206beaddeed429c0a2f7e0738b/content/browser/bluetooth/bluetooth_device_chooser_controller.cc
[modify] https://crrev.com/085fd9524d8369206beaddeed429c0a2f7e0738b/content/browser/bluetooth/bluetooth_device_chooser_controller_unittest.cc

Comment 28 by rolfe@chromium.org, Mar 29 2017

Cc: -bettes@chromium.org -rolfe@chromium.org
Removing previous designers. If you have a visual question, reach out to hannahs. If you have a general design question, cleer.
Project Member

Comment 29 by bugdroid1@chromium.org, Apr 21 2017

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

commit a973e918a51467c001a313ba91ebb69c69478b65
Author: ortuno <ortuno@chromium.org>
Date: Fri Apr 21 02:13:20 2017

bluetooth: Add RSSI icon for bluetooth choosers.

So that users can more easily identify the devices that are near them.

BUG= 629689 

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

[modify] https://crrev.com/a973e918a51467c001a313ba91ebb69c69478b65/build/android/lint/suppressions.xml
[modify] https://crrev.com/a973e918a51467c001a313ba91ebb69c69478b65/chrome/android/java/res/drawable/ic_bluetooth_connected.xml
[add] https://crrev.com/a973e918a51467c001a313ba91ebb69c69478b65/chrome/android/java/res/drawable/ic_signal_cellular_0_bar.xml
[add] https://crrev.com/a973e918a51467c001a313ba91ebb69c69478b65/chrome/android/java/res/drawable/ic_signal_cellular_1_bar.xml
[add] https://crrev.com/a973e918a51467c001a313ba91ebb69c69478b65/chrome/android/java/res/drawable/ic_signal_cellular_2_bar.xml
[add] https://crrev.com/a973e918a51467c001a313ba91ebb69c69478b65/chrome/android/java/res/drawable/ic_signal_cellular_3_bar.xml
[add] https://crrev.com/a973e918a51467c001a313ba91ebb69c69478b65/chrome/android/java/res/drawable/ic_signal_cellular_4_bar.xml
[modify] https://crrev.com/a973e918a51467c001a313ba91ebb69c69478b65/chrome/android/java/src/org/chromium/chrome/browser/BluetoothChooserDialog.java
[modify] https://crrev.com/a973e918a51467c001a313ba91ebb69c69478b65/chrome/android/java/strings/android_chrome_strings.grd
[modify] https://crrev.com/a973e918a51467c001a313ba91ebb69c69478b65/chrome/android/javatests/src/org/chromium/chrome/browser/BluetoothChooserDialogTest.java
[modify] https://crrev.com/a973e918a51467c001a313ba91ebb69c69478b65/chrome/browser/ui/android/bluetooth_chooser_android.cc

Status: Fixed (was: Started)
Project Member

Comment 31 by bugdroid1@chromium.org, Oct 20 2017

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

commit f413ff2e354321b0e4c60752fc3cf1fbb71f48b8
Author: Vincent Scheib <scheib@chromium.org>
Date: Fri Oct 20 18:20:45 2017

bluetooth: web: Update chooser RSSI to signal strength display.

The Bluetooth Chooser displays a signal strength indicator
so that similarly named devices can be disambiguated. E.g.
a nearby Thingy can be seen in a list of several Thingys.

This is done by measuring all RSSI values encountered by
users and placing them into equal size buckets.  See code
comments for more detail.

Now that there there is increased usage, the data is more
representative, and is updated to improve the signal
display.

Bug:  629689 
Change-Id: I05a1ce6f93b1d828f9d7ab8f127a8ef4d4002bd0
Reviewed-on: https://chromium-review.googlesource.com/729559
Commit-Queue: Vincent Scheib <scheib@chromium.org>
Reviewed-by: Matt Reynolds <mattreynolds@chromium.org>
Cr-Commit-Position: refs/heads/master@{#510497}
[modify] https://crrev.com/f413ff2e354321b0e4c60752fc3cf1fbb71f48b8/content/browser/bluetooth/bluetooth_device_chooser_controller.cc
[modify] https://crrev.com/f413ff2e354321b0e4c60752fc3cf1fbb71f48b8/content/browser/bluetooth/bluetooth_device_chooser_controller_unittest.cc

Sign in to add a comment