|
|
Chromium Code Reviews|
Created:
3 years, 9 months ago by dpapad Modified:
3 years, 9 months ago Reviewers:
Dan Beam CC:
arv+watch_chromium.org, chromium-reviews, dbeam+watch-settings_chromium.org, michaelpg+watch-md-settings_chromium.org, michaelpg+watch-md-ui_chromium.org, stevenjb+watch-md-settings_chromium.org Target Ref:
refs/pending/heads/master Project:
chromium Visibility:
Public. |
DescriptionMD Settings: Change "view reported settings" string.
BUG=695630
CQ_INCLUDE_TRYBOTS=master.tryserver.chromium.linux:closure_compilation
Review-Url: https://codereview.chromium.org/2722083003
Cr-Commit-Position: refs/heads/master@{#455188}
Committed: https://chromium.googlesource.com/chromium/src/+/4f4441915d7f7dee6dd36fcf3e06e743f5779e2c
Patch Set 1 #
Total comments: 5
Patch Set 2 : Fix #
Total comments: 3
Patch Set 3 : Fix Enter key #Patch Set 4 : Add test. #
Messages
Total messages: 41 (20 generated)
Description was changed from ========== MD Settings: Change "view reported settings" string. BUG=695630 ========== to ========== MD Settings: Change "view reported settings" string. BUG=695630 CQ_INCLUDE_TRYBOTS=master.tryserver.chromium.linux:closure_compilation ==========
dbeam@chromium.org changed reviewers: + dbeam@chromium.org
https://codereview.chromium.org/2722083003/diff/1/chrome/browser/resources/se... File chrome/browser/resources/settings/reset_page/reset_profile_dialog.js (right): https://codereview.chromium.org/2722083003/diff/1/chrome/browser/resources/se... chrome/browser/resources/settings/reset_page/reset_profile_dialog.js:130: if (Polymer.dom(e).localTarget.tagName == 'A') did you try else e.stopPropagation(); or preventDefault()?
https://codereview.chromium.org/2722083003/diff/1/chrome/browser/resources/se... File chrome/browser/resources/settings/reset_page/reset_profile_dialog.js (right): https://codereview.chromium.org/2722083003/diff/1/chrome/browser/resources/se... chrome/browser/resources/settings/reset_page/reset_profile_dialog.js:130: if (Polymer.dom(e).localTarget.tagName == 'A') On 2017/03/01 at 19:10:03, Dan Beam wrote: > did you try > > else > e.stopPropagation(); > > or preventDefault()? Yes. Tried both and did not fix the issue. The checkbox is still getting toggled. Note that the listener is on the checkbox itself, since I don't have a programmatic way of adding the listener on the action link (it resides within the translation), which is why stopPropagation() is not fixing the issue I think.
https://codereview.chromium.org/2722083003/diff/1/chrome/browser/resources/se... File chrome/browser/resources/settings/reset_page/reset_profile_dialog.js (right): https://codereview.chromium.org/2722083003/diff/1/chrome/browser/resources/se... chrome/browser/resources/settings/reset_page/reset_profile_dialog.js:130: if (Polymer.dom(e).localTarget.tagName == 'A') On 2017/03/01 at 19:30:11, dpapad wrote: > On 2017/03/01 at 19:10:03, Dan Beam wrote: > > did you try > > > > else > > e.stopPropagation(); > > > > or preventDefault()? > > Yes. Tried both and did not fix the issue. The checkbox is still getting toggled. > > Note that the listener is on the checkbox itself, since I don't have a programmatic way of adding the listener on the action link (it resides within the translation), which is why stopPropagation() is not fixing the issue I think. Correction: I don't have an *declarative* way of adding the listener on the action link itself.
https://codereview.chromium.org/2722083003/diff/1/chrome/browser/resources/se... File chrome/browser/resources/settings/reset_page/reset_profile_dialog.js (right): https://codereview.chromium.org/2722083003/diff/1/chrome/browser/resources/se... chrome/browser/resources/settings/reset_page/reset_profile_dialog.js:130: if (Polymer.dom(e).localTarget.tagName == 'A') On 2017/03/01 19:31:10, dpapad wrote: > On 2017/03/01 at 19:30:11, dpapad wrote: > > On 2017/03/01 at 19:10:03, Dan Beam wrote: > > > did you try > > > > > > else > > > e.stopPropagation(); > > > > > > or preventDefault()? > > > > Yes. Tried both and did not fix the issue. The checkbox is still getting > toggled. > > > > Note that the listener is on the checkbox itself, since I don't have a > programmatic way of adding the listener on the action link (it resides within > the translation), which is why stopPropagation() is not fixing the issue I > think. > > Correction: I don't have an *declarative* way of adding the listener on the > action link itself. did you try stopImmediatePropagation()?
Patchset #2 (id:20001) has been deleted
The CQ bit was checked by dpapad@chromium.org to run a CQ dry run
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.or...
Patchset #2 (id:40001) has been deleted
The CQ bit was checked by dpapad@chromium.org to run a CQ dry run
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.or...
https://codereview.chromium.org/2722083003/diff/1/chrome/browser/resources/se... File chrome/browser/resources/settings/reset_page/reset_profile_dialog.js (right): https://codereview.chromium.org/2722083003/diff/1/chrome/browser/resources/se... chrome/browser/resources/settings/reset_page/reset_profile_dialog.js:130: if (Polymer.dom(e).localTarget.tagName == 'A') > did you try stopImmediatePropagation()? I figured out a way to fix (see latest patch). The key is to add the event listener on the <a> itself, otherwise any calls to stopPropagation/stopImmediatePropagation are occurring too late. As revealed by DevTools debugging the paper-checkbox was toggled before even my listener executed (not surprising).
lgtm https://codereview.chromium.org/2722083003/diff/60001/chrome/browser/resource... File chrome/browser/resources/settings/reset_page/reset_profile_dialog.js (right): https://codereview.chromium.org/2722083003/diff/60001/chrome/browser/resource... chrome/browser/resources/settings/reset_page/reset_profile_dialog.js:80: 'tap', this.onShowReportedSettingsTap_.bind(this)); is addEventListener('tap') the same as listen('tap')? basically, is this still triggered for clicks and Enter from the keyboard? if not, maybe try this.listen(this.$$('paper-checkbox a'), 'tap', 'onShowReportedSettingsTap_');
https://codereview.chromium.org/2722083003/diff/60001/chrome/browser/resource... File chrome/browser/resources/settings/reset_page/reset_profile_dialog.js (right): https://codereview.chromium.org/2722083003/diff/60001/chrome/browser/resource... chrome/browser/resources/settings/reset_page/reset_profile_dialog.js:80: 'tap', this.onShowReportedSettingsTap_.bind(this)); On 2017/03/01 at 20:29:37, Dan Beam wrote: > is addEventListener('tap') the same as listen('tap')? > > basically, is this still triggered for clicks and Enter from the keyboard? > > if not, maybe try > > this.listen(this.$$('paper-checkbox a'), 'tap', 'onShowReportedSettingsTap_'); Yes, it is triggered either way. The problem I see though is that stopPropagation() only seems to work when you use the mouse. If you hit "Enter" the checkbox is still toggled. Ugh
https://codereview.chromium.org/2722083003/diff/60001/chrome/browser/resource... File chrome/browser/resources/settings/reset_page/reset_profile_dialog.js (right): https://codereview.chromium.org/2722083003/diff/60001/chrome/browser/resource... chrome/browser/resources/settings/reset_page/reset_profile_dialog.js:80: 'tap', this.onShowReportedSettingsTap_.bind(this)); On 2017/03/01 at 20:37:49, dpapad wrote: > On 2017/03/01 at 20:29:37, Dan Beam wrote: > > is addEventListener('tap') the same as listen('tap')? > > > > basically, is this still triggered for clicks and Enter from the keyboard? > > > > if not, maybe try > > > > this.listen(this.$$('paper-checkbox a'), 'tap', 'onShowReportedSettingsTap_'); > > Yes, it is triggered either way. The problem I see though is that stopPropagation() only seems to work when you use the mouse. If you hit "Enter" the checkbox is still toggled. Ugh Fixed by adding a listener for keydown, see latest patch.
On 2017/03/01 at 20:42:59, dpapad wrote: > https://codereview.chromium.org/2722083003/diff/60001/chrome/browser/resource... > File chrome/browser/resources/settings/reset_page/reset_profile_dialog.js (right): > > https://codereview.chromium.org/2722083003/diff/60001/chrome/browser/resource... > chrome/browser/resources/settings/reset_page/reset_profile_dialog.js:80: 'tap', this.onShowReportedSettingsTap_.bind(this)); > On 2017/03/01 at 20:37:49, dpapad wrote: > > On 2017/03/01 at 20:29:37, Dan Beam wrote: > > > is addEventListener('tap') the same as listen('tap')? > > > > > > basically, is this still triggered for clicks and Enter from the keyboard? > > > > > > if not, maybe try > > > > > > this.listen(this.$$('paper-checkbox a'), 'tap', 'onShowReportedSettingsTap_'); > > > > Yes, it is triggered either way. The problem I see though is that stopPropagation() only seems to work when you use the mouse. If you hit "Enter" the checkbox is still toggled. Ugh > > Fixed by adding a listener for keydown, see latest patch. FWIW, I also tried using this.listen(this.$$('paper-checkbox a'), 'tap', 'onShowReportedSettingsTap_'); and calling e.detail.sourceEvent.stopPropagation(), but that caused clicking on the link to toggle the checkbox. So, I think the combination of 'tap' and 'keydown' handler is our best option.
still lgtm but as we talked about offline: this potentially means there are issues other places in settings
On 2017/03/06 at 19:28:01, dbeam wrote: > still lgtm but as we talked about offline: this potentially means there are issues other places in settings Added an assertion to ensure that tapping on the link does not toggle the checkbox. Will follow up with filing a bug for existing cases that don't work as expected.
The CQ bit was checked by dpapad@chromium.org
The patchset sent to the CQ was uploaded after l-g-t-m from dbeam@chromium.org Link to the patchset: https://codereview.chromium.org/2722083003/#ps100001 (title: "Add test.")
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.or...
The CQ bit was unchecked by commit-bot@chromium.org
Try jobs failed on following builders: win_chromium_rel_ng on master.tryserver.chromium.win (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.win/builders/win_chromium_rel_...)
The CQ bit was checked by dpapad@chromium.org
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.or...
The CQ bit was unchecked by commit-bot@chromium.org
Try jobs failed on following builders: win_chromium_x64_rel_ng on master.tryserver.chromium.win (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.win/builders/win_chromium_x64_...)
The CQ bit was checked by dpapad@chromium.org
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.or...
The CQ bit was unchecked by commit-bot@chromium.org
Try jobs failed on following builders: win_chromium_x64_rel_ng on master.tryserver.chromium.win (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.win/builders/win_chromium_x64_...)
The CQ bit was checked by dpapad@chromium.org
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.or...
The CQ bit was unchecked by commit-bot@chromium.org
Try jobs failed on following builders: win_chromium_x64_rel_ng on master.tryserver.chromium.win (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.win/builders/win_chromium_x64_...)
The CQ bit was checked by dpapad@chromium.org
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.or...
CQ is committing da patch.
Bot data: {"patchset_id": 100001, "attempt_start_ts": 1488909966832140,
"parent_rev": "60588ea13e075f43e47cd97d6911b8c50ce5d579", "commit_rev":
"4f4441915d7f7dee6dd36fcf3e06e743f5779e2c"}
Message was sent while issue was closed.
Description was changed from ========== MD Settings: Change "view reported settings" string. BUG=695630 CQ_INCLUDE_TRYBOTS=master.tryserver.chromium.linux:closure_compilation ========== to ========== MD Settings: Change "view reported settings" string. BUG=695630 CQ_INCLUDE_TRYBOTS=master.tryserver.chromium.linux:closure_compilation Review-Url: https://codereview.chromium.org/2722083003 Cr-Commit-Position: refs/heads/master@{#455188} Committed: https://chromium.googlesource.com/chromium/src/+/4f4441915d7f7dee6dd36fcf3e06... ==========
Message was sent while issue was closed.
Committed patchset #4 (id:100001) as https://chromium.googlesource.com/chromium/src/+/4f4441915d7f7dee6dd36fcf3e06... |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
