New issue
Advanced search Search tips

Issue 629217 link

Starred by 3 users

Issue metadata

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



Sign in to add a comment

MD find bar needs bigger text input region

Project Member Reported by sky@chromium.org, Jul 18 2016

Issue description

Pre-md we allowed way more characters. It looks we provide ~100 pixels for the typed content when the overall view is ~260 pixels. In other words, we provide more space for controls/feedback that actual content. I easily trigger scrolling in the findbar in many searches I do. Is there really a need to restrict the width when in many cases there is ample space available?
 
find.png
1.4 KB View Download

Comment 1 by sky@chromium.org, Jul 18 2016

I'm attaching the old treatment. That one allowed ~19 characters. IMO the old one looks more as I would expect. That is, more space is provided for typing vs the controls.
find2.png
2.9 KB View Download
Labels: M-54 OS-Linux
Status: Available (was: Untriaged)
Summary: MD find bar needs bigger text input region (was: MD find bar only allows for 8 characters)
I can fit 11 w characters in mine rather than 8.  This is on Win 10.  Perhaps there are font differences on different platforms?  What platform are you on?

I do think we could stand to widen the text input area a bit regardless.

Comment 3 by sky@chromium.org, Jul 18 2016

Win 7. 'W' is the widest character.
Cc: est...@chromium.org
Looks like Evan originally landed the work here, and the current bar is sized based only on how wide the "default number of characters" string is, without taking into account the additional controls as the old bar did.  This doesn't seem right to me even if we did want a narrower bar (I'd think instead we'd want to still account for the other controls, but use a shorter "default string width" value for the entry box).

I don't know where the mocks for this are, so I think we could Just Do Something Reasonable here.

Comment 5 by est...@chromium.org, Jul 18 2016

Owner: est...@chromium.org
Status: Assigned (was: Available)
I can fit 12 'W' in the find bar in cros and 16 in linux. I guess font metrics are not behaving very consistently across platforms. Here's one of the original mocks as a guideline.
4a91fd4d128.png
76.3 KB View Download
Hmm.  There may be a bug in how GetPreferredSize() is calculated on labels, in addition to the stuff in comment 4.

Comment 7 by est...@chromium.org, Jul 18 2016

I think it's actually just that the font is actually wider on Linux, meaning the rest of the controls eat up fewer character widths and leave more width for the actual text. With this potential fix[1] the width is pretty similar on Linux and CrOS in terms of how many times you can fit the word "Design" in the box.

[1] https://codereview.chromium.org/2156423002
Project Member

Comment 8 by bugdroid1@chromium.org, Jul 19 2016

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

commit 043095f529a06276651d87e1f503c0d8f9867ace
Author: estade <estade@chromium.org>
Date: Tue Jul 19 19:55:05 2016

Adjust width of find in page bar.

The text area now approximately fits "DesignDesignDesignDesign".

BUG= 629217 

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

[modify] https://crrev.com/043095f529a06276651d87e1f503c0d8f9867ace/chrome/browser/ui/views/find_bar_view.cc

Comment 9 by est...@chromium.org, Jul 21 2016

Labels: -M-54 Merge-Request-53 M-53
would be nice to merge this to m53 for windows's sake (this is by far most annoying there). Scott or Peter, can you confirm that it now looks good on windows?

Comment 10 by dimu@google.com, Jul 21 2016

Labels: -Merge-Request-53 Merge-Approved-53 Hotlist-Merge-Approved
Your change meets the bar and is auto-approved for M53 (branch: 2785)
On my Win 7 box I can now fit 14 'w's, which is certainly better than before.  It would be nice for the input field to be maybe 15% wider here still if possible, but I could live with this.
how much more average text can you fit?

+sgabriel can perhaps give a spec for how much of "The quick brown fox jumps..." should fit in the input. For now I'll merge this and then make any necessary adjustments in later milestones.
Other tests on my Win 7 box:

Old: abcdefghijklmnop
New: abcdefghijklmnopqrstu

Old: The quick brown f
New: The quick brown fox ju

I threw out the 15% number based on messing around in Paint and looking at what would still look "balanced" between textfield width and controls width.
Project Member

Comment 14 by bugdroid1@chromium.org, Jul 21 2016

Labels: -merge-approved-53 merge-merged-2785
The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/44f0edded4bbb01314f50066ac4e631de58ca106

commit 44f0edded4bbb01314f50066ac4e631de58ca106
Author: Evan Stade <estade@chromium.org>
Date: Thu Jul 21 18:55:17 2016

Adjust width of find in page bar.

The text area now approximately fits "DesignDesignDesignDesign".

BUG= 629217 

Review-Url: https://codereview.chromium.org/2156423002
Cr-Commit-Position: refs/heads/master@{#406356}
(cherry picked from commit 043095f529a06276651d87e1f503c0d8f9867ace)

Review URL: https://codereview.chromium.org/2170943002 .

Cr-Commit-Position: refs/branch-heads/2785@{#271}
Cr-Branched-From: 68623971be0cfc492a2cb0427d7f478e7b214c24-refs/heads/master@{#403382}

[modify] https://crrev.com/44f0edded4bbb01314f50066ac4e631de58ca106/chrome/browser/ui/views/find_bar_view.cc

Labels: TE-Verified-M53 TE-Verified-53.0.2785.30
Verified the above change on All-OS(Win, Mac 10.11.5 & Ubuntu 14.04) with chrome version - 53.0.2785.30 and MD-Find bar is displayed with bigger text region.

Hence marking it as TE-Verified-53.0.2785.30.

Attach is the screen-shot.

Thank you!
Screenshot from 2016-07-26 17_42_49.png
196 KB View Download
ping sgabriel -- what amount of text should fit assuming "0 of 0" results?
I think the one showed here doesn't match the Chrome OS one width wise correct? We shouldn't hesitate in making it longer (I designed it as 280px, the one showed is 260).
Right now the one on Cros fits 12 Caps W. 

It gives: The quick brown fox jum...
> Right now the one on Cros fits 12 Caps W. 
> It gives: The quick brown fox jum...

Is that the width you think it should be, or just the width it is currently?
It's the width we have on Cros, which is longer that the width of the fip showed in #0 for some reason.
OK. So what is the width you think it should be? Please specify in characters, not pixels.
12
If we're specifying widths in characters, and you like the current width on CrOS, then there won't be any change on any platform, because we already specify it in characters.  Specifying in characters inherently means different platforms are going to get different widths.

I think your statement about "we shouldn't hesitate in making it longer" was more correct, and given that you were measuring the total find bar width as 260, my suggestion of increasing just the textfield width by 15% would line up reasonably well with making the overall width 280.  I think we should size this based on the size on the smallest platform, and I don't think we should target 12 cap-W-widths, because that seems too small.

So I continue to recommend increasing the current value by 15% and I think you would be OK with the result :)
I see. that sounds good to me. I don't have strong opinion on this piece of UI as long as it feels comfortable and that it doesn't look ridiculously wide in place.
Project Member

Comment 24 by bugdroid1@chromium.org, Jul 27 2016

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

commit f236dce1ef52375dfbfcfdaa6605a50130fbf7e1
Author: estade <estade@chromium.org>
Date: Wed Jul 27 20:25:04 2016

Increase find bar text field width by 15%.

BUG= 629217 

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

[modify] https://crrev.com/f236dce1ef52375dfbfcfdaa6605a50130fbf7e1/chrome/browser/ui/views/find_bar_view.cc

Status: Fixed (was: Assigned)
should be fixed. Hopefully everyone is happy.

Sign in to add a comment