Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(143)

Issue 9489011: Elide long emails in the wrench and profile menus. (Closed)

Created:
8 years, 9 months ago by gab
Modified:
8 years, 9 months ago
CC:
chromium-reviews, SteveT
Base URL:
http://git.chromium.org/chromium/src.git@master
Visibility:
Public.

Description

Elide long emails in the wrench and profile menus. NOTE: This CL now only adds eliding functionality, but doesn't use it in the UI just yet. Refer to bug 113133 for details (refer to comment 22 for a screenshot of the result: http://code.google.com/p/chromium/issues/detail?id=113133#c22). BUG=113133 TEST=Make sure ui_unittests (ElideEmail and ElideEmailMoreSpace) pass. Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=126445 Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=127175

Patch Set 1 #

Patch Set 2 : fixed lint #

Total comments: 17

Patch Set 3 : rev2 #

Total comments: 1

Patch Set 4 : syncing to r124010 #

Patch Set 5 : use pixel width not #chars, remove eliding intrusion in models #

Patch Set 6 : lint - fix comment spacing #

Total comments: 11

Patch Set 7 : adressed asvitkine's comments #

Patch Set 8 : fix lint -- missing space #

Total comments: 10

Patch Set 9 : tweaks #

Total comments: 9

Patch Set 10 : collapse 4 lines into 1 #

Patch Set 11 : wellformed requirement comment #

Patch Set 12 : more robust #

Total comments: 4

Patch Set 13 : split at last @ #

Total comments: 3

Patch Set 14 : split_index and DCHECK_NE string16::npos #

Patch Set 15 : fix mac and windows tests #

Patch Set 16 : make tests robust under all fonts #

Patch Set 17 : comment special case #

Patch Set 18 : more chars in last test #

Total comments: 2

Patch Set 19 : nit comment fix #

Patch Set 20 : silly chrome OS..more Ls. #

Total comments: 1
Unified diffs Side-by-side diffs Delta from patch set Stats (+159 lines, -12 lines) Patch
M ui/base/text/text_elider.h View 1 2 3 4 5 6 7 8 9 10 1 chunk +19 lines, -4 lines 0 comments Download
M ui/base/text/text_elider.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 2 chunks +60 lines, -8 lines 0 comments Download
M ui/base/text/text_elider_unittest.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 1 chunk +80 lines, -0 lines 1 comment Download

Messages

Total messages: 59 (0 generated)
gab
PTAL
8 years, 9 months ago (2012-02-28 15:08:16 UTC) #1
gab
Need OWNERS approval. sail: chrome/browser/profiles/* ben: chrome/browser/ui/*, ui/base/* jeffreyc: Can you take a look at ...
8 years, 9 months ago (2012-02-28 15:38:30 UTC) #2
Alexei Svitkine (slow)
https://chromiumcodereview.appspot.com/9489011/diff/4001/ui/base/text/text_elider.cc File ui/base/text/text_elider.cc (right): https://chromiumcodereview.appspot.com/9489011/diff/4001/ui/base/text/text_elider.cc#newcode164 ui/base/text/text_elider.cc:164: // This function assumes max_email_length is >= 5. It ...
8 years, 9 months ago (2012-02-28 15:46:22 UTC) #3
Alexei Svitkine (slow)
> Please variables parameter names in comments with |'s. i.e. > |max_email_length| Sorry, this should ...
8 years, 9 months ago (2012-02-28 15:50:51 UTC) #4
sail
+rsesek since he wrote AvatarMenuModel http://codereview.chromium.org/9489011/diff/4001/ui/base/text/text_elider.h File ui/base/text/text_elider.h (right): http://codereview.chromium.org/9489011/diff/4001/ui/base/text/text_elider.h#newcode59 ui/base/text/text_elider.h:59: size_t max_email_length); Eliding using ...
8 years, 9 months ago (2012-02-28 18:37:19 UTC) #5
Robert Sesek
On 2012/02/28 18:37:19, sail wrote: > +rsesek since he wrote AvatarMenuModel > > http://codereview.chromium.org/9489011/diff/4001/ui/base/text/text_elider.h > ...
8 years, 9 months ago (2012-02-28 18:55:06 UTC) #6
gab
Fixed most of the points addressed by Alexei (see replies to inline comments) http://codereview.chromium.org/9489011/diff/4001/ui/base/text/text_elider.cc File ...
8 years, 9 months ago (2012-02-28 19:20:11 UTC) #7
gab
The reason I did it based on # characters is that the menu already stretches ...
8 years, 9 months ago (2012-02-28 19:20:36 UTC) #8
gab
http://codereview.chromium.org/9489011/diff/10001/ui/base/text/text_elider.h File ui/base/text/text_elider.h (right): http://codereview.chromium.org/9489011/diff/10001/ui/base/text/text_elider.h#newcode42 ui/base/text/text_elider.h:42: size_t max_email_length); I moved this here as ElideEmail is ...
8 years, 9 months ago (2012-02-28 19:23:01 UTC) #9
sail
> eliding on width could only be > done based on an arbitrary width (say ...
8 years, 9 months ago (2012-02-28 19:30:28 UTC) #10
gab
> This is not true. Eliding to a fixed pixel width (say 300) is better ...
8 years, 9 months ago (2012-02-28 20:20:18 UTC) #11
sail
On 2012/02/28 20:20:18, gab wrote: > > This is not true. Eliding to a fixed ...
8 years, 9 months ago (2012-02-28 20:30:04 UTC) #12
gab
> > Ideally we would elide the full menu title (Signed in as ..). On ...
8 years, 9 months ago (2012-02-28 21:54:24 UTC) #13
gab
> FYI, I found some current UI code which uses character base eliding: > http://code.google.com/codesearch#search/&exact_package=chromium&q=ElideString&type=cs ...
8 years, 9 months ago (2012-02-28 21:55:52 UTC) #14
sail
On 2012/02/28 21:55:52, gab wrote: > > FYI, I found some current UI code which ...
8 years, 9 months ago (2012-02-28 21:59:40 UTC) #15
gab
PTAL @sail: no longer need OWNER approval in chrome/browser/profiles/* @ben: still need OWNER approval in ...
8 years, 9 months ago (2012-03-01 19:37:25 UTC) #16
asvitkine_google
Some initial comments. I'll give you more once you address these. http://codereview.chromium.org/9489011/diff/19004/ui/base/text/text_elider.cc File ui/base/text/text_elider.cc (right): ...
8 years, 9 months ago (2012-03-01 20:13:29 UTC) #17
gab
Addressed all of asvitkine's comments on patch set 6. http://codereview.chromium.org/9489011/diff/19004/ui/base/text/text_elider.cc File ui/base/text/text_elider.cc (right): http://codereview.chromium.org/9489011/diff/19004/ui/base/text/text_elider.cc#newcode179 ui/base/text/text_elider.cc:179: ...
8 years, 9 months ago (2012-03-01 21:48:17 UTC) #18
asvitkine_google
http://codereview.chromium.org/9489011/diff/23005/ui/base/text/text_elider.cc File ui/base/text/text_elider.cc (right): http://codereview.chromium.org/9489011/diff/23005/ui/base/text/text_elider.cc#newcode166 ui/base/text/text_elider.cc:166: // Ignore the @ symbol and add it back ...
8 years, 9 months ago (2012-03-01 22:10:56 UTC) #19
gab
http://codereview.chromium.org/9489011/diff/23005/ui/base/text/text_elider.cc File ui/base/text/text_elider.cc (right): http://codereview.chromium.org/9489011/diff/23005/ui/base/text/text_elider.cc#newcode179 ui/base/text/text_elider.cc:179: // let the domain take that extra space. On ...
8 years, 9 months ago (2012-03-01 23:03:46 UTC) #20
Alexei Svitkine (slow)
http://codereview.chromium.org/9489011/diff/20008/ui/base/text/text_elider.cc File ui/base/text/text_elider.cc (right): http://codereview.chromium.org/9489011/diff/20008/ui/base/text/text_elider.cc#newcode182 ui/base/text/text_elider.cc:182: available_pixel_width / 2); I think the "available_pixel_width / 2" ...
8 years, 9 months ago (2012-03-02 20:20:44 UTC) #21
SteveT
Quick drive by comment. http://codereview.chromium.org/9489011/diff/20008/ui/base/text/text_elider.h File ui/base/text/text_elider.h (right): http://codereview.chromium.org/9489011/diff/20008/ui/base/text/text_elider.h#newcode37 ui/base/text/text_elider.h:37: // extra width). Do you ...
8 years, 9 months ago (2012-03-02 20:26:35 UTC) #22
gab
On 2012/03/02 20:26:35, SteveT wrote: > Quick drive by comment. > > http://codereview.chromium.org/9489011/diff/20008/ui/base/text/text_elider.h > File ...
8 years, 9 months ago (2012-03-02 21:47:50 UTC) #23
gab
http://codereview.chromium.org/9489011/diff/20008/ui/base/text/text_elider.cc File ui/base/text/text_elider.cc (right): http://codereview.chromium.org/9489011/diff/20008/ui/base/text/text_elider.cc#newcode182 ui/base/text/text_elider.cc:182: available_pixel_width / 2); On 2012/03/02 20:20:44, Alexei Svitkine wrote: ...
8 years, 9 months ago (2012-03-02 21:57:37 UTC) #24
SteveT
lgtm http://codereview.chromium.org/9489011/diff/20008/ui/base/text/text_elider.h File ui/base/text/text_elider.h (right): http://codereview.chromium.org/9489011/diff/20008/ui/base/text/text_elider.h#newcode37 ui/base/text/text_elider.h:37: // extra width). Sounds good. Just add the ...
8 years, 9 months ago (2012-03-02 22:03:56 UTC) #25
asvitkine_google
LGTM http://codereview.chromium.org/9489011/diff/20008/ui/base/text/text_elider.cc File ui/base/text/text_elider.cc (right): http://codereview.chromium.org/9489011/diff/20008/ui/base/text/text_elider.cc#newcode182 ui/base/text/text_elider.cc:182: available_pixel_width / 2); > Actually, if available_pixel_width/2 > ...
8 years, 9 months ago (2012-03-02 22:08:40 UTC) #26
gab
@asvitkine: I found some very picky corner cases and changed the logic slightly can you ...
8 years, 9 months ago (2012-03-02 23:37:21 UTC) #27
asvitkine_google
I'll take a look at the latest changes later. Could you update the CL description ...
8 years, 9 months ago (2012-03-03 00:37:20 UTC) #28
gab1
On Fri, Mar 2, 2012 at 7:36 PM, Alexei Svitkine <asvitkine@google.com>wrote: > I'll take a ...
8 years, 9 months ago (2012-03-03 12:26:15 UTC) #29
asvitkine_google
Still LGTM
8 years, 9 months ago (2012-03-05 17:14:23 UTC) #30
gab
ben, can you have a second look and give owner approval? Thanks, Gab
8 years, 9 months ago (2012-03-05 22:13:16 UTC) #31
sky
http://codereview.chromium.org/9489011/diff/30007/ui/base/text/text_elider.cc File ui/base/text/text_elider.cc (right): http://codereview.chromium.org/9489011/diff/30007/ui/base/text/text_elider.cc#newcode159 ui/base/text/text_elider.cc:159: base::SplitString(email, '@', &email_split); Are you sure this is right? ...
8 years, 9 months ago (2012-03-06 16:56:16 UTC) #32
gab
http://codereview.chromium.org/9489011/diff/30007/ui/base/text/text_elider.cc File ui/base/text/text_elider.cc (right): http://codereview.chromium.org/9489011/diff/30007/ui/base/text/text_elider.cc#newcode159 ui/base/text/text_elider.cc:159: base::SplitString(email, '@', &email_split); On 2012/03/06 16:56:16, sky wrote: > ...
8 years, 9 months ago (2012-03-06 22:06:21 UTC) #33
sky
I would feel more comfortable if it weren't a DCHECK, but instead searched for the ...
8 years, 9 months ago (2012-03-06 22:48:27 UTC) #34
gab
On 2012/03/06 22:48:27, sky wrote: > I would feel more comfortable if it weren't a ...
8 years, 9 months ago (2012-03-07 19:01:39 UTC) #35
Alexei Svitkine (slow)
http://codereview.chromium.org/9489011/diff/40001/ui/base/text/text_elider.cc File ui/base/text/text_elider.cc (right): http://codereview.chromium.org/9489011/diff/40001/ui/base/text/text_elider.cc#newcode163 ui/base/text/text_elider.cc:163: const size_t splitIndex = email.find_last_of('@'); Rename to split_index. http://codereview.chromium.org/9489011/diff/40001/ui/base/text/text_elider.cc#newcode164 ...
8 years, 9 months ago (2012-03-07 19:07:35 UTC) #36
sky
LGTM
8 years, 9 months ago (2012-03-07 19:18:55 UTC) #37
gab
http://codereview.chromium.org/9489011/diff/40001/ui/base/text/text_elider.cc File ui/base/text/text_elider.cc (right): http://codereview.chromium.org/9489011/diff/40001/ui/base/text/text_elider.cc#newcode164 ui/base/text/text_elider.cc:164: DCHECK_LT(splitIndex, email.length()); On 2012/03/07 19:07:35, Alexei Svitkine wrote: > ...
8 years, 9 months ago (2012-03-07 19:36:15 UTC) #38
Alexei Svitkine (slow)
LGTM
8 years, 9 months ago (2012-03-07 20:23:44 UTC) #39
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/gab@chromium.org/9489011/42002
8 years, 9 months ago (2012-03-07 20:57:02 UTC) #40
commit-bot: I haz the power
Try job failure for 9489011-42002 (retry) on mac_rel for step "gfx_unittests". It's a second try, ...
8 years, 9 months ago (2012-03-07 22:43:53 UTC) #41
gab
The 't' and the 'm' don't have the same relative width in all fonts and ...
8 years, 9 months ago (2012-03-12 19:33:00 UTC) #42
asvitkine_google
Is there a way to make the test not fragile to these issues? For example, ...
8 years, 9 months ago (2012-03-12 20:04:13 UTC) #43
gab
On 2012/03/12 20:04:13, asvitkine wrote: > Is there a way to make the test not ...
8 years, 9 months ago (2012-03-12 20:33:30 UTC) #44
asvitkine_google
On 2012/03/12 20:33:30, gab wrote: > On 2012/03/12 20:04:13, asvitkine wrote: > > Is there ...
8 years, 9 months ago (2012-03-13 00:36:05 UTC) #45
gab
Here is a modified set of tests which I think are robust under all fonts. ...
8 years, 9 months ago (2012-03-13 15:09:03 UTC) #46
Alexei Svitkine (slow)
LGTM. Thanks! http://codereview.chromium.org/9489011/diff/52004/ui/base/text/text_elider_unittest.cc File ui/base/text/text_elider_unittest.cc (right): http://codereview.chromium.org/9489011/diff/52004/ui/base/text/text_elider_unittest.cc#newcode61 ui/base/text/text_elider_unittest.cc:61: // Test emails and their expected elided ...
8 years, 9 months ago (2012-03-13 15:36:54 UTC) #47
gab
Great, pushing to CQ. http://codereview.chromium.org/9489011/diff/52004/ui/base/text/text_elider_unittest.cc File ui/base/text/text_elider_unittest.cc (right): http://codereview.chromium.org/9489011/diff/52004/ui/base/text/text_elider_unittest.cc#newcode61 ui/base/text/text_elider_unittest.cc:61: // Test emails and their ...
8 years, 9 months ago (2012-03-13 15:49:53 UTC) #48
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/gab@chromium.org/9489011/49003
8 years, 9 months ago (2012-03-13 15:50:16 UTC) #49
commit-bot: I haz the power
Change committed as 126445
8 years, 9 months ago (2012-03-13 20:04:37 UTC) #50
gab
Fixed, can someone launch a try job for me (I should have provisional committer access ...
8 years, 9 months ago (2012-03-13 20:40:34 UTC) #51
asvitkine_google
Sent try jobs.
8 years, 9 months ago (2012-03-13 20:58:24 UTC) #52
gab
On 2012/03/13 20:58:24, asvitkine wrote: > Sent try jobs. Looks like patching failed, I uploaded ...
8 years, 9 months ago (2012-03-13 21:03:08 UTC) #53
gab
All relevant bots passed. linux_aura && mac_aura are not ready for public use (as maruel@ ...
8 years, 9 months ago (2012-03-15 22:29:56 UTC) #54
asvitkine_google
Sounds good to me.
8 years, 9 months ago (2012-03-15 22:34:34 UTC) #55
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/gab@chromium.org/9489011/49005
8 years, 9 months ago (2012-03-16 12:29:16 UTC) #56
commit-bot: I haz the power
Try job failure for 9489011-49005 on mac_rel for step "update". http://build.chromium.org/p/tryserver.chromium/buildstatus?builder=mac_rel&number=9590 Step "update" is always ...
8 years, 9 months ago (2012-03-16 13:11:55 UTC) #57
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/gab@chromium.org/9489011/49005
8 years, 9 months ago (2012-03-16 13:17:43 UTC) #58
commit-bot: I haz the power
8 years, 9 months ago (2012-03-16 16:25:05 UTC) #59
Change committed as 127175

Powered by Google App Engine
This is Rietveld 408576698