Migrate object_ui popovers towards view-based rendering [devtools/devtools-frontend : main]

0 views
Skip to first unread message

Helmut Januschka (Gerrit)

unread,
Mar 16, 2026, 5:37:25 AMMar 16
to Helmut Januschka, Philip Pfaffe, Danil Somsikov, Devtools-frontend LUCI CQ, devtools-rev...@chromium.org
Attention needed from Danil Somsikov

Helmut Januschka added 3 comments

Patchset-level comments
File-level comment, Patchset 6 (Latest):
Helmut Januschka . resolved

reusing issue, hope its correct, its non public

File front_end/ui/legacy/components/object_ui/CustomPreviewComponent.ts
Line 43, Patchset 5:const DEFAULT_CUSTOM_PREVIEW_COMPONENT_VIEW: CustomPreviewComponentView = (input, _output, target) => {
Danil Somsikov . resolved

We want the view to be injected into the constructor, so that the presenter logic could be tested in isolation.

Helmut Januschka

Done.

File front_end/ui/legacy/components/object_ui/ObjectPopoverHelper.ts
Line 120, Patchset 5: OBJECT_POPOVER_CONTENT_VIEW(
Danil Somsikov . resolved

If this is an intermediate step, this might be fine. But eventually we want the view to be injectable into a presenter.

Helmut Januschka

Done

Open in Gerrit

Related details

Attention is currently required from:
  • Danil Somsikov
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: Id3657528ac387d2bda5e76e45582c6835f227395
Gerrit-Change-Number: 7669118
Gerrit-PatchSet: 6
Gerrit-Owner: Helmut Januschka <hel...@januschka.com>
Gerrit-Reviewer: Helmut Januschka <hel...@januschka.com>
Gerrit-CC: Danil Somsikov <d...@chromium.org>
Gerrit-CC: Devtools-frontend LUCI CQ <devtools-fro...@luci-project-accounts.iam.gserviceaccount.com>
Gerrit-CC: Philip Pfaffe <pfa...@chromium.org>
Gerrit-Attention: Danil Somsikov <d...@chromium.org>
Gerrit-Comment-Date: Mon, 16 Mar 2026 09:37:22 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Comment-In-Reply-To: Danil Somsikov <d...@chromium.org>
unsatisfied_requirement
open
diffy

Philip Pfaffe (Gerrit)

unread,
Mar 16, 2026, 5:43:51 AMMar 16
to Helmut Januschka, Danil Somsikov, Devtools-frontend LUCI CQ, devtools-rev...@chromium.org
Attention needed from Danil Somsikov and Helmut Januschka

Philip Pfaffe added 1 comment

Patchset-level comments
File-level comment, Patchset 6:
Philip Pfaffe . unresolved

Checkout https://chromium.googlesource.com/devtools/devtools-frontend/+/HEAD/docs/ui_engineering.md#examples for some inspiration. Specifically, the pattern should:

  • Call the view function in it's performUpdate() function.
  • Pass state as explicit setters, not the constructor.
  • The constructor's signature should be constructor(target?: HTMLElement, view = DEFAULT_VIEW).
Open in Gerrit

Related details

Attention is currently required from:
  • Danil Somsikov
  • Helmut Januschka
Submit Requirements:
    • requirement is not satisfiedCode-Owners
    • requirement is not satisfiedCode-Review
    • requirement is not satisfiedNo-Unresolved-Comments
    • 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: Id3657528ac387d2bda5e76e45582c6835f227395
    Gerrit-Change-Number: 7669118
    Gerrit-PatchSet: 6
    Gerrit-Owner: Helmut Januschka <hel...@januschka.com>
    Gerrit-Reviewer: Helmut Januschka <hel...@januschka.com>
    Gerrit-CC: Danil Somsikov <d...@chromium.org>
    Gerrit-CC: Devtools-frontend LUCI CQ <devtools-fro...@luci-project-accounts.iam.gserviceaccount.com>
    Gerrit-CC: Philip Pfaffe <pfa...@chromium.org>
    Gerrit-Attention: Helmut Januschka <hel...@januschka.com>
    Gerrit-Attention: Danil Somsikov <d...@chromium.org>
    Gerrit-Comment-Date: Mon, 16 Mar 2026 09:43:47 +0000
    Gerrit-HasComments: Yes
    Gerrit-Has-Labels: No
    unsatisfied_requirement
    open
    diffy

    Philip Pfaffe (Gerrit)

    unread,
    Mar 16, 2026, 5:45:31 AMMar 16
    to Helmut Januschka, Danil Somsikov, Devtools-frontend LUCI CQ, devtools-rev...@chromium.org
    Attention needed from Danil Somsikov and Helmut Januschka

    Philip Pfaffe added 1 comment

    Patchset-level comments
    Helmut Januschka . resolved

    reusing issue, hope its correct, its non public

    Philip Pfaffe

    407752215 is the correct one.

    Open in Gerrit

    Related details

    Attention is currently required from:
    • Danil Somsikov
    • Helmut Januschka
    Submit Requirements:
    • requirement is not satisfiedCode-Owners
    • requirement is not satisfiedCode-Review
    • requirement is not satisfiedNo-Unresolved-Comments
    • 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: Id3657528ac387d2bda5e76e45582c6835f227395
    Gerrit-Change-Number: 7669118
    Gerrit-PatchSet: 7
    Gerrit-Owner: Helmut Januschka <hel...@januschka.com>
    Gerrit-Reviewer: Helmut Januschka <hel...@januschka.com>
    Gerrit-CC: Danil Somsikov <d...@chromium.org>
    Gerrit-CC: Devtools-frontend LUCI CQ <devtools-fro...@luci-project-accounts.iam.gserviceaccount.com>
    Gerrit-CC: Philip Pfaffe <pfa...@chromium.org>
    Gerrit-Attention: Helmut Januschka <hel...@januschka.com>
    Gerrit-Attention: Danil Somsikov <d...@chromium.org>
    Gerrit-Comment-Date: Mon, 16 Mar 2026 09:45:27 +0000
    Gerrit-HasComments: Yes
    Gerrit-Has-Labels: No
    Comment-In-Reply-To: Helmut Januschka <hel...@januschka.com>
    unsatisfied_requirement
    open
    diffy

    Helmut Januschka (Gerrit)

    unread,
    Mar 16, 2026, 3:08:21 PMMar 16
    to Helmut Januschka, Philip Pfaffe, Danil Somsikov, Devtools-frontend LUCI CQ, devtools-rev...@chromium.org
    Attention needed from Danil Somsikov and Philip Pfaffe

    Helmut Januschka added 1 comment

    Patchset-level comments
    File-level comment, Patchset 6:
    Philip Pfaffe . resolved

    Checkout https://chromium.googlesource.com/devtools/devtools-frontend/+/HEAD/docs/ui_engineering.md#examples for some inspiration. Specifically, the pattern should:

    • Call the view function in it's performUpdate() function.
    • Pass state as explicit setters, not the constructor.
    • The constructor's signature should be constructor(target?: HTMLElement, view = DEFAULT_VIEW).
    Helmut Januschka

    thanks, guess this CL again needs a 3 way dance :/
    are there any plans on improving this xp, pretty painfull in the end?

    Open in Gerrit

    Related details

    Attention is currently required from:
    • Danil Somsikov
    • Philip Pfaffe
    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: Id3657528ac387d2bda5e76e45582c6835f227395
      Gerrit-Change-Number: 7669118
      Gerrit-PatchSet: 7
      Gerrit-Owner: Helmut Januschka <hel...@januschka.com>
      Gerrit-Reviewer: Helmut Januschka <hel...@januschka.com>
      Gerrit-Reviewer: Philip Pfaffe <pfa...@chromium.org>
      Gerrit-CC: Danil Somsikov <d...@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: Danil Somsikov <d...@chromium.org>
      Gerrit-Comment-Date: Mon, 16 Mar 2026 19:08:17 +0000
      Gerrit-HasComments: Yes
      Gerrit-Has-Labels: No
      Comment-In-Reply-To: Philip Pfaffe <pfa...@chromium.org>
      unsatisfied_requirement
      open
      diffy

      Philip Pfaffe (Gerrit)

      unread,
      Mar 18, 2026, 11:58:18 AMMar 18
      to Helmut Januschka, Danil Somsikov, Devtools-frontend LUCI CQ, devtools-rev...@chromium.org
      Attention needed from Danil Somsikov and Helmut Januschka

      Philip Pfaffe added 3 comments

      File front_end/ui/legacy/components/object_ui/CustomPreviewComponent.ts
      File-level comment, Patchset 7 (Latest):
      Philip Pfaffe . unresolved

      I'm a little bit surprised the linter accepts this, the content is still assmebled entireley imperatively. @d...@chromium.org do we want to fix that?

      Line 232, Patchset 7 (Latest): #render(): void {
      Philip Pfaffe . unresolved

      Check out the examples here: https://chromium.googlesource.com/devtools/devtools-frontend/+/HEAD/docs/ui_engineering.md#examples

      The view function should be called in performUpdate() and (mostly) only in performUpdate(). The right way to trigger an update (for CustomPreviewSection), is via this.requestUpdate(). This makes sure the lifecycle is as expected.

      File front_end/ui/legacy/components/object_ui/ObjectPopoverHelper.ts
      Line 90, Patchset 7 (Latest):export const DEFAULT_OBJECT_POPOVER_PRESENTER_VIEWS: ObjectPopoverPresenterViews = {
      Philip Pfaffe . unresolved

      It's probably simpler to just have one Widget per type, WDYT?

      Open in Gerrit

      Related details

      Attention is currently required from:
      • Danil Somsikov
      • Helmut Januschka
      Submit Requirements:
        • requirement is not satisfiedCode-Owners
        • requirement is not satisfiedCode-Review
        • requirement is not satisfiedNo-Unresolved-Comments
        • 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: Id3657528ac387d2bda5e76e45582c6835f227395
        Gerrit-Change-Number: 7669118
        Gerrit-PatchSet: 7
        Gerrit-Owner: Helmut Januschka <hel...@januschka.com>
        Gerrit-Reviewer: Helmut Januschka <hel...@januschka.com>
        Gerrit-Reviewer: Philip Pfaffe <pfa...@chromium.org>
        Gerrit-CC: Danil Somsikov <d...@chromium.org>
        Gerrit-CC: Devtools-frontend LUCI CQ <devtools-fro...@luci-project-accounts.iam.gserviceaccount.com>
        Gerrit-Attention: Helmut Januschka <hel...@januschka.com>
        Gerrit-Attention: Danil Somsikov <d...@chromium.org>
        Gerrit-Comment-Date: Wed, 18 Mar 2026 15:58:15 +0000
        Gerrit-HasComments: Yes
        Gerrit-Has-Labels: No
        unsatisfied_requirement
        open
        diffy

        Danil Somsikov (Gerrit)

        unread,
        Mar 18, 2026, 12:53:58 PMMar 18
        to Helmut Januschka, Philip Pfaffe, Devtools-frontend LUCI CQ, devtools-rev...@chromium.org
        Attention needed from Helmut Januschka and Philip Pfaffe

        Danil Somsikov added 1 comment

        File front_end/ui/legacy/components/object_ui/CustomPreviewComponent.ts
        Philip Pfaffe . resolved

        I'm a little bit surprised the linter accepts this, the content is still assmebled entireley imperatively. @d...@chromium.org do we want to fix that?

        Danil Somsikov
        Open in Gerrit

        Related details

        Attention is currently required from:
        • Helmut Januschka
        • Philip Pfaffe
        Submit Requirements:
        • requirement is not satisfiedCode-Owners
        • requirement is not satisfiedCode-Review
        • requirement is not satisfiedNo-Unresolved-Comments
        • 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: Id3657528ac387d2bda5e76e45582c6835f227395
        Gerrit-Change-Number: 7669118
        Gerrit-PatchSet: 7
        Gerrit-Owner: Helmut Januschka <hel...@januschka.com>
        Gerrit-Reviewer: Helmut Januschka <hel...@januschka.com>
        Gerrit-Reviewer: Philip Pfaffe <pfa...@chromium.org>
        Gerrit-CC: Danil Somsikov <d...@chromium.org>
        Gerrit-CC: Devtools-frontend LUCI CQ <devtools-fro...@luci-project-accounts.iam.gserviceaccount.com>
        Gerrit-Attention: Helmut Januschka <hel...@januschka.com>
        Gerrit-Attention: Philip Pfaffe <pfa...@chromium.org>
        Gerrit-Comment-Date: Wed, 18 Mar 2026 16:53:55 +0000
        Gerrit-HasComments: Yes
        Gerrit-Has-Labels: No
        Comment-In-Reply-To: Philip Pfaffe <pfa...@chromium.org>
        unsatisfied_requirement
        open
        diffy

        Helmut Januschka (Gerrit)

        unread,
        Mar 19, 2026, 4:48:18 PMMar 19
        to Helmut Januschka, Philip Pfaffe, Danil Somsikov, Devtools-frontend LUCI CQ, devtools-rev...@chromium.org
        Attention needed from Philip Pfaffe

        Helmut Januschka added 2 comments

        File front_end/ui/legacy/components/object_ui/CustomPreviewComponent.ts
        Line 232, Patchset 7: #render(): void {
        Philip Pfaffe . resolved

        Check out the examples here: https://chromium.googlesource.com/devtools/devtools-frontend/+/HEAD/docs/ui_engineering.md#examples

        The view function should be called in performUpdate() and (mostly) only in performUpdate(). The right way to trigger an update (for CustomPreviewSection), is via this.requestUpdate(). This makes sure the lifecycle is as expected.

        Helmut Januschka

        done, thanks for the details!

        File front_end/ui/legacy/components/object_ui/ObjectPopoverHelper.ts
        Line 90, Patchset 7:export const DEFAULT_OBJECT_POPOVER_PRESENTER_VIEWS: ObjectPopoverPresenterViews = {
        Philip Pfaffe . resolved

        It's probably simpler to just have one Widget per type, WDYT?

        Helmut Januschka

        Done refactored to:

        • `ObjectPopoverContentWidget`
        • `PrimitivePopoverWidget`
        • `DescriptionPopoverWidget`
        Open in Gerrit

        Related details

        Attention is currently required from:
        • Philip Pfaffe
        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: Id3657528ac387d2bda5e76e45582c6835f227395
          Gerrit-Change-Number: 7669118
          Gerrit-PatchSet: 7
          Gerrit-Owner: Helmut Januschka <hel...@januschka.com>
          Gerrit-Reviewer: Helmut Januschka <hel...@januschka.com>
          Gerrit-Reviewer: Philip Pfaffe <pfa...@chromium.org>
          Gerrit-CC: Danil Somsikov <d...@chromium.org>
          Gerrit-CC: Devtools-frontend LUCI CQ <devtools-fro...@luci-project-accounts.iam.gserviceaccount.com>
          Gerrit-Attention: Philip Pfaffe <pfa...@chromium.org>
          Gerrit-Comment-Date: Thu, 19 Mar 2026 20:48:14 +0000
          unsatisfied_requirement
          open
          diffy

          Philip Pfaffe (Gerrit)

          unread,
          Mar 23, 2026, 9:46:52 AMMar 23
          to Helmut Januschka, Danil Somsikov, Devtools-frontend LUCI CQ, devtools-rev...@chromium.org
          Attention needed from Helmut Januschka

          Philip Pfaffe added 1 comment

          File front_end/ui/legacy/components/object_ui/CustomPreviewComponent.ts
          Line 95, Patchset 12 (Latest): content(): Node[] {
          Philip Pfaffe . unresolved

          This is still using imperative DOM all the way dow I'm afraid. So more things for the linter to catch!

          Open in Gerrit

          Related details

          Attention is currently required from:
          • Helmut Januschka
          Submit Requirements:
            • requirement is not satisfiedCode-Owners
            • requirement is not satisfiedCode-Review
            • requirement is not satisfiedNo-Unresolved-Comments
            • 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: Id3657528ac387d2bda5e76e45582c6835f227395
            Gerrit-Change-Number: 7669118
            Gerrit-PatchSet: 12
            Gerrit-Owner: Helmut Januschka <hel...@januschka.com>
            Gerrit-Reviewer: Helmut Januschka <hel...@januschka.com>
            Gerrit-Reviewer: Philip Pfaffe <pfa...@chromium.org>
            Gerrit-CC: Danil Somsikov <d...@chromium.org>
            Gerrit-CC: Devtools-frontend LUCI CQ <devtools-fro...@luci-project-accounts.iam.gserviceaccount.com>
            Gerrit-Attention: Helmut Januschka <hel...@januschka.com>
            Gerrit-Comment-Date: Mon, 23 Mar 2026 13:46:49 +0000
            Gerrit-HasComments: Yes
            Gerrit-Has-Labels: No
            unsatisfied_requirement
            open
            diffy

            Danil Somsikov (Gerrit)

            unread,
            Mar 23, 2026, 9:51:55 AMMar 23
            to Helmut Januschka, Philip Pfaffe, Devtools-frontend LUCI CQ, devtools-rev...@chromium.org
            Attention needed from Helmut Januschka

            Danil Somsikov added 1 comment

            File front_end/ui/legacy/components/object_ui/CustomPreviewComponent.ts
            Line 95, Patchset 12 (Latest): content(): Node[] {
            Philip Pfaffe . unresolved

            This is still using imperative DOM all the way dow I'm afraid. So more things for the linter to catch!

            Danil Somsikov

            Of course, this patch is cheating by replacing `document.createTextNode` with `new Text` and `document.createElement` with `document.createElementNS`.

            I will update the linter, but this is not what we normally have in the codebase.

            Open in Gerrit

            Related details

            Attention is currently required from:
            • Helmut Januschka
            Submit Requirements:
            • requirement is not satisfiedCode-Owners
            • requirement is not satisfiedCode-Review
            • requirement is not satisfiedNo-Unresolved-Comments
            • 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: Id3657528ac387d2bda5e76e45582c6835f227395
            Gerrit-Change-Number: 7669118
            Gerrit-PatchSet: 12
            Gerrit-Owner: Helmut Januschka <hel...@januschka.com>
            Gerrit-Reviewer: Helmut Januschka <hel...@januschka.com>
            Gerrit-Reviewer: Philip Pfaffe <pfa...@chromium.org>
            Gerrit-CC: Danil Somsikov <d...@chromium.org>
            Gerrit-CC: Devtools-frontend LUCI CQ <devtools-fro...@luci-project-accounts.iam.gserviceaccount.com>
            Gerrit-Attention: Helmut Januschka <hel...@januschka.com>
            Gerrit-Comment-Date: Mon, 23 Mar 2026 13:51:52 +0000
            Gerrit-HasComments: Yes
            Gerrit-Has-Labels: No
            Comment-In-Reply-To: Philip Pfaffe <pfa...@chromium.org>
            unsatisfied_requirement
            open
            diffy

            Helmut Januschka (Gerrit)

            unread,
            Mar 28, 2026, 8:42:09 PMMar 28
            to Helmut Januschka, Philip Pfaffe, Danil Somsikov, Devtools-frontend LUCI CQ, devtools-rev...@chromium.org
            Attention needed from Danil Somsikov and Philip Pfaffe

            Helmut Januschka added 1 comment

            File front_end/ui/legacy/components/object_ui/CustomPreviewComponent.ts
            Line 95, Patchset 12: content(): Node[] {
            Philip Pfaffe . resolved

            This is still using imperative DOM all the way dow I'm afraid. So more things for the linter to catch!

            Danil Somsikov

            Of course, this patch is cheating by replacing `document.createTextNode` with `new Text` and `document.createElement` with `document.createElementNS`.

            I will update the linter, but this is not what we normally have in the codebase.

            Helmut Januschka

            ok thanks, should be ok now, @d...@chromium.org is the linter also somewhere opensource?

            Open in Gerrit

            Related details

            Attention is currently required from:
            • Danil Somsikov
            • Philip Pfaffe
            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: Id3657528ac387d2bda5e76e45582c6835f227395
              Gerrit-Change-Number: 7669118
              Gerrit-PatchSet: 13
              Gerrit-Owner: Helmut Januschka <hel...@januschka.com>
              Gerrit-Reviewer: Helmut Januschka <hel...@januschka.com>
              Gerrit-Reviewer: Philip Pfaffe <pfa...@chromium.org>
              Gerrit-CC: Danil Somsikov <d...@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: Danil Somsikov <d...@chromium.org>
              Gerrit-Comment-Date: Sun, 29 Mar 2026 00:42:03 +0000
              Gerrit-HasComments: Yes
              Gerrit-Has-Labels: No
              Comment-In-Reply-To: Philip Pfaffe <pfa...@chromium.org>
              Comment-In-Reply-To: Danil Somsikov <d...@chromium.org>
              unsatisfied_requirement
              open
              diffy

              Danil Somsikov (Gerrit)

              unread,
              Mar 30, 2026, 7:13:07 AMMar 30
              to Helmut Januschka, Philip Pfaffe, Devtools-frontend LUCI CQ, devtools-rev...@chromium.org
              Attention needed from Danil Somsikov and Philip Pfaffe

              Danil Somsikov added 1 comment

              File front_end/ui/legacy/components/object_ui/CustomPreviewComponent.ts
              Line 95, Patchset 12: content(): Node[] {
              Philip Pfaffe . resolved

              This is still using imperative DOM all the way dow I'm afraid. So more things for the linter to catch!

              Danil Somsikov

              Of course, this patch is cheating by replacing `document.createTextNode` with `new Text` and `document.createElement` with `document.createElementNS`.

              I will update the linter, but this is not what we normally have in the codebase.

              Helmut Januschka

              ok thanks, should be ok now, @d...@chromium.org is the linter also somewhere opensource?

              Open in Gerrit

              Related details

              Attention is currently required from:
              • Danil Somsikov
              • Philip Pfaffe
              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: Id3657528ac387d2bda5e76e45582c6835f227395
              Gerrit-Change-Number: 7669118
              Gerrit-PatchSet: 12
              Gerrit-Owner: Helmut Januschka <hel...@januschka.com>
              Gerrit-Reviewer: Helmut Januschka <hel...@januschka.com>
              Gerrit-Reviewer: Philip Pfaffe <pfa...@chromium.org>
              Gerrit-CC: Danil Somsikov <d...@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: Danil Somsikov <d...@chromium.org>
              Gerrit-Comment-Date: Mon, 30 Mar 2026 11:13:04 +0000
              Gerrit-HasComments: Yes
              Gerrit-Has-Labels: No
              Comment-In-Reply-To: Helmut Januschka <hel...@januschka.com>
              unsatisfied_requirement
              open
              diffy

              Philip Pfaffe (Gerrit)

              unread,
              Jun 12, 2026, 5:43:34 AM (2 days ago) Jun 12
              to Helmut Januschka, Danil Somsikov, devtools-fro...@luci-project-accounts.iam.gserviceaccount.com, devtools-rev...@chromium.org
              Attention needed from Danil Somsikov and Helmut Januschka

              Philip Pfaffe added 13 comments

              Patchset-level comments
              File-level comment, Patchset 15 (Latest):
              Philip Pfaffe . unresolved

              A first round of comments!

              File front_end/ui/legacy/components/object_ui/CustomPreviewComponent.ts
              Line 41, Patchset 15 (Latest): className?: string;
              Philip Pfaffe . unresolved

              Class names are a view responsibility.

              Line 66, Patchset 15 (Latest):function joinClassNames(...classNames: Array<string|undefined>): string|undefined {
              Philip Pfaffe . unresolved

              Use classMap instead

              Line 143, Patchset 15 (Latest):function renderCustomPreviewSection(
              Philip Pfaffe . unresolved

              Should we just use <details><summary> instead here?

              Line 179, Patchset 15 (Latest): fallbackContent: Element|null;
              Philip Pfaffe . unresolved

              fallbackContent should not be part of the input.

              Line 180, Patchset 15 (Latest): onSectionHeaderClick: (event: Event) => void;
              Philip Pfaffe . unresolved

              We shouldn't be passing dom events out to the presenter

              Line 186, Patchset 15 (Latest):export type View = (input: ViewInput, output: ViewOutput, target: ShadowRoot) => void;
              Philip Pfaffe . unresolved

              output: undefined or output: {} is fine

              Line 212, Patchset 15 (Latest): constructor(object: SDK.RemoteObject.RemoteObject, onContentChanged: () => void = () => {}) {
              Philip Pfaffe . unresolved

              Do we need the callback? If so, let's use an event instead.

              Line 314, Patchset 15 (Latest): private onClick(event: Event): void {
              Philip Pfaffe . unresolved

              We should not handle dom events in the presenter.

              Line 342, Patchset 15 (Latest): this.defaultBodyTreeOutline = new ObjectPropertiesSectionsTreeOutline({readOnly: true});
              Philip Pfaffe . unresolved

              We should be using <devtools-tree> for this. PropertiesWidget could be a good example.

              Line 348, Patchset 15 (Latest): this.bodyUsesDefaultTreeOutline = true;
              Philip Pfaffe . unresolved

              This is a view responsibility and shouldn't be decided in the presenter.

              Line 376, Patchset 15 (Latest): this.customPreviewSection = new CustomPreviewSection(object, () => this.performUpdate());
              Philip Pfaffe . unresolved

              Use requestUpdate. if the web tests can't deal with that they need to be updated.

              Line 380, Patchset 15 (Latest): this.#shadowRoot = UI.UIUtils.createShadowRootWithCoreStyles(this.element, {cssFile: customPreviewComponentStyles});
              Philip Pfaffe . unresolved

              Presenters should not call this, but set flag in super() and apply styles in the view.

              Open in Gerrit

              Related details

              Attention is currently required from:
              • Danil Somsikov
              • Helmut Januschka
              Submit Requirements:
                • requirement is not satisfiedCode-Owners
                • requirement is not satisfiedCode-Review
                • requirement is not satisfiedNo-Unresolved-Comments
                • 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: Id3657528ac387d2bda5e76e45582c6835f227395
                Gerrit-Change-Number: 7669118
                Gerrit-PatchSet: 15
                Gerrit-Owner: Helmut Januschka <hel...@januschka.com>
                Gerrit-Reviewer: Helmut Januschka <hel...@januschka.com>
                Gerrit-Reviewer: Philip Pfaffe <pfa...@chromium.org>
                Gerrit-CC: Danil Somsikov <d...@chromium.org>
                Gerrit-Attention: Helmut Januschka <hel...@januschka.com>
                Gerrit-Attention: Danil Somsikov <d...@chromium.org>
                Gerrit-Comment-Date: Fri, 12 Jun 2026 09:43:29 +0000
                Gerrit-HasComments: Yes
                Gerrit-Has-Labels: No
                unsatisfied_requirement
                open
                diffy

                Helmut Januschka (Gerrit)

                unread,
                5:06 AM (3 hours ago) 5:06 AM
                to Helmut Januschka, Philip Pfaffe, Danil Somsikov, devtools-fro...@luci-project-accounts.iam.gserviceaccount.com, devtools-rev...@chromium.org
                Attention needed from Danil Somsikov and Philip Pfaffe

                Helmut Januschka added 14 comments

                Patchset-level comments
                File-level comment, Patchset 15:
                Philip Pfaffe . resolved

                A first round of comments!

                Helmut Januschka

                Done

                File front_end/ui/legacy/components/object_ui/CustomPreviewComponent.ts
                Line 41, Patchset 15: className?: string;
                Philip Pfaffe . resolved

                Class names are a view responsibility.

                Helmut Januschka

                Done. Removed `className` from the `RenderedJSONMLElement` data model.

                Line 66, Patchset 15:function joinClassNames(...classNames: Array<string|undefined>): string|undefined {
                Philip Pfaffe . resolved

                Use classMap instead

                Helmut Januschka

                Done

                Line 143, Patchset 15:function renderCustomPreviewSection(
                Philip Pfaffe . resolved

                Should we just use <details><summary> instead here?

                Helmut Januschka

                Done. Switched the expandable section to a native `<details>`/`<summary>`.

                Line 179, Patchset 15: fallbackContent: Element|null;
                Philip Pfaffe . resolved

                fallbackContent should not be part of the input.

                Helmut Januschka

                Done. Removed `fallbackContent`

                Line 180, Patchset 15: onSectionHeaderClick: (event: Event) => void;
                Philip Pfaffe . resolved

                We shouldn't be passing dom events out to the presenter

                Helmut Januschka

                Done

                Line 186, Patchset 15:export type View = (input: ViewInput, output: ViewOutput, target: ShadowRoot) => void;
                Philip Pfaffe . resolved

                output: undefined or output: {} is fine

                Helmut Januschka

                Done

                Line 212, Patchset 15: constructor(object: SDK.RemoteObject.RemoteObject, onContentChanged: () => void = () => {}) {
                Philip Pfaffe . resolved

                Do we need the callback? If so, let's use an event instead.

                Helmut Januschka

                done, callback is needed.

                Line 314, Patchset 15: private onClick(event: Event): void {
                Philip Pfaffe . resolved

                We should not handle dom events in the presenter.

                Helmut Januschka

                Done

                Line 342, Patchset 15: this.defaultBodyTreeOutline = new ObjectPropertiesSectionsTreeOutline({readOnly: true});
                Philip Pfaffe . resolved

                We should be using <devtools-tree> for this. PropertiesWidget could be a good example.

                Helmut Januschka

                Done

                Line 348, Patchset 15: this.bodyUsesDefaultTreeOutline = true;
                Philip Pfaffe . resolved

                This is a view responsibility and shouldn't be decided in the presenter.

                Helmut Januschka

                Done

                Line 376, Patchset 15: this.customPreviewSection = new CustomPreviewSection(object, () => this.performUpdate());
                Philip Pfaffe . resolved

                Use requestUpdate. if the web tests can't deal with that they need to be updated.

                Helmut Januschka

                Done

                Line 380, Patchset 15: this.#shadowRoot = UI.UIUtils.createShadowRootWithCoreStyles(this.element, {cssFile: customPreviewComponentStyles});
                Philip Pfaffe . resolved

                Presenters should not call this, but set flag in super() and apply styles in the view.

                Helmut Januschka

                Done

                Open in Gerrit

                Related details

                Attention is currently required from:
                • Danil Somsikov
                • Philip Pfaffe
                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: Id3657528ac387d2bda5e76e45582c6835f227395
                  Gerrit-Change-Number: 7669118
                  Gerrit-PatchSet: 19
                  Gerrit-Owner: Helmut Januschka <hel...@januschka.com>
                  Gerrit-Reviewer: Helmut Januschka <hel...@januschka.com>
                  Gerrit-Reviewer: Philip Pfaffe <pfa...@chromium.org>
                  Gerrit-CC: Danil Somsikov <d...@chromium.org>
                  Gerrit-Attention: Philip Pfaffe <pfa...@chromium.org>
                  Gerrit-Attention: Danil Somsikov <d...@chromium.org>
                  Gerrit-Comment-Date: Sun, 14 Jun 2026 09:06:55 +0000
                  Gerrit-HasComments: Yes
                  Gerrit-Has-Labels: No
                  Comment-In-Reply-To: Philip Pfaffe <pfa...@chromium.org>
                  unsatisfied_requirement
                  open
                  diffy
                  Reply all
                  Reply to author
                  Forward
                  0 new messages