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

Issue 2072643002: MD Settings: animation interface (Closed)

Created:
4 years, 6 months ago by michaelpg
Modified:
4 years, 5 months ago
Reviewers:
Dan Beam
CC:
chromium-reviews, michaelpg+watch-md-settings_chromium.org, jlklein+watch-closure_chromium.org, michaelpg+watch-md-ui_chromium.org, arv+watch_chromium.org, vitalyp+closure_chromium.org, dbeam+watch-settings_chromium.org, stevenjb+watch-md-settings_chromium.org, dbeam+watch-closure_chromium.org, shans, dstockwell
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

MD Settings: step 1 of modular, testable Settings transitions Settings animations, Settings UI, and the routing/navigation are all tightly coupled. The animations are complicated[1], fragile and hard to test; as a result, they constantly become janky. It's also hard to add polish or write new transitions. Step 1: simple wrappers around web animations. * settings.animation.Animation adds a |finished| Promise which Chrome hasn't implemented natively yet. Step 2: interface for grouping animations to start/stop together. * settings.animation.AnimationGroup is an abstract animation or group of animations which can succeed or be cancelled, immediately or asynchronously. This is just a nice interface around patterns we are using throughout material WebUI. Example usage: http://pastebin.com/GZegDqLh A router doesn't have to keep track of the state of animations: http://pastebin.com/YwCzmXFv Step 3 is to port existing animations by wrapping them in AnimationGroup, removing the weird TransitionBehavior, and writing tests. Step 4 is to rework the router to make use of AnimationGroup Promises. Step 5 (optional nice-to-have) is to separate navigation from routing so navigation events can be queued, canceled and reversed more smoothly. BUG=589681 R=dbeam@chromium.org CQ_INCLUDE_TRYBOTS=tryserver.chromium.linux:closure_compilation [1] https://cs.chromium.org/chromium/src/chrome/browser/resources/settings/settings_page/main_page_behavior.js?q=main_page_behavior.js&sq=package:chromium&dr&l=43-78 Committed: https://crrev.com/239ecba6156f4e179b09107953638f7c8d8db09e Cr-Commit-Position: refs/heads/master@{#404097}

Patch Set 1 #

Total comments: 11

Patch Set 2 : simplify #

Total comments: 4

Patch Set 3 : Transition constructor => AnimationGroup interface #

Patch Set 4 : fixes #

Patch Set 5 : rebase #

Total comments: 3

Patch Set 6 : Remove AnimationGroup #

Patch Set 7 : rebase why not #

Unified diffs Side-by-side diffs Delta from patch set Stats (+261 lines, -6 lines) Patch
A chrome/browser/resources/settings/animation/animation.html View 1 chunk +3 lines, -0 lines 0 comments Download
A chrome/browser/resources/settings/animation/animation.js View 1 1 chunk +92 lines, -0 lines 0 comments Download
A + chrome/browser/resources/settings/animation/compiled_resources2.gyp View 1 2 3 4 5 1 chunk +3 lines, -2 lines 0 comments Download
M chrome/browser/resources/settings/compiled_resources2.gyp View 1 2 3 4 1 chunk +1 line, -0 lines 0 comments Download
M chrome/browser/resources/settings/settings_resources.grd View 1 2 3 4 5 6 1 chunk +6 lines, -0 lines 0 comments Download
M chrome/chrome_tests.gypi View 1 2 3 4 5 6 1 chunk +1 line, -0 lines 0 comments Download
M chrome/test/data/webui/mocha_adapter.js View 1 chunk +8 lines, -4 lines 0 comments Download
A chrome/test/data/webui/settings/animation_browsertest.js View 1 2 3 4 5 1 chunk +147 lines, -0 lines 0 comments Download

Dependent Patchsets:

Messages

Total messages: 37 (17 generated)
michaelpg
4 years, 6 months ago (2016-06-16 01:04:29 UTC) #5
Dan Beam
+shans, dstockwell
4 years, 6 months ago (2016-06-17 19:02:42 UTC) #6
michaelpg
On 2016/06/17 19:02:42, Dan Beam wrote: > +shans, dstockwell Hi guys. The TL;DR: is that ...
4 years, 6 months ago (2016-06-17 19:09:43 UTC) #7
Dan Beam
https://codereview.chromium.org/2072643002/diff/1/chrome/browser/resources/settings/animation/animation.js File chrome/browser/resources/settings/animation/animation.js (right): https://codereview.chromium.org/2072643002/diff/1/chrome/browser/resources/settings/animation/animation.js#newcode45 chrome/browser/resources/settings/animation/animation.js:45: resolve(self.animation_); why are we keeping |animation_| private but passing ...
4 years, 6 months ago (2016-06-17 19:22:42 UTC) #8
Dan Beam
https://codereview.chromium.org/2072643002/diff/1/chrome/browser/resources/settings/animation/transition.js File chrome/browser/resources/settings/animation/transition.js (right): https://codereview.chromium.org/2072643002/diff/1/chrome/browser/resources/settings/animation/transition.js#newcode59 chrome/browser/resources/settings/animation/transition.js:59: function ImmediateTransition() {} On 2016/06/17 19:22:42, Dan Beam wrote: ...
4 years, 6 months ago (2016-06-20 23:28:03 UTC) #9
michaelpg
see usage in follow-up, coming soon to a CL near you https://codereview.chromium.org/2072643002/diff/1/chrome/browser/resources/settings/animation/animation.js File chrome/browser/resources/settings/animation/animation.js (right): ...
4 years, 5 months ago (2016-06-28 23:17:23 UTC) #10
Dan Beam
can you remove transition.js from this CL or explain why it's useful yet? i still ...
4 years, 5 months ago (2016-07-01 00:33:24 UTC) #11
Dan Beam
https://codereview.chromium.org/2072643002/diff/20001/chrome/browser/resources/settings/animation/animation.js File chrome/browser/resources/settings/animation/animation.js (right): https://codereview.chromium.org/2072643002/diff/20001/chrome/browser/resources/settings/animation/animation.js#newcode41 chrome/browser/resources/settings/animation/animation.js:41: this.finished = new Promise(function(resolve, reject) { so the point ...
4 years, 5 months ago (2016-07-01 00:33:58 UTC) #12
Dan Beam
ok, I read your jsbins. this makes slightly more sense to me now. can we ...
4 years, 5 months ago (2016-07-01 01:20:44 UTC) #13
michaelpg
https://codereview.chromium.org/2072643002/diff/20001/chrome/browser/resources/settings/animation/animation.js File chrome/browser/resources/settings/animation/animation.js (right): https://codereview.chromium.org/2072643002/diff/20001/chrome/browser/resources/settings/animation/animation.js#newcode41 chrome/browser/resources/settings/animation/animation.js:41: this.finished = new Promise(function(resolve, reject) { On 2016/07/01 00:33:58, ...
4 years, 5 months ago (2016-07-01 20:21:46 UTC) #16
michaelpg
On 2016/07/01 01:20:44, Dan Beam wrote: > ok, I read your jsbins. this makes slightly ...
4 years, 5 months ago (2016-07-01 20:24:45 UTC) #17
Dan Beam
i would still arguably move animation group into the next CL (i.e. when you actually ...
4 years, 5 months ago (2016-07-01 23:22:24 UTC) #18
michaelpg
On 2016/07/01 23:22:24, Dan Beam wrote: > i would still arguably move animation group into ...
4 years, 5 months ago (2016-07-02 00:56:22 UTC) #20
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2072643002/140001
4 years, 5 months ago (2016-07-07 04:59:30 UTC) #25
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2072643002/140001
4 years, 5 months ago (2016-07-07 05:00:08 UTC) #28
commit-bot: I haz the power
Try jobs failed on following builders: linux_chromium_rel_ng on master.tryserver.chromium.linux (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.linux/builders/linux_chromium_rel_ng/builds/258300)
4 years, 5 months ago (2016-07-07 05:45:28 UTC) #30
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2072643002/140001
4 years, 5 months ago (2016-07-07 06:43:17 UTC) #32
commit-bot: I haz the power
Committed patchset #7 (id:140001)
4 years, 5 months ago (2016-07-07 07:25:22 UTC) #34
commit-bot: I haz the power
CQ bit was unchecked.
4 years, 5 months ago (2016-07-07 07:25:28 UTC) #35
commit-bot: I haz the power
4 years, 5 months ago (2016-07-07 07:26:42 UTC) #37
Message was sent while issue was closed.
Patchset 7 (id:??) landed as
https://crrev.com/239ecba6156f4e179b09107953638f7c8d8db09e
Cr-Commit-Position: refs/heads/master@{#404097}

Powered by Google App Engine
This is Rietveld 408576698