Skip to content

Commit 18a5140

Browse files
ktranDevtools-frontend LUCI CQ
authored andcommitted
[application] Add right padding to report sections and inline links
The frame details report view was previously using a separate class for adding report sections. After changing to the general devtools-report-section, the "learn more" link styling changed. This CL makes sure that learn more links are in-line with the preceding text, and adds right padding to report sections. Thus, focus styles are also properly seen if things are narrow. Before: https://i.imgur.com/oZowNJv.png After: https://i.imgur.com/3WGIBBv.png Fixed: 406226081 Change-Id: I9a7117a106e84f75f9c5b6c9338c6ac186730d86 Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/6394676 Reviewed-by: Benedikt Meurer <[email protected]> Commit-Queue: Kim-Anh Tran <[email protected]>
1 parent 77e873a commit 18a5140

File tree

3 files changed

+14
-7
lines changed

3 files changed

+14
-7
lines changed

front_end/panels/application/components/FrameDetailsView.ts

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -347,10 +347,9 @@ export class FrameDetailsReportView extends LegacyWrapper.LegacyWrapper.Wrappabl
347347
// clang-format off
348348
return html`
349349
<devtools-report-section-header>${i18n.i18n.lockedString('Origin trials')}</devtools-report-section-header>
350-
<devtools-report-section>
351-
${i18nString(UIStrings.originTrialsExplanation)}
350+
<devtools-report-section><span class="report-section">${i18nString(UIStrings.originTrialsExplanation)}
352351
<x-link href="https://developer.chrome.com/docs/web-platform/origin-trials/" class="link"
353-
jslog=${VisualLogging.link('learn-more.origin-trials').track({click: true})}>${i18nString(UIStrings.learnMore)}</x-link>
352+
jslog=${VisualLogging.link('learn-more.origin-trials').track({click: true})}>${i18nString(UIStrings.learnMore)}</x-link></span>
354353
</devtools-report-section>
355354
${this.#originTrialTreeView}
356355
<devtools-report-divider></devtools-report-divider>
@@ -732,9 +731,12 @@ export class FrameDetailsReportView extends LegacyWrapper.LegacyWrapper.Wrappabl
732731
return html`
733732
<devtools-report-section-header>${i18nString(UIStrings.apiAvailability)}</devtools-report-section-header>
734733
<devtools-report-section>
735-
${i18nString(UIStrings.availabilityOfCertainApisDepends)}
736-
<x-link href="https://web.dev/why-coop-coep/" class="link" jslog=${
737-
VisualLogging.link('learn-more.coop-coep').track({click: true})}>${i18nString(UIStrings.learnMore)}</x-link>
734+
<span class="report-section">${
735+
i18nString(
736+
UIStrings
737+
.availabilityOfCertainApisDepends)}<x-link href="https://web.dev/why-coop-coep/" class="link" jslog=${
738+
VisualLogging.link('learn-more.coop-coep').track({click: true})}>${
739+
i18nString(UIStrings.learnMore)}</x-link></span>
738740
</devtools-report-section>
739741
${this.#renderSharedArrayBufferAvailability()}
740742
${this.#renderMeasureMemoryAvailability()}

front_end/panels/application/components/frameDetailsReportView.css

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@ button ~ .text-ellipsis {
2222
outline-offset: 2px;
2323
padding: 0;
2424
margin-left: var(--sys-size-3);
25+
white-space: nowrap;;
2526
}
2627

2728
button.link {
@@ -80,6 +81,10 @@ button.text-link {
8081
line-height: 28px;
8182
}
8283

84+
.report-section:has(.link) {
85+
line-height: var(--sys-size-12);
86+
}
87+
8388
.without-min-width {
8489
min-width: auto;
8590
}

front_end/ui/components/report_view/reportSection.css

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
}
1111

1212
.section {
13-
padding: var(--sys-size-5) 0 var(--sys-size-5) var(--sys-size-9);
13+
padding: var(--sys-size-5) var(--sys-size-9);
1414
display: flex;
1515
flex-direction: row;
1616
align-items: center;

0 commit comments

Comments
 (0)