chrome-devtools-frontend 1.0.940714 → 1.0.941095

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -141,6 +141,20 @@
141
141
  this.domAutomationController_.send('[FAILED] ' + error);
142
142
  };
143
143
 
144
+ TestSuite.prototype.setupLegacyFilesForTest = async function() {
145
+ try {
146
+ await Promise.all([
147
+ self.runtime.loadLegacyModule('core/common/common-legacy.js'),
148
+ self.runtime.loadLegacyModule('core/sdk/sdk-legacy.js'),
149
+ self.runtime.loadLegacyModule('ui/legacy/legacy-legacy.js'),
150
+ self.runtime.loadLegacyModule('models/workspace/workspace-legacy.js'),
151
+ ]);
152
+ this.reportOk_();
153
+ } catch (e) {
154
+ this.reportFailure_(e);
155
+ }
156
+ };
157
+
144
158
  /**
145
159
  * Run specified test on a fresh instance of the test suite.
146
160
  * @param {Array<string>} args method name followed by its parameters.
@@ -11453,6 +11453,18 @@
11453
11453
  "ui/components/linear_memory_inspector/ValueInterpreterSettings.ts | otherGroup": {
11454
11454
  "message": "Other"
11455
11455
  },
11456
+ "ui/components/panel_feedback/PanelFeedback.ts | previewFeature": {
11457
+ "message": "Preview feature"
11458
+ },
11459
+ "ui/components/panel_feedback/PanelFeedback.ts | previewText": {
11460
+ "message": "Our team is actively working on this feature and we would love to know what you think."
11461
+ },
11462
+ "ui/components/panel_feedback/PanelFeedback.ts | previewTextFeedbackLink": {
11463
+ "message": "Send us your feedback."
11464
+ },
11465
+ "ui/components/panel_feedback/PanelFeedback.ts | videoAndDocumentation": {
11466
+ "message": "Video and documentation"
11467
+ },
11456
11468
  "ui/components/request_link_icon/RequestLinkIcon.ts | clickToShowRequestInTheNetwork": {
11457
11469
  "message": "Click to open the network panel and show request for URL: {url}"
11458
11470
  },
@@ -11453,6 +11453,18 @@
11453
11453
  "ui/components/linear_memory_inspector/ValueInterpreterSettings.ts | otherGroup": {
11454
11454
  "message": "Ôt́ĥér̂"
11455
11455
  },
11456
+ "ui/components/panel_feedback/PanelFeedback.ts | previewFeature": {
11457
+ "message": "P̂ŕêv́îéŵ f́êát̂úr̂é"
11458
+ },
11459
+ "ui/components/panel_feedback/PanelFeedback.ts | previewText": {
11460
+ "message": "Ôúr̂ t́êám̂ íŝ áĉt́îv́êĺŷ ẃôŕk̂ín̂ǵ ôń t̂h́îś f̂éât́ûŕê án̂d́ ŵé ŵóûĺd̂ ĺôv́ê t́ô ḱn̂óŵ ẃĥát̂ ýôú t̂h́îńk̂."
11461
+ },
11462
+ "ui/components/panel_feedback/PanelFeedback.ts | previewTextFeedbackLink": {
11463
+ "message": "Ŝén̂d́ ûś ŷóûŕ f̂éêd́b̂áĉḱ."
11464
+ },
11465
+ "ui/components/panel_feedback/PanelFeedback.ts | videoAndDocumentation": {
11466
+ "message": "V̂íd̂éô án̂d́ d̂óĉúm̂én̂t́ât́îón̂"
11467
+ },
11456
11468
  "ui/components/request_link_icon/RequestLinkIcon.ts | clickToShowRequestInTheNetwork": {
11457
11469
  "message": "Ĉĺîćk̂ t́ô óp̂én̂ t́ĥé n̂ét̂ẃôŕk̂ ṕâńêĺ âńd̂ śĥóŵ ŕêq́ûéŝt́ f̂ór̂ ÚR̂Ĺ: {url}"
11458
11470
  },
@@ -424,7 +424,8 @@ export class SourcesPanel extends UI.Panel.Panel implements UI.ContextMenu.Provi
424
424
  private debuggerPaused(event: Common.EventTarget.EventTargetEvent<SDK.DebuggerModel.DebuggerModel>): void {
425
425
  const debuggerModel = event.data;
426
426
  const details = debuggerModel.debuggerPausedDetails();
427
- if (!this.pausedInternal) {
427
+ if (!this.pausedInternal &&
428
+ Common.Settings.Settings.instance().moduleSetting('autoFocusOnDebuggerPausedEnabled').get()) {
428
429
  this.setAsCurrentPanel();
429
430
  }
430
431
 
@@ -986,6 +987,9 @@ export class SourcesPanel extends UI.Panel.Panel implements UI.ContextMenu.Provi
986
987
  }
987
988
 
988
989
  private revealDebuggerSidebar(): void {
990
+ if (!Common.Settings.Settings.instance().moduleSetting('autoFocusOnDebuggerPausedEnabled').get()) {
991
+ return;
992
+ }
989
993
  this.setAsCurrentPanel();
990
994
  this.splitWidget.showBoth(true);
991
995
  }
@@ -1083,10 +1087,7 @@ export class SourcesPanel extends UI.Panel.Panel implements UI.ContextMenu.Provi
1083
1087
  }
1084
1088
 
1085
1089
  setAsCurrentPanel(): Promise<void> {
1086
- if (Common.Settings.Settings.instance().moduleSetting('autoFocusOnDebuggerPausedEnabled').get()) {
1087
- return UI.ViewManager.ViewManager.instance().showView('sources');
1088
- }
1089
- return Promise.resolve();
1090
+ return UI.ViewManager.ViewManager.instance().showView('sources');
1090
1091
  }
1091
1092
 
1092
1093
  private extensionSidebarPaneAdded(
@@ -1207,6 +1208,9 @@ export class DebuggerPausedDetailsRevealer implements Common.Revealer.Revealer {
1207
1208
  }
1208
1209
 
1209
1210
  reveal(_object: Object): Promise<void> {
1211
+ if (!Common.Settings.Settings.instance().moduleSetting('autoFocusOnDebuggerPausedEnabled').get()) {
1212
+ return Promise.resolve();
1213
+ }
1210
1214
  return SourcesPanel.instance().setAsCurrentPanel();
1211
1215
  }
1212
1216
  }
@@ -0,0 +1,25 @@
1
+ <!--
2
+ Copyright 2021 The Chromium Authors. All rights reserved.
3
+ Use of this source code is governed by a BSD-style license that can be
4
+ found in the LICENSE file.
5
+ -->
6
+ <!DOCTYPE html>
7
+ <html>
8
+ <head>
9
+ <meta charset="UTF-8" />
10
+ <meta name="viewport" content="width=device-width" />
11
+ <title>Panel Feedback</title>
12
+ <style>
13
+ #container {
14
+ width: 80%;
15
+ border: 1px solid black;
16
+ padding: 10px;
17
+ }
18
+ </style>
19
+ </head>
20
+ <body>
21
+ <div id="container">
22
+ </div>
23
+ <script type="module" src="./basic.js"></script>
24
+ </body>
25
+ </html>
@@ -0,0 +1,20 @@
1
+ // Copyright 2021 The Chromium Authors. All rights reserved.
2
+ // Use of this source code is governed by a BSD-style license that can be
3
+ // found in the LICENSE file.
4
+
5
+ import * as FrontendHelpers from '../../../../../test/unittests/front_end/helpers/EnvironmentHelpers.js';
6
+ import * as PanelFeedback from '../../../components/panel_feedback/panel_feedback.js';
7
+ import * as ComponentHelpers from '../../helpers/helpers.js';
8
+
9
+ await ComponentHelpers.ComponentServerSetup.setup();
10
+ await FrontendHelpers.initializeGlobalVars();
11
+
12
+ const component = new PanelFeedback.PanelFeedback.PanelFeedback();
13
+
14
+ component.data = {
15
+ feedbackUrl: 'https://www.example.com',
16
+ quickStartUrl: 'https://www.example.com',
17
+ quickStartLinkText: 'Quick start: get started with the Recorder',
18
+ };
19
+
20
+ document.getElementById('container')?.appendChild(component);
@@ -56,4 +56,5 @@ export const CSS_RESOURCES_TO_LOAD_INTO_RUNTIME = [
56
56
  'ui/legacy/components/source_frame/jsonView.css',
57
57
  'ui/legacy/searchableView.css',
58
58
  'ui/legacy/toolbar.css',
59
+ 'ui/legacy/inspectorViewTabbedPane.css',
59
60
  ];
@@ -0,0 +1,100 @@
1
+ // Copyright 2021 The Chromium Authors. All rights reserved.
2
+ // Use of this source code is governed by a BSD-style license that can be
3
+ // found in the LICENSE file.
4
+
5
+ import * as i18n from '../../../core/i18n/i18n.js';
6
+ import * as ComponentHelpers from '../../components/helpers/helpers.js';
7
+ import * as LitHtml from '../../lit-html/lit-html.js';
8
+ import * as IconButton from '../icon_button/icon_button.js';
9
+
10
+ import panelFeedbackStyles from './panelFeedback.css.js';
11
+
12
+ const UIStrings = {
13
+ /**
14
+ *@description Introduction sentence to convey the feature is being actively worked on and we are looking for feedback.
15
+ */
16
+ previewText: 'Our team is actively working on this feature and we would love to know what you think.',
17
+ /**
18
+ *@description Link text the user can click to provide feedback to the team.
19
+ */
20
+ previewTextFeedbackLink: 'Send us your feedback.',
21
+ /**
22
+ *@description Title of the UI section that shows the user that this feature is in preview. Used as the main heading. Not a verb.
23
+ */
24
+ previewFeature: 'Preview feature',
25
+ /**
26
+ *@description Title of the section to the quick start video and documentation on experimental panels.
27
+ */
28
+ videoAndDocumentation: 'Video and documentation',
29
+ };
30
+
31
+ const str_ = i18n.i18n.registerUIStrings('ui/components/panel_feedback/PanelFeedback.ts', UIStrings);
32
+ const i18nString = i18n.i18n.getLocalizedString.bind(undefined, str_);
33
+
34
+ const previewFeatureUrl = new URL('../../../Images/ic_preview_feature.svg', import.meta.url).toString();
35
+ const videoThumbnailUrl = new URL('../../../Images/preview_feature_video_thumbnail.svg', import.meta.url).toString();
36
+
37
+ export interface PanelFeedbackData {
38
+ feedbackUrl: string;
39
+ quickStartUrl: string;
40
+ quickStartLinkText: string;
41
+ }
42
+ export class PanelFeedback extends HTMLElement {
43
+ static readonly litTagName = LitHtml.literal`devtools-panel-feedback`;
44
+ readonly #shadow = this.attachShadow({mode: 'open'});
45
+ readonly #boundRender = this.render.bind(this);
46
+
47
+ #props: PanelFeedbackData = {
48
+ feedbackUrl: '',
49
+ quickStartUrl: '',
50
+ quickStartLinkText: '',
51
+ };
52
+
53
+ connectedCallback(): void {
54
+ this.#shadow.adoptedStyleSheets = [panelFeedbackStyles];
55
+ }
56
+
57
+ set data(data: PanelFeedbackData) {
58
+ this.#props = data;
59
+ ComponentHelpers.ScheduledRender.scheduleRender(this, this.#boundRender);
60
+ }
61
+
62
+ private render(): void {
63
+ if (!ComponentHelpers.ScheduledRender.isScheduledRender(this)) {
64
+ throw new Error('PanelFeedback render was not scheduled');
65
+ }
66
+
67
+ // clang-format off
68
+ LitHtml.render(LitHtml.html`
69
+ <div class="preview">
70
+ <h2 class="flex">
71
+ <${IconButton.Icon.Icon.litTagName} .data=${{
72
+ iconPath: previewFeatureUrl,
73
+ width: '24px',
74
+ height: '24px',
75
+ color: 'var(--color-primary)',
76
+ } as IconButton.Icon.IconData}></${IconButton.Icon.Icon.litTagName}> ${i18nString(UIStrings.previewFeature)}
77
+ </h2>
78
+ <p>${i18nString(UIStrings.previewText)} <x-link href=${this.#props.feedbackUrl}>${i18nString(UIStrings.previewTextFeedbackLink)}</x-link></p>
79
+ <div class="video">
80
+ <div class="thumbnail">
81
+ <img src=${videoThumbnailUrl} role="presentation" />
82
+ </div>
83
+ <div class="video-description">
84
+ <h3>${i18nString(UIStrings.videoAndDocumentation)}</h3>
85
+ <x-link class="quick-start-link" href=${this.#props.quickStartUrl}>${this.#props.quickStartLinkText}</x-link>
86
+ </div>
87
+ </div>
88
+ </div>
89
+ `, this.#shadow, {host: this});
90
+ // clang-format on
91
+ }
92
+ }
93
+
94
+ ComponentHelpers.CustomElements.defineComponent('devtools-panel-feedback', PanelFeedback);
95
+
96
+ declare global {
97
+ interface HTMLElementTagNameMap {
98
+ 'devtools-panel-feedback': PanelFeedback;
99
+ }
100
+ }
@@ -0,0 +1,76 @@
1
+ /*
2
+ * Copyright 2021 The Chromium Authors. All rights reserved.
3
+ * Use of this source code is governed by a BSD-style license that can be
4
+ * found in the LICENSE file.
5
+ */
6
+
7
+ /**
8
+ * Copyright 2021 Google LLC. All rights reserved.
9
+ */
10
+
11
+ :host {
12
+ display: block;
13
+ }
14
+
15
+ .preview {
16
+ padding: 12px 16px;
17
+ border: 1px solid var(--color-details-hairline);
18
+ color: var(--color-text-primary);
19
+ font-size: 13px;
20
+ line-height: 20px;
21
+ border-radius: 12px;
22
+ margin: 42px 0;
23
+ letter-spacing: 0.01em;
24
+ }
25
+
26
+ h2 {
27
+ color: var(--color-primary);
28
+ font-size: 13px;
29
+ line-height: 20px;
30
+ letter-spacing: 0.01em;
31
+ margin: 9px 0 14px;
32
+ display: flex;
33
+ align-items: center;
34
+ gap: 5px;
35
+ font-weight: normal;
36
+ }
37
+
38
+ h3 {
39
+ font-size: 13px;
40
+ line-height: 20px;
41
+ letter-spacing: 0.04em;
42
+ color: var(--color-text-primary);
43
+ margin-bottom: 2px;
44
+ font-weight: normal;
45
+ }
46
+
47
+ .preview p {
48
+ margin-bottom: 24px;
49
+ }
50
+
51
+ .thumbnail {
52
+ height: 92px;
53
+ }
54
+
55
+ .video {
56
+ display: flex;
57
+ flex-flow: row wrap;
58
+ gap: 20px;
59
+ }
60
+
61
+ x-link { /* stylelint-disable-line selector-type-no-unknown */
62
+ color: var(--color-primary);
63
+ text-decoration-line: underline;
64
+ }
65
+
66
+ x-link.quick-start-link { /* stylelint-disable-line selector-type-no-unknown */
67
+ font-size: 14px;
68
+ line-height: 22px;
69
+ letter-spacing: 0.04em;
70
+ }
71
+
72
+ .video-description {
73
+ min-width: min-content;
74
+ flex-basis: min-content;
75
+ flex-grow: 1;
76
+ }
@@ -0,0 +1,5 @@
1
+ // Copyright 2021 The Chromium Authors. All rights reserved.
2
+ // Use of this source code is governed by a BSD-style license that can be
3
+ // found in the LICENSE file.
4
+
5
+ export * as PanelFeedback from './PanelFeedback.js';
@@ -14,4 +14,5 @@
14
14
  color: var(--color-text-primary);
15
15
  margin-inline-start: 0;
16
16
  padding: 0 6px;
17
+ overflow-wrap: break-word;
17
18
  }
@@ -42,6 +42,7 @@
42
42
  padding: 3px 7px 3px 8px;
43
43
  margin: 0 13px 0 0;
44
44
  white-space: nowrap;
45
+ align-items: center;
45
46
  }
46
47
 
47
48
  .soft-context-menu-item devtools-icon {
package/package.json CHANGED
@@ -55,5 +55,5 @@
55
55
  "unittest": "scripts/test/run_unittests.py --no-text-coverage",
56
56
  "watch": "third_party/node/node.py --output scripts/watch_build.js"
57
57
  },
58
- "version": "1.0.940714"
58
+ "version": "1.0.941095"
59
59
  }