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

Issue 2312423003: MD Settings: Set overscroll before attempting to scroll to section (Closed)

Created:
4 years, 3 months ago by michaelpg
Modified:
4 years, 2 months ago
Reviewers:
dschuyler, Dan Beam
CC:
chromium-reviews, michaelpg+watch-md-settings_chromium.org, michaelpg+watch-md-ui_chromium.org, dbeam+watch-settings_chromium.org, stevenjb+watch-md-settings_chromium.org, arv+watch_chromium.org
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

MD Settings: Set overscroll before attempting to scroll to section Fixes scrolling when tapping an item in the drawer nav menu below the current scroll position. https://codereview.chromium.org/2230123002 made MainPageBehavior try scrolling to a section synchronously, but settings-main updates the overscroll after a setTimeout. We should be able to update the overscroll synchronously as well -- we originally had issues with tests but hopefully the code is now more robust. This consolidates toggleScrolling_ into settings-main via the freeze-scroll event. Testing is difficult because of timing issues: we have to wait for the page to be fully 100% loaded before testing scrolling, or sections could change height and interfere with the test. But we don't have any way of knowing that. BUG=644583 R=dschuyler@chromium.org CQ_INCLUDE_TRYBOTS=master.tryserver.chromium.linux:closure_compilation Committed: https://crrev.com/4a12c6d364a12f51c18854c0b16bae824a55c88e Cr-Commit-Position: refs/heads/master@{#422569}

Patch Set 1 #

Patch Set 2 : keep setTimeout because timing sucks #

Total comments: 1

Patch Set 3 : Fix overscroll and scrolling #

Total comments: 2

Patch Set 4 : rebase #

Patch Set 5 : rebase #

Unified diffs Side-by-side diffs Delta from patch set Stats (+59 lines, -29 lines) Patch
M chrome/browser/resources/settings/settings_main/settings_main.html View 1 2 2 chunks +4 lines, -2 lines 0 comments Download
M chrome/browser/resources/settings/settings_main/settings_main.js View 1 2 4 chunks +51 lines, -4 lines 0 comments Download
M chrome/browser/resources/settings/settings_page/main_page_behavior.js View 1 2 3 4 5 chunks +4 lines, -23 lines 0 comments Download

Dependent Patchsets:

Messages

Total messages: 28 (10 generated)
michaelpg
PTAL...
4 years, 3 months ago (2016-09-07 03:12:01 UTC) #2
dschuyler
On 2016/09/07 03:12:01, michaelpg wrote: > PTAL... Thanks, I tried out the CL. I noticed ...
4 years, 3 months ago (2016-09-07 20:33:32 UTC) #3
michaelpg
On 2016/09/07 20:33:32, dschuyler wrote: > On 2016/09/07 03:12:01, michaelpg wrote: > > PTAL... > ...
4 years, 3 months ago (2016-09-07 22:34:12 UTC) #4
michaelpg
with setTimeout
4 years, 3 months ago (2016-09-07 22:39:17 UTC) #5
dschuyler
https://codereview.chromium.org/2312423003/diff/20001/chrome/browser/resources/settings/settings_main/settings_main.js File chrome/browser/resources/settings/settings_main/settings_main.js (right): https://codereview.chromium.org/2312423003/diff/20001/chrome/browser/resources/settings/settings_main/settings_main.js#newcode192 chrome/browser/resources/settings/settings_main/settings_main.js:192: this.setOverscroll_(this.overscrollHeight_()); I added some logging to see how often ...
4 years, 3 months ago (2016-09-08 21:00:37 UTC) #6
Dan Beam
what's the status on this CL?
4 years, 2 months ago (2016-09-26 18:22:57 UTC) #8
michaelpg
PTAL. I've consolidated freezing scrolling & overscroll into settings-main, triggered by an event from basic/advanced. ...
4 years, 2 months ago (2016-09-28 22:26:59 UTC) #9
michaelpg
oops, full message: On 2016/09/28 22:26:59, michaelpg wrote: > PTAL. I've consolidated freezing scrolling & ...
4 years, 2 months ago (2016-09-28 22:27:43 UTC) #10
michaelpg
Here's an example test showing the timing struggles. Note the "guaranteed to flake or your ...
4 years, 2 months ago (2016-09-28 22:33:11 UTC) #12
Dan Beam
this seems fine to me, but deferring to dschuyler@ https://codereview.chromium.org/2312423003/diff/40001/chrome/browser/resources/settings/settings_main/settings_main.js File chrome/browser/resources/settings/settings_main/settings_main.js (right): https://codereview.chromium.org/2312423003/diff/40001/chrome/browser/resources/settings/settings_main/settings_main.js#newcode140 chrome/browser/resources/settings/settings_main/settings_main.js:140: ...
4 years, 2 months ago (2016-09-29 03:04:20 UTC) #13
michaelpg
https://codereview.chromium.org/2312423003/diff/40001/chrome/browser/resources/settings/settings_main/settings_main.js File chrome/browser/resources/settings/settings_main/settings_main.js (right): https://codereview.chromium.org/2312423003/diff/40001/chrome/browser/resources/settings/settings_main/settings_main.js#newcode140 chrome/browser/resources/settings/settings_main/settings_main.js:140: * @param {boolean} detail True to freeze, false to ...
4 years, 2 months ago (2016-09-29 03:10:50 UTC) #14
dschuyler
On 2016/09/28 22:27:43, michaelpg wrote: > oops, full message: > > On 2016/09/28 22:26:59, michaelpg ...
4 years, 2 months ago (2016-09-29 21:51:31 UTC) #15
dschuyler
lgtm
4 years, 2 months ago (2016-09-29 21:53:18 UTC) #16
michaelpg
On 2016/09/29 21:51:31, dschuyler wrote: > On 2016/09/28 22:27:43, michaelpg wrote: > > oops, full ...
4 years, 2 months ago (2016-09-29 22:47:40 UTC) #17
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/2312423003/60001
4 years, 2 months ago (2016-09-30 01:12:36 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/2312423003/80001
4 years, 2 months ago (2016-10-03 20:25:01 UTC) #24
commit-bot: I haz the power
Committed patchset #5 (id:80001)
4 years, 2 months ago (2016-10-03 22:31:34 UTC) #26
commit-bot: I haz the power
4 years, 2 months ago (2016-10-03 22:33:29 UTC) #28
Message was sent while issue was closed.
Patchset 5 (id:??) landed as
https://crrev.com/4a12c6d364a12f51c18854c0b16bae824a55c88e
Cr-Commit-Position: refs/heads/master@{#422569}

Powered by Google App Engine
This is Rietveld 408576698