Skip to content

Commit b9d7a12

Browse files
danilsomsikovDevtools-frontend LUCI CQ
authored and
Devtools-frontend LUCI CQ
committed
Address UI eng vision violations in panels/whats_new/ReleaseNoteView.ts
Bug: 407942007 Change-Id: I04660af3e0990be2be61da6324bf0f340deadd56 Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/6441440 Reviewed-by: Kim-Anh Tran <kimanh@chromium.org> Auto-Submit: Danil Somsikov <dsv@chromium.org> Commit-Queue: Kim-Anh Tran <kimanh@chromium.org>
1 parent 188a3e6 commit b9d7a12

File tree

1 file changed

+5
-8
lines changed

1 file changed

+5
-8
lines changed

front_end/panels/whats_new/ReleaseNoteView.ts

Lines changed: 5 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,6 @@
11
// Copyright 2024 The Chromium Authors. All rights reserved.
22
// Use of this source code is governed by a BSD-style license that can be
33
// found in the LICENSE file.
4-
/* eslint-disable rulesdir/no-imperative-dom-api */
5-
/* eslint-disable rulesdir/no-lit-render-outside-of-view */
64

75
import * as i18n from '../../core/i18n/i18n.js';
86
import type * as Platform from '../../core/platform/platform.js';
@@ -61,15 +59,15 @@ export async function getMarkdownContent(): Promise<Marked.Marked.Token[][]> {
6159
return splitMarkdownAst;
6260
}
6361

64-
export class ReleaseNoteView extends UI.Widget.VBox {
62+
export class ReleaseNoteView extends UI.Panel.Panel {
6563
#view: View;
6664

67-
constructor(element?: HTMLElement, view: View = (input, _output, target) => {
68-
this.registerRequiredCSS(releaseNoteViewStyles);
65+
constructor(view: View = (input, _output, target) => {
6966
const releaseNote = input.getReleaseNote();
7067
const markdownContent = input.markdownContent;
7168
// clang-format off
7269
render(html`
70+
<style>${releaseNoteViewStyles.cssText}</style>
7371
<div class="whatsnew" jslog=${VisualLogging.section().context('release-notes')}>
7472
<div class="whatsnew-content">
7573
<div class="header">
@@ -104,11 +102,10 @@ export class ReleaseNoteView extends UI.Widget.VBox {
104102
</div>
105103
</div>
106104
</div>
107-
`, target, {host: this});
105+
`, target, {host: input});
108106
// clang-format on
109107
}) {
110-
super(true, undefined, element);
111-
this.element.setAttribute('jslog', `${VisualLogging.panel().context('whats-new')}`);
108+
super('whats-new', true);
112109
this.#view = view;
113110
this.requestUpdate();
114111
}

0 commit comments

Comments
 (0)