New tab button icon/ink drop tweaks per spec |
|||||||
Issue descriptionThere are at least four known issues with the current new tab button in refresh per the spec at https://docs.google.com/presentation/d/1EO7TOpIMJ7QHjaTVw9St-q6naKwtXX2TwzMirG5EsKY/edit#slide=id.g36e7d8d795_33_195 : (1) The icon glyph is 12x12 rather than 14x14 DIP in touchable mode. (2) The icon is COLOR_TAB_TEXT (GG800) rather than COLOR_BACKGROUND_TAB_TEXT (GG700). (3) There is no ink drop on hover. (4) The pressed ink drop is currently "black at 14%" (see code in constructor and UpdatInkDropBaseColor()) rather than "GG900 at 16%" (for non-touch) or "GG900 at 10% base/8% ripple" (for touch). CCing Allen since some of his changes related to bug 848493 may affect this.
,
Jun 8 2018
,
Jun 13 2018
,
Jun 14 2018
(1), (2), (3) are addressed: https://chromium-review.googlesource.com/c/chromium/src/+/1100196 (4) seems to have been addressed by another recent CL. After enabling the hover ink drop highlight, some clipping/masking logic is apparently cutting off the ink drop highlight but not the ink drop ripple. This seems wrong, but is probably a separate issue. I will look into it, but advice is welcome - and let me know if I should file a separate bug for this ink drop rendering inconsistency.
,
Jun 14 2018
1, 2, 3 LGTM. The clipping does seem to be another issue. I defer to kylixrd@ on how to proceed.
,
Jun 14 2018
Question for pkasting@ : On (1), should the 12 DIP vs 14 DIP be coming from a central source of information that chooses icon sizes, etc. -- or is this from-the-spec info fair game for coding directly to source? I don't like hard-coding numbers, but it seems common in new_tab_button.cc and I'm unaware of a styles structure or some such source of truth.
,
Jun 15 2018
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/775707e91ade177c36bbe952abe75c0090420ae8 commit 775707e91ade177c36bbe952abe75c0090420ae8 Author: Orin Jaworski <orinj@chromium.org> Date: Fri Jun 15 19:36:56 2018 Tweak new tab button icon/ink drop per spec Use 14x14 DIP icon in touchable mode, change icon color from COLOR_TAB_TEXT (GG800) to COLOR_BACKGROUND_TAB_TEXT (GG700), and turn on the ink drop hover highlight. Bug: 851041 Change-Id: I6b415d03a39914f7f35003be511b45332d1543f7 Reviewed-on: https://chromium-review.googlesource.com/1100196 Commit-Queue: Orin Jaworski <orinj@chromium.org> Reviewed-by: Justin Donnelly <jdonnelly@chromium.org> Reviewed-by: Scott Violet <sky@chromium.org> Cr-Commit-Position: refs/heads/master@{#567765} [modify] https://crrev.com/775707e91ade177c36bbe952abe75c0090420ae8/chrome/browser/ui/views/tabs/new_tab_button.cc
,
Jun 18 2018
orinj: Is this fixed?
,
Jun 18 2018
I addressed items 1-3 and 4 was apparently already addressed, so I think this issue is resolved, but it may very well have revealed a new issue as shown in the screenshot. Should we open a new bug for that and mark this one fixed? As a matter of principle, I don't like the idea of calling my own bugs 'fixed', I think that should always come from a separate, ideally independent entity; but I am not familiar with the process here yet.
,
Jun 18 2018
I think the clipping issue in the screenshots of c#4 is reported in issue 853700 .
,
Jun 18 2018
Comment 0 item (4) does not appear to be addressed, by code inspection. For example, https://cs.chromium.org/chromium/src/chrome/browser/ui/views/tabs/new_tab_button.cc?rcl=4429dfc0c28654be26b2e2f3190b482bfae5c58e&l=103 still says 0.14.
,
Jun 18 2018
Okay, I had seen some changes affecting its color elsewhere in the code recently, but the link is helpful and I will look more into (4) soon. I am working in this code right now on another open issue.
,
Jun 21 2018
Here are screens of touch and non-touch ink effects after opacity tweaks of Patch Set 2 on https://chromium-review.googlesource.com/c/chromium/src/+/1109459
,
Jun 22 2018
OK, looking at those screenshots and the spec, I think: * The value passed to set_ink_drop_visible_opacity() is an opacity atop the hovered state, as opposed to atop the background. So for the non-touch case for example, the CL paints the hover as GG900 10% atop the frame, and then the ripple as GG900 16% atop the hover. * The spec for non-touch gives a "pressed" state in terms of the opacity against the background, but for touch gives a pressed ripple in terms of the opacity against the hover. As I asked bettes@ via email (no reply yet), it's not clear if the spec is trying to disable ripples for non-touch, and if so, whether that would be a change from other buttons (which currently have ripples on non-touch). Here's my suggestion: change the ripple opacity to 8% all the time. This makes both touch and non-touch exactly match the touch spec. The net effect on touch is very similar to the non-touch spec anyway (GG900 @16% is close to GG900 @8% atop GG900 @10%), so until we get further clarity from Alan on what the intent of the non-touch design is, this is as close as I think we should try to get.
,
Jun 22 2018
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/3ee6269d98e83b59bb90c0499eea51abdd0972f1 commit 3ee6269d98e83b59bb90c0499eea51abdd0972f1 Author: Orin Jaworski <orinj@chromium.org> Date: Fri Jun 22 17:28:08 2018 Change new tab button ink drop opacity New tab button ink drop effect is made less opaque for touch and more opaque for non-touch interfaces. Bug: 851041 Change-Id: I2243a44f3d98899eace803a0681e1b060014e08e Reviewed-on: https://chromium-review.googlesource.com/1109459 Commit-Queue: Orin Jaworski <orinj@chromium.org> Reviewed-by: Peter Kasting <pkasting@chromium.org> Cr-Commit-Position: refs/heads/master@{#569680} [modify] https://crrev.com/3ee6269d98e83b59bb90c0499eea51abdd0972f1/chrome/browser/ui/views/tabs/new_tab_button.cc
,
Jun 25 2018
bettes: Is there additional work required here?
,
Jun 25 2018
Leaving open for now since we don't actually match the spec, because I want to understand the intent of the spec (see private email/comment 14).
,
Jun 25 2018
Word from bettes@ is "looks good" |
|||||||
►
Sign in to add a comment |
|||||||
Comment 1 by pkasting@chromium.org
, Jun 8 2018Labels: Hotlist-Helper