|
|
DescriptionAdd base and bonus scores to site-engagement WebUI.
This breaks the displayed score out into:
- The (decayed) base score, which can be edited.
- The bonus score, based on granted permissions and launched-ness.
- The total resulting score (mainly useful for ordering by).
BUG=711041
CQ_INCLUDE_TRYBOTS=master.tryserver.chromium.linux:closure_compilation
Review-Url: https://codereview.chromium.org/2808663002
Cr-Commit-Position: refs/heads/master@{#466236}
Committed: https://chromium.googlesource.com/chromium/src/+/c1ada31798d86398887b3c4221975255e0599fab
Patch Set 1 #
Total comments: 14
Patch Set 2 : Rebase #Patch Set 3 : Address comments #
Total comments: 2
Patch Set 4 : Address review comments #
Total comments: 2
Messages
Total messages: 37 (25 generated)
Description was changed from ========== Add base and bonus scores to site-engagement WebUI. BUG=703848 ========== to ========== Add base and bonus scores to site-engagement WebUI. BUG=703848 CQ_INCLUDE_TRYBOTS=master.tryserver.chromium.linux:closure_compilation ==========
wez@chromium.org changed reviewers: + dominickn@chromium.org
PTAL
The CQ bit was checked by wez@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...
The CQ bit was unchecked by commit-bot@chromium.org
Dry run: Try jobs failed on following builders: mac_chromium_rel_ng on master.tryserver.chromium.mac (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.mac/builders/mac_chromium_rel_...)
dominickn@chromium.org changed reviewers: + calamity@chromium.org
Looks pretty good to me, but I'm not an expert for WebUI. :) +calamity
https://codereview.chromium.org/2808663002/diff/1/chrome/browser/resources/en... File chrome/browser/resources/engagement/site_engagement.html (right): https://codereview.chromium.org/2808663002/diff/1/chrome/browser/resources/en... chrome/browser/resources/engagement/site_engagement.html:30: white-space: nowrap; visual nit: Set a min-width here to prevent the table from resizing jankily when you choose Bonus or Total as sort columns. https://codereview.chromium.org/2808663002/diff/1/chrome/browser/resources/en... chrome/browser/resources/engagement/site_engagement.html:61: .score-input:focus { base-score-input? https://codereview.chromium.org/2808663002/diff/1/chrome/browser/resources/en... File chrome/browser/resources/engagement/site_engagement.js (right): https://codereview.chromium.org/2808663002/diff/1/chrome/browser/resources/en... chrome/browser/resources/engagement/site_engagement.js:65: var baseScoreInput = createElementWithClassName('input', 'score-input'); Change this class name to base-score-input. https://codereview.chromium.org/2808663002/diff/1/chrome/browser/resources/en... chrome/browser/resources/engagement/site_engagement.js:160: if ((sortKey == 'base_score') || nit: no parens around each condition. https://codereview.chromium.org/2808663002/diff/1/chrome/browser/resources/en... chrome/browser/resources/engagement/site_engagement.js:180: info.bonus_score = Number(Math.round(info.bonus_score * 100) / 100); This key doesn't exist? Only info.installed_bonus and info.notifications_bonus exist. https://codereview.chromium.org/2808663002/diff/1/chrome/browser/resources/en... chrome/browser/resources/engagement/site_engagement.js:181: info.total_score = Number(Math.round(info.total_score * 100) / 100); nit: Pull this rounding into a function roundScore.
The CQ bit was checked by wez@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...
The CQ bit was unchecked by commit-bot@chromium.org
Dry run: This issue passed the CQ dry run.
The CQ bit was checked by wez@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...
PTAL; also updated the browser test, but didn't add new tests since you have a replacement in review already. https://codereview.chromium.org/2808663002/diff/1/chrome/browser/resources/en... File chrome/browser/resources/engagement/site_engagement.html (right): https://codereview.chromium.org/2808663002/diff/1/chrome/browser/resources/en... chrome/browser/resources/engagement/site_engagement.html:30: white-space: nowrap; On 2017/04/11 01:16:56, calamity wrote: > visual nit: Set a min-width here to prevent the table from resizing jankily when > you choose Bonus or Total as sort columns. Done. Is there a better way to do that than just hard-wiring a value? Really you want to just reserve some pixels to hold the sort indicator, or have a same-sized placeholder string to replace the arrows with when the column isn't sorted. https://codereview.chromium.org/2808663002/diff/1/chrome/browser/resources/en... chrome/browser/resources/engagement/site_engagement.html:61: .score-input:focus { On 2017/04/11 01:16:56, calamity wrote: > base-score-input? Done. https://codereview.chromium.org/2808663002/diff/1/chrome/browser/resources/en... File chrome/browser/resources/engagement/site_engagement.js (right): https://codereview.chromium.org/2808663002/diff/1/chrome/browser/resources/en... chrome/browser/resources/engagement/site_engagement.js:65: var baseScoreInput = createElementWithClassName('input', 'score-input'); On 2017/04/11 01:16:56, calamity wrote: > Change this class name to base-score-input. Done. https://codereview.chromium.org/2808663002/diff/1/chrome/browser/resources/en... chrome/browser/resources/engagement/site_engagement.js:160: if ((sortKey == 'base_score') || On 2017/04/11 01:16:56, calamity wrote: > nit: no parens around each condition. Done. https://codereview.chromium.org/2808663002/diff/1/chrome/browser/resources/en... chrome/browser/resources/engagement/site_engagement.js:180: info.bonus_score = Number(Math.round(info.bonus_score * 100) / 100); On 2017/04/11 01:16:56, calamity wrote: > This key doesn't exist? Only info.installed_bonus and info.notifications_bonus > exist. Yup; didn't spot that because of course these never need rounding in practice. *facepalm* Of course sorting of the Bonus column was still broken because the |info| doesn't have this field, so fixed this to calculate it. https://codereview.chromium.org/2808663002/diff/1/chrome/browser/resources/en... chrome/browser/resources/engagement/site_engagement.js:181: info.total_score = Number(Math.round(info.total_score * 100) / 100); On 2017/04/11 01:16:56, calamity wrote: > nit: Pull this rounding into a function roundScore. Done.
Description was changed from ========== Add base and bonus scores to site-engagement WebUI. BUG=703848 CQ_INCLUDE_TRYBOTS=master.tryserver.chromium.linux:closure_compilation ========== to ========== Add base and bonus scores to site-engagement WebUI. BUG=711041 CQ_INCLUDE_TRYBOTS=master.tryserver.chromium.linux:closure_compilation ==========
The CQ bit was unchecked by commit-bot@chromium.org
Dry run: This issue passed the CQ dry run.
https://codereview.chromium.org/2808663002/diff/1/chrome/browser/resources/en... File chrome/browser/resources/engagement/site_engagement.html (right): https://codereview.chromium.org/2808663002/diff/1/chrome/browser/resources/en... chrome/browser/resources/engagement/site_engagement.html:30: white-space: nowrap; On 2017/04/12 23:49:48, Wez wrote: > On 2017/04/11 01:16:56, calamity wrote: > > visual nit: Set a min-width here to prevent the table from resizing jankily > when > > you choose Bonus or Total as sort columns. > > Done. Is there a better way to do that than just hard-wiring a value? Really > you want to just reserve some pixels to hold the sort indicator, or have a > same-sized placeholder string to replace the arrows with when the column isn't > sorted. You can make the ::after element position: absolute and then add some side padding into the th to reserve space. https://codereview.chromium.org/2808663002/diff/40001/chrome/browser/resource... File chrome/browser/resources/engagement/site_engagement.js (right): https://codereview.chromium.org/2808663002/diff/40001/chrome/browser/resource... chrome/browser/resources/engagement/site_engagement.js:172: * @param {number} The number to be rounded. @param {number} score
The CQ bit was checked by wez@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/2808663002/diff/1/chrome/browser/resources/en... File chrome/browser/resources/engagement/site_engagement.html (right): https://codereview.chromium.org/2808663002/diff/1/chrome/browser/resources/en... chrome/browser/resources/engagement/site_engagement.html:30: white-space: nowrap; On 2017/04/13 03:34:36, calamity wrote: > On 2017/04/12 23:49:48, Wez wrote: > > On 2017/04/11 01:16:56, calamity wrote: > > > visual nit: Set a min-width here to prevent the table from resizing jankily > > when > > > you choose Bonus or Total as sort columns. > > > > Done. Is there a better way to do that than just hard-wiring a value? Really > > you want to just reserve some pixels to hold the sort indicator, or have a > > same-sized placeholder string to replace the arrows with when the column isn't > > sorted. > > You can make the ::after element position: absolute and then add some side > padding into the th to reserve space. Done. https://codereview.chromium.org/2808663002/diff/40001/chrome/browser/resource... File chrome/browser/resources/engagement/site_engagement.js (right): https://codereview.chromium.org/2808663002/diff/40001/chrome/browser/resource... chrome/browser/resources/engagement/site_engagement.js:172: * @param {number} The number to be rounded. On 2017/04/13 03:34:36, calamity wrote: > @param {number} score Done.
The CQ bit was unchecked by commit-bot@chromium.org
Dry run: This issue passed the CQ dry run.
lgtm
https://codereview.chromium.org/2808663002/diff/60001/chrome/browser/resource... File chrome/browser/resources/engagement/site_engagement.html (right): https://codereview.chromium.org/2808663002/diff/60001/chrome/browser/resource... chrome/browser/resources/engagement/site_engagement.html:30: padding-top: 4px; nit: Actually, can you remove all the paddings here and replace with padding: 4px 16px; The balance feels off without a left padding as well.
Description was changed from ========== Add base and bonus scores to site-engagement WebUI. BUG=711041 CQ_INCLUDE_TRYBOTS=master.tryserver.chromium.linux:closure_compilation ========== to ========== Add base and bonus scores to site-engagement WebUI. This breaks the displayed score out into: - The (decayed) base score, which can be edited. - The bonus score, based on granted permissions and launched-ness. - The total resulting score (mainly useful for ordering by). BUG=711041 CQ_INCLUDE_TRYBOTS=master.tryserver.chromium.linux:closure_compilation ==========
wez@chromium.org changed reviewers: + dbeam@chromium.org
+dbeam for OWNERS for browser-test. https://codereview.chromium.org/2808663002/diff/60001/chrome/browser/resource... File chrome/browser/resources/engagement/site_engagement.html (right): https://codereview.chromium.org/2808663002/diff/60001/chrome/browser/resource... chrome/browser/resources/engagement/site_engagement.html:30: padding-top: 4px; On 2017/04/19 02:46:37, calamity wrote: > nit: Actually, can you remove all the paddings here and replace with padding: > 4px 16px; > > The balance feels off without a left padding as well. Done.
lgtm
The CQ bit was checked by wez@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": 60001, "attempt_start_ts": 1492738134011050, "parent_rev": "99057287caaf728362d5f83d0040f1ca3ae280b7", "commit_rev": "c1ada31798d86398887b3c4221975255e0599fab"}
Message was sent while issue was closed.
Description was changed from ========== Add base and bonus scores to site-engagement WebUI. This breaks the displayed score out into: - The (decayed) base score, which can be edited. - The bonus score, based on granted permissions and launched-ness. - The total resulting score (mainly useful for ordering by). BUG=711041 CQ_INCLUDE_TRYBOTS=master.tryserver.chromium.linux:closure_compilation ========== to ========== Add base and bonus scores to site-engagement WebUI. This breaks the displayed score out into: - The (decayed) base score, which can be edited. - The bonus score, based on granted permissions and launched-ness. - The total resulting score (mainly useful for ordering by). BUG=711041 CQ_INCLUDE_TRYBOTS=master.tryserver.chromium.linux:closure_compilation Review-Url: https://codereview.chromium.org/2808663002 Cr-Commit-Position: refs/heads/master@{#466236} Committed: https://chromium.googlesource.com/chromium/src/+/c1ada31798d86398887b3c422197... ==========
Message was sent while issue was closed.
Committed patchset #4 (id:60001) as https://chromium.googlesource.com/chromium/src/+/c1ada31798d86398887b3c422197... |