healthd_internals: Add custom element for telemetry page [chromium/src : main]

0 views
Skip to first unread message

Byron Lee (Gerrit)

unread,
Jul 1, 2024, 5:48:45 AM (2 days ago) Jul 1
to chromium...@chromium.org, alemat...@chromium.org, blundell+...@chromium.org, rrsilva+wat...@google.com, oshima...@chromium.org

Byron Lee has uploaded the change for review

Commit message

healthd_internals: Add custom element for telemetry page

Also updated the CSS and fixed the path handling.
Bug: b:350423216
TEST: Check chrome:healthd-intermals on DUT
Change-Id: I993fdc9913eb9674b555dcbe468384cfe575905f

Change diff


Change information

Files:
  • M chrome/browser/resources/chromeos/healthd_internals/BUILD.gn
  • M chrome/browser/resources/chromeos/healthd_internals/app.html
  • M chrome/browser/resources/chromeos/healthd_internals/app.ts
  • M chrome/browser/resources/chromeos/healthd_internals/healthd_internals.html
  • M chrome/browser/resources/chromeos/healthd_internals/healthd_internals_shared.css
  • A chrome/browser/resources/chromeos/healthd_internals/pages/telemetry.html
  • A chrome/browser/resources/chromeos/healthd_internals/pages/telemetry.ts
Change size: M
Delta: 7 files changed, 114 insertions(+), 65 deletions(-)
Open in Gerrit

Related details

Attention set is empty
Submit Requirements:
  • requirement satisfiedCode-Coverage
  • requirement is not satisfiedCode-Review
Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
Gerrit-MessageType: newchange
Gerrit-Project: chromium/src
Gerrit-Branch: main
Gerrit-Change-Id: I993fdc9913eb9674b555dcbe468384cfe575905f
Gerrit-Change-Number: 5666413
Gerrit-PatchSet: 1
Gerrit-Owner: Byron Lee <byro...@chromium.org>
satisfied_requirement
unsatisfied_requirement
open
diffy

Byron Lee (Gerrit)

unread,
Jul 1, 2024, 5:54:40 AM (2 days ago) Jul 1
to Ethan Cheng, chromium...@chromium.org, alemat...@chromium.org, blundell+...@chromium.org, oshima...@chromium.org, rrsilva+wat...@google.com
Attention needed from Ethan Cheng

Byron Lee voted Commit-Queue+1

Commit-Queue+1
Open in Gerrit

Related details

Attention is currently required from:
  • Ethan Cheng
Submit Requirements:
  • requirement satisfiedCode-Coverage
  • requirement is not satisfiedCode-Review
Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
Gerrit-MessageType: comment
Gerrit-Project: chromium/src
Gerrit-Branch: main
Gerrit-Change-Id: I993fdc9913eb9674b555dcbe468384cfe575905f
Gerrit-Change-Number: 5666413
Gerrit-PatchSet: 2
Gerrit-Owner: Byron Lee <byro...@chromium.org>
Gerrit-Reviewer: Byron Lee <byro...@chromium.org>
Gerrit-Reviewer: Ethan Cheng <yyc...@google.com>
Gerrit-Attention: Ethan Cheng <yyc...@google.com>
Gerrit-Comment-Date: Mon, 01 Jul 2024 09:54:23 +0000
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes
satisfied_requirement
unsatisfied_requirement
open
diffy

Ethan Cheng (Gerrit)

unread,
Jul 1, 2024, 10:48:45 PM (2 days ago) Jul 1
to Byron Lee, Chromium LUCI CQ, chromium...@chromium.org, alemat...@chromium.org, blundell+...@chromium.org, oshima...@chromium.org, rrsilva+wat...@google.com
Attention needed from Byron Lee

Ethan Cheng added 4 comments

Patchset-level comments
File-level comment, Patchset 2 (Latest):
Ethan Cheng . unresolved

High level comment:

Mostly LGTM. If this work is non-urgent, can you help look into using decorators for writing polymer?

I'm not sure if this is supported in Ash, but using decorator should significantly simplify the codebase, and make the control flow much easier to view.

go/polymer-ts-style#declaring-properties
https://github.com/Polymer/polymer-decorators

File chrome/browser/resources/chromeos/healthd_internals/app.ts
Line 25, Patchset 2 (Latest):export interface HealthdInternalsAppElement {
$: {
selector: CrMenuSelector,
};
}
Ethan Cheng . unresolved

I believe this is used to query the selector element from its HTML template, and access it in TS.

However, I don't think it is used right now anymore, can you confirm whether we need this?

go/cgcm/styleguide/web/web.md#polymer

Line 43, Patchset 2 (Latest): currentPath: {type: String},
Ethan Cheng . unresolved

Just to confirm, does this now solve the problem of navigation from URL directly?

File chrome/browser/resources/chromeos/healthd_internals/pages/telemetry.ts
Line 12, Patchset 2 (Latest):export interface HealthdInternalsTelemetryElement {
$: {};
}
Ethan Cheng . unresolved

Ditto.

Can you confirm whether we need this?

We can always add it back in future CLs if you need to query internal elements.

go/cgcm/styleguide/web/web.md#polymer

Open in Gerrit

Related details

Attention is currently required from:
  • Byron Lee
Submit Requirements:
    • requirement satisfiedCode-Coverage
    • requirement is not satisfiedCode-Review
    • requirement is not satisfiedNo-Unresolved-Comments
    Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
    Gerrit-MessageType: comment
    Gerrit-Project: chromium/src
    Gerrit-Branch: main
    Gerrit-Change-Id: I993fdc9913eb9674b555dcbe468384cfe575905f
    Gerrit-Change-Number: 5666413
    Gerrit-PatchSet: 2
    Gerrit-Owner: Byron Lee <byro...@chromium.org>
    Gerrit-Reviewer: Byron Lee <byro...@chromium.org>
    Gerrit-Reviewer: Ethan Cheng <yyc...@google.com>
    Gerrit-Attention: Byron Lee <byro...@chromium.org>
    Gerrit-Comment-Date: Tue, 02 Jul 2024 02:48:30 +0000
    Gerrit-HasComments: Yes
    Gerrit-Has-Labels: No
    satisfied_requirement
    unsatisfied_requirement
    open
    diffy

    Ethan Cheng (Gerrit)

    unread,
    Jul 2, 2024, 1:31:04 AM (yesterday) Jul 2
    to Byron Lee, Chromium LUCI CQ, chromium...@chromium.org, alemat...@chromium.org, blundell+...@chromium.org, oshima...@chromium.org, rrsilva+wat...@google.com
    Attention needed from Byron Lee

    Ethan Cheng added 1 comment

    Patchset-level comments
    Ethan Cheng . resolved

    High level comment:

    Mostly LGTM. If this work is non-urgent, can you help look into using decorators for writing polymer?

    I'm not sure if this is supported in Ash, but using decorator should significantly simplify the codebase, and make the control flow much easier to view.

    go/polymer-ts-style#declaring-properties
    https://github.com/Polymer/polymer-decorators

    Ethan Cheng

    NVM, a quick codesearch suggests that there's no decorator usage in place right now.

    There were discussion a few years back and I don't think this is ported yet.

    https://docs.google.com/document/d/1qBt7-4OXRvUhKL3Ag5kfZk-WliwZ4CJ4XbA8lk_BcqA/edit?disco=AAAATMhYeME

    Open in Gerrit

    Related details

    Attention is currently required from:
    • Byron Lee
    Submit Requirements:
    • requirement satisfiedCode-Coverage
    • requirement is not satisfiedCode-Review
    • requirement is not satisfiedNo-Unresolved-Comments
    Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
    Gerrit-MessageType: comment
    Gerrit-Project: chromium/src
    Gerrit-Branch: main
    Gerrit-Change-Id: I993fdc9913eb9674b555dcbe468384cfe575905f
    Gerrit-Change-Number: 5666413
    Gerrit-PatchSet: 2
    Gerrit-Owner: Byron Lee <byro...@chromium.org>
    Gerrit-Reviewer: Byron Lee <byro...@chromium.org>
    Gerrit-Reviewer: Ethan Cheng <yyc...@google.com>
    Gerrit-Attention: Byron Lee <byro...@chromium.org>
    Gerrit-Comment-Date: Tue, 02 Jul 2024 05:30:50 +0000
    Gerrit-HasComments: Yes
    Gerrit-Has-Labels: No
    Comment-In-Reply-To: Ethan Cheng <yyc...@google.com>
    satisfied_requirement
    unsatisfied_requirement
    open
    diffy

    Byron Lee (Gerrit)

    unread,
    Jul 2, 2024, 1:42:28 AM (24 hours ago) Jul 2
    to Chromium LUCI CQ, Ethan Cheng, chromium...@chromium.org, alemat...@chromium.org, blundell+...@chromium.org, oshima...@chromium.org, rrsilva+wat...@google.com
    Attention needed from Ethan Cheng

    Byron Lee voted and added 4 comments

    Votes added by Byron Lee

    Commit-Queue+1

    4 comments

    Patchset-level comments
    File-level comment, Patchset 2:
    Ethan Cheng . unresolved

    High level comment:

    Mostly LGTM. If this work is non-urgent, can you help look into using decorators for writing polymer?

    I'm not sure if this is supported in Ash, but using decorator should significantly simplify the codebase, and make the control flow much easier to view.

    go/polymer-ts-style#declaring-properties
    https://github.com/Polymer/polymer-decorators

    Byron Lee

    That looks helpful!

    However, I didn't find any [use cases](https://source.chromium.org/search?q=%22@customElement%22&sq=&ss=chromium%2Fchromium%2Fsrc:chrome%2F) in Chromium and any [decorator-related files](https://source.chromium.org/search?q=decorator&ss=chromium%2Fchromium%2Fsrc:third_party%2Fpolymer%2F&start=1) in polymer folders.


    I guess it's not supported in Chromium.

    File chrome/browser/resources/chromeos/healthd_internals/app.ts
    Line 25, Patchset 2:export interface HealthdInternalsAppElement {
    $: {
    selector: CrMenuSelector,
    };
    }
    Ethan Cheng . resolved

    I believe this is used to query the selector element from its HTML template, and access it in TS.

    However, I don't think it is used right now anymore, can you confirm whether we need this?

    go/cgcm/styleguide/web/web.md#polymer

    Byron Lee

    I think we don't need to keep it. Removed!

    Line 43, Patchset 2: currentPath: {type: String},
    Ethan Cheng . resolved

    Just to confirm, does this now solve the problem of navigation from URL directly?

    Byron Lee

    Yes, let me update the commit message.

    File chrome/browser/resources/chromeos/healthd_internals/pages/telemetry.ts
    Line 12, Patchset 2:export interface HealthdInternalsTelemetryElement {
    $: {};
    }
    Ethan Cheng . resolved

    Ditto.

    Can you confirm whether we need this?

    We can always add it back in future CLs if you need to query internal elements.

    go/cgcm/styleguide/web/web.md#polymer

    Byron Lee

    Removed.

    Open in Gerrit

    Related details

    Attention is currently required from:
    • Ethan Cheng
    Submit Requirements:
    • requirement satisfiedCode-Coverage
    • requirement is not satisfiedCode-Review
    • requirement is not satisfiedNo-Unresolved-Comments
    Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
    Gerrit-MessageType: comment
    Gerrit-Project: chromium/src
    Gerrit-Branch: main
    Gerrit-Change-Id: I993fdc9913eb9674b555dcbe468384cfe575905f
    Gerrit-Change-Number: 5666413
    Gerrit-PatchSet: 3
    Gerrit-Owner: Byron Lee <byro...@chromium.org>
    Gerrit-Reviewer: Byron Lee <byro...@chromium.org>
    Gerrit-Reviewer: Ethan Cheng <yyc...@google.com>
    Gerrit-Attention: Ethan Cheng <yyc...@google.com>
    Gerrit-Comment-Date: Tue, 02 Jul 2024 05:42:15 +0000
    Gerrit-HasComments: Yes
    Gerrit-Has-Labels: Yes
    Comment-In-Reply-To: Ethan Cheng <yyc...@google.com>
    satisfied_requirement
    unsatisfied_requirement
    open
    diffy

    Ethan Cheng (Gerrit)

    unread,
    Jul 2, 2024, 2:31:50 AM (23 hours ago) Jul 2
    to Byron Lee, Chromium LUCI CQ, chromium...@chromium.org, alemat...@chromium.org, blundell+...@chromium.org, oshima...@chromium.org, rrsilva+wat...@google.com
    Attention needed from Byron Lee

    Ethan Cheng voted and added 2 comments

    Votes added by Ethan Cheng

    Code-Review+1

    2 comments

    Patchset-level comments
    File-level comment, Patchset 2:
    Ethan Cheng . resolved

    High level comment:

    Mostly LGTM. If this work is non-urgent, can you help look into using decorators for writing polymer?

    I'm not sure if this is supported in Ash, but using decorator should significantly simplify the codebase, and make the control flow much easier to view.

    go/polymer-ts-style#declaring-properties
    https://github.com/Polymer/polymer-decorators

    Byron Lee

    That looks helpful!

    However, I didn't find any [use cases](https://source.chromium.org/search?q=%22@customElement%22&sq=&ss=chromium%2Fchromium%2Fsrc:chrome%2F) in Chromium and any [decorator-related files](https://source.chromium.org/search?q=decorator&ss=chromium%2Fchromium%2Fsrc:third_party%2Fpolymer%2F&start=1) in polymer folders.


    I guess it's not supported in Chromium.

    Ethan Cheng

    Done

    File chrome/browser/resources/chromeos/healthd_internals/app.html
    Line 41, Patchset 3 (Latest): <iron-pages selected="[[selectedIndex]]">
    Ethan Cheng . unresolved

    Not in this CL

    Can you check the status of using iron-xxx elements?

    I know that there was effort in chromium WebUI to deprecate all use of iron-xxx, replacing with either cr-element or something else.

    https://chromium.googlesource.com/chromium/src/+/HEAD/docs/webui_using_lit.md#polymer-iron_paper-elements-alternatives

    Open in Gerrit

    Related details

    Attention is currently required from:
    • Byron Lee
    Submit Requirements:
    • requirement satisfiedCode-Coverage
    • requirement satisfiedCode-Review
    • requirement is not satisfiedNo-Unresolved-Comments
    Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
    Gerrit-MessageType: comment
    Gerrit-Project: chromium/src
    Gerrit-Branch: main
    Gerrit-Change-Id: I993fdc9913eb9674b555dcbe468384cfe575905f
    Gerrit-Change-Number: 5666413
    Gerrit-PatchSet: 3
    Gerrit-Owner: Byron Lee <byro...@chromium.org>
    Gerrit-Reviewer: Byron Lee <byro...@chromium.org>
    Gerrit-Reviewer: Ethan Cheng <yyc...@google.com>
    Gerrit-Attention: Byron Lee <byro...@chromium.org>
    Gerrit-Comment-Date: Tue, 02 Jul 2024 06:31:35 +0000
    Gerrit-HasComments: Yes
    Gerrit-Has-Labels: Yes
    Comment-In-Reply-To: Ethan Cheng <yyc...@google.com>
    Comment-In-Reply-To: Byron Lee <byro...@chromium.org>
    satisfied_requirement
    unsatisfied_requirement
    open
    diffy

    Byron Lee (Gerrit)

    unread,
    Jul 2, 2024, 3:14:30 AM (22 hours ago) Jul 2
    to Ethan Cheng, Chromium LUCI CQ, chromium...@chromium.org, alemat...@chromium.org, blundell+...@chromium.org, oshima...@chromium.org, rrsilva+wat...@google.com

    Byron Lee voted and added 1 comment

    Votes added by Byron Lee

    Commit-Queue+2

    1 comment

    File chrome/browser/resources/chromeos/healthd_internals/app.html
    Line 41, Patchset 3 (Latest): <iron-pages selected="[[selectedIndex]]">
    Ethan Cheng . resolved

    Not in this CL

    Can you check the status of using iron-xxx elements?

    I know that there was effort in chromium WebUI to deprecate all use of iron-xxx, replacing with either cr-element or something else.

    https://chromium.googlesource.com/chromium/src/+/HEAD/docs/webui_using_lit.md#polymer-iron_paper-elements-alternatives

    Byron Lee

    Sure. I will check it later.

    IIUC, Lit is not supported under `//chrome/browser/resources/chromeos/`, maybe the migration is not required for us.

    Open in Gerrit

    Related details

    Attention set is empty
    Submit Requirements:
    • requirement satisfiedCode-Coverage
    • requirement satisfiedCode-Review
    Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
    Gerrit-MessageType: comment
    Gerrit-Project: chromium/src
    Gerrit-Branch: main
    Gerrit-Change-Id: I993fdc9913eb9674b555dcbe468384cfe575905f
    Gerrit-Change-Number: 5666413
    Gerrit-PatchSet: 3
    Gerrit-Owner: Byron Lee <byro...@chromium.org>
    Gerrit-Reviewer: Byron Lee <byro...@chromium.org>
    Gerrit-Reviewer: Ethan Cheng <yyc...@google.com>
    Gerrit-Comment-Date: Tue, 02 Jul 2024 07:14:15 +0000
    satisfied_requirement
    open
    diffy

    Chromium LUCI CQ (Gerrit)

    unread,
    Jul 2, 2024, 3:17:43 AM (22 hours ago) Jul 2
    to Byron Lee, Ethan Cheng, chromium...@chromium.org, alemat...@chromium.org, blundell+...@chromium.org, oshima...@chromium.org, rrsilva+wat...@google.com

    Chromium LUCI CQ submitted the change

    Change information

    Commit message:
    healthd_internals: Add custom element for telemetry page

    Also updated the CSS and fixed the variable style and issue of
    navigation from URL.
    Bug: b:350423216
    TEST: Check chrome:healthd-intermals on DUT
    Change-Id: I993fdc9913eb9674b555dcbe468384cfe575905f
    Reviewed-by: Ethan Cheng <yyc...@google.com>
    Commit-Queue: Byron Lee <byro...@chromium.org>
    Cr-Commit-Position: refs/heads/main@{#1322037}
    Files:
    • M chrome/browser/resources/chromeos/healthd_internals/BUILD.gn
    • M chrome/browser/resources/chromeos/healthd_internals/app.html
    • M chrome/browser/resources/chromeos/healthd_internals/app.ts
    • M chrome/browser/resources/chromeos/healthd_internals/healthd_internals.html
    • M chrome/browser/resources/chromeos/healthd_internals/healthd_internals_shared.css
    • A chrome/browser/resources/chromeos/healthd_internals/pages/telemetry.html
    • A chrome/browser/resources/chromeos/healthd_internals/pages/telemetry.ts
    Change size: M
    Delta: 7 files changed, 101 insertions(+), 67 deletions(-)
    Branch: refs/heads/main
    Submit Requirements:
    • requirement satisfiedCode-Review: +1 by Ethan Cheng
    Open in Gerrit
    Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
    Gerrit-MessageType: merged
    Gerrit-Project: chromium/src
    Gerrit-Branch: main
    Gerrit-Change-Id: I993fdc9913eb9674b555dcbe468384cfe575905f
    Gerrit-Change-Number: 5666413
    Gerrit-PatchSet: 4
    Gerrit-Owner: Byron Lee <byro...@chromium.org>
    Gerrit-Reviewer: Byron Lee <byro...@chromium.org>
    Gerrit-Reviewer: Chromium LUCI CQ <chromiu...@luci-project-accounts.iam.gserviceaccount.com>
    Gerrit-Reviewer: Ethan Cheng <yyc...@google.com>
    open
    diffy
    satisfied_requirement
    Reply all
    Reply to author
    Forward
    0 new messages