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

Issue 2106013002: Move settings-section animations into setting-section, make better (Closed)

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

Description

Move settings-section animations into setting-section, make better This follows https://codereview.chromium.org/2072643002/ by creating OpenSectionTransition/CloseSectionTransition to manage animation lifetime. Most of the section animation/styling logic is now in settings_section.js where it belongs. This patch: * Removes most animation logic from MainPageBehavior and does away with TransitionBehavior entirely. * Makes the collapse animation position: absolute (instead of fixed). Anchoring it this way makes it MUCH easier to end up in the right place regardless of scroll events, height blips, etc. Should reduce jarring jumps at the end of transitions. * Moves most style changes into Web Animations instead of inline. This makes the animations fire-and-forget. Transition clean up is largely automatic, there are no styles to (forget to) remove (at the wrong time). If a transition is buggy, we're still likely to end up in the right place. * As a result of the above, simplifies the cancel/finish logic. We only have one animation going at a time. This is much easier to debug and should lead to fewer broken page states. This also fixes a LOT of bugs (and introduces a few less severe ones). It's annoying to test animations programmatically. I have CLs with tests, but they're still flaky. BUG=589681, 621245, 622172 CQ_INCLUDE_TRYBOTS=tryserver.chromium.linux:closure_compilation;master.tryserver.chromium.linux:closure_compilation

Patch Set 1 #

Patch Set 2 : cleanup #

Total comments: 19

Patch Set 3 : rebase on 2072643002 #4 #

Patch Set 4 : feedback #

Patch Set 5 : big rebase #

Total comments: 4

Patch Set 6 : rebase, minor fix #

Total comments: 19

Patch Set 7 : draft #

Patch Set 8 : Computed properties #

Total comments: 18

Patch Set 9 : Comments #

Patch Set 10 : Reworked properties/rebase #

Total comments: 7

Patch Set 11 : rebase #

Patch Set 12 : extract AnimationGroup into own CL #

Patch Set 13 : use strict #

Total comments: 5

Patch Set 14 : Refactor #

Total comments: 16
Unified diffs Side-by-side diffs Delta from patch set Stats (+570 lines, -428 lines) Patch
M chrome/browser/resources/settings/advanced_page/compiled_resources2.gyp View 1 2 3 4 5 6 7 8 9 10 11 12 13 1 chunk +0 lines, -1 line 0 comments Download
M chrome/browser/resources/settings/basic_page/compiled_resources2.gyp View 1 2 3 4 5 6 7 8 9 10 11 12 13 1 chunk +0 lines, -1 line 0 comments Download
M chrome/browser/resources/settings/settings_main/settings_main.html View 1 2 3 4 5 6 7 8 9 10 11 12 13 2 chunks +6 lines, -3 lines 1 comment Download
M chrome/browser/resources/settings/settings_main/settings_main.js View 1 2 3 4 5 6 7 8 9 10 11 12 13 5 chunks +57 lines, -14 lines 3 comments Download
M chrome/browser/resources/settings/settings_page/compiled_resources2.gyp View 1 2 3 4 5 6 7 8 9 10 11 12 13 3 chunks +13 lines, -10 lines 0 comments Download
M chrome/browser/resources/settings/settings_page/main_page_behavior.html View 1 2 3 4 5 6 7 8 9 10 11 12 13 1 chunk +2 lines, -1 line 0 comments Download
M chrome/browser/resources/settings/settings_page/main_page_behavior.js View 1 2 3 4 5 6 7 8 9 10 11 12 13 4 chunks +154 lines, -285 lines 10 comments Download
A chrome/browser/resources/settings/settings_page/open_section_transition.html View 1 2 3 4 5 6 7 8 9 10 11 12 13 1 chunk +3 lines, -0 lines 0 comments Download
A chrome/browser/resources/settings/settings_page/open_section_transition.js View 1 2 3 4 5 6 7 8 9 10 11 12 13 1 chunk +137 lines, -0 lines 0 comments Download
M chrome/browser/resources/settings/settings_page/settings_section.html View 1 2 3 4 5 6 7 8 9 10 11 12 13 3 chunks +10 lines, -10 lines 0 comments Download
M chrome/browser/resources/settings/settings_page/settings_section.js View 1 2 3 4 5 6 7 8 9 10 11 12 13 2 chunks +176 lines, -8 lines 1 comment Download
D chrome/browser/resources/settings/settings_page/transition_behavior.html View 1 chunk +0 lines, -2 lines 0 comments Download
D chrome/browser/resources/settings/settings_page/transition_behavior.js View 1 chunk +0 lines, -86 lines 0 comments Download
M chrome/browser/resources/settings/settings_page_css.html View 1 2 3 4 5 6 7 8 9 10 11 12 13 2 chunks +8 lines, -3 lines 1 comment Download
M chrome/browser/resources/settings/settings_resources.grd View 1 2 3 4 5 6 7 8 9 10 11 12 13 1 chunk +4 lines, -4 lines 0 comments Download

Depends on Patchset:

Messages

Total messages: 32 (10 generated)
michaelpg
the big one. I'm happy with where this is. PTAL and let me know your ...
4 years, 5 months ago (2016-06-28 23:45:16 UTC) #4
dschuyler
I'm going to need to look this over again. In the meantime, I've noted some ...
4 years, 5 months ago (2016-06-30 01:24:05 UTC) #5
michaelpg
Forgot to send this out; mind taking another look? https://codereview.chromium.org/2106013002/diff/20001/chrome/browser/resources/settings/settings_page/expand_card_transition.js File chrome/browser/resources/settings/settings_page/expand_card_transition.js (right): https://codereview.chromium.org/2106013002/diff/20001/chrome/browser/resources/settings/settings_page/expand_card_transition.js#newcode6 chrome/browser/resources/settings/settings_page/expand_card_transition.js:6: ...
4 years, 5 months ago (2016-07-07 05:27:44 UTC) #7
Dan Beam
https://codereview.chromium.org/2106013002/diff/80001/chrome/browser/resources/settings/settings_main/settings_main.js File chrome/browser/resources/settings/settings_main/settings_main.js (right): https://codereview.chromium.org/2106013002/diff/80001/chrome/browser/resources/settings/settings_main/settings_main.js#newcode118 chrome/browser/resources/settings/settings_main/settings_main.js:118: newRoute.page == 'advanced'; should all of these be computed ...
4 years, 5 months ago (2016-07-07 18:15:39 UTC) #8
Dan Beam
did you meant to remove transition_behavior.*? https://codereview.chromium.org/2106013002/diff/120001/chrome/browser/resources/settings/settings_page/expand_card_transition.js File chrome/browser/resources/settings/settings_page/expand_card_transition.js (right): https://codereview.chromium.org/2106013002/diff/120001/chrome/browser/resources/settings/settings_page/expand_card_transition.js#newcode20 chrome/browser/resources/settings/settings_page/expand_card_transition.js:20: this.animation_ = null; ...
4 years, 5 months ago (2016-07-07 18:27:54 UTC) #9
dschuyler
https://codereview.chromium.org/2106013002/diff/120001/chrome/browser/resources/settings/settings_main/settings_main.js File chrome/browser/resources/settings/settings_main/settings_main.js (right): https://codereview.chromium.org/2106013002/diff/120001/chrome/browser/resources/settings/settings_main/settings_main.js#newcode113 chrome/browser/resources/settings/settings_main/settings_main.js:113: var isSubpage = !!newRoute.subpage.length; Is isSubpage unused? https://codereview.chromium.org/2106013002/diff/120001/chrome/browser/resources/settings/settings_page/main_page_behavior.js File ...
4 years, 5 months ago (2016-07-07 18:46:21 UTC) #10
michaelpg
On 2016/07/07 18:27:54, Dan Beam wrote: > did you meant to remove transition_behavior.*? Yes. The ...
4 years, 5 months ago (2016-07-08 00:19:02 UTC) #11
Dan Beam
https://codereview.chromium.org/2106013002/diff/120001/chrome/browser/resources/settings/settings_page/transition_behavior.js File chrome/browser/resources/settings/settings_page/transition_behavior.js (left): https://codereview.chromium.org/2106013002/diff/120001/chrome/browser/resources/settings/settings_page/transition_behavior.js#oldcode57 chrome/browser/resources/settings/settings_page/transition_behavior.js:57: reject(); On 2016/07/07 18:27:54, Dan Beam wrote: > we ...
4 years, 5 months ago (2016-07-12 01:36:48 UTC) #12
Dan Beam
https://codereview.chromium.org/2106013002/diff/160001/chrome/browser/resources/settings/settings_main/settings_main.js File chrome/browser/resources/settings/settings_main/settings_main.js (right): https://codereview.chromium.org/2106013002/diff/160001/chrome/browser/resources/settings/settings_main/settings_main.js#newcode31 chrome/browser/resources/settings/settings_main/settings_main.js:31: /** @private */ it might be worth making a ...
4 years, 5 months ago (2016-07-12 02:01:55 UTC) #13
michaelpg
PTAL. I think I've addressed or obsoleted all comments. https://codereview.chromium.org/2106013002/diff/120001/chrome/browser/resources/settings/settings_page/transition_behavior.js File chrome/browser/resources/settings/settings_page/transition_behavior.js (left): https://codereview.chromium.org/2106013002/diff/120001/chrome/browser/resources/settings/settings_page/transition_behavior.js#oldcode57 chrome/browser/resources/settings/settings_page/transition_behavior.js:57: ...
4 years, 5 months ago (2016-07-20 22:10:58 UTC) #15
dschuyler
https://codereview.chromium.org/2106013002/diff/200001/chrome/browser/resources/settings/animation/animation_group.js File chrome/browser/resources/settings/animation/animation_group.js (right): https://codereview.chromium.org/2106013002/diff/200001/chrome/browser/resources/settings/animation/animation_group.js#newcode6 chrome/browser/resources/settings/animation/animation_group.js:6: 'use strict'; Adding 'use strict' is cool, but why ...
4 years, 5 months ago (2016-07-21 03:26:09 UTC) #16
Dan Beam
https://codereview.chromium.org/2106013002/diff/200001/chrome/browser/resources/settings/animation/animation_group.js File chrome/browser/resources/settings/animation/animation_group.js (right): https://codereview.chromium.org/2106013002/diff/200001/chrome/browser/resources/settings/animation/animation_group.js#newcode39 chrome/browser/resources/settings/animation/animation_group.js:39: * Resolved or rejected when the the AnimationGroup finishes ...
4 years, 5 months ago (2016-07-21 03:55:11 UTC) #17
michaelpg
PTAL. https://codereview.chromium.org/2106013002/diff/200001/chrome/browser/resources/settings/animation/animation_group.js File chrome/browser/resources/settings/animation/animation_group.js (right): https://codereview.chromium.org/2106013002/diff/200001/chrome/browser/resources/settings/animation/animation_group.js#newcode6 chrome/browser/resources/settings/animation/animation_group.js:6: 'use strict'; On 2016/07/21 03:26:09, dschuyler wrote: > ...
4 years, 5 months ago (2016-07-22 16:05:50 UTC) #20
dschuyler
lgtm
4 years, 5 months ago (2016-07-22 22:34:10 UTC) #21
Dan Beam
i really think that moving the freezing logic into sections and/or cards would clarify this ...
4 years, 5 months ago (2016-07-23 01:13:45 UTC) #22
michaelpg
On 2016/07/23 01:13:45, Dan Beam wrote: > i really think that moving the freezing logic ...
4 years, 4 months ago (2016-07-29 17:30:10 UTC) #23
michaelpg
PTAL. I don't recommend trying to diff with previous patches, just look through the new ...
4 years, 4 months ago (2016-08-04 07:07:36 UTC) #26
dschuyler
https://codereview.chromium.org/2106013002/diff/320001/chrome/browser/resources/settings/settings_main/settings_main.html File chrome/browser/resources/settings/settings_main/settings_main.html (right): https://codereview.chromium.org/2106013002/diff/320001/chrome/browser/resources/settings/settings_main/settings_main.html#newcode65 chrome/browser/resources/settings/settings_main/settings_main.html:65: I'm fine with a blank line or not having ...
4 years, 4 months ago (2016-08-04 18:36:51 UTC) #28
Dan Beam
i really think it'd be a better idea to split this up i think it's ...
4 years, 4 months ago (2016-08-05 00:18:06 UTC) #29
michaelpg
Dan has pointed out that this is harder, not easier, to review that the previous ...
4 years, 4 months ago (2016-08-05 00:20:27 UTC) #30
Dan Beam
this is looking better but it's still fairly hard to grok (and i think we'll ...
4 years, 4 months ago (2016-08-05 00:47:07 UTC) #31
michaelpg
4 years, 4 months ago (2016-08-05 02:15:58 UTC) #32
Message was sent while issue was closed.
On 2016/08/05 00:47:07, Dan Beam wrote:
> this is looking better but it's still fairly hard to grok (and i think we'll
all
> miss things while it's big and hard to keep in sync)
> 
> i don't think you HAVE to split, but i think it'll result in landing this
faster

first part: https://codereview.chromium.org/2215213002/

Powered by Google App Engine
This is Rietveld 408576698