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

Issue 630955 link

Starred by 2 users

Issue metadata

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

Blocking:
issue 604105



Sign in to add a comment

bluetooth: French text in chooser is cropped

Project Member Reported by fbeaufort@chromium.org, Jul 25 2016

Issue description

Version: Chromium 54.0.2805.0
OS: Mac OS X

What steps will reproduce the problem?
(1) Turn your machine general language to French (or any language that has long fancy words - I can say it... I'm french ;) 
(2) Go to any Web Bluetooth working page
(3) Trigger Bluetooth chooser to search for devices

What is the expected output?
"Recherche d'appareil en cours" (Searching for devices) text should not be cropped.

See screenshots attached.
 
Capture d’écran 2016-07-25 à 9.39.29 AM.png
127 KB View Download
Status: Started (was: Available)
Here are some screenshots of showing multiple lines for the status text on ChromeOS and Mac. (The "Scanning for devices..." are shown multiple times only for testing)
multiple_lines_ChromeOS.png
87.7 KB View Download
multiple_lines_mac_1.png
177 KB View Download
multiple_lines_mac_2.png
174 KB View Download
Also the buttons on the ChromeOS version shouldn't expand.

Could it be possible to only expand the chooser if it's required? I don't think the blank space looks very good.
The button height is determined by the maximum height of its height and the extra view's height:
https://cs.chromium.org/chromium/src/ui/views/window/dialog_client_view.cc?cl=GROK&sq=package:chromium&rcl=1470223047&l=319

https://cs.chromium.org/chromium/src/ui/views/window/dialog_client_view.cc?cl=GROK&sq=package:chromium&rcl=1470223047&l=157

If we need to adjust the button's height, we probably need to hardcode its height.

Yes, it only expand the chooser when necessary. When the status text can be displayed on one line, it looks exactly the same as before.

Comment 5 by msw@chromium.org, Aug 3 2016

Yeah, it seems like the buttons should not expand vertically in this case.
It makes sense when the extra view is also a button, but not a tall label/link.

Perhaps DialogClientView::Layout should only use the height of the extra view if it's a button (check CustomButton::AsCustomButton?), when setting the buttons' heights via LayoutButton. Otherwise, it should make the ok/cancel buttons have the same height (max of those two buttons) and align them (to center/bottom?) within the row that also contains the extra view; similar to Mac. WDYT?
Fixed the blank space issue on Mac. Here are two screenshots.
multiple_lines_mac_3.png
178 KB View Download
multiple_lines_mac_4.png
175 KB View Download
Could we vertically align to the top "Pair" and "Cancel" buttons?
See attached mock.
mock.jpg
153 KB View Download
Cc: rolfe@chromium.org
Labels: OS-Windows
rolfe@, we would like to get some of your thoughts about how to align multiple lines of text with the buttons. Thanks!

Comment 9 by rolfe@chromium.org, Aug 4 2016

I have some thoughts but let me confirm them with bettes@. I have a meeting with him on  Monday afternoon and can get back to you then. Screenshots are useful for discussion - thanks.
Fixed the buttons height issue on ChromeOS. Here are two screenshots.
multiple_lines_ChromeOS_2.png
87.4 KB View Download
multiple_lines_ChromeOS_3.png
82.6 KB View Download
Project Member

Comment 11 by bugdroid1@chromium.org, Aug 5 2016

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

commit 37e24c4337dd6c5f8e41768d5d792edb52e52d60
Author: juncai <juncai@chromium.org>
Date: Fri Aug 05 20:44:03 2016

Support multiple lines for status text on Chooser UI

This CL updated code to support multiple lines for status text. This
fixed the issue when the translated status text is too long to be
displayed in one line.

BUG= 630955 

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

[modify] https://crrev.com/37e24c4337dd6c5f8e41768d5d792edb52e52d60/chrome/browser/ui/views/chooser_content_view.cc
[modify] https://crrev.com/37e24c4337dd6c5f8e41768d5d792edb52e52d60/ui/views/window/dialog_client_view.cc
[modify] https://crrev.com/37e24c4337dd6c5f8e41768d5d792edb52e52d60/ui/views/window/dialog_client_view.h

Project Member

Comment 12 by bugdroid1@chromium.org, Aug 8 2016

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

commit 20dcd15ebc1fbc8f39642cf4f688656369d769fb
Author: juncai <juncai@chromium.org>
Date: Mon Aug 08 20:15:43 2016

Support multiple lines for status text on Chooser UI on Mac

This CL updated code to support multiple lines for status text on Mac.
This fixed the issue when the translated status text is too long to be
displayed in one line.

BUG= 630955 

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

[modify] https://crrev.com/20dcd15ebc1fbc8f39642cf4f688656369d769fb/chrome/browser/ui/cocoa/chooser_content_view_cocoa.h
[modify] https://crrev.com/20dcd15ebc1fbc8f39642cf4f688656369d769fb/chrome/browser/ui/cocoa/chooser_content_view_cocoa.mm

Cc: bettes@chromium.org
+ bettes@ wanted to weigh in here

This work is relevant to a project to streamline desktop UI. He can make a recommendation for text wrapping on the bluetooth chooser.
Status: Fixed (was: Started)

Sign in to add a comment