Skip to content

Commit d8bde3a

Browse files
Kateryna ProkopenkoDevtools-frontend LUCI CQ
authored andcommitted
[GM3Restyling] Update remote debugging dialog
Screenshot: https://imgur.com/a/2XUhSrM Bug: 325442935 Change-Id: I0b2553180a40a3e68ef7ad34f73c27a0ed397df9 Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/6282145 Auto-Submit: Kateryna Prokopenko <[email protected]> Commit-Queue: Kim-Anh Tran <[email protected]> Reviewed-by: Kim-Anh Tran <[email protected]>
1 parent f705a3f commit d8bde3a

File tree

2 files changed

+26
-26
lines changed

2 files changed

+26
-26
lines changed

front_end/ui/legacy/RemoteDebuggingTerminatedScreen.ts

Lines changed: 14 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -12,11 +12,16 @@ import {VBox} from './Widget.js';
1212

1313
const UIStrings = {
1414
/**
15-
* @description Text in a dialog box in DevTools stating why remote debugging has been terminated.
15+
* @description Text in a dialog box in DevTools stating that remote debugging has been terminated.
1616
* "Remote debugging" here means that DevTools on a PC is inspecting a website running on an actual mobile device
1717
* (see https://developer.chrome.com/docs/devtools/remote-debugging/).
1818
*/
19-
debuggingConnectionWasClosed: 'Debugging connection was closed. Reason: ',
19+
debuggingConnectionWasClosed: 'Debugging connection was closed',
20+
/**
21+
*@description Text in a dialog box in DevTools stating the reason for remote debugging being terminated.
22+
*@example {target_closed} PH1
23+
*/
24+
connectionClosedReason: 'Reason: {PH1}.',
2025
/**
2126
* @description Text in a dialog box showing how to reconnect to DevTools when remote debugging has been terminated.
2227
* "Remote debugging" here means that DevTools on a PC is inspecting a website running on an actual mobile device
@@ -38,15 +43,15 @@ export class RemoteDebuggingTerminatedScreen extends VBox {
3843
constructor(reason: string) {
3944
super(true);
4045
this.registerRequiredCSS(remoteDebuggingTerminatedScreenStyles);
41-
const message = this.contentElement.createChild('div', 'message');
42-
const span = message.createChild('span');
43-
span.append(i18nString(UIStrings.debuggingConnectionWasClosed));
44-
const reasonElement = span.createChild('span', 'reason');
45-
reasonElement.textContent = reason;
46-
this.contentElement.createChild('div', 'message').textContent = i18nString(UIStrings.reconnectWhenReadyByReopening);
46+
this.contentElement.createChild('div', 'header').textContent = i18nString(UIStrings.debuggingConnectionWasClosed);
47+
const contentContainer = this.contentElement.createChild('div', 'content');
48+
contentContainer.createChild('div', 'reason').textContent =
49+
i18nString(UIStrings.connectionClosedReason, {PH1: reason});
50+
contentContainer.createChild('div', 'message').textContent = i18nString(UIStrings.reconnectWhenReadyByReopening);
51+
const buttonContainer = this.contentElement.createChild('div', 'button-container');
4752
const button = createTextButton(
4853
i18nString(UIStrings.reconnectDevtools), () => window.location.reload(), {jslogContext: 'reconnect'});
49-
this.contentElement.createChild('div', 'button').appendChild(button);
54+
buttonContainer.createChild('div', 'button').appendChild(button);
5055
}
5156

5257
static show(reason: string): void {

front_end/ui/legacy/remoteDebuggingTerminatedScreen.css

Lines changed: 12 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -4,29 +4,24 @@
44
* found in the LICENSE file.
55
*/
66

7-
.widget {
8-
padding: 20px;
7+
.header {
8+
padding-top: var(--sys-size-3);
9+
margin: var(--sys-size-5) var(--sys-size-5) var(--sys-size-5) var(--sys-size-8);
10+
font: var(--sys-typescale-body2-medium);
911
}
1012

11-
.message,
12-
.button {
13-
font-size: larger;
14-
white-space: pre;
15-
margin: 5px;
13+
.close-button {
14+
margin: var(--sys-size-3);
1615
}
1716

18-
.button {
19-
text-align: center;
20-
margin-top: 10px;
17+
.content {
18+
margin: 0 var(--sys-size-8);
2119
}
2220

23-
.reason {
24-
--override-reason-color: #8b0000;
25-
26-
color: var(--override-reason-color);
21+
.button-container {
22+
margin: var(--sys-size-6) var(--sys-size-8) var(--sys-size-8) var(--sys-size-8);
2723
}
2824

29-
.theme-with-dark-background .reason,
30-
:host-context(.theme-with-dark-background) .reason {
31-
--override-reason-color: rgb(255 116 116);
25+
.reason {
26+
color: var(--sys-color-error);
3227
}

0 commit comments

Comments
 (0)