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

Issue 1390113006: Added material design mouse hover feedback support. (Closed)

Created:
5 years, 2 months ago by bruthig
Modified:
4 years, 11 months ago
CC:
chromium-reviews, tfarina, dcheng
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Added material design mouse hover feedback support. Overview of changes: - Added InkDropHover class that manages animating a Layer to show visual feedback for mouse hover. - Wired the InkDropHover class in to the InkDropAnimationControllerImpl. - Wired some Views up to use the hover animation. Overview of Hover behavior: - Hover will fade in when mouse enters an enabled View - Hover will fade out instantly if an ink drop animation is initiated. - Hover will fade back in, after a delay, when an ink drop animation completes and the mouse is still hovering the View. TEST=InkDropHoverTest.InitialStateAfterConstruction TEST=InkDropHoverTest.IsHoveredStateTransitions TEST=InkDropAnimationControllerFactoryTest.HoveredStateAfterAnimateToState TEST=HoveredStateAfterHoverTimerFiresWhenHostIsHovered.SetHoveredIsHovered TEST=HoveredStateAfterHoverTimerFiresWhenHostIsHovered.HoveredStateAfterHoverTimerFiresWhenHostIsHovered TEST=HoveredStateAfterHoverTimerFiresWhenHostIsHovered.HoveredStateAfterHoverTimerFiresWhenHostIsNotHovered BUG=537238, 518919 Committed: https://crrev.com/c657e3be3b1248d7e7908c10fe75dc2f191dccee Cr-Commit-Position: refs/heads/master@{#371511}

Patch Set 1 #

Total comments: 8

Patch Set 2 : Used new CallbackLayerAnimationObserver constructors and added polish. #

Patch Set 3 : Changed the diff delta to depend on correct branch. #

Total comments: 15

Patch Set 4 : Addressed pkasting@'s comments from patch set 3. #

Patch Set 5 : Merged with master. #

Patch Set 6 : Merged in master. #

Patch Set 7 : Merge with master #

Patch Set 8 : Removed hover auto fade in after ripple animation. #

Patch Set 9 : Fixed the InkDropAnimationControllerFactoryTests. #

Patch Set 10 : Initialized radius members of InkDropAnimationControllerImpl. #

Total comments: 14

Patch Set 11 : Added an InkDropConsumer and fade in hover after a ripple animation after a delay. #

Patch Set 12 : Merge with master. #

Patch Set 13 : Fixed the *InkDropControllerFactory* tests to work with the hover timer. #

Total comments: 2

Patch Set 14 : Addressed pkasting@'s comments from patch set 13. #

Total comments: 5

Patch Set 15 : Merged with master. #

Patch Set 16 : Added layer names for the hover layers. #

Patch Set 17 : Merge with master. #

Patch Set 18 : Merge with https://codereview.chromium.org/1411833006/#ps500001 #

Patch Set 19 : Uploaded diff delta based on https://codereview.chromium.org/1411833006/#ps500001 #

Patch Set 20 : Merged with master/https://codereview.chromium.org/1478303003 #

Patch Set 21 : Merged with master / https://codereview.chromium.org/1478303003. #

Patch Set 22 : Diff based on https://codereview.chromium.org/1478303003 #

Patch Set 23 : Merge with master. #

Patch Set 24 : Merge with https://codereview.chromium.org/1544613002/ #

Patch Set 25 : Uploaded diff based on https://codereview.chromium.org/1544613002/ #

Patch Set 26 : Extracted CustomButton inheriting InkDropHost to separate CL. #

Patch Set 27 : Fixed merge with https://codereview.chromium.org/1550443002/ #

Patch Set 28 : Removed tests duplicated by InkDropAnimationControllerFactoryTest. #

Patch Set 29 : Merge with changes in https://codereview.chromium.org/1550443002/ #

Patch Set 30 : Merge with master. #

Total comments: 2

Patch Set 31 : Moved MouseEntered/Exit() to hover handling in to the ButtonInkDropDelegate. #

Total comments: 10

Patch Set 32 : Merge with master. #

Patch Set 33 : Addressed some simple comments from patch set 30. #

Patch Set 34 : Merge with master. #

Patch Set 35 : Changed the InkDropAnimationControllerImpl to destroy its timer when not running. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+669 lines, -16 lines) Patch
M ui/views/animation/button_ink_drop_delegate.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 1 chunk +2 lines, -0 lines 0 comments Download
M ui/views/animation/button_ink_drop_delegate.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 1 chunk +15 lines, -0 lines 0 comments Download
M ui/views/animation/ink_drop_animation.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 1 chunk +0 lines, -1 line 0 comments Download
M ui/views/animation/ink_drop_animation_controller.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 2 chunks +8 lines, -2 lines 0 comments Download
M ui/views/animation/ink_drop_animation_controller_factory.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 3 chunks +19 lines, -2 lines 0 comments Download
M ui/views/animation/ink_drop_animation_controller_factory_unittest.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 7 chunks +42 lines, -3 lines 0 comments Download
M ui/views/animation/ink_drop_animation_controller_impl.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 5 chunks +46 lines, -1 line 0 comments Download
M ui/views/animation/ink_drop_animation_controller_impl.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 7 chunks +124 lines, -5 lines 0 comments Download
A ui/views/animation/ink_drop_animation_controller_impl_unittest.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 1 chunk +87 lines, -0 lines 0 comments Download
M ui/views/animation/ink_drop_delegate.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 1 chunk +3 lines, -0 lines 0 comments Download
M ui/views/animation/ink_drop_host.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 1 chunk +3 lines, -1 line 0 comments Download
A ui/views/animation/ink_drop_hover.h View 1 2 3 4 5 6 7 8 9 10 1 chunk +69 lines, -0 lines 0 comments Download
A ui/views/animation/ink_drop_hover.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 1 chunk +102 lines, -0 lines 0 comments Download
A ui/views/animation/ink_drop_hover_unittest.cc View 1 1 chunk +58 lines, -0 lines 0 comments Download
M ui/views/animation/ink_drop_painted_layer_delegates.h View 1 2 3 4 5 6 7 8 9 10 11 1 chunk +25 lines, -0 lines 0 comments Download
M ui/views/animation/ink_drop_painted_layer_delegates.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 2 chunks +31 lines, -0 lines 0 comments Download
M ui/views/animation/test/test_ink_drop_host.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 1 chunk +7 lines, -0 lines 0 comments Download
M ui/views/animation/test/test_ink_drop_host.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 2 chunks +6 lines, -1 line 0 comments Download
M ui/views/controls/button/custom_button.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 2 chunks +4 lines, -0 lines 0 comments Download
M ui/views/controls/button/custom_button.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 4 chunks +12 lines, -0 lines 0 comments Download
M ui/views/controls/button/custom_button_unittest.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 1 chunk +2 lines, -0 lines 0 comments Download
M ui/views/views.gyp View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 2 chunks +4 lines, -0 lines 0 comments Download

Messages

Total messages: 47 (14 generated)
tdanderson
Overall LG, please see a few comments. https://codereview.chromium.org/1390113006/diff/1/chrome/browser/ui/views/toolbar/toolbar_button.h File chrome/browser/ui/views/toolbar/toolbar_button.h (right): https://codereview.chromium.org/1390113006/diff/1/chrome/browser/ui/views/toolbar/toolbar_button.h#newcode104 chrome/browser/ui/views/toolbar/toolbar_button.h:104: // Animation ...
5 years, 2 months ago (2015-10-15 14:46:54 UTC) #2
bruthig
pkasting@chromium.org, Please review changes in: - chrome/browser/* sadrul@chromium.org, Please review changes in: - ui/views/* https://codereview.chromium.org/1390113006/diff/1/chrome/browser/ui/views/toolbar/toolbar_button.h ...
5 years, 2 months ago (2015-10-15 21:49:29 UTC) #4
Peter Kasting
https://codereview.chromium.org/1390113006/diff/40001/chrome/browser/ui/views/toolbar/toolbar_button.cc File chrome/browser/ui/views/toolbar/toolbar_button.cc (right): https://codereview.chromium.org/1390113006/diff/40001/chrome/browser/ui/views/toolbar/toolbar_button.cc#newcode147 chrome/browser/ui/views/toolbar/toolbar_button.cc:147: UpdateInkDropHoverState(); Why do you need this? https://codereview.chromium.org/1390113006/diff/40001/chrome/browser/ui/views/toolbar/toolbar_button.cc#newcode160 chrome/browser/ui/views/toolbar/toolbar_button.cc:160: void ...
5 years, 2 months ago (2015-10-15 22:21:33 UTC) #5
bruthig
pkasting@, can you PTAL? sadrul@, can you review the comments in toolbar_button.cc in patch set ...
5 years, 2 months ago (2015-10-16 14:57:21 UTC) #6
Peter Kasting
https://codereview.chromium.org/1390113006/diff/40001/chrome/browser/ui/views/toolbar/toolbar_button.cc File chrome/browser/ui/views/toolbar/toolbar_button.cc (right): https://codereview.chromium.org/1390113006/diff/40001/chrome/browser/ui/views/toolbar/toolbar_button.cc#newcode147 chrome/browser/ui/views/toolbar/toolbar_button.cc:147: UpdateInkDropHoverState(); On 2015/10/16 14:57:21, bruthig wrote: > On 2015/10/15 ...
5 years, 2 months ago (2015-10-16 18:41:16 UTC) #7
bruthig
https://codereview.chromium.org/1390113006/diff/40001/chrome/browser/ui/views/toolbar/toolbar_button.cc File chrome/browser/ui/views/toolbar/toolbar_button.cc (right): https://codereview.chromium.org/1390113006/diff/40001/chrome/browser/ui/views/toolbar/toolbar_button.cc#newcode160 chrome/browser/ui/views/toolbar/toolbar_button.cc:160: void ToolbarButton::OnMouseMoved(const ui::MouseEvent& event) { On 2015/10/16 18:41:16, Peter ...
5 years, 2 months ago (2015-10-16 19:10:51 UTC) #8
Peter Kasting
On 2015/10/16 19:10:51, bruthig wrote: > https://codereview.chromium.org/1390113006/diff/40001/chrome/browser/ui/views/toolbar/toolbar_button.cc > File chrome/browser/ui/views/toolbar/toolbar_button.cc (right): > > https://codereview.chromium.org/1390113006/diff/40001/chrome/browser/ui/views/toolbar/toolbar_button.cc#newcode160 > ...
5 years, 2 months ago (2015-10-16 19:21:31 UTC) #9
bruthig
sadrul@, Friendly ping. Can you review the comments in toolbar_button.cc in patch set 3. There ...
5 years, 2 months ago (2015-10-22 15:31:24 UTC) #10
sadrul
Sorry about the delay. On 2015/10/22 15:31:24, bruthig wrote: > sadrul@, Friendly ping. Can you ...
5 years, 2 months ago (2015-10-22 21:26:03 UTC) #11
bruthig
I've updated the patch set so that the hover is not automatically shown after a ...
5 years, 1 month ago (2015-11-02 16:42:31 UTC) #12
Peter Kasting
On 2015/11/02 16:42:31, bruthig wrote: > I've updated the patch set so that the hover ...
5 years, 1 month ago (2015-11-02 19:32:58 UTC) #13
sadrul
On 2015/11/02 19:32:58, Peter Kasting wrote: ... > We should be transitioning to hover as ...
5 years, 1 month ago (2015-11-04 19:58:11 UTC) #14
sadrul
For non-trivial CLs such as this, please make sure the CL description is up-to-date, and ...
5 years, 1 month ago (2015-11-04 20:00:55 UTC) #15
bruthig
I've updated the hover to delay for 1 second before fading in after an ink ...
5 years, 1 month ago (2015-11-11 21:48:45 UTC) #18
Peter Kasting
It looks like this CL and https://codereview.chromium.org/1422593003/ contain overlapping changes. Please split things up so ...
5 years, 1 month ago (2015-11-11 21:52:08 UTC) #19
bruthig
On 2015/11/11 21:52:08, Peter Kasting wrote: > It looks like this CL and https://codereview.chromium.org/1422593003/ contain ...
5 years, 1 month ago (2015-11-11 22:05:15 UTC) #20
Peter Kasting
LGTM. I copied over the applicable comment from the other review. https://codereview.chromium.org/1390113006/diff/240001/chrome/browser/ui/views/toolbar/toolbar_button.cc File chrome/browser/ui/views/toolbar/toolbar_button.cc (right): ...
5 years, 1 month ago (2015-11-11 22:08:24 UTC) #21
bruthig
https://codereview.chromium.org/1390113006/diff/240001/chrome/browser/ui/views/toolbar/toolbar_button.cc File chrome/browser/ui/views/toolbar/toolbar_button.cc (right): https://codereview.chromium.org/1390113006/diff/240001/chrome/browser/ui/views/toolbar/toolbar_button.cc#newcode159 chrome/browser/ui/views/toolbar/toolbar_button.cc:159: UpdateInkDropHoverState(); On 2015/11/11 22:08:24, Peter Kasting wrote: > Nit: ...
5 years, 1 month ago (2015-11-12 18:21:08 UTC) #22
Evan Stade
https://codereview.chromium.org/1390113006/diff/260001/ui/views/animation/ink_drop_consumer.h File ui/views/animation/ink_drop_consumer.h (right): https://codereview.chromium.org/1390113006/diff/260001/ui/views/animation/ink_drop_consumer.h#newcode13 ui/views/animation/ink_drop_consumer.h:13: // Pure virtual base class that defines the API ...
5 years, 1 month ago (2015-11-12 19:31:46 UTC) #24
bruthig
https://codereview.chromium.org/1390113006/diff/260001/ui/views/animation/ink_drop_consumer.h File ui/views/animation/ink_drop_consumer.h (right): https://codereview.chromium.org/1390113006/diff/260001/ui/views/animation/ink_drop_consumer.h#newcode15 ui/views/animation/ink_drop_consumer.h:15: class VIEWS_EXPORT InkDropConsumer { On 2015/11/12 19:31:46, Evan Stade ...
5 years, 1 month ago (2015-11-12 21:16:12 UTC) #25
bruthig
sadrul@, friendly ping! Just wanted to make sure this one was on your radar :)
5 years, 1 month ago (2015-11-17 21:38:51 UTC) #26
bruthig
FYI I've made this CL slightly similar by extracting some changes out in to https://codereview.chromium.org/1550443002/. ...
4 years, 12 months ago (2015-12-23 20:31:35 UTC) #29
bruthig
sadrul@, this patch is ready for review now as well. Can you PTAL?
4 years, 11 months ago (2016-01-08 21:48:44 UTC) #31
sadrul
https://codereview.chromium.org/1390113006/diff/580001/ui/views/controls/button/custom_button.cc File ui/views/controls/button/custom_button.cc (right): https://codereview.chromium.org/1390113006/diff/580001/ui/views/controls/button/custom_button.cc#newcode206 ui/views/controls/button/custom_button.cc:206: UpdateInkDropHoverState(); Can ButtonInkDropDelegate take care of updating the hover ...
4 years, 11 months ago (2016-01-12 15:55:38 UTC) #33
bruthig
sadrul@, PTAL https://codereview.chromium.org/1390113006/diff/580001/ui/views/controls/button/custom_button.cc File ui/views/controls/button/custom_button.cc (right): https://codereview.chromium.org/1390113006/diff/580001/ui/views/controls/button/custom_button.cc#newcode206 ui/views/controls/button/custom_button.cc:206: UpdateInkDropHoverState(); On 2016/01/12 15:55:38, sadrul wrote: > ...
4 years, 11 months ago (2016-01-12 16:27:17 UTC) #34
sadrul
ui/views/ looks good. It'd be good to have varkha@ review before landing as well. lgtm ...
4 years, 11 months ago (2016-01-22 15:23:18 UTC) #35
varkha
https://codereview.chromium.org/1390113006/diff/600001/chrome/browser/ui/views/toolbar/toolbar_button.cc File chrome/browser/ui/views/toolbar/toolbar_button.cc (right): https://codereview.chromium.org/1390113006/diff/600001/chrome/browser/ui/views/toolbar/toolbar_button.cc#newcode147 chrome/browser/ui/views/toolbar/toolbar_button.cc:147: UpdateInkDropHoverState(); Would this not be taken care by the ...
4 years, 11 months ago (2016-01-22 15:45:33 UTC) #36
bruthig
I've added some InkDropAnimationControllerImplTests. sadrul@, can you take a look at: - ui/views/animation/ink_drop_hover_unittest.cc varka@, PTAL. ...
4 years, 11 months ago (2016-01-25 22:39:17 UTC) #38
bruthig
We're planning to turn MD on by default today so I'm submitting this now. varkha@, ...
4 years, 11 months ago (2016-01-26 14:45:06 UTC) #39
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1390113006/680001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1390113006/680001
4 years, 11 months ago (2016-01-26 14:45:59 UTC) #42
commit-bot: I haz the power
Committed patchset #35 (id:680001)
4 years, 11 months ago (2016-01-26 14:51:16 UTC) #44
commit-bot: I haz the power
Patchset 35 (id:??) landed as https://crrev.com/c657e3be3b1248d7e7908c10fe75dc2f191dccee Cr-Commit-Position: refs/heads/master@{#371511}
4 years, 11 months ago (2016-01-26 14:52:18 UTC) #46
varkha
4 years, 11 months ago (2016-01-26 15:30:33 UTC) #47
Message was sent while issue was closed.
After-the-fact lgtm.

Powered by Google App Engine
This is Rietveld 408576698