chrome-devtools-frontend 1.0.939277 → 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.
Files changed (61) hide show
  1. package/.stylelintrc.json +1 -7
  2. package/config/gni/all_devtools_files.gni +0 -1
  3. package/config/gni/devtools_grd_files.gni +2 -0
  4. package/docs/triage_guidelines.md +13 -11
  5. package/front_end/Tests.js +47 -0
  6. package/front_end/core/host/InspectorFrontendHostAPI.ts +5 -0
  7. package/front_end/core/host/UserMetrics.ts +72 -0
  8. package/front_end/core/i18n/locales/en-US.json +42 -9
  9. package/front_end/core/i18n/locales/en-XL.json +42 -9
  10. package/front_end/core/protocol_client/InspectorBackend.ts +4 -0
  11. package/front_end/core/root/Runtime.ts +4 -0
  12. package/front_end/core/sdk/CategorizedBreakpoint.ts +35 -0
  13. package/front_end/core/sdk/DOMDebuggerModel.ts +28 -42
  14. package/front_end/core/sdk/EventBreakpointsModel.ts +178 -0
  15. package/front_end/core/sdk/Target.ts +2 -1
  16. package/front_end/core/sdk/sdk.ts +4 -0
  17. package/front_end/devtools_compatibility.js +5 -0
  18. package/front_end/entrypoints/main/MainImpl.ts +6 -3
  19. package/front_end/entrypoints/main/main-meta.ts +1 -2
  20. package/front_end/entrypoints/shell/shell.js +1 -0
  21. package/front_end/entrypoints/shell/shell.json +0 -1
  22. package/front_end/models/logs/LogManager.ts +1 -0
  23. package/front_end/panels/accessibility/AXBreadcrumbsPane.ts +1 -1
  24. package/front_end/panels/accessibility/AccessibilityNodeView.ts +1 -1
  25. package/front_end/panels/application/ApplicationPanelCacheSection.ts +1 -1
  26. package/front_end/panels/application/BackForwardCacheView.ts +24 -24
  27. package/front_end/panels/browser_debugger/CSPViolationBreakpointsSidebarPane.ts +2 -2
  28. package/front_end/panels/browser_debugger/CategorizedBreakpointsSidebarPane.ts +7 -7
  29. package/front_end/panels/browser_debugger/EventListenerBreakpointsSidebarPane.ts +14 -6
  30. package/front_end/panels/css_overview/components/CSSOverviewStartView.ts +6 -8
  31. package/front_end/panels/css_overview/components/cssOverviewStartView.css +7 -1
  32. package/front_end/panels/elements/StylesSidebarPane.ts +2 -1
  33. package/front_end/panels/issues/IssueKindView.ts +22 -4
  34. package/front_end/panels/lighthouse/LighthouseController.ts +10 -33
  35. package/front_end/panels/lighthouse/LighthousePanel.ts +2 -1
  36. package/front_end/panels/lighthouse/LighthouseReportRenderer.ts +2 -1
  37. package/front_end/panels/network/NetworkLogView.ts +3 -0
  38. package/front_end/panels/network/RequestPayloadView.ts +2 -0
  39. package/front_end/panels/network/requestPayloadTree.css +5 -0
  40. package/front_end/panels/protocol_monitor/ProtocolMonitor.ts +1 -0
  41. package/front_end/panels/settings/components/SyncSection.ts +25 -4
  42. package/front_end/panels/sources/DebuggerPausedMessage.ts +14 -7
  43. package/front_end/panels/sources/SourcesPanel.ts +9 -5
  44. package/front_end/third_party/codemirror.next/bundle-tsconfig.json +1 -1
  45. package/front_end/ui/components/buttons/Button.ts +11 -0
  46. package/front_end/ui/components/buttons/button.css +4 -0
  47. package/front_end/ui/components/docs/button/basic.ts +10 -0
  48. package/front_end/ui/components/docs/panel_feedback/basic.html +25 -0
  49. package/front_end/ui/components/docs/panel_feedback/basic.ts +20 -0
  50. package/front_end/ui/components/helpers/get-stylesheet.ts +1 -0
  51. package/front_end/ui/components/panel_feedback/PanelFeedback.ts +100 -0
  52. package/front_end/ui/components/panel_feedback/panelFeedback.css +76 -0
  53. package/front_end/ui/components/panel_feedback/panel_feedback.ts +5 -0
  54. package/front_end/ui/components/report_view/reportValue.css +1 -0
  55. package/front_end/ui/legacy/softContextMenu.css +1 -0
  56. package/package.json +2 -2
  57. package/scripts/eslint_rules/lib/check_component_naming.js +1 -1
  58. package/scripts/eslint_rules/lib/enforce_custom_event_names.js +1 -1
  59. package/scripts/eslint_rules/lib/l10n_no_i18nString_calls_module_instantiation.js +1 -1
  60. package/scripts/eslint_rules/lib/no_underscored_properties.js +1 -1
  61. package/front_end/entrypoints/main/module.json +0 -5
@@ -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
@@ -31,7 +31,7 @@
31
31
  "check-external-links": "third_party/node/node.py --output scripts/check_external_links.js",
32
32
  "check-gn": "third_party/node/node.py --output scripts/check_gn.js",
33
33
  "check-json": "third_party/node/node.py --output scripts/json_validator/validate_module_json.js",
34
- "check-lint": "third_party/node/node.py --output scripts/test/run_lint_check_js.js && third_party/node/node.py --output scripts/test/run_lint_check_css.js",
34
+ "check-lint": "third_party/node/node.py --output scripts/test/run_lint_check_js.mjs && third_party/node/node.py --output scripts/test/run_lint_check_css.js",
35
35
  "check-lint-css": "third_party/node/node.py --output scripts/test/run_lint_check_css.js",
36
36
  "collect-strings": "third_party/node/node.py --output third_party/i18n/collect-strings.js front_end",
37
37
  "components-server": "third_party/node/node.py --output scripts/component_server/server.js",
@@ -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.939277"
58
+ "version": "1.0.941095"
59
59
  }
@@ -44,7 +44,7 @@ module.exports = {
44
44
 
45
45
  function findComponentTagNameFromStaticProperty(classBodyNode) {
46
46
  return classBodyNode.body.find(node => {
47
- return node.type === 'ClassProperty' && node.key.name === 'litTagName';
47
+ return node.type === 'PropertyDefinition' && node.key.name === 'litTagName';
48
48
  });
49
49
  }
50
50
 
@@ -73,7 +73,7 @@ module.exports = {
73
73
 
74
74
  // If the reference is right, let's find the value of the static eventName property and make sure it is valid.
75
75
  const eventNameProperty = node.body.body.find(classBodyPart => {
76
- return classBodyPart.type === 'ClassProperty' && classBodyPart.key.name === 'eventName';
76
+ return classBodyPart.type === 'PropertyDefinition' && classBodyPart.key.name === 'eventName';
77
77
  });
78
78
 
79
79
  // This should always exist because we checked for its existence
@@ -7,7 +7,7 @@
7
7
  // One of these AST nodes must be an ancestor of an i18nString call.
8
8
  const REQUIRED_ANCESTOR = new Set([
9
9
  'ArrowFunctionExpression',
10
- 'ClassProperty',
10
+ 'PropertyDefinition',
11
11
  'FunctionDeclaration',
12
12
  'FunctionExpression',
13
13
  'MethodDefinition',
@@ -49,7 +49,7 @@ module.exports = {
49
49
  },
50
50
  create: function(context) {
51
51
  return {
52
- ClassProperty(node) {
52
+ PropertyDefinition(node) {
53
53
  checkNodeForUnderscoredProperties(context, node, 'property');
54
54
  },
55
55
  MethodDefinition(node) {
@@ -1,5 +0,0 @@
1
- {
2
- "dependencies": [
3
- "ui/legacy"
4
- ]
5
- }