[AdTagging] Frontend: Show ad provenance in "ad" adorner tooltip [devtools/devtools-frontend : main]

0 views
Skip to first unread message

Yao Xiao (Gerrit)

unread,
12:11 AM (5 hours ago) 12:11 AM
to Simon Zünd, Devtools-frontend LUCI CQ, devtools-rev...@chromium.org
Attention needed from Simon Zünd

Yao Xiao voted and added 1 comment

Votes added by Yao Xiao

Commit-Queue+1

1 comment

Patchset-level comments
File-level comment, Patchset 2 (Latest):
Yao Xiao . resolved

szuend@: PTAL. Thanks!

Open in Gerrit

Related details

Attention is currently required from:
  • Simon Zünd
Submit Requirements:
  • requirement is not satisfiedCode-Owners
  • requirement is not satisfiedCode-Review
  • requirement is not satisfiedReview-Enforcement
Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
Gerrit-MessageType: comment
Gerrit-Project: devtools/devtools-frontend
Gerrit-Branch: main
Gerrit-Change-Id: Ifaab3fd212a4dbfaf1f353216f3dd526a9eacb10
Gerrit-Change-Number: 7695773
Gerrit-PatchSet: 2
Gerrit-Owner: Yao Xiao <yao...@chromium.org>
Gerrit-Reviewer: Simon Zünd <szu...@chromium.org>
Gerrit-Reviewer: Yao Xiao <yao...@chromium.org>
Gerrit-CC: Devtools-frontend LUCI CQ <devtools-fro...@luci-project-accounts.iam.gserviceaccount.com>
Gerrit-Attention: Simon Zünd <szu...@chromium.org>
Gerrit-Comment-Date: Tue, 24 Mar 2026 04:11:20 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: Yes
unsatisfied_requirement
open
diffy

Simon Zünd (Gerrit)

unread,
1:45 AM (4 hours ago) 1:45 AM
to Yao Xiao, Philip Pfaffe, Devtools-frontend LUCI CQ, devtools-rev...@chromium.org
Attention needed from Philip Pfaffe and Yao Xiao

Simon Zünd voted and added 4 comments

Votes added by Simon Zünd

Code-Review+1

4 comments

Patchset-level comments
Simon Zünd . resolved

lgtm % comments

@pfa...@chromium.org can you check if the adorner ref is doing the right thing? I didn't review the other ones and don't know if it follows the same pattern.

File front_end/core/sdk/DOMModel.ts
Line 193, Patchset 2 (Latest): #adProvenanceInternal?: Protocol.Network.AdProvenance;
Simon Zünd . unresolved

nit: Since the CL changes this we can use the opportunity to drop the `Internal` suffix. This is a left-over from some migration script of the past.

Line 348, Patchset 2 (Latest): return {} as Protocol.Network.AdProvenance;
Simon Zünd . unresolved

Is this cast actually necessary? Both properties are optional. I'd rather remove the `as` cast in case new props get added in the future that become mandatory. In that case we want a compilation erorr here.

File front_end/panels/elements/ElementsTreeElement.ts
Line 525, Patchset 2 (Latest): <div style="color: var(--sys-color-on-surface-subtle);">Filterlist Rule</div>
Simon Zünd . unresolved

This string needs translation, same for `Creator Ad Script Ancestry` and `Root Script Filterlist Rule`. Please note that in DevTools we use title case. So unless these have a very concrete recognized casing (e.g. "DevTools", "Chrome" or some web API), these should probably be `Creator ad script ancestry` and `Root script filter list rule`.

If `Filterlist` is a concrete web API concept, then we can leave it as-is, but make sure to mark it with back-ticks in the `UIStrings` definition so it does ont get translated.

Open in Gerrit

Related details

Attention is currently required from:
  • Philip Pfaffe
  • Yao Xiao
Submit Requirements:
  • requirement satisfiedCode-Owners
  • requirement is not satisfiedCode-Review
  • requirement is not satisfiedNo-Unresolved-Comments
  • requirement satisfiedReview-Enforcement
Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
Gerrit-MessageType: comment
Gerrit-Project: devtools/devtools-frontend
Gerrit-Branch: main
Gerrit-Change-Id: Ifaab3fd212a4dbfaf1f353216f3dd526a9eacb10
Gerrit-Change-Number: 7695773
Gerrit-PatchSet: 2
Gerrit-Owner: Yao Xiao <yao...@chromium.org>
Gerrit-Reviewer: Philip Pfaffe <pfa...@chromium.org>
Gerrit-Reviewer: Simon Zünd <szu...@chromium.org>
Gerrit-Reviewer: Yao Xiao <yao...@chromium.org>
Gerrit-CC: Devtools-frontend LUCI CQ <devtools-fro...@luci-project-accounts.iam.gserviceaccount.com>
Gerrit-Attention: Yao Xiao <yao...@chromium.org>
Gerrit-Attention: Philip Pfaffe <pfa...@chromium.org>
Gerrit-Comment-Date: Tue, 24 Mar 2026 05:45:24 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: Yes
satisfied_requirement
unsatisfied_requirement
open
diffy

Yao Xiao (Gerrit)

unread,
2:47 AM (3 hours ago) 2:47 AM
to Philip Pfaffe, Simon Zünd, Devtools-frontend LUCI CQ, devtools-rev...@chromium.org
Attention needed from Philip Pfaffe and Simon Zünd

Yao Xiao added 3 comments

File front_end/core/sdk/DOMModel.ts
Line 193, Patchset 2: #adProvenanceInternal?: Protocol.Network.AdProvenance;
Simon Zünd . resolved

nit: Since the CL changes this we can use the opportunity to drop the `Internal` suffix. This is a left-over from some migration script of the past.

Yao Xiao

Done

Line 348, Patchset 2: return {} as Protocol.Network.AdProvenance;
Simon Zünd . resolved

Is this cast actually necessary? Both properties are optional. I'd rather remove the `as` cast in case new props get added in the future that become mandatory. In that case we want a compilation erorr here.

Yao Xiao

Removed!

File front_end/panels/elements/ElementsTreeElement.ts
Line 525, Patchset 2: <div style="color: var(--sys-color-on-surface-subtle);">Filterlist Rule</div>
Simon Zünd . resolved

This string needs translation, same for `Creator Ad Script Ancestry` and `Root Script Filterlist Rule`. Please note that in DevTools we use title case. So unless these have a very concrete recognized casing (e.g. "DevTools", "Chrome" or some web API), these should probably be `Creator ad script ancestry` and `Root script filter list rule`.

If `Filterlist` is a concrete web API concept, then we can leave it as-is, but make sure to mark it with back-ticks in the `UIStrings` definition so it does ont get translated.

Yao Xiao

Done! I separated "filter list" into two words, which should be fine to translate as-is.

Open in Gerrit

Related details

Attention is currently required from:
  • Philip Pfaffe
  • Simon Zünd
Submit Requirements:
    • requirement satisfiedCode-Owners
    • requirement is not satisfiedCode-Review
    • requirement is not satisfiedReview-Enforcement
    Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
    Gerrit-MessageType: comment
    Gerrit-Project: devtools/devtools-frontend
    Gerrit-Branch: main
    Gerrit-Change-Id: Ifaab3fd212a4dbfaf1f353216f3dd526a9eacb10
    Gerrit-Change-Number: 7695773
    Gerrit-PatchSet: 4
    Gerrit-Owner: Yao Xiao <yao...@chromium.org>
    Gerrit-Reviewer: Philip Pfaffe <pfa...@chromium.org>
    Gerrit-Reviewer: Simon Zünd <szu...@chromium.org>
    Gerrit-Reviewer: Yao Xiao <yao...@chromium.org>
    Gerrit-CC: Devtools-frontend LUCI CQ <devtools-fro...@luci-project-accounts.iam.gserviceaccount.com>
    Gerrit-Attention: Philip Pfaffe <pfa...@chromium.org>
    Gerrit-Attention: Simon Zünd <szu...@chromium.org>
    Gerrit-Comment-Date: Tue, 24 Mar 2026 06:47:01 +0000
    Gerrit-HasComments: Yes
    Gerrit-Has-Labels: No
    Comment-In-Reply-To: Simon Zünd <szu...@chromium.org>
    satisfied_requirement
    unsatisfied_requirement
    open
    diffy

    Simon Zünd (Gerrit)

    unread,
    3:10 AM (2 hours ago) 3:10 AM
    to Yao Xiao, Philip Pfaffe, Devtools-frontend LUCI CQ, devtools-rev...@chromium.org
    Attention needed from Philip Pfaffe and Yao Xiao

    Simon Zünd voted and added 1 comment

    Votes added by Simon Zünd

    Code-Review+1

    1 comment

    Patchset-level comments
    File-level comment, Patchset 4 (Latest):
    Simon Zünd . resolved

    Nice, still lgtm! Wait for Philips' +1 though as I'm unsure about the adorner <-> lit interaction.

    Open in Gerrit

    Related details

    Attention is currently required from:
    • Philip Pfaffe
    • Yao Xiao
    Submit Requirements:
      • requirement satisfiedCode-Owners
      • requirement is not satisfiedCode-Review
      • requirement satisfiedReview-Enforcement
      Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
      Gerrit-MessageType: comment
      Gerrit-Project: devtools/devtools-frontend
      Gerrit-Branch: main
      Gerrit-Change-Id: Ifaab3fd212a4dbfaf1f353216f3dd526a9eacb10
      Gerrit-Change-Number: 7695773
      Gerrit-PatchSet: 4
      Gerrit-Owner: Yao Xiao <yao...@chromium.org>
      Gerrit-Reviewer: Philip Pfaffe <pfa...@chromium.org>
      Gerrit-Reviewer: Simon Zünd <szu...@chromium.org>
      Gerrit-Reviewer: Yao Xiao <yao...@chromium.org>
      Gerrit-CC: Devtools-frontend LUCI CQ <devtools-fro...@luci-project-accounts.iam.gserviceaccount.com>
      Gerrit-Attention: Yao Xiao <yao...@chromium.org>
      Gerrit-Attention: Philip Pfaffe <pfa...@chromium.org>
      Gerrit-Comment-Date: Tue, 24 Mar 2026 07:10:18 +0000
      Gerrit-HasComments: Yes
      Gerrit-Has-Labels: Yes
      satisfied_requirement
      unsatisfied_requirement
      open
      diffy

      Philip Pfaffe (Gerrit)

      unread,
      5:37 AM (now) 5:37 AM
      to Yao Xiao, Simon Zünd, Devtools-frontend LUCI CQ, devtools-rev...@chromium.org
      Attention needed from Yao Xiao

      Philip Pfaffe added 1 comment

      File front_end/panels/elements/ElementsTreeElement.ts
      Line 1029, Patchset 4 (Latest): ${adAdornerRef(input.adProvenance, input.target)}>
      Philip Pfaffe . unresolved

      Have you considered using <devtools-tooltip> instead of GlassPane/PopoverHelper? It saves you from having to do all that state management and is fully declarative.

      Only thing you'll need to do is make sure the tooltip ids are unique, like by having a global counter for instance.

      Open in Gerrit

      Related details

      Attention is currently required from:
      • Yao Xiao
      Submit Requirements:
        • requirement satisfiedCode-Owners
        • requirement is not satisfiedCode-Review
        • requirement is not satisfiedNo-Unresolved-Comments
        • requirement satisfiedReview-Enforcement
        Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
        Gerrit-MessageType: comment
        Gerrit-Project: devtools/devtools-frontend
        Gerrit-Branch: main
        Gerrit-Change-Id: Ifaab3fd212a4dbfaf1f353216f3dd526a9eacb10
        Gerrit-Change-Number: 7695773
        Gerrit-PatchSet: 4
        Gerrit-Owner: Yao Xiao <yao...@chromium.org>
        Gerrit-Reviewer: Philip Pfaffe <pfa...@chromium.org>
        Gerrit-Reviewer: Simon Zünd <szu...@chromium.org>
        Gerrit-Reviewer: Yao Xiao <yao...@chromium.org>
        Gerrit-CC: Devtools-frontend LUCI CQ <devtools-fro...@luci-project-accounts.iam.gserviceaccount.com>
        Gerrit-Attention: Yao Xiao <yao...@chromium.org>
        Gerrit-Comment-Date: Tue, 24 Mar 2026 09:37:40 +0000
        Gerrit-HasComments: Yes
        Gerrit-Has-Labels: No
        satisfied_requirement
        unsatisfied_requirement
        open
        diffy
        Reply all
        Reply to author
        Forward
        0 new messages