MD find bar needs bigger text input region |
|||||||||
Issue descriptionPre-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?
,
Jul 18 2016
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.
,
Jul 18 2016
Win 7. 'W' is the widest character.
,
Jul 18 2016
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.
,
Jul 18 2016
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.
,
Jul 18 2016
Hmm. There may be a bug in how GetPreferredSize() is calculated on labels, in addition to the stuff in comment 4.
,
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
,
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
,
Jul 21 2016
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?
,
Jul 21 2016
Your change meets the bar and is auto-approved for M53 (branch: 2785)
,
Jul 21 2016
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.
,
Jul 21 2016
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.
,
Jul 21 2016
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.
,
Jul 21 2016
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
,
Jul 26 2016
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!
,
Jul 26 2016
ping sgabriel -- what amount of text should fit assuming "0 of 0" results?
,
Jul 27 2016
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...
,
Jul 27 2016
> 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?
,
Jul 27 2016
It's the width we have on Cros, which is longer that the width of the fip showed in #0 for some reason.
,
Jul 27 2016
OK. So what is the width you think it should be? Please specify in characters, not pixels.
,
Jul 27 2016
12
,
Jul 27 2016
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 :)
,
Jul 27 2016
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.
,
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
,
Jul 27 2016
should be fixed. Hopefully everyone is happy. |
|||||||||
►
Sign in to add a comment |
|||||||||
Comment 1 by sky@chromium.org
, Jul 18 20162.9 KB
2.9 KB View Download