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

Issue 2022893003: [MD settings] scroll to section find host (Closed)

Created:
4 years, 6 months ago by dschuyler
Modified:
4 years, 6 months ago
Reviewers:
Dan Beam, michaelpg
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
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

[MD settings] scroll to section find host This CL fixes an issue with the scroll to section not finding its host element. A unit test has also been added to detect the issue. BUG=616186 CQ_INCLUDE_TRYBOTS=tryserver.chromium.linux:closure_compilation Committed: https://crrev.com/5f6ada4bb2d2c650ed6c4ffb3e81a33cf8f2b368 Cr-Commit-Position: refs/heads/master@{#398089}

Patch Set 1 #

Total comments: 12

Patch Set 2 : review changes #

Total comments: 2

Patch Set 3 : setInterval #

Patch Set 4 : closure fix #

Total comments: 5
Unified diffs Side-by-side diffs Delta from patch set Stats (+24 lines, -1 line) Patch
M chrome/browser/resources/settings/settings_page/compiled_resources2.gyp View 1 2 3 1 chunk +1 line, -0 lines 0 comments Download
M chrome/browser/resources/settings/settings_page/main_page_behavior.js View 1 1 chunk +2 lines, -1 line 1 comment Download
M chrome/test/data/webui/settings/basic_page_browsertest.js View 1 2 1 chunk +21 lines, -0 lines 4 comments Download

Messages

Total messages: 27 (11 generated)
dschuyler
4 years, 6 months ago (2016-05-31 19:29:40 UTC) #3
Dan Beam
please update chrome/browser/resources/settings/settings_page/compiled_resources2.gyp#main_page_behavior to depend on '<(DEPTH)/ui/webui/resources/js/compiled_resources2.gyp:util', https://codereview.chromium.org/2022893003/diff/1/chrome/browser/resources/settings/settings_page/main_page_behavior.js File chrome/browser/resources/settings/settings_page/main_page_behavior.js (right): https://codereview.chromium.org/2022893003/diff/1/chrome/browser/resources/settings/settings_page/main_page_behavior.js#newcode338 chrome/browser/resources/settings/settings_page/main_page_behavior.js:338: /** @param? ...
4 years, 6 months ago (2016-05-31 21:27:20 UTC) #4
dschuyler
While I don't like polling, I'd also like to not change the code solely for ...
4 years, 6 months ago (2016-05-31 22:02:15 UTC) #5
Dan Beam
eh, i don't know if setInterval() or other little things make your code much better ...
4 years, 6 months ago (2016-05-31 22:10:30 UTC) #6
dschuyler
On 2016/05/31 22:10:30, Dan Beam wrote: > eh, i don't know if setInterval() or other ...
4 years, 6 months ago (2016-05-31 22:24:52 UTC) #7
dschuyler
https://codereview.chromium.org/2022893003/diff/20001/chrome/test/data/webui/settings/basic_page_browsertest.js File chrome/test/data/webui/settings/basic_page_browsertest.js (right): https://codereview.chromium.org/2022893003/diff/20001/chrome/test/data/webui/settings/basic_page_browsertest.js#newcode74 chrome/test/data/webui/settings/basic_page_browsertest.js:74: pollForVisibility(); On 2016/05/31 22:10:29, Dan Beam wrote: > arguably: ...
4 years, 6 months ago (2016-05-31 22:25:02 UTC) #8
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/2022893003/40001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/2022893003/40001
4 years, 6 months ago (2016-06-01 00:17:34 UTC) #11
commit-bot: I haz the power
Try jobs failed on following builders: closure_compilation on tryserver.chromium.linux (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.linux/builders/closure_compilation/builds/411)
4 years, 6 months ago (2016-06-01 00:28:47 UTC) #13
dschuyler
Added dependency for closure.
4 years, 6 months ago (2016-06-01 21:27:06 UTC) #14
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/2022893003/60001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/2022893003/60001
4 years, 6 months ago (2016-06-01 21:28:04 UTC) #17
commit-bot: I haz the power
Try jobs failed on following builders: linux_chromium_rel_ng on tryserver.chromium.linux (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.linux/builders/linux_chromium_rel_ng/builds/239310)
4 years, 6 months ago (2016-06-02 01:59:40 UTC) #19
michaelpg
Sorry, I didn't notice this and made my own: https://codereview.chromium.org/2039603002/ The trick is that the ...
4 years, 6 months ago (2016-06-03 23:32:35 UTC) #21
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/2022893003/60001
4 years, 6 months ago (2016-06-06 17:48:06 UTC) #23
commit-bot: I haz the power
Committed patchset #4 (id:60001)
4 years, 6 months ago (2016-06-06 19:23:40 UTC) #24
commit-bot: I haz the power
Patchset 4 (id:??) landed as https://crrev.com/5f6ada4bb2d2c650ed6c4ffb3e81a33cf8f2b368 Cr-Commit-Position: refs/heads/master@{#398089}
4 years, 6 months ago (2016-06-06 19:26:16 UTC) #26
michaelpg
4 years, 6 months ago (2016-06-06 20:13:04 UTC) #27
Message was sent while issue was closed.
I didn't expect this to land without addressing my comment here or the CL I
linked to. Anyway, here were my issues with the CL.

https://codereview.chromium.org/2022893003/diff/60001/chrome/browser/resource...
File chrome/browser/resources/settings/settings_page/main_page_behavior.js
(right):

https://codereview.chromium.org/2022893003/diff/60001/chrome/browser/resource...
chrome/browser/resources/settings/settings_page/main_page_behavior.js:349: var
host = findAncestor(element, function(n) { return n.host; }).host;
This is more complicated than necessary (this.scrollHeight would have sufficed).
If this is due to changes "coming down the pipeline" it would've been cool to
have a comment or TODO or something, or even a comment in the CL at the very
least. Also curious why Polymer.Base.domHost doesn't suffice.

https://codereview.chromium.org/2022893003/diff/60001/chrome/test/data/webui/...
File chrome/test/data/webui/settings/basic_page_browsertest.js (right):

https://codereview.chromium.org/2022893003/diff/60001/chrome/test/data/webui/...
chrome/test/data/webui/settings/basic_page_browsertest.js:28:
TEST_F('SettingsBasicPageBrowserTest', 'MAYBE_Load', function() {
Load is no longer an appropriate name for this test.

https://codereview.chromium.org/2022893003/diff/60001/chrome/test/data/webui/...
chrome/test/data/webui/settings/basic_page_browsertest.js:59:
self.getPage('basic').currentRoute = {
Since this is a test of the entire page, why not trigger the actual interaction
being tested (tapping an item in the settings-menu)?

https://codereview.chromium.org/2022893003/diff/60001/chrome/test/data/webui/...
chrome/test/data/webui/settings/basic_page_browsertest.js:68: if
(self.getSection(page, page.currentRoute.section)) {
Why not actually *check* page.scroller.scrollTop to confirm the page has
scrolled?

https://codereview.chromium.org/2022893003/diff/60001/chrome/test/data/webui/...
chrome/test/data/webui/settings/basic_page_browsertest.js:72: }, 55);
This is an unnecessary use of setInterval when setTimeout with a 0 timeout would
suffice.

Powered by Google App Engine
This is Rietveld 408576698