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

Issue 722841 link

Starred by 12 users

Issue metadata

Status: Fixed
Owner:
Closed: Feb 2018
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Linux , Windows , Chrome , Mac
Pri: 2
Type: Feature


Show other hotlists

Hotlists containing this issue:
interesting-issues


Sign in to add a comment

Clip or squash favicon, instead of hiding, when tab space decreases

Project Member Reported by varkha@chromium.org, May 16 2017

Issue description

When tab width becomes less than the favicon width, the favicon is dropped and the first letter of the text label is shown. I think it will be better to show the favicon even if cropped, ideally centered in whatever space remains.

The case is shown for Mac in [1]. I am also attaching screenshots of what happens to tabstrip when adding just one tab (from 21 to 22).

Note - this is a small corner case of issue 188 but I felt this could be taken on separately if necessary.

[1] - https://motherboard.vice.com/en_us/article/leave-chrome-for-opera
 
21 tabs.png
9.1 KB View Download
22 tabs.png
9.9 KB View Download
Labels: -Restrict-View-Google -Type-Bug -Pri-3 Pri-2 Type-Feature
Status: Available (was: Untriaged)
Summary: Clip or squash favicon, instead of hiding, when tab space decreases (was: Favor favicon when tab width becomes small)
Opera's behavior in that article is to squish the favicon, which is probably better than clipping.

I think we should do this.

-RVG (not sensitive)
Cc: ainslie@chromium.org
 Issue 722877  has been merged into this issue.

Comment 3 by rpop@chromium.org, May 16 2017

Cc: edwardjung@chromium.org bettes@chromium.org
There are some other exploration into making tabs more usable at smaller sizes, eg https://docs.google.com/presentation/d/17_AjeagqThCof_LG1ApE8hqhFBJ-M_12mGgK_pcvkng/edit

ccing designers who are thinking through this. Please don't implement favicon squishing just yet. :)

 

That article comes right on time, I was putting together come thoughts around this since pkasting pointed me to bug 188.

The screenshots from varkha@ show how less recognisable the tabs are when you switch from favicon to 1/2 letters from the title. Sticking to favicons keeps the tab identifiable.

Adding other reference screenshots from Vivaldi and Opera, where overlapping icons.
Screen Shot 2017-05-16 at 16.21.55.png
337 KB View Download
Screen Shot 2017-05-16 at 16.26.14.png
323 KB View Download
Note that  bug 722927  covers the tab shape exploration in comment 3.

I think this bug and that one are largely orthogonal, though they should be considered cohesively.  My suggestion is that we find someone interested in doing the engineering here and just start playing with this, to avoid the possibility that we navel-gaze too long (as we've arguably done already) :)

Comment 6 by varkha@chromium.org, May 16 2017

Cc: girard@chromium.org est...@chromium.org
#5, that was exactly my motivation for filing this separately. I think there are some low-hanging fruits here.
Cc: spqc...@chromium.org shrike@chromium.org jfincher@google.com
 Issue 637343  has been merged into this issue.
Friendly ping to see if there is an engineering, or if we can get eng support to work on this for Mac and Views.

This would be a much appreciated change to those users with lots of tabs and buys some time before future tab efforts land. 

I'm willing to provide UX support, prototyping, as part of on going tab efforts. If we use the starting point of just showing the favicon and clipping it (without shaping it to the tab), then we can refine from that. 

Comment 9 by rpop@chromium.org, Jan 19 2018

PK, would it make sense for you to also take this?
Yeah, probably.  This would be a lot easier for a new person to tackle than dynamic tab shape would, though, if we're looking for such opportunities.
I was hoping that someone else could do this bug so pkasting can focus on the shaping. 

Also because this isn't contingent on the tab shaping part and we should really have shipped this last year! 
Hello everyone!
If you don't mind i'd like to work on this. May I?
Though I did't get any response yet, I implemented this roughly. In the process, I find that we need to give some thought to throbber too. Which way is better, clip or squish? Please give me your opinion :)

Here's CL to test this https://chromium-review.googlesource.com/c/chromium/src/+/890696
favicon_test.png
7.6 KB View Download
Thanks,

Seems like in your screenshot the favicon is clipped but the loader is squished. I need to patch your CL to test but immediately we shouldn't squash the progress spinner.

@pkasting since tab shaping is on hold for now, did you want to take this on, or guide Sangwoo108? 

I'm happy to provide guidance.

My suggestion for now is:
* Clip both icon and throbber, rather than squashing
* Clip the edges equally (leaving the center section), rather than clipping off the trailing edge

Bonus points:
* Allow the icon to eat the padding even into the "slanted" area, and clip to the tab shape (there's already a path you can use to clip to, so the clipping itself should be trivial here; the tricky bit is the positioning logic).
I would suggest fading to a clip rather than an abrupt clip (whether that clip is vertical or matches the tab shape).
I agree that a couple-pixel fade will look even better especially in the tab-shape-clip case; we can implement that as an enhancement.  We already fade text this way today, so it shouldn't be too hard to do something similar.
@edwardjung Exactly :)

@pkasting, @est Thank you for guidance. I'll do my best :)
Attach some pictures to share current state.
clip_favicon.png
4.3 KB View Download
throbber.png
8.1 KB View Download
fade_one_third.png
16.9 KB View Download
The fading actually looks weird to me because it's implemented as fading the right side (but not the left), and it fades on a horizontal gradient but we clip to a diagonal tab edge, so the top doesn't actually get faded at all while the bottom fades "too early".

I think if we're going to fade, we'd need to do it at both edges, on diagonal gradients that match the tab slope.  This is nastier to implement than I thought it would be, so it probably makes sense to punt it (unless you think you know how to do it easily).

Even without this fading, I think the clipped favicons look surprisingly (shippably) good.  Edward, WDYT?
Owner: pkasting@chromium.org
Status: Assigned (was: Available)
[@pkasting, I assigned it to you for the moment as sangwoo108@ isn't a project member]

@sangwoo108 could you update your CL so we can patch to get an a better feel how this looks in the not so extreme cases. Also wanted to check the throbber animation when clipped.

My immediate reaction was I was expecting some inner padding to the tab itself so the favicons don't merge into each other. I don't know how this would look with 1dp or 2dp padding. 

Fading: agree with pkasting the fading needs to match the angles of the tab on both sides if we we're doing this. I would like to compare no fading but with some padding and the fading option. 

Overall this is a way better state than we have now, but I don't want that to be the bar we're setting ourselves. Would also like to get this front of our visual designers for any other thoughts they may have.


@21: By "inner padding", I assume you mean "following the contour of the tab edge?  That will be trickier to implement, since we don't want to inset every edge, but only the sides.  That is, we'd want "padding" to work a bit like the proposal for "fading" I give above, but with a hard transition instead of a blended one.  I can think how to do that (by changing the function that computes the fill path), but getting some of the details right could be nontrivial.

And actually, I'm not sure that'll do as much as you think, since when tab A is atop tab B, tab B won't have any padding "outside" the edge of tab A that overlaps it, but will be clipped by it directly.

I'm a little worried as well about "when in this state, we should maximize information density, even at the cost of visual cleanliness, since that keeps it maximally usable".  Losing even 1 dp off each side of an already-clipped favicon seems like a meaningful usability cost.

I would certainly like to see this with padding just to see how big a deal the above is, I just don't know whether it will be simple to implement.
@edward Sure. You can patch clip + fade version from https://chromium-review.googlesource.com/c/chromium/src/+/890696 and clip only version from https://chromium-review.googlesource.com/c/chromium/src/+/897022
(The second one is only for testing)

As for throbber, I guess it might not be clipped when it has own layer. But it seems perfectly fit in tab for me when it's centered. Please check it out and let me know if throbber needs further work :)

@edward @pkasting
* Fading : It certainly looks weird to me too. Let me try fading both side along tab's shape. I think I can sort out this.
* Padding : I'm not sure I can do that easily but let me try this too.
* I didn't looked into cocoa yet, but when views implementation finishes, I'll try that too.

Attach some pictures to share progress in "Diagonal fading"

* Fading starts from both side on top.
* Fading width can be different according to tab's width.
mask.png
31.8 KB View Download
mask_extream.png
31.2 KB View Download
clip_diagonal.png
23.0 KB View Download
clip_diagonal_extream.png
12.2 KB View Download
I think we can get away with more of a fade from both sides. Or possibly adjusting the fade so that it's full opacity along the edges and more quickly get's to 0 opacity. 

Thanks for making progress so quickly. I'll try out the CLs today when I get the chance.

One additional request, once we're happy with some options (maybe fade, padding, straight clipping), would it be possible to get them behind a flag, for more folks to try. 
@edward Yes. The fade is too faint, isn't it? Let me tune this. Thank you for pointing this out.

As for flags, I totally agree with you. I've been thinking about it too :) I think it won't take long.
@Sangwoo, I met with Alan our visual design and went through the current implementation with the various options we are exploring. The faded version felt the best to him if can refine this a bit more. The straight clipping feels too sharp. The only option we would want to look at is a padding one without fading.

Thanks for your efforts on this.
Re: To clarify the padding option. This is where a straight clip happens against an insetted tab shape. The padding I'm thinking is minimal - 1dp or 2dp.

Actually there was another option that Alan raised, which was to shrink the whole favicon to the available tab space. Given the low fidelity of favicons, I wonder if the favicon would be completely unrecognisable at 8dp x 8dp.
#28, I think shrinking icons will look worse than what's in the recent screenshots here. Also I suspect the tabs layouts are independent from one another and so special care would need to be taken not to have different favicon resolutions for adjacent tabs at some window widths.

Separately I've noticed that sometimes the close tab icon gets misplaced when opening lots of tabs, probably a separate bug that has to do with the assumption that the tab having a close button has some minimum width.

Awesome progress, can't wait to see this in action!
Screenshot 2018-02-02 at 15.14.11.png
4.1 KB View Download
Screenshot 2018-02-02 at 15.14.21.png
4.5 KB View Download
@29: Misplaced close button is a known bug on file elsewhere.

I agree that shrinking the tab favicons will look worse than all other options.
@varkha Thanks :)

Current state:
Now you can try these via chrome://flags . Please check out a flag named "More recognizable tab". There are several options.
- Default(Clip only)
- Clip with padding
- Fading - weak
- Fading - Strong (Opacity drops to 0 twice faster than "weak" above)
- Scale (For Alan's suggestion, hope I didn't misunderstand his request)

https://chromium-review.googlesource.com/c/chromium/src/+/890696
clip.png
2.7 KB View Download
clip_with_padding.png
3.1 KB View Download
fading_weak.png
2.9 KB View Download
fading_strong.png
5.5 KB View Download
scale.png
1.4 KB View Download
Thanks for the update. The flags selection is very welcome.

+ The fading on both the weak and strong seem to overlap into the icon too much causing it to be faint. Are the fades from each side intersecting causing this? Could the fade width be narrower or adjusted based on available width? Only a slight adjustment from your initial implementations is required.

+ Scaled version, clearly doesn't work very well the favicon is too pixelated to be distinguishable.

+ Clip with padding - the diagonal clipping is jagged, losing an extra pixel from each edge makes it slightly less identifiable at the extreme case where the favicon becomes a triangle. However it feels neater as the favicons don't merge into each other so I'm . 

For me the clip with padding and a more refined fading would be the options to consider. We can remove the strong version of the fade.

@edwrad Thank you for the feedback

* Fading: Yes, The fading from both side can cross as they have fixed width(as wide as tab's padding, so they can intersect at the top). I guess making it narrower is not that big like you guessed. For now, Their width is related to padding for a tab. I'll try to make it aesthetic.

* Clip with padding and jagging: Maybe it's just a matter of antialiasing. Let me try this.
@edward

I tried to make fading better. Fading starts at the same point of initial version and fading width is narrower. And fading start point is affected by available capacity, Fading looks slightly different. If you're satisfied with this version, I'll update my CL. 

And I applied antialiasing to clip. This looks much better. Thank you :)
fade-tuned.png
3.4 KB View Download
fading-tuned-2.png
4.3 KB View Download
clip-with-padding-antialiasing.png
3.4 KB View Download
Thanks, the screenshots look better. The fading still makes the favicon look desaturated, maybe the fade width needs to be scaled / positioned back a few pixels more. If you could update the CL I can check more closely.

@pkasting any preferences. I'm siding with the straight clip with padding. 
I like the clip with padding best, but I think the amount of padding there is too large.  The proportions on the screenshot don't match 1x or 2x on my system so it's hard for me to tell what padding it is.  It looks as if that's maybe 1.5x with 2-3 DIP of padding?  I'd like to see 1x and 2x screenshots with 1 DIP of padding.

I could probably generate this locally, I just don't have time to patch the CL in and play with it at the moment.
Agreed, 1dp padding may look better. @sangwoo could you make the requested changes for a 1dp padding. 



@peter You're right. The screenshots above were taken where DPI is 1.5x and padding was 2.

@peter @edward Here it is. I think 1 dip padding gives us more recognizable favicon as you expected. I attached 4 files with different dpi and padding so that you can compare them.

And I also made fading narrower. Though clipping and fading look quite similar, they are slightly different according to DPI and available width. So I've updated CL. I hope you check it out if you have time. Thank you :)
dpi1-padding1.png
1.7 KB View Download
dpi1-padding2.png
1.6 KB View Download
dpi2-padding1.png
4.0 KB View Download
dpi2-padding2.png
3.9 KB View Download
dpi1-fading.png
1.8 KB View Download
dpi2-fading.png
3.9 KB View Download
1dp padding looks great. The fading option is improved at the smaller sizes, but at the wider widths it seems to start too early and obscures too much of the favicon shape. 

I don't think we need to tweak any more. I'll ask UI review to see if we want to experiment, but I'll be happy to get this in with the 1dp padding on by default. 

Attached some extra 1x screenshot (done through remote desktop). 
Screen Shot 2018-02-07 at 16.06.47.png
90.2 KB View Download
Screen Shot 2018-02-07 at 16.06.14.png
101 KB View Download
Screen Shot 2018-02-07 at 16.07.21.png
114 KB View Download
Screen Shot 2018-02-07 at 16.09.44.png
118 KB View Download
Does this also work for Mac because I don't see a chrome flag for mac it's only unix and windows? Is there any work to be done for it to work on mac?
Re: #40 The code isn't checked in yet, but also it's views only so will be for Windows, Linux and CrOS for now. A separate implementation for Mac would be required. 
@edward Thank you. Please let me know when the decision is made. Then I'll do clean up and restart code review process with @peter :)

One question, It's okay to remove flags and fading version, isn't it?




@41 Can you show me the file where the mac version will be implemented if it doesn't require Objective C/Swift I can implement it myself. I really want this feature on Mac.
Re #41: The implementation will be in Objective C.

We hope to be able to get this onto Mac too.
Cc: -shrike@chromium.org
Re: #42 SangWoo, we have approval for the clipping with 1dp padding. Yes please remove the experiment and fading code. Thanks and appreciate your work on this.
Status: Fixed (was: Assigned)
Fixed!

All thanks go to sangwoo108@gmail.com for the work here.
Project Member

Comment 48 by bugdroid1@chromium.org, Feb 14 2018

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

commit 6a306a35961de0cbdd5eebc12dbb43a54f8ab939
Author: sangwoo.ko <sangwoo108@gmail.com>
Date: Wed Feb 14 23:04:39 2018

Show favicon even if there's no enough space

In this case, we will do:
1. Align favicon ceter.
2. Clip favicon to the tab's shape with 1 DIP padding.

Bug:  722841 
Change-Id: Ie69c7135a560a57656e8b777009b9fa04c00cc1f
Test: TabTest.LayoutAndVisibilityOfElements
Reviewed-on: https://chromium-review.googlesource.com/890696
Commit-Queue: Peter Kasting <pkasting@chromium.org>
Reviewed-by: Peter Kasting <pkasting@chromium.org>
Cr-Commit-Position: refs/heads/master@{#536862}
[modify] https://crrev.com/6a306a35961de0cbdd5eebc12dbb43a54f8ab939/chrome/browser/ui/views/tabs/tab.cc
[modify] https://crrev.com/6a306a35961de0cbdd5eebc12dbb43a54f8ab939/chrome/browser/ui/views/tabs/tab.h
[modify] https://crrev.com/6a306a35961de0cbdd5eebc12dbb43a54f8ab939/chrome/browser/ui/views/tabs/tab_unittest.cc

Great work Sang Woo. Thanks being so responsive to our comments!

We now need to see if there is someone able to get the same thing done for Mac. 
@49 Can you give me the googlesource URL for the Mac file that needs to be changed?

Sign in to add a comment