chrome-devtools-frontend 1.0.1362775 → 1.0.1367881
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.
- package/.eslintrc.js +1 -0
- package/.stylelintrc.json +2 -1
- package/config/gni/devtools_grd_files.gni +14 -2
- package/config/gni/devtools_image_files.gni +2 -1
- package/docs/contributing/issues.md +15 -0
- package/extensions/cxx_debugging/src/ExtensionOptions.ts +0 -1
- package/extensions/cxx_debugging/third_party/llvm/README.chromium +1 -1
- package/front_end/.eslintrc.js +0 -5
- package/front_end/Images/src/button-magic.svg +3 -0
- package/front_end/Images/src/performance-panel-delete-annotation.svg +32 -0
- package/front_end/Images/src/performance-panel-diagram.svg +19 -14
- package/front_end/Images/src/performance-panel-entry-label.svg +9 -16
- package/front_end/Images/src/performance-panel-time-range.svg +2 -8
- package/front_end/core/common/AppProvider.ts +1 -1
- package/front_end/core/common/Object.ts +2 -7
- package/front_end/core/common/SettingRegistration.ts +1 -1
- package/front_end/core/common/Settings.ts +1 -1
- package/front_end/core/host/AidaClient.ts +7 -1
- package/front_end/core/host/InspectorFrontendHost.ts +1 -1
- package/front_end/core/host/ResourceLoader.ts +1 -1
- package/front_end/core/host/UserMetrics.ts +14 -2
- package/front_end/core/i18n/time-utilities.ts +7 -1
- package/front_end/core/platform/ArrayUtilities.ts +1 -0
- package/front_end/core/platform/DevToolsPath.ts +1 -1
- package/front_end/core/platform/Timing.ts +1 -1
- package/front_end/core/platform/UIString.ts +1 -1
- package/front_end/core/platform/UserVisibleError.ts +1 -1
- package/front_end/core/root/Runtime.ts +11 -2
- package/front_end/core/sdk/AccessibilityModel.ts +3 -4
- package/front_end/core/sdk/CPUProfilerModel.ts +3 -4
- package/front_end/core/sdk/CSSContainerQuery.ts +3 -3
- package/front_end/core/sdk/CSSLayer.ts +2 -2
- package/front_end/core/sdk/CSSMatchedStyles.test.ts +1 -0
- package/front_end/core/sdk/CSSMatchedStyles.ts +10 -2
- package/front_end/core/sdk/CSSMedia.ts +2 -2
- package/front_end/core/sdk/CSSMetadata.ts +21 -0
- package/front_end/core/sdk/CSSModel.ts +1 -0
- package/front_end/core/sdk/CSSProperty.ts +2 -2
- package/front_end/core/sdk/CSSQuery.ts +2 -2
- package/front_end/core/sdk/CSSRule.ts +2 -2
- package/front_end/core/sdk/CSSScope.ts +2 -2
- package/front_end/core/sdk/CSSStyleDeclaration.ts +3 -3
- package/front_end/core/sdk/CSSStyleSheetHeader.ts +4 -4
- package/front_end/core/sdk/CSSSupports.ts +2 -2
- package/front_end/core/sdk/CookieModel.ts +1 -1
- package/front_end/core/sdk/DOMDebuggerModel.ts +1 -1
- package/front_end/core/sdk/DebuggerModel.ts +9 -3
- package/front_end/core/sdk/EnhancedTracesParser.test.ts +1 -5
- package/front_end/core/sdk/EnhancedTracesParser.ts +2 -6
- package/front_end/core/sdk/EventBreakpointsModel.ts +1 -2
- package/front_end/core/sdk/FrameAssociated.ts +1 -1
- package/front_end/core/sdk/FrameManager.ts +9 -7
- package/front_end/core/sdk/HeapProfilerModel.ts +3 -4
- package/front_end/core/sdk/IsolateManager.ts +2 -3
- package/front_end/core/sdk/LayerTreeBase.ts +2 -2
- package/front_end/core/sdk/NetworkManager.ts +1 -1
- package/front_end/core/sdk/OverlayModel.ts +2 -2
- package/front_end/core/sdk/OverlayPersistentHighlighter.ts +1 -1
- package/front_end/core/sdk/PageLoad.ts +1 -1
- package/front_end/core/sdk/PageResourceLoader.ts +1 -1
- package/front_end/core/sdk/RemoteObject.ts +3 -3
- package/front_end/core/sdk/Resource.ts +2 -2
- package/front_end/core/sdk/ResourceTreeModel.ts +1 -1
- package/front_end/core/sdk/SDKModel.ts +1 -1
- package/front_end/core/sdk/Script.ts +5 -5
- package/front_end/core/sdk/ServiceWorkerCacheModel.ts +5 -7
- package/front_end/core/sdk/SourceMap.ts +1 -1
- package/front_end/core/sdk/SourceMapManager.ts +1 -1
- package/front_end/core/sdk/SourceMapScopeChainEntry.ts +2 -2
- package/front_end/core/sdk/SourceMapScopesInfo.ts +2 -2
- package/front_end/core/sdk/Target.ts +3 -2
- package/front_end/core/sdk/TargetManager.ts +4 -1
- package/front_end/core/sdk/WebAuthnModel.ts +20 -0
- package/front_end/core/sdk/sdk-meta.ts +7 -0
- package/front_end/devtools_compatibility.js +3 -3
- package/front_end/entrypoints/formatter_worker/CSSFormatter.ts +1 -1
- package/front_end/entrypoints/formatter_worker/HTMLFormatter.ts +1 -1
- package/front_end/entrypoints/formatter_worker/IdentityFormatter.ts +1 -1
- package/front_end/entrypoints/formatter_worker/JSONFormatter.ts +1 -1
- package/front_end/entrypoints/formatter_worker/JavaScriptFormatter.ts +1 -1
- package/front_end/entrypoints/heap_snapshot_worker/AllocationProfile.ts +1 -1
- package/front_end/entrypoints/heap_snapshot_worker/HeapSnapshot.ts +12 -12
- package/front_end/entrypoints/heap_snapshot_worker/HeapSnapshotLoader.ts +1 -1
- package/front_end/entrypoints/main/MainImpl.ts +11 -1
- package/front_end/generated/InspectorBackendCommands.js +5 -3
- package/front_end/generated/SupportedCSSProperties.js +20 -14
- package/front_end/generated/protocol-mapping.d.ts +10 -0
- package/front_end/generated/protocol-proxy-api.d.ts +12 -0
- package/front_end/generated/protocol.ts +32 -1
- package/front_end/legacy_test_runner/sdk_test_runner/sdk_test_runner.js +4 -2
- package/front_end/models/bindings/CSSWorkspaceBinding.ts +2 -2
- package/front_end/models/bindings/CompilerScriptMapping.ts +1 -2
- package/front_end/models/bindings/DebuggerLanguagePlugins.test.ts +1 -1
- package/front_end/models/bindings/DebuggerLanguagePlugins.ts +2 -2
- package/front_end/models/bindings/DebuggerWorkspaceBinding.ts +1 -1
- package/front_end/models/bindings/DefaultScriptMapping.ts +1 -1
- package/front_end/models/bindings/IgnoreListManager.test.ts +49 -12
- package/front_end/models/bindings/IgnoreListManager.ts +79 -5
- package/front_end/models/bindings/ResourceMapping.ts +1 -1
- package/front_end/models/bindings/StylesSourceMapping.ts +11 -6
- package/front_end/models/breakpoints/BreakpointManager.test.ts +1 -1
- package/front_end/models/extensions/ExtensionPanel.ts +1 -1
- package/front_end/models/extensions/ExtensionServer.test.ts +1 -1
- package/front_end/models/extensions/ExtensionServer.ts +1 -1
- package/front_end/models/extensions/ExtensionView.ts +1 -1
- package/front_end/models/extensions/LanguageExtensionEndpoint.ts +1 -1
- package/front_end/models/extensions/RecorderPluginManager.ts +1 -1
- package/front_end/models/har/Importer.ts +1 -1
- package/front_end/models/issues_manager/AttributionReportingIssue.ts +1 -1
- package/front_end/models/issues_manager/BounceTrackingIssue.ts +1 -2
- package/front_end/models/issues_manager/CookieDeprecationMetadataIssue.ts +1 -1
- package/front_end/models/issues_manager/CorsIssue.ts +1 -1
- package/front_end/models/issues_manager/HeavyAdIssue.ts +1 -1
- package/front_end/models/issues_manager/Issue.ts +1 -1
- package/front_end/models/issues_manager/IssueResolver.ts +2 -2
- package/front_end/models/issues_manager/IssuesManager.ts +1 -1
- package/front_end/models/issues_manager/LowTextContrastIssue.ts +1 -1
- package/front_end/models/issues_manager/MixedContentIssue.ts +1 -1
- package/front_end/models/issues_manager/PropertyRuleIssue.ts +1 -1
- package/front_end/models/issues_manager/QuirksModeIssue.ts +1 -1
- package/front_end/models/issues_manager/RelatedIssue.ts +1 -1
- package/front_end/models/issues_manager/SharedArrayBufferIssue.ts +3 -3
- package/front_end/models/issues_manager/SourceFrameIssuesManager.ts +1 -1
- package/front_end/models/issues_manager/StylesheetLoadingIssue.ts +1 -1
- package/front_end/models/javascript_metadata/NativeFunctions.js +69 -61
- package/front_end/models/live-metrics/LiveMetrics.ts +41 -34
- package/front_end/models/live-metrics/web-vitals-injected/spec/spec.ts +1 -1
- package/front_end/models/persistence/EditFileSystemView.ts +1 -1
- package/front_end/models/persistence/FileSystemWorkspaceBinding.ts +2 -3
- package/front_end/models/persistence/IsolatedFileSystemManager.ts +2 -3
- package/front_end/models/persistence/WorkspaceSettingsTab.ts +2 -2
- package/front_end/models/text_utils/ContentProvider.ts +3 -3
- package/front_end/models/text_utils/StaticContentProvider.ts +1 -5
- package/front_end/models/text_utils/TextUtils.ts +1 -1
- package/front_end/models/text_utils/WasmDisassembly.ts +1 -1
- package/front_end/models/timeline_model/TimelineProfileTree.test.ts +21 -21
- package/front_end/models/timeline_model/TimelineProfileTree.ts +1 -1
- package/front_end/models/trace/ModelImpl.test.ts +1 -1
- package/front_end/models/trace/ModelImpl.ts +10 -27
- package/front_end/models/trace/Processor.test.ts +16 -15
- package/front_end/models/trace/Processor.ts +33 -9
- package/front_end/models/trace/extras/FilmStrip.ts +2 -2
- package/front_end/models/trace/handlers/LayoutShiftsHandler.test.ts +2 -2
- package/front_end/models/trace/handlers/LayoutShiftsHandler.ts +10 -1
- package/front_end/models/trace/handlers/MetaHandler.ts +4 -0
- package/front_end/models/trace/handlers/PageLoadMetricsHandler.ts +1 -1
- package/front_end/models/trace/handlers/RendererHandler.test.ts +1 -1
- package/front_end/models/trace/handlers/SamplesHandler.test.ts +2 -2
- package/front_end/models/trace/handlers/ScreenshotsHandler.test.ts +5 -4
- package/front_end/models/trace/handlers/ScreenshotsHandler.ts +7 -5
- package/front_end/models/trace/handlers/Threads.ts +2 -2
- package/front_end/models/trace/handlers/WarningsHandler.ts +1 -1
- package/front_end/models/trace/helpers/Network.ts +20 -2
- package/front_end/models/trace/helpers/SyntheticEvents.test.ts +1 -1
- package/front_end/models/trace/helpers/Trace.test.ts +34 -3
- package/front_end/models/trace/helpers/Trace.ts +12 -0
- package/front_end/models/trace/helpers/TreeHelpers.test.ts +52 -0
- package/front_end/models/trace/helpers/TreeHelpers.ts +80 -1
- package/front_end/models/trace/insights/Common.ts +1 -1
- package/front_end/models/trace/insights/CumulativeLayoutShift.test.ts +24 -2
- package/front_end/models/trace/insights/CumulativeLayoutShift.ts +102 -27
- package/front_end/models/trace/insights/DocumentLatency.test.ts +22 -11
- package/front_end/models/trace/insights/DocumentLatency.ts +9 -6
- package/front_end/models/trace/insights/FontDisplay.ts +5 -1
- package/front_end/models/trace/insights/InteractionToNextPaint.ts +4 -3
- package/front_end/models/trace/insights/LargestContentfulPaint.test.ts +9 -1
- package/front_end/models/trace/insights/LargestContentfulPaint.ts +26 -6
- package/front_end/models/trace/insights/RenderBlocking.test.ts +10 -16
- package/front_end/models/trace/insights/RenderBlocking.ts +6 -4
- package/front_end/models/trace/insights/SlowCSSSelector.ts +3 -1
- package/front_end/models/trace/insights/ThirdPartyWeb.ts +15 -2
- package/front_end/models/trace/insights/Viewport.ts +1 -0
- package/front_end/models/trace/insights/types.ts +14 -11
- package/front_end/models/trace/lantern/graph/BaseNode.ts +2 -2
- package/front_end/models/trace/lantern/graph/PageDependencyGraph.ts +4 -3
- package/front_end/models/trace/lantern/simulation/TCPConnection.ts +1 -1
- package/front_end/models/trace/lantern/testing/MetricTestUtils.ts +1 -1
- package/front_end/models/trace/root-causes/LayoutShift.ts +3 -20
- package/front_end/models/trace/types/Extensions.ts +3 -7
- package/front_end/models/trace/types/File.ts +2 -8
- package/front_end/models/trace/types/TraceEvents.ts +10 -4
- package/front_end/models/workspace/UISourceCode.test.ts +3 -3
- package/front_end/models/workspace/WorkspaceImpl.ts +1 -1
- package/front_end/panels/accessibility/AXBreadcrumbsPane.ts +1 -1
- package/front_end/panels/animation/AnimationGroupPreviewUI.ts +1 -1
- package/front_end/panels/animation/AnimationModel.ts +1 -1
- package/front_end/panels/animation/AnimationTimeline.ts +1 -1
- package/front_end/panels/animation/AnimationUI.ts +1 -1
- package/front_end/panels/application/ApplicationPanelSidebar.test.ts +90 -0
- package/front_end/panels/application/ApplicationPanelSidebar.ts +123 -20
- package/front_end/panels/application/ApplicationPanelTreeElement.ts +1 -1
- package/front_end/panels/application/BackForwardCacheTreeElement.ts +1 -1
- package/front_end/panels/application/BounceTrackingMitigationsTreeElement.ts +1 -1
- package/front_end/panels/application/DOMStorageItemsView.ts +4 -2
- package/front_end/panels/application/ExtensionStorageItemsView.test.ts +89 -0
- package/front_end/panels/application/ExtensionStorageItemsView.ts +219 -0
- package/front_end/panels/application/ExtensionStorageModel.test.ts +12 -0
- package/front_end/panels/application/ExtensionStorageModel.ts +56 -13
- package/front_end/panels/application/IndexedDBViews.ts +14 -19
- package/front_end/panels/application/InterestGroupTreeElement.ts +1 -1
- package/front_end/panels/application/PreloadingTreeElement.ts +1 -1
- package/front_end/panels/application/ReportingApiTreeElement.ts +1 -1
- package/front_end/panels/application/ResourcesPanel.ts +18 -1
- package/front_end/panels/application/ServiceWorkerCacheTreeElement.ts +1 -1
- package/front_end/panels/application/SharedStorageListTreeElement.ts +1 -1
- package/front_end/panels/application/SharedStorageTreeElement.ts +2 -2
- package/front_end/panels/application/StorageBucketsTreeElement.ts +1 -1
- package/front_end/panels/application/TrustTokensTreeElement.ts +1 -1
- package/front_end/panels/application/application.ts +2 -0
- package/front_end/panels/application/components/BackForwardCacheView.ts +76 -72
- package/front_end/panels/application/components/BounceTrackingMitigationsView.ts +32 -29
- package/front_end/panels/application/components/EndpointsGrid.ts +5 -4
- package/front_end/panels/application/components/FrameDetailsView.ts +110 -127
- package/front_end/panels/application/components/InterestGroupAccessGrid.ts +11 -11
- package/front_end/panels/application/components/OriginTrialTreeView.ts +36 -34
- package/front_end/panels/application/components/PermissionsPolicySection.ts +31 -33
- package/front_end/panels/application/components/ProtocolHandlersView.ts +15 -14
- package/front_end/panels/application/components/ReportsGrid.ts +11 -9
- package/front_end/panels/application/components/ServiceWorkerRouterView.ts +0 -1
- package/front_end/panels/application/components/SharedStorageAccessGrid.ts +11 -11
- package/front_end/panels/application/components/SharedStorageMetadataView.ts +16 -14
- package/front_end/panels/application/components/StackTrace.ts +18 -17
- package/front_end/panels/application/components/StorageMetadataView.ts +19 -18
- package/front_end/panels/application/components/TrustTokensView.ts +17 -16
- package/front_end/panels/application/preloading/PreloadingView.ts +14 -11
- package/front_end/panels/application/preloading/components/MismatchedPreloadingGrid.ts +7 -6
- package/front_end/panels/application/preloading/components/PreloadingDetailsReportView.ts +42 -45
- package/front_end/panels/application/preloading/components/PreloadingDisabledInfobar.ts +13 -11
- package/front_end/panels/application/preloading/components/PreloadingGrid.ts +11 -9
- package/front_end/panels/application/preloading/components/PreloadingMismatchedHeadersGrid.ts +5 -4
- package/front_end/panels/application/preloading/components/PreloadingString.ts +2 -0
- package/front_end/panels/application/preloading/components/RuleSetDetailsView.ts +10 -8
- package/front_end/panels/application/preloading/components/RuleSetGrid.ts +20 -16
- package/front_end/panels/application/preloading/components/UsedPreloadingView.ts +50 -57
- package/front_end/panels/application/resourcesSidebar.css +0 -3
- package/front_end/panels/autofill/AutofillView.ts +19 -14
- package/front_end/panels/console/ConsoleFilter.ts +1 -1
- package/front_end/panels/console/ConsoleSidebar.ts +1 -1
- package/front_end/panels/console/ConsoleViewMessage.ts +2 -2
- package/front_end/panels/console/consoleView.css +4 -3
- package/front_end/panels/coverage/CoverageDecorationManager.ts +1 -1
- package/front_end/panels/css_overview/CSSOverviewCompletedView.ts +1 -1
- package/front_end/panels/css_overview/CSSOverviewController.ts +2 -2
- package/front_end/panels/css_overview/CSSOverviewModel.ts +2 -3
- package/front_end/panels/css_overview/CSSOverviewPanel.ts +5 -7
- package/front_end/panels/css_overview/components/CSSOverviewStartView.ts +12 -10
- package/front_end/panels/elements/AccessibilityTreeUtils.ts +9 -4
- package/front_end/panels/elements/ColorSwatchPopoverIcon.ts +3 -3
- package/front_end/panels/elements/ComputedStyleWidget.ts +6 -4
- package/front_end/panels/elements/ElementsPanel.ts +7 -6
- package/front_end/panels/elements/ElementsTreeElement.ts +35 -0
- package/front_end/panels/elements/ElementsTreeOutline.ts +1 -1
- package/front_end/panels/elements/PropertyMatchers.test.ts +57 -0
- package/front_end/panels/elements/PropertyMatchers.ts +78 -1
- package/front_end/panels/elements/StyleEditorWidget.ts +2 -2
- package/front_end/panels/elements/StylePropertiesSection.test.ts +1 -0
- package/front_end/panels/elements/StylePropertyHighlighter.test.ts +1 -0
- package/front_end/panels/elements/StylePropertyHighlighter.ts +2 -2
- package/front_end/panels/elements/StylePropertyTreeElement.test.ts +36 -3
- package/front_end/panels/elements/StylePropertyTreeElement.ts +72 -26
- package/front_end/panels/elements/StylesSidebarPane.test.ts +2 -0
- package/front_end/panels/elements/TopLayerContainer.ts +1 -2
- package/front_end/panels/elements/components/AccessibilityTreeNode.ts +8 -7
- package/front_end/panels/elements/components/AdornerSettingsPane.ts +3 -4
- package/front_end/panels/elements/components/AnchorFunctionLinkSwatch.ts +8 -7
- package/front_end/panels/elements/components/CSSHintDetailsView.ts +3 -2
- package/front_end/panels/elements/components/CSSPropertyDocsView.ts +3 -2
- package/front_end/panels/elements/components/CSSQuery.ts +0 -1
- package/front_end/panels/elements/components/CSSVariableValueView.ts +1 -3
- package/front_end/panels/elements/components/ComputedStyleProperty.ts +0 -1
- package/front_end/panels/elements/components/ComputedStyleTrace.ts +0 -1
- package/front_end/panels/elements/components/ElementsBreadcrumbs.ts +15 -11
- package/front_end/panels/elements/components/ElementsBreadcrumbsUtils.ts +1 -1
- package/front_end/panels/elements/components/ElementsTreeExpandButton.ts +6 -4
- package/front_end/panels/elements/components/LayoutPane.ts +8 -7
- package/front_end/panels/elements/components/QueryContainer.test.ts +2 -3
- package/front_end/panels/elements/components/QueryContainer.ts +10 -9
- package/front_end/panels/elements/components/StylePropertyEditor.ts +4 -4
- package/front_end/panels/elements/components/computedStyleProperty.css +2 -1
- package/front_end/panels/elements/components/cssPropertyDocsView.css +3 -2
- package/front_end/panels/elements/elementsTreeOutline.css +17 -0
- package/front_end/panels/elements/stylesSidebarPane.css +2 -2
- package/front_end/panels/emulation/DeviceModeWrapper.ts +1 -1
- package/front_end/panels/emulation/components/DeviceSizeInputElement.ts +3 -1
- package/front_end/panels/explain/components/ConsoleInsight.ts +47 -46
- package/front_end/panels/explain/components/consoleInsight.css +0 -9
- package/front_end/panels/freestyler/AiAgent.ts +8 -2
- package/front_end/panels/freestyler/DrJonesFileAgent.test.ts +201 -0
- package/front_end/panels/freestyler/DrJonesFileAgent.ts +196 -0
- package/front_end/panels/freestyler/DrJonesNetworkAgent.test.ts +1 -1
- package/front_end/panels/freestyler/DrJonesNetworkAgent.ts +34 -31
- package/front_end/panels/freestyler/DrJonesPerformanceAgent.test.ts +195 -0
- package/front_end/panels/freestyler/DrJonesPerformanceAgent.ts +193 -0
- package/front_end/panels/freestyler/FreestylerAgent.test.ts +177 -12
- package/front_end/panels/freestyler/FreestylerAgent.ts +83 -8
- package/front_end/panels/freestyler/FreestylerEvaluateAction.test.ts +21 -1
- package/front_end/panels/freestyler/FreestylerEvaluateAction.ts +3 -0
- package/front_end/panels/freestyler/FreestylerPanel.test.ts +16 -2
- package/front_end/panels/freestyler/FreestylerPanel.ts +126 -15
- package/front_end/panels/freestyler/components/FreestylerChatUi.test.ts +21 -2
- package/front_end/panels/freestyler/components/FreestylerChatUi.ts +294 -145
- package/front_end/panels/freestyler/components/ProvideFeedback.ts +16 -13
- package/front_end/panels/freestyler/components/freestylerChatUi.css +78 -26
- package/front_end/panels/freestyler/freestyler-meta.ts +64 -9
- package/front_end/panels/freestyler/freestyler.ts +2 -0
- package/front_end/panels/issues/AffectedResourcesView.ts +2 -2
- package/front_end/panels/issues/AttributionReportingIssueDetailsView.ts +5 -4
- package/front_end/panels/issues/CorsIssueDetailsView.ts +6 -6
- package/front_end/panels/issues/GenericIssueDetailsView.ts +3 -3
- package/front_end/panels/issues/IssueView.ts +2 -2
- package/front_end/panels/issues/components/ElementsPanelLink.ts +3 -1
- package/front_end/panels/issues/components/HideIssuesMenu.ts +6 -5
- package/front_end/panels/lighthouse/LighthouseController.ts +2 -2
- package/front_end/panels/lighthouse/LighthousePanel.ts +1 -1
- package/front_end/panels/lighthouse/LighthouseReportRenderer.ts +2 -6
- package/front_end/panels/lighthouse/LighthouseStartView.ts +1 -1
- package/front_end/panels/lighthouse/LighthouseStatusView.ts +1 -1
- package/front_end/panels/lighthouse/LighthouseTimespanView.ts +1 -1
- package/front_end/panels/linear_memory_inspector/LinearMemoryInspectorPane.ts +8 -2
- package/front_end/panels/linear_memory_inspector/components/LinearMemoryHighlightChipList.ts +6 -6
- package/front_end/panels/linear_memory_inspector/components/LinearMemoryInspector.test.ts +11 -0
- package/front_end/panels/linear_memory_inspector/components/LinearMemoryInspector.ts +26 -31
- package/front_end/panels/linear_memory_inspector/components/LinearMemoryNavigator.ts +5 -5
- package/front_end/panels/linear_memory_inspector/components/LinearMemoryValueInterpreter.ts +11 -14
- package/front_end/panels/linear_memory_inspector/components/LinearMemoryViewer.ts +1 -3
- package/front_end/panels/linear_memory_inspector/components/ValueInterpreterDisplay.ts +5 -4
- package/front_end/panels/linear_memory_inspector/components/ValueInterpreterSettings.ts +0 -1
- package/front_end/panels/media/EventDisplayTable.ts +1 -1
- package/front_end/panels/media/EventTimelineView.ts +1 -1
- package/front_end/panels/media/PlayerDetailView.ts +3 -3
- package/front_end/panels/media/PlayerListView.ts +2 -2
- package/front_end/panels/mobile_throttling/ThrottlingManager.ts +23 -29
- package/front_end/panels/network/NetworkConfigView.ts +1 -2
- package/front_end/panels/network/NetworkDataGridNode.ts +4 -153
- package/front_end/panels/network/NetworkFrameGrouper.ts +1 -1
- package/front_end/panels/network/NetworkItemView.ts +1 -1
- package/front_end/panels/network/NetworkLogView.ts +1 -1
- package/front_end/panels/network/NetworkLogViewColumns.ts +4 -6
- package/front_end/panels/network/NetworkWaterfallColumn.ts +5 -8
- package/front_end/panels/network/RequestBinaryResponseView.test.ts +69 -0
- package/front_end/panels/network/RequestBinaryResponseView.ts +67 -0
- package/front_end/panels/network/RequestResponseView.test.ts +28 -1
- package/front_end/panels/network/RequestResponseView.ts +14 -7
- package/front_end/panels/network/components/EditableSpan.ts +0 -1
- package/front_end/panels/network/components/HeaderSectionRow.test.ts +1 -1
- package/front_end/panels/network/components/HeaderSectionRow.ts +22 -21
- package/front_end/panels/network/components/RequestHeaderSection.ts +7 -7
- package/front_end/panels/network/components/RequestHeadersView.ts +25 -26
- package/front_end/panels/network/components/RequestTrustTokensView.ts +32 -35
- package/front_end/panels/network/components/ResponseHeaderSection.ts +8 -10
- package/front_end/panels/network/components/WebBundleInfoView.ts +13 -11
- package/front_end/panels/network/network.ts +2 -0
- package/front_end/panels/network/networkConfigView.css +12 -5
- package/front_end/panels/network/networkLogView.css +4 -15
- package/front_end/panels/network/requestHTMLView.css +1 -0
- package/front_end/panels/profiler/BottomUpProfileDataGrid.ts +3 -3
- package/front_end/panels/profiler/HeapProfileView.ts +1 -1
- package/front_end/panels/profiler/HeapProfilerPanel.ts +2 -2
- package/front_end/panels/profiler/HeapSnapshotDataGrids.ts +3 -3
- package/front_end/panels/profiler/HeapSnapshotGridNodes.ts +3 -3
- package/front_end/panels/profiler/HeapSnapshotProxy.ts +1 -1
- package/front_end/panels/profiler/ProfileLauncherView.ts +3 -3
- package/front_end/panels/protocol_monitor/ProtocolMonitor.ts +4 -2
- package/front_end/panels/protocol_monitor/components/JSONEditor.ts +22 -15
- package/front_end/panels/protocol_monitor/components/Toolbar.ts +4 -4
- package/front_end/panels/recorder/RecorderController.ts +39 -43
- package/front_end/panels/recorder/components/ControlButton.ts +1 -1
- package/front_end/panels/recorder/components/CreateRecordingView.ts +15 -15
- package/front_end/panels/recorder/components/ExtensionView.ts +9 -8
- package/front_end/panels/recorder/components/RecordingListView.ts +15 -13
- package/front_end/panels/recorder/components/RecordingView.ts +92 -84
- package/front_end/panels/recorder/components/ReplaySection.ts +6 -6
- package/front_end/panels/recorder/components/SelectButton.ts +21 -20
- package/front_end/panels/recorder/components/StartView.ts +14 -18
- package/front_end/panels/recorder/components/StepEditor.ts +3 -3
- package/front_end/panels/recorder/components/StepView.ts +20 -20
- package/front_end/panels/recorder/components/TimelineSection.ts +3 -2
- package/front_end/panels/recorder/converters/ExtensionConverter.ts +2 -2
- package/front_end/panels/recorder/converters/JSONConverter.ts +1 -1
- package/front_end/panels/recorder/converters/LighthouseConverter.ts +1 -1
- package/front_end/panels/recorder/converters/PuppeteerConverter.ts +1 -1
- package/front_end/panels/recorder/converters/PuppeteerReplayConverter.ts +1 -1
- package/front_end/panels/recorder/injected/RecordingClient.ts +7 -10
- package/front_end/panels/recorder/injected/SelectorComputer.ts +5 -5
- package/front_end/panels/recorder/injected/SelectorPicker.ts +2 -2
- package/front_end/panels/recorder/injected/Step.ts +1 -1
- package/front_end/panels/recorder/injected/injected.ts +1 -1
- package/front_end/panels/recorder/injected/selectors/ARIASelector.ts +1 -1
- package/front_end/panels/recorder/injected/selectors/PierceSelector.ts +6 -7
- package/front_end/panels/recorder/injected/selectors/TextSelector.ts +3 -5
- package/front_end/panels/recorder/injected/util.ts +1 -1
- package/front_end/panels/recorder/models/RecordingPlayer.ts +1 -1
- package/front_end/panels/recorder/models/RecordingSettings.ts +1 -4
- package/front_end/panels/recorder/models/RecordingStorage.ts +1 -1
- package/front_end/panels/recorder/models/SDKUtils.ts +3 -2
- package/front_end/panels/recorder/models/ScreenshotUtils.ts +1 -1
- package/front_end/panels/recorder/models/Section.ts +2 -2
- package/front_end/panels/search/SearchResultsPane.ts +1 -2
- package/front_end/panels/search/SearchView.ts +1 -1
- package/front_end/panels/security/OriginTreeElement.ts +1 -1
- package/front_end/panels/security/SecurityAndPrivacyPanelSidebar.ts +1 -1
- package/front_end/panels/security/SecurityPanelSidebarTreeElement.ts +1 -1
- package/front_end/panels/sensors/SensorsView.ts +16 -0
- package/front_end/panels/sensors/sensors.css +16 -0
- package/front_end/panels/settings/AISettingsTab.test.ts +41 -11
- package/front_end/panels/settings/AISettingsTab.ts +103 -58
- package/front_end/panels/settings/FrameworkIgnoreListSettingsTab.ts +9 -0
- package/front_end/panels/settings/SettingsScreen.ts +1 -1
- package/front_end/panels/settings/components/SyncSection.ts +18 -13
- package/front_end/panels/settings/emulation/components/UserAgentClientHintsForm.ts +33 -30
- package/front_end/panels/settings/settings-meta.ts +2 -2
- package/front_end/panels/sources/DebuggerPlugin.ts +1 -1
- package/front_end/panels/sources/EditingLocationHistoryManager.ts +2 -2
- package/front_end/panels/sources/GoToLineQuickOpen.ts +1 -1
- package/front_end/panels/sources/InplaceFormatterEditorAction.ts +1 -1
- package/front_end/panels/sources/OutlineQuickOpen.ts +1 -1
- package/front_end/panels/sources/SourcesNavigator.test.ts +1 -0
- package/front_end/panels/sources/SourcesPanel.ts +7 -0
- package/front_end/panels/sources/TabbedEditorContainer.ts +1 -1
- package/front_end/panels/sources/UISourceCodeFrame.ts +1 -1
- package/front_end/panels/sources/components/BreakpointsView.ts +25 -26
- package/front_end/panels/sources/components/HeadersView.ts +17 -15
- package/front_end/panels/timeline/AnimationsTrackAppender.ts +18 -3
- package/front_end/panels/timeline/AnnotationHelpers.ts +1 -1
- package/front_end/panels/timeline/AppenderUtils.ts +1 -1
- package/front_end/panels/timeline/CompatibilityTracksAppender.ts +27 -10
- package/front_end/panels/timeline/CountersGraph.ts +1 -1
- package/front_end/panels/timeline/EntriesFilter.test.ts +68 -0
- package/front_end/panels/timeline/EntriesFilter.ts +13 -0
- package/front_end/panels/timeline/EventsTimelineTreeView.ts +1 -1
- package/front_end/panels/timeline/InteractionsTrackAppender.ts +10 -0
- package/front_end/panels/timeline/LayoutShiftsTrackAppender.ts +135 -1
- package/front_end/panels/timeline/ModificationsManager.test.ts +160 -0
- package/front_end/panels/timeline/ModificationsManager.ts +31 -0
- package/front_end/panels/timeline/TimelineDetailsView.test.ts +4 -2
- package/front_end/panels/timeline/TimelineDetailsView.ts +34 -12
- package/front_end/panels/timeline/TimelineEventOverview.ts +1 -0
- package/front_end/panels/timeline/TimelineFlameChartDataProvider.test.ts +53 -0
- package/front_end/panels/timeline/TimelineFlameChartDataProvider.ts +50 -20
- package/front_end/panels/timeline/TimelineFlameChartNetworkDataProvider.test.ts +57 -0
- package/front_end/panels/timeline/TimelineFlameChartNetworkDataProvider.ts +18 -0
- package/front_end/panels/timeline/TimelineFlameChartView.ts +90 -29
- package/front_end/panels/timeline/TimelineHistoryManager.ts +3 -1
- package/front_end/panels/timeline/TimelineLoader.ts +1 -1
- package/front_end/panels/timeline/TimelinePanel.ts +49 -37
- package/front_end/panels/timeline/TimelineSelectorStatsView.ts +16 -12
- package/front_end/panels/timeline/TimelineTreeView.test.ts +9 -9
- package/front_end/panels/timeline/TimelineTreeView.ts +1 -1
- package/front_end/panels/timeline/TimelineUIUtils.ts +116 -41
- package/front_end/panels/timeline/TimingsTrackAppender.ts +1 -1
- package/front_end/panels/timeline/components/BreadcrumbsUI.ts +2 -3
- package/front_end/panels/timeline/components/CPUThrottlingSelector.ts +8 -7
- package/front_end/panels/timeline/components/FieldSettingsDialog.ts +28 -27
- package/front_end/panels/timeline/components/InteractionBreakdown.ts +3 -2
- package/front_end/panels/timeline/components/LayoutShiftDetails.test.ts +13 -11
- package/front_end/panels/timeline/components/LayoutShiftDetails.ts +217 -87
- package/front_end/panels/timeline/components/LiveMetricsView.test.ts +194 -69
- package/front_end/panels/timeline/components/LiveMetricsView.ts +327 -141
- package/front_end/panels/timeline/components/MetricCard.test.ts +8 -8
- package/front_end/panels/timeline/components/MetricCard.ts +6 -4
- package/front_end/panels/timeline/components/MetricCompareStrings.ts +1 -1
- package/front_end/panels/timeline/components/NetworkRequestDetails.ts +16 -13
- package/front_end/panels/timeline/components/NetworkRequestTooltip.ts +12 -10
- package/front_end/panels/timeline/components/NetworkThrottlingSelector.test.ts +35 -2
- package/front_end/panels/timeline/components/NetworkThrottlingSelector.ts +30 -13
- package/front_end/panels/timeline/components/RelatedInsightChips.test.ts +74 -0
- package/front_end/panels/timeline/components/RelatedInsightChips.ts +92 -0
- package/front_end/panels/timeline/components/Sidebar.test.ts +74 -0
- package/front_end/panels/timeline/components/Sidebar.ts +32 -13
- package/front_end/panels/timeline/components/SidebarAnnotationsTab.test.ts +66 -0
- package/front_end/panels/timeline/components/SidebarAnnotationsTab.ts +108 -39
- package/front_end/panels/timeline/components/SidebarInsightsTab.test.ts +11 -1
- package/front_end/panels/timeline/components/SidebarInsightsTab.ts +70 -37
- package/front_end/panels/timeline/components/SidebarSingleInsightSet.test.ts +59 -1
- package/front_end/panels/timeline/components/SidebarSingleInsightSet.ts +90 -34
- package/front_end/panels/timeline/components/Utils.test.ts +65 -0
- package/front_end/panels/timeline/components/Utils.ts +117 -0
- package/front_end/panels/timeline/components/components.ts +2 -0
- package/front_end/panels/timeline/components/insights/CLSCulprits.ts +67 -53
- package/front_end/panels/timeline/components/insights/DocumentLatency.ts +98 -14
- package/front_end/panels/timeline/components/insights/EventRef.ts +92 -0
- package/front_end/panels/timeline/components/insights/FontDisplay.ts +24 -13
- package/front_end/panels/timeline/components/insights/Helpers.ts +48 -43
- package/front_end/panels/timeline/components/insights/InteractionToNextPaint.ts +20 -18
- package/front_end/panels/timeline/components/insights/LCPDiscovery.ts +93 -48
- package/front_end/panels/timeline/components/insights/LCPPhases.ts +28 -9
- package/front_end/panels/timeline/components/insights/NodeLink.ts +3 -1
- package/front_end/panels/timeline/components/insights/RenderBlocking.ts +33 -25
- package/front_end/panels/timeline/components/insights/SidebarInsight.ts +92 -15
- package/front_end/panels/timeline/components/insights/SlowCSSSelector.ts +26 -39
- package/front_end/panels/timeline/components/insights/Table.ts +12 -9
- package/front_end/panels/timeline/components/insights/ThirdParties.ts +20 -12
- package/front_end/panels/timeline/components/insights/Viewport.ts +23 -20
- package/front_end/panels/timeline/components/insights/insights.ts +2 -0
- package/front_end/panels/timeline/components/insights/sidebarInsight.css +54 -9
- package/front_end/panels/timeline/components/insights/table.css +9 -1
- package/front_end/panels/timeline/components/layoutShiftDetails.css +22 -20
- package/front_end/panels/timeline/components/liveMetricsView.css +46 -16
- package/front_end/panels/timeline/components/networkRequestDetails.css +2 -1
- package/front_end/panels/timeline/components/relatedInsightChips.css +45 -0
- package/front_end/panels/timeline/components/sidebarInsightsTab.css +24 -6
- package/front_end/panels/timeline/components/sidebarSingleInsightSet.css +18 -4
- package/front_end/panels/timeline/extensions/ExtensionUI.ts +4 -1
- package/front_end/panels/timeline/fixtures/traces/basic.json.gz +0 -0
- package/front_end/panels/timeline/fixtures/traces/many-redirects.json.gz +0 -0
- package/front_end/panels/timeline/fixtures/traces/missing-url.json.gz +0 -0
- package/front_end/panels/timeline/overlays/OverlaysImpl.test.ts +40 -51
- package/front_end/panels/timeline/overlays/OverlaysImpl.ts +87 -39
- package/front_end/panels/timeline/overlays/components/EntriesLinkOverlay.ts +13 -11
- package/front_end/panels/timeline/overlays/components/EntryLabelOverlay.ts +24 -32
- package/front_end/panels/timeline/overlays/components/TimeRangeOverlay.ts +23 -24
- package/front_end/panels/timeline/overlays/components/TimespanBreakdownOverlay.test.ts +42 -0
- package/front_end/panels/timeline/overlays/components/TimespanBreakdownOverlay.ts +25 -19
- package/front_end/panels/timeline/overlays/components/entryLabelOverlay.css +0 -14
- package/front_end/panels/timeline/overlays/components/timeRangeOverlay.css +16 -13
- package/front_end/panels/timeline/overlays/components/timespanBreakdownOverlay.css +59 -20
- package/front_end/panels/timeline/timelineFlameChartView.css +3 -2
- package/front_end/panels/timeline/timelineFlamechartPopover.css +19 -0
- package/front_end/panels/timeline/timelineHistoryManager.css +4 -0
- package/front_end/panels/timeline/timelinePanel.css +2 -10
- package/front_end/panels/timeline/track_appenders/LayoutShiftsTrackAppender.test.ts +7 -7
- package/front_end/panels/timeline/track_appenders/TimingsTrackAppender.test.ts +1 -1
- package/front_end/panels/timeline/utils/Helpers.test.ts +38 -0
- package/front_end/panels/timeline/utils/Helpers.ts +94 -0
- package/front_end/panels/timeline/utils/ImageCache.test.ts +106 -0
- package/front_end/panels/timeline/utils/ImageCache.ts +55 -0
- package/front_end/panels/timeline/utils/SourceMapsResolver.test.ts +13 -1
- package/front_end/panels/timeline/utils/SourceMapsResolver.ts +11 -2
- package/front_end/panels/timeline/utils/utils.ts +4 -0
- package/front_end/panels/utils/utils.ts +1 -1
- package/front_end/panels/web_audio/graph_visualizer/EdgeView.ts +1 -1
- package/front_end/panels/web_audio/graph_visualizer/GraphView.ts +3 -9
- package/front_end/panels/webauthn/WebauthnPane.test.ts +75 -4
- package/front_end/panels/webauthn/WebauthnPane.ts +24 -3
- package/front_end/testing/EnvironmentHelpers.ts +19 -4
- package/front_end/testing/ExtensionHelpers.ts +1 -1
- package/front_end/testing/LanguagePluginHelpers.ts +1 -1
- package/front_end/testing/MockConnection.ts +1 -1
- package/front_end/testing/MockIssuesManager.ts +1 -1
- package/front_end/testing/MockScopeChain.ts +1 -1
- package/front_end/testing/MutationHelpers.test.ts +6 -8
- package/front_end/testing/TraceHelpers.ts +3 -1
- package/front_end/third_party/codemirror.next/chunk/codemirror.js +1 -1
- package/front_end/third_party/codemirror.next/chunk/codemirror.js.map +1 -1
- package/front_end/third_party/codemirror.next/chunk/java.js +1 -1
- package/front_end/third_party/codemirror.next/chunk/java.js.map +1 -1
- package/front_end/third_party/codemirror.next/chunk/sass.js +1 -1
- package/front_end/third_party/codemirror.next/chunk/sass.js.map +1 -1
- package/front_end/third_party/codemirror.next/codemirror.next.d.ts +11 -3
- package/front_end/third_party/codemirror.next/package.json +5 -5
- package/front_end/third_party/i18n/localized-string-set.ts +1 -1
- package/front_end/third_party/puppeteer/README.chromium +2 -2
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/api/Browser.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/api/Browser.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/api/BrowserContext.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/api/BrowserContext.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/api/ElementHandle.d.ts +9 -9
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/api/ElementHandle.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/api/ElementHandle.js +84 -84
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/api/ElementHandle.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/api/Page.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/api/Page.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/bidi/ElementHandle.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/bidi/ElementHandle.js +1 -2
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/bidi/ElementHandle.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/bidi/core/Browser.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/bidi/core/Browser.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/bidi/core/BrowsingContext.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/bidi/core/BrowsingContext.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/bidi/core/Navigation.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/bidi/core/Navigation.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/bidi/core/Realm.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/bidi/core/Realm.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/bidi/core/Request.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/bidi/core/Request.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/bidi/core/Session.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/bidi/core/Session.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/bidi/core/UserContext.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/bidi/core/UserContext.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/bidi/core/UserPrompt.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/bidi/core/UserPrompt.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/cdp/Accessibility.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/cdp/Accessibility.js +7 -4
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/cdp/Accessibility.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/cdp/ElementHandle.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/cdp/ElementHandle.js +2 -3
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/cdp/ElementHandle.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/cdp/ExecutionContext.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/cdp/ExecutionContext.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/cdp/Frame.d.ts +2 -0
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/cdp/Frame.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/cdp/Frame.js +17 -0
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/cdp/Frame.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/cdp/IsolatedWorld.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/cdp/IsolatedWorld.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/QueryHandler.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/QueryHandler.js +1 -2
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/QueryHandler.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/util.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/util.js +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/util.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/generated/injected.d.ts +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/generated/injected.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/generated/injected.js +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/generated/injected.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/generated/version.d.ts +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/generated/version.js +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/injected/PQuerySelector.js +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/injected/PQuerySelector.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/injected/injected.d.ts +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/node/ScreenRecorder.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/node/ScreenRecorder.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/revisions.d.ts +2 -2
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/revisions.js +2 -2
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/util/Mutex.d.ts +2 -2
- package/front_end/third_party/puppeteer/package/lib/es5-iife/puppeteer-core-browser.d.ts +2 -1
- package/front_end/third_party/puppeteer/package/lib/es5-iife/puppeteer-core-browser.js +114 -97
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/api/Browser.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/api/Browser.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/api/BrowserContext.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/api/BrowserContext.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/api/ElementHandle.d.ts +9 -9
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/api/ElementHandle.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/api/ElementHandle.js +82 -83
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/api/ElementHandle.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/api/Page.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/api/Page.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/bidi/ElementHandle.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/bidi/ElementHandle.js +2 -3
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/bidi/ElementHandle.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/bidi/core/Browser.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/bidi/core/Browser.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/bidi/core/BrowsingContext.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/bidi/core/BrowsingContext.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/bidi/core/Navigation.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/bidi/core/Navigation.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/bidi/core/Realm.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/bidi/core/Realm.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/bidi/core/Request.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/bidi/core/Request.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/bidi/core/Session.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/bidi/core/Session.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/bidi/core/UserContext.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/bidi/core/UserContext.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/bidi/core/UserPrompt.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/bidi/core/UserPrompt.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/cdp/Accessibility.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/cdp/Accessibility.js +7 -4
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/cdp/Accessibility.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/cdp/ElementHandle.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/cdp/ElementHandle.js +3 -4
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/cdp/ElementHandle.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/cdp/ExecutionContext.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/cdp/ExecutionContext.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/cdp/Frame.d.ts +2 -0
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/cdp/Frame.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/cdp/Frame.js +17 -0
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/cdp/Frame.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/cdp/IsolatedWorld.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/cdp/IsolatedWorld.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/QueryHandler.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/QueryHandler.js +1 -2
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/QueryHandler.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/util.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/util.js +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/util.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/generated/injected.d.ts +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/generated/injected.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/generated/injected.js +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/generated/injected.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/generated/version.d.ts +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/generated/version.js +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/injected/PQuerySelector.js +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/injected/PQuerySelector.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/node/ScreenRecorder.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/node/ScreenRecorder.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/revisions.d.ts +2 -2
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/revisions.js +2 -2
- package/front_end/third_party/puppeteer/package/lib/types.d.ts +2 -1
- package/front_end/third_party/puppeteer/package/package.json +2 -2
- package/front_end/third_party/puppeteer/package/src/api/Browser.ts +1 -1
- package/front_end/third_party/puppeteer/package/src/api/BrowserContext.ts +1 -1
- package/front_end/third_party/puppeteer/package/src/api/ElementHandle.ts +89 -89
- package/front_end/third_party/puppeteer/package/src/api/Page.ts +1 -1
- package/front_end/third_party/puppeteer/package/src/bidi/ElementHandle.ts +6 -2
- package/front_end/third_party/puppeteer/package/src/bidi/core/Browser.ts +1 -1
- package/front_end/third_party/puppeteer/package/src/bidi/core/BrowsingContext.ts +1 -1
- package/front_end/third_party/puppeteer/package/src/bidi/core/Navigation.ts +1 -1
- package/front_end/third_party/puppeteer/package/src/bidi/core/Realm.ts +2 -2
- package/front_end/third_party/puppeteer/package/src/bidi/core/Request.ts +1 -1
- package/front_end/third_party/puppeteer/package/src/bidi/core/Session.ts +1 -1
- package/front_end/third_party/puppeteer/package/src/bidi/core/UserContext.ts +1 -1
- package/front_end/third_party/puppeteer/package/src/bidi/core/UserPrompt.ts +1 -1
- package/front_end/third_party/puppeteer/package/src/cdp/Accessibility.ts +9 -5
- package/front_end/third_party/puppeteer/package/src/cdp/ElementHandle.ts +7 -3
- package/front_end/third_party/puppeteer/package/src/cdp/ExecutionContext.ts +1 -1
- package/front_end/third_party/puppeteer/package/src/cdp/Frame.ts +22 -1
- package/front_end/third_party/puppeteer/package/src/cdp/IsolatedWorld.ts +1 -1
- package/front_end/third_party/puppeteer/package/src/common/QueryHandler.ts +1 -3
- package/front_end/third_party/puppeteer/package/src/common/util.ts +2 -1
- package/front_end/third_party/puppeteer/package/src/generated/injected.ts +1 -1
- package/front_end/third_party/puppeteer/package/src/generated/version.ts +1 -1
- package/front_end/third_party/puppeteer/package/src/injected/PQuerySelector.ts +1 -1
- package/front_end/third_party/puppeteer/package/src/node/ScreenRecorder.ts +1 -1
- package/front_end/third_party/puppeteer/package/src/revisions.ts +2 -2
- package/front_end/third_party/puppeteer/puppeteer.ts +1 -1
- package/front_end/ui/components/buttons/Button.ts +18 -17
- package/front_end/ui/components/buttons/button.css +0 -4
- package/front_end/ui/components/cards/Card.test.ts +66 -0
- package/front_end/ui/components/cards/Card.ts +57 -0
- package/front_end/ui/components/cards/card.css +32 -0
- package/front_end/ui/components/cards/cards.ts +9 -0
- package/front_end/ui/components/chrome_link/ChromeLink.test.ts +5 -3
- package/front_end/ui/components/chrome_link/ChromeLink.ts +3 -1
- package/front_end/ui/components/data_grid/DataGrid.test.ts +3 -1
- package/front_end/ui/components/data_grid/DataGrid.ts +25 -23
- package/front_end/ui/components/data_grid/DataGridContextMenuUtils.ts +2 -2
- package/front_end/ui/components/data_grid/DataGridController.ts +9 -5
- package/front_end/ui/components/data_grid/DataGridEvents.ts +1 -1
- package/front_end/ui/components/data_grid/DataGridRenderers.ts +7 -4
- package/front_end/ui/components/dialogs/Dialog.ts +4 -2
- package/front_end/ui/components/dialogs/IconDialog.ts +9 -7
- package/front_end/ui/components/dialogs/ShortcutDialog.ts +10 -8
- package/front_end/ui/components/diff_view/DiffView.ts +9 -8
- package/front_end/ui/components/docs/create_breadcrumbs.ts +3 -1
- package/front_end/ui/components/docs/expandable_list/basic.ts +4 -2
- package/front_end/ui/components/docs/floating_button/basic.html +26 -0
- package/front_end/ui/components/docs/floating_button/basic.ts +20 -0
- package/front_end/ui/components/docs/freestyler/basic.ts +5 -0
- package/front_end/ui/components/docs/freestyler/empty_state.ts +5 -0
- package/front_end/ui/components/docs/icon_dialog/basic.ts +5 -3
- package/front_end/ui/components/docs/panel_introduction_steps/basic.ts +7 -4
- package/front_end/ui/components/docs/performance_panel/flamechart.html +4 -0
- package/front_end/ui/components/docs/performance_panel/flamechart.ts +45 -0
- package/front_end/ui/components/docs/recorder_select_button/basic.ts +21 -18
- package/front_end/ui/components/docs/report/basic.ts +19 -23
- package/front_end/ui/components/docs/theme_colors/basic.ts +4 -2
- package/front_end/ui/components/docs/tree_outline/custom-renderers.ts +4 -2
- package/front_end/ui/components/expandable_list/ExpandableList.test.ts +5 -3
- package/front_end/ui/components/expandable_list/ExpandableList.ts +6 -4
- package/front_end/ui/components/floating_button/FloatingButton.ts +51 -0
- package/front_end/ui/components/floating_button/floatingButton.css +63 -0
- package/front_end/ui/components/floating_button/floating_button.ts +7 -0
- package/front_end/ui/components/helpers/helpers.test.ts +18 -14
- package/front_end/ui/components/icon_button/Icon.ts +2 -2
- package/front_end/ui/components/icon_button/IconButton.ts +15 -10
- package/front_end/ui/components/issue_counter/IssueCounter.ts +5 -1
- package/front_end/ui/components/issue_counter/IssueLinkIcon.ts +7 -4
- package/front_end/ui/components/legacy_wrapper/LegacyWrapper.ts +0 -1
- package/front_end/ui/components/linkifier/LinkifierImpl.ts +3 -1
- package/front_end/ui/components/markdown_view/CodeBlock.test.ts +7 -7
- package/front_end/ui/components/markdown_view/CodeBlock.ts +33 -41
- package/front_end/ui/components/markdown_view/MarkdownImage.ts +12 -9
- package/front_end/ui/components/markdown_view/MarkdownLink.ts +3 -1
- package/front_end/ui/components/markdown_view/MarkdownView.test.ts +51 -3
- package/front_end/ui/components/markdown_view/MarkdownView.ts +39 -22
- package/front_end/ui/components/markdown_view/codeBlock.css +6 -28
- package/front_end/ui/components/markdown_view/markdownLink.css +1 -1
- package/front_end/ui/components/markdown_view/markdownView.css +4 -0
- package/front_end/ui/components/menus/Menu.ts +7 -5
- package/front_end/ui/components/menus/SelectMenu.test.ts +3 -1
- package/front_end/ui/components/menus/SelectMenu.ts +17 -15
- package/front_end/ui/components/panel_feedback/FeedbackButton.ts +5 -3
- package/front_end/ui/components/panel_feedback/PanelFeedback.ts +8 -4
- package/front_end/ui/components/panel_feedback/PreviewToggle.ts +6 -4
- package/front_end/ui/components/panel_introduction_steps/PanelIntroductionSteps.ts +3 -1
- package/front_end/ui/components/report_view/ReportView.test.ts +5 -3
- package/front_end/ui/components/report_view/ReportView.ts +9 -7
- package/front_end/ui/components/request_link_icon/RequestLinkIcon.ts +8 -5
- package/front_end/ui/components/settings/SettingCheckbox.ts +14 -12
- package/front_end/ui/components/settings/SettingDeprecationWarning.ts +7 -4
- package/front_end/ui/components/spinners/Spinner.ts +3 -1
- package/front_end/ui/components/split_view/SplitView.ts +3 -1
- package/front_end/ui/components/srgb_overlay/SrgbOverlay.ts +3 -1
- package/front_end/ui/components/suggestion_input/SuggestionInput.ts +3 -2
- package/front_end/ui/components/survey_link/SurveyLink.ts +7 -3
- package/front_end/ui/components/switch/SwitchImpl.ts +3 -1
- package/front_end/ui/components/text_editor/TextEditorHistory.ts +2 -2
- package/front_end/ui/components/text_prompt/TextPrompt.ts +3 -1
- package/front_end/ui/components/tree_outline/TreeOutline.test.ts +8 -6
- package/front_end/ui/components/tree_outline/TreeOutline.ts +9 -8
- package/front_end/ui/components/two_states_counter/TwoStatesCounter.ts +5 -3
- package/front_end/ui/legacy/Context.ts +1 -1
- package/front_end/ui/legacy/Dialog.ts +2 -2
- package/front_end/ui/legacy/DockController.ts +2 -2
- package/front_end/ui/legacy/FilterBar.ts +1 -1
- package/front_end/ui/legacy/FilterSuggestionBuilder.ts +1 -1
- package/front_end/ui/legacy/GlassPane.ts +1 -1
- package/front_end/ui/legacy/Infobar.ts +1 -1
- package/front_end/ui/legacy/InspectorView.ts +5 -5
- package/front_end/ui/legacy/Panel.ts +1 -1
- package/front_end/ui/legacy/ShortcutRegistry.ts +1 -1
- package/front_end/ui/legacy/SplitWidget.test.ts +33 -1
- package/front_end/ui/legacy/SplitWidget.ts +62 -7
- package/front_end/ui/legacy/TabbedPane.ts +24 -0
- package/front_end/ui/legacy/Toolbar.test.ts +39 -0
- package/front_end/ui/legacy/Toolbar.ts +16 -17
- package/front_end/ui/legacy/UIUtils.ts +1 -1
- package/front_end/ui/legacy/View.ts +2 -2
- package/front_end/ui/legacy/ViewManager.ts +3 -2
- package/front_end/ui/legacy/ViewRegistration.ts +2 -2
- package/front_end/ui/legacy/Widget.ts +62 -14
- package/front_end/ui/legacy/XElement.ts +0 -1
- package/front_end/ui/legacy/XLink.test.ts +3 -1
- package/front_end/ui/legacy/XLink.ts +6 -4
- package/front_end/ui/legacy/checkboxTextLabel.css +4 -0
- package/front_end/ui/legacy/components/color_picker/Spectrum.ts +1 -1
- package/front_end/ui/legacy/components/data_grid/DataGridWithPreview.ts +21 -10
- package/front_end/ui/legacy/components/inline_editor/AnimationTimingUI.ts +1 -1
- package/front_end/ui/legacy/components/inline_editor/CSSAngle.ts +10 -7
- package/front_end/ui/legacy/components/inline_editor/ColorMixSwatch.ts +3 -1
- package/front_end/ui/legacy/components/inline_editor/ColorSwatch.ts +3 -1
- package/front_end/ui/legacy/components/inline_editor/LinkSwatch.ts +9 -9
- package/front_end/ui/legacy/components/inline_editor/Swatches.ts +5 -4
- package/front_end/ui/legacy/components/perf_ui/BrickBreaker.ts +2 -2
- package/front_end/ui/legacy/components/perf_ui/FilmStripView.test.ts +9 -9
- package/front_end/ui/legacy/components/perf_ui/FlameChart.ts +49 -13
- package/front_end/ui/legacy/components/perf_ui/PieChart.ts +1 -0
- package/front_end/ui/legacy/components/perf_ui/TimelineOverviewCalculator.ts +1 -1
- package/front_end/ui/legacy/inspectorCommon.css +0 -1
- package/front_end/ui/legacy/themeColors.css +10 -0
- package/front_end/ui/legacy/toolbar.css +4 -0
- package/front_end/ui/legacy/treeoutline.css +0 -3
- package/front_end/ui/lit-html/static.test.ts +8 -8
- package/front_end/ui/visual_logging/Debugging.ts +1 -1
- package/front_end/ui/visual_logging/KnownContextValues.ts +32 -3
- package/front_end/ui/visual_logging/LoggingDriver.ts +1 -1
- package/front_end/ui/visual_logging/LoggingEvents.ts +28 -28
- package/front_end/ui/visual_logging/LoggingState.ts +1 -1
- package/front_end/ui/visual_logging/NonDomState.ts +2 -2
- package/front_end/ui/visual_logging/visual_logging.ts +3 -1
- package/inspector_overlay/css_grid_label_helpers.test.ts +103 -0
- package/inspector_overlay/css_grid_label_helpers.ts +63 -12
- package/inspector_overlay/highlight_common.ts +2 -2
- package/inspector_overlay/highlight_container_query.ts +1 -2
- package/inspector_overlay/highlight_flex_common.test.ts +1 -1
- package/inspector_overlay/highlight_flex_common.ts +2 -3
- package/inspector_overlay/highlight_grid_common.ts +10 -4
- package/inspector_overlay/highlight_isolated_element.ts +1 -1
- package/inspector_overlay/highlight_scroll_snap.ts +1 -2
- package/inspector_overlay/testing/InspectorOverlayHelpers.ts +1 -1
- package/inspector_overlay/tool_highlight.ts +4 -8
- package/package.json +4 -3
- package/scripts/devtools_paths.js +9 -2
- package/scripts/eslint_rules/lib/avoid_assert_equal.js +34 -7
- package/scripts/eslint_rules/lib/html_tagged_template.js +55 -0
- package/scripts/eslint_rules/lib/inline_type_imports.js +22 -23
- package/scripts/eslint_rules/tests/avoid_assert_equal_test.js +61 -2
- package/scripts/eslint_rules/tests/html_tagged_template_test.js +96 -0
- package/scripts/eslint_rules/tests/inline_type_imports_test.js +5 -25
- package/scripts/freestyler/eval/index.js +83 -47
- package/scripts/protocol_typescript/protocol_dts_generator.ts +1 -1
- package/scripts/stylelint_rules/lib/use_theme_colors.js +2 -1
- package/scripts/stylelint_rules/tests/use_theme_colors_test.js +16 -0
- package/front_end/Images/src/spark.svg +0 -3
- package/front_end/panels/timeline/components/insights/lcpDiscovery.css +0 -13
- package/scripts/eslint_rules/lib/ban_literal_devtools_component_tag_names.js +0 -40
- package/scripts/eslint_rules/lib/check_component_naming.js +0 -214
- package/scripts/eslint_rules/tests/ban_literal_devtools_component_tag_names_test.js +0 -38
- package/scripts/eslint_rules/tests/check_component_naming_test.js +0 -246
@@ -2,18 +2,41 @@
|
|
2
2
|
// Use of this source code is governed by a BSD-style license that can be
|
3
3
|
// found in the LICENSE file.
|
4
4
|
|
5
|
+
import './SidebarSingleInsightSet.js';
|
6
|
+
|
7
|
+
import * as Host from '../../../core/host/host.js';
|
8
|
+
import * as i18n from '../../../core/i18n/i18n.js';
|
9
|
+
import type * as Platform from '../../../core/platform/platform.js';
|
5
10
|
import * as Trace from '../../../models/trace/trace.js';
|
11
|
+
import * as Buttons from '../../../ui/components/buttons/buttons.js';
|
6
12
|
import * as ComponentHelpers from '../../../ui/components/helpers/helpers.js';
|
7
13
|
import * as LitHtml from '../../../ui/lit-html/lit-html.js';
|
8
|
-
import * as
|
14
|
+
import * as Utils from '../utils/utils.js';
|
9
15
|
|
10
16
|
import * as Insights from './insights/insights.js';
|
11
|
-
import
|
17
|
+
import type {ActiveInsight} from './Sidebar.js';
|
12
18
|
import styles from './sidebarInsightsTab.css.js';
|
13
|
-
import
|
19
|
+
import type {SidebarSingleInsightSetData} from './SidebarSingleInsightSet.js';
|
20
|
+
|
21
|
+
const {html} = LitHtml;
|
22
|
+
|
23
|
+
const FEEDBACK_URL = 'https://crbug.com/371170842' as Platform.DevToolsPath.UrlString;
|
24
|
+
|
25
|
+
const UIStrings = {
|
26
|
+
/**
|
27
|
+
*@description text show in feedback button
|
28
|
+
*/
|
29
|
+
feedbackButton: 'Feedback',
|
30
|
+
/**
|
31
|
+
*@description text show in feedback tooltip
|
32
|
+
*/
|
33
|
+
feedbackTooltip: 'Insights is an experimental feature. Your feedback will help us improve it.',
|
34
|
+
};
|
35
|
+
|
36
|
+
const str_ = i18n.i18n.registerUIStrings('panels/timeline/components/SidebarInsightsTab.ts', UIStrings);
|
37
|
+
const i18nString = i18n.i18n.getLocalizedString.bind(undefined, str_);
|
14
38
|
|
15
39
|
export class SidebarInsightsTab extends HTMLElement {
|
16
|
-
static readonly litTagName = LitHtml.literal`devtools-performance-sidebar-insights`;
|
17
40
|
readonly #boundRender = this.#render.bind(this);
|
18
41
|
readonly #shadow = this.attachShadow({mode: 'open'});
|
19
42
|
|
@@ -33,6 +56,8 @@ export class SidebarInsightsTab extends HTMLElement {
|
|
33
56
|
this.#shadow.adoptedStyleSheets = [styles];
|
34
57
|
}
|
35
58
|
|
59
|
+
// TODO(paulirish): add back a disconnectedCallback() to avoid memory leaks that doesn't cause b/372943062
|
60
|
+
|
36
61
|
set parsedTrace(data: Trace.Handlers.Types.ParsedTrace|null) {
|
37
62
|
if (data === this.#parsedTrace) {
|
38
63
|
return;
|
@@ -73,22 +98,24 @@ export class SidebarInsightsTab extends HTMLElement {
|
|
73
98
|
return;
|
74
99
|
}
|
75
100
|
this.#activeInsight = active;
|
76
|
-
void ComponentHelpers.ScheduledRender.scheduleRender(this, this.#boundRender);
|
77
|
-
}
|
78
101
|
|
79
|
-
|
80
|
-
|
81
|
-
|
82
|
-
|
102
|
+
// Only update the insightSetKey if there is an active insight. Otherwise, closing an insight
|
103
|
+
// would also collapse the insight set. Usually the proper insight set is already set because
|
104
|
+
// the user has it open already in order for this setter to be called, but insights can also
|
105
|
+
// be activated by clicking on a insight chip in the Summary panel, which may require opening
|
106
|
+
// a different insight set.
|
107
|
+
if (this.#activeInsight) {
|
108
|
+
this.#insightSetKey = this.#activeInsight.insightSetKey;
|
109
|
+
}
|
83
110
|
void ComponentHelpers.ScheduledRender.scheduleRender(this, this.#boundRender);
|
84
111
|
}
|
85
112
|
|
86
|
-
#
|
113
|
+
#insightSetToggled(id: string): void {
|
114
|
+
this.#insightSetKey = this.#insightSetKey === id ? null : id;
|
87
115
|
// Update the active insight set.
|
88
|
-
if (
|
116
|
+
if (this.#insightSetKey !== this.#activeInsight?.insightSetKey) {
|
89
117
|
this.dispatchEvent(new Insights.SidebarInsight.InsightDeactivated());
|
90
118
|
}
|
91
|
-
this.#insightSetKey = id;
|
92
119
|
void ComponentHelpers.ScheduledRender.scheduleRender(this, this.#boundRender);
|
93
120
|
}
|
94
121
|
|
@@ -101,7 +128,10 @@ export class SidebarInsightsTab extends HTMLElement {
|
|
101
128
|
this.dispatchEvent(new Insights.SidebarInsight.InsightSetHovered());
|
102
129
|
}
|
103
130
|
|
104
|
-
|
131
|
+
#onFeedbackClick(): void {
|
132
|
+
Host.InspectorFrontendHost.InspectorFrontendHostInstance.openInNewTab(FEEDBACK_URL);
|
133
|
+
}
|
134
|
+
|
105
135
|
#render(): void {
|
106
136
|
if (!this.#parsedTrace || !this.#insights) {
|
107
137
|
LitHtml.render(LitHtml.nothing, this.#shadow, {host: this});
|
@@ -109,24 +139,13 @@ export class SidebarInsightsTab extends HTMLElement {
|
|
109
139
|
}
|
110
140
|
|
111
141
|
const hasMultipleInsightSets = this.#insights.size > 1;
|
142
|
+
const labels = Utils.Helpers.createUrlLabels([...this.#insights.values()].map(({url}) => url));
|
112
143
|
|
113
|
-
|
114
|
-
|
115
|
-
|
116
|
-
@change=${this.#onCategoryDropdownChange}
|
117
|
-
jslog=${VisualLogging.dropDown('timeline.sidebar-insights-category-select').track({click: true})}
|
118
|
-
>
|
119
|
-
${Object.values(Insights.Types.Category).map(insightsCategory => {
|
120
|
-
return LitHtml.html`
|
121
|
-
<option value=${insightsCategory}>
|
122
|
-
${insightsCategory}
|
123
|
-
</option>
|
124
|
-
`;
|
125
|
-
})}
|
126
|
-
</select>
|
127
|
-
|
144
|
+
const contents =
|
145
|
+
// clang-format off
|
146
|
+
html`
|
128
147
|
<div class="insight-sets-wrapper">
|
129
|
-
${[...this.#insights.values()].map(({id,
|
148
|
+
${[...this.#insights.values()].map(({id, url}, index) => {
|
130
149
|
const data = {
|
131
150
|
parsedTrace: this.#parsedTrace,
|
132
151
|
insights: this.#insights,
|
@@ -135,21 +154,22 @@ export class SidebarInsightsTab extends HTMLElement {
|
|
135
154
|
activeInsight: this.#activeInsight,
|
136
155
|
};
|
137
156
|
|
138
|
-
const contents =
|
139
|
-
|
157
|
+
const contents = html`
|
158
|
+
<devtools-performance-sidebar-single-navigation
|
140
159
|
.data=${data as SidebarSingleInsightSetData}>
|
141
|
-
|
160
|
+
</devtools-performance-sidebar-single-navigation>
|
142
161
|
`;
|
143
162
|
|
144
163
|
if (hasMultipleInsightSets) {
|
145
|
-
return
|
164
|
+
return html`<details
|
146
165
|
?open=${id === this.#insightSetKey}
|
147
166
|
>
|
148
167
|
<summary
|
149
|
-
@click=${() => this.#
|
168
|
+
@click=${() => this.#insightSetToggled(id)}
|
150
169
|
@mouseenter=${() => this.#insightSetHovered(id)}
|
151
170
|
@mouseleave=${() => this.#insightSetUnhovered()}
|
152
|
-
|
171
|
+
title=${url.href}
|
172
|
+
>${labels[index]}</summary>
|
153
173
|
${contents}
|
154
174
|
</details>`;
|
155
175
|
}
|
@@ -157,9 +177,22 @@ export class SidebarInsightsTab extends HTMLElement {
|
|
157
177
|
return contents;
|
158
178
|
})}
|
159
179
|
</div>
|
180
|
+
|
181
|
+
<div class="feedback-wrapper">
|
182
|
+
<devtools-button .variant=${Buttons.Button.Variant.OUTLINED} .iconName=${'experiment'} @click=${this.#onFeedbackClick}>
|
183
|
+
${i18nString(UIStrings.feedbackButton)}
|
184
|
+
</devtools-button>
|
185
|
+
|
186
|
+
<p class="tooltip">${i18nString(UIStrings.feedbackTooltip)}</p>
|
187
|
+
</div>
|
160
188
|
`;
|
161
189
|
// clang-format on
|
162
|
-
|
190
|
+
|
191
|
+
// Insight components contain state, so to prevent insights from previous trace loads breaking things we use the parsedTrace
|
192
|
+
// as a render key.
|
193
|
+
// Note: newer Lit has `keyed`, but we don't have that, so we do it manually. https://lit.dev/docs/templates/directives/#keyed
|
194
|
+
const result = LitHtml.Directives.repeat([contents], () => this.#parsedTrace, template => template);
|
195
|
+
LitHtml.render(result, this.#shadow, {host: this});
|
163
196
|
}
|
164
197
|
}
|
165
198
|
|
@@ -2,6 +2,7 @@
|
|
2
2
|
// Use of this source code is governed by a BSD-style license that can be
|
3
3
|
// found in the LICENSE file.
|
4
4
|
|
5
|
+
import * as Root from '../../../core/root/root.js';
|
5
6
|
import {getCleanTextContentFromElements, renderElementIntoDOM} from '../../../testing/DOMHelpers.js';
|
6
7
|
import {describeWithEnvironment} from '../../../testing/EnvironmentHelpers.js';
|
7
8
|
import {TraceLoader} from '../../../testing/TraceLoader.js';
|
@@ -9,6 +10,7 @@ import * as Coordinator from '../../../ui/components/render_coordinator/render_c
|
|
9
10
|
|
10
11
|
import * as Components from './components.js';
|
11
12
|
import * as InsightComponents from './insights/insights.js';
|
13
|
+
|
12
14
|
const coordinator = Coordinator.RenderCoordinator.RenderCoordinator.instance();
|
13
15
|
|
14
16
|
function getUserVisibleInsights(component: Components.SidebarSingleInsightSet.SidebarSingleInsightSet):
|
@@ -63,7 +65,7 @@ describeWithEnvironment('SidebarSingleInsightSet', () => {
|
|
63
65
|
await coordinator.done();
|
64
66
|
|
65
67
|
const userVisibleTitles = getUserVisibleInsights(component).flatMap(component => {
|
66
|
-
return getCleanTextContentFromElements(component.shadowRoot!, '
|
68
|
+
return getCleanTextContentFromElements(component.shadowRoot!, '.insight-title');
|
67
69
|
});
|
68
70
|
assert.deepEqual(userVisibleTitles, [
|
69
71
|
'LCP by phase',
|
@@ -74,6 +76,62 @@ describeWithEnvironment('SidebarSingleInsightSet', () => {
|
|
74
76
|
]);
|
75
77
|
});
|
76
78
|
|
79
|
+
it('does not render experimental insights by default', async function() {
|
80
|
+
const {parsedTrace, insights} = await TraceLoader.traceEngine(this, 'font-display.json.gz');
|
81
|
+
const component = new Components.SidebarSingleInsightSet.SidebarSingleInsightSet();
|
82
|
+
renderElementIntoDOM(component);
|
83
|
+
const firstNavigation = parsedTrace.Meta.mainFrameNavigations.at(0)?.args.data?.navigationId;
|
84
|
+
assert.isOk(firstNavigation);
|
85
|
+
component.data = {
|
86
|
+
parsedTrace,
|
87
|
+
insights,
|
88
|
+
insightSetKey: firstNavigation,
|
89
|
+
activeCategory: InsightComponents.Types.Category.ALL,
|
90
|
+
activeInsight: null,
|
91
|
+
};
|
92
|
+
await coordinator.done();
|
93
|
+
const userVisibleTitles = getUserVisibleInsights(component).flatMap(component => {
|
94
|
+
return getCleanTextContentFromElements(component.shadowRoot!, '.insight-title');
|
95
|
+
});
|
96
|
+
// Does not include "font display", which is experimental.
|
97
|
+
assert.deepEqual(userVisibleTitles, [
|
98
|
+
'LCP by phase',
|
99
|
+
'Layout shift culprits',
|
100
|
+
'Document request latency',
|
101
|
+
'Third parties',
|
102
|
+
]);
|
103
|
+
});
|
104
|
+
|
105
|
+
it('renders experimental insights if the experiment is turned on', async function() {
|
106
|
+
const {parsedTrace, insights} = await TraceLoader.traceEngine(this, 'font-display.json.gz');
|
107
|
+
const component = new Components.SidebarSingleInsightSet.SidebarSingleInsightSet();
|
108
|
+
Root.Runtime.experiments.enableForTest(
|
109
|
+
Root.Runtime.ExperimentName.TIMELINE_EXPERIMENTAL_INSIGHTS,
|
110
|
+
);
|
111
|
+
renderElementIntoDOM(component);
|
112
|
+
const firstNavigation = parsedTrace.Meta.mainFrameNavigations.at(0)?.args.data?.navigationId;
|
113
|
+
assert.isOk(firstNavigation);
|
114
|
+
component.data = {
|
115
|
+
parsedTrace,
|
116
|
+
insights,
|
117
|
+
insightSetKey: firstNavigation,
|
118
|
+
activeCategory: InsightComponents.Types.Category.ALL,
|
119
|
+
activeInsight: null,
|
120
|
+
};
|
121
|
+
await coordinator.done();
|
122
|
+
const userVisibleTitles = getUserVisibleInsights(component).flatMap(component => {
|
123
|
+
return getCleanTextContentFromElements(component.shadowRoot!, '.insight-title');
|
124
|
+
});
|
125
|
+
// Does not include "font display", which is experimental.
|
126
|
+
assert.deepEqual(userVisibleTitles, [
|
127
|
+
'LCP by phase',
|
128
|
+
'Layout shift culprits',
|
129
|
+
'Document request latency',
|
130
|
+
'Font display',
|
131
|
+
'Third parties',
|
132
|
+
]);
|
133
|
+
});
|
134
|
+
|
77
135
|
it('will render the active insight fully', async function() {
|
78
136
|
const {parsedTrace, insights} = await TraceLoader.traceEngine(this, 'web-dev-with-commit.json.gz');
|
79
137
|
|
@@ -3,24 +3,66 @@
|
|
3
3
|
// found in the LICENSE file.
|
4
4
|
|
5
5
|
import * as i18n from '../../../core/i18n/i18n.js';
|
6
|
+
import * as Root from '../../../core/root/root.js';
|
6
7
|
import * as Trace from '../../../models/trace/trace.js';
|
7
8
|
import * as ComponentHelpers from '../../../ui/components/helpers/helpers.js';
|
8
9
|
import * as LitHtml from '../../../ui/lit-html/lit-html.js';
|
9
10
|
|
10
11
|
import * as Insights from './insights/insights.js';
|
11
|
-
import
|
12
|
+
import type {ActiveInsight} from './Sidebar.js';
|
12
13
|
import styles from './sidebarSingleInsightSet.css.js';
|
14
|
+
import {NumberWithUnit, type NumberWithUnitString} from './Utils.js';
|
15
|
+
|
16
|
+
const {html} = LitHtml;
|
17
|
+
|
18
|
+
const UIStrings = {
|
19
|
+
/**
|
20
|
+
*@description title used for a metric value to tell the user about its score classification
|
21
|
+
*@example {INP} PH1
|
22
|
+
*@example {1.2s} PH2
|
23
|
+
*@example {poor} PH3
|
24
|
+
*/
|
25
|
+
metricScore: '{PH1}: {PH2} {PH3} score',
|
26
|
+
};
|
27
|
+
const str_ = i18n.i18n.registerUIStrings('panels/timeline/components/SidebarSingleInsightSet.ts', UIStrings);
|
28
|
+
const i18nString = i18n.i18n.getLocalizedString.bind(undefined, str_);
|
13
29
|
|
14
30
|
export interface SidebarSingleInsightSetData {
|
15
31
|
parsedTrace: Trace.Handlers.Types.ParsedTrace|null;
|
16
32
|
insights: Trace.Insights.Types.TraceInsightSets|null;
|
17
|
-
insightSetKey:
|
33
|
+
insightSetKey: Trace.Types.Events.NavigationId|null;
|
18
34
|
activeCategory: Insights.Types.Category;
|
19
35
|
activeInsight: ActiveInsight|null;
|
20
36
|
}
|
21
37
|
|
38
|
+
/**
|
39
|
+
* These are WIP Insights that are only shown if the user has turned on the
|
40
|
+
* "enable experimental performance insights" experiment. This is used to enable
|
41
|
+
* us to ship incrementally without turning insights on by default for all
|
42
|
+
* users. */
|
43
|
+
const EXPERIMENTAL_INSIGHTS: ReadonlySet<typeof Insights.Helpers.BaseInsight> = new Set([
|
44
|
+
Insights.FontDisplay.FontDisplay,
|
45
|
+
]);
|
46
|
+
|
47
|
+
/**
|
48
|
+
* Every insight (INCLUDING experimental ones)
|
49
|
+
* The order of this array is the order the insights will be shown in the sidebar.
|
50
|
+
* TODO(crbug.com/368135130): sort this in a smart way!
|
51
|
+
*/
|
52
|
+
const ALL_INSIGHTS: typeof Insights.Helpers.BaseInsight[] = [
|
53
|
+
Insights.InteractionToNextPaint.InteractionToNextPaint,
|
54
|
+
Insights.LCPPhases.LCPPhases,
|
55
|
+
Insights.LCPDiscovery.LCPDiscovery,
|
56
|
+
Insights.CLSCulprits.CLSCulprits,
|
57
|
+
Insights.RenderBlocking.RenderBlockingRequests,
|
58
|
+
Insights.DocumentLatency.DocumentLatency,
|
59
|
+
Insights.FontDisplay.FontDisplay,
|
60
|
+
Insights.Viewport.Viewport,
|
61
|
+
Insights.ThirdParties.ThirdParties,
|
62
|
+
Insights.SlowCSSSelector.SlowCSSSelector,
|
63
|
+
] as const;
|
64
|
+
|
22
65
|
export class SidebarSingleInsightSet extends HTMLElement {
|
23
|
-
static readonly litTagName = LitHtml.literal`devtools-performance-sidebar-single-navigation`;
|
24
66
|
readonly #shadow = this.attachShadow({mode: 'open'});
|
25
67
|
#renderBound = this.#render.bind(this);
|
26
68
|
|
@@ -49,19 +91,33 @@ export class SidebarSingleInsightSet extends HTMLElement {
|
|
49
91
|
}
|
50
92
|
|
51
93
|
#onClickMetric(traceEvent: Trace.Types.Events.Event): void {
|
52
|
-
this.dispatchEvent(new Insights.
|
94
|
+
this.dispatchEvent(new Insights.EventRef.EventReferenceClick(traceEvent));
|
53
95
|
}
|
54
96
|
|
55
97
|
#renderMetricValue(
|
56
|
-
label: 'LCP'|'CLS'|'INP', value: string,
|
98
|
+
label: 'LCP'|'CLS'|'INP', value: string|NumberWithUnitString,
|
57
99
|
classification: Trace.Handlers.ModelHandlers.PageLoadMetrics.ScoreClassification,
|
58
100
|
eventToSelectOnClick: Trace.Types.Events.Event|null): LitHtml.LitTemplate {
|
101
|
+
const valueText = typeof value === 'string' ? value : value.text;
|
102
|
+
const valueDisplay = typeof value === 'string' ? value : value.element;
|
103
|
+
|
104
|
+
// NOTE: it is deliberate to use the same value for the title and
|
105
|
+
// aria-label; the aria-label is used to give more context to
|
106
|
+
// screen-readers, and the title is to aid users who may not know what
|
107
|
+
// the red/orange/green classification is, or those who are unable to
|
108
|
+
// easily distinguish the visual colour differences.
|
59
109
|
// clang-format off
|
60
|
-
|
61
|
-
|
62
|
-
|
110
|
+
const title = i18nString(UIStrings.metricScore, {PH1: label, PH2: valueText, PH3: classification});
|
111
|
+
|
112
|
+
return this.#metricIsVisible(label) ? html`
|
113
|
+
<button class="metric"
|
114
|
+
@click=${eventToSelectOnClick ? this.#onClickMetric.bind(this, eventToSelectOnClick) : null}
|
115
|
+
title=${title}
|
116
|
+
aria-label=${title}
|
117
|
+
>
|
118
|
+
<div class="metric-value metric-value-${classification}">${valueDisplay}</div>
|
63
119
|
<div class="metric-label">${label}</div>
|
64
|
-
</
|
120
|
+
</button>
|
65
121
|
` : LitHtml.nothing;
|
66
122
|
// clang-format on
|
67
123
|
}
|
@@ -114,50 +170,50 @@ export class SidebarSingleInsightSet extends HTMLElement {
|
|
114
170
|
const cls = this.#getCLS(insightSetKey);
|
115
171
|
const inp = this.#getINP(insightSetKey);
|
116
172
|
|
117
|
-
return
|
173
|
+
return html`
|
118
174
|
<div class="metrics-row">
|
119
175
|
${
|
120
176
|
lcp ? this.#renderMetricValue(
|
121
|
-
'LCP',
|
177
|
+
'LCP', NumberWithUnit.formatMicroSecondsAsSeconds(lcp.value),
|
122
178
|
Trace.Handlers.ModelHandlers.PageLoadMetrics.scoreClassificationForLargestContentfulPaint(lcp.value),
|
123
179
|
lcp.event ?? null) :
|
124
180
|
LitHtml.nothing}
|
125
|
-
${
|
126
|
-
this.#renderMetricValue(
|
127
|
-
'CLS', cls.value.toFixed(2),
|
128
|
-
Trace.Handlers.ModelHandlers.LayoutShifts.scoreClassificationForLayoutShift(cls.value),
|
129
|
-
cls.worstShiftEvent)}
|
130
181
|
${
|
131
182
|
inp ? this.#renderMetricValue(
|
132
|
-
'INP',
|
183
|
+
'INP', NumberWithUnit.formatMicroSecondsAsMillisFixed(inp.value),
|
133
184
|
Trace.Handlers.ModelHandlers.UserInteractions.scoreClassificationForInteractionToNextPaint(inp.value),
|
134
185
|
inp.event) :
|
135
186
|
LitHtml.nothing}
|
187
|
+
${
|
188
|
+
this.#renderMetricValue(
|
189
|
+
'CLS', cls.value ? cls.value.toFixed(2) : '0',
|
190
|
+
Trace.Handlers.ModelHandlers.LayoutShifts.scoreClassificationForLayoutShift(cls.value),
|
191
|
+
cls.worstShiftEvent)}
|
136
192
|
</div>
|
137
193
|
`;
|
138
194
|
}
|
139
195
|
|
196
|
+
#insightsForRendering(): typeof Insights.Helpers.BaseInsight[] {
|
197
|
+
const includeExperimental = Root.Runtime.experiments.isEnabled(
|
198
|
+
Root.Runtime.ExperimentName.TIMELINE_EXPERIMENTAL_INSIGHTS,
|
199
|
+
);
|
200
|
+
|
201
|
+
if (includeExperimental) {
|
202
|
+
return ALL_INSIGHTS;
|
203
|
+
}
|
204
|
+
|
205
|
+
return ALL_INSIGHTS.filter(insight => !EXPERIMENTAL_INSIGHTS.has(insight));
|
206
|
+
}
|
207
|
+
|
140
208
|
#renderInsights(
|
141
209
|
insights: Trace.Insights.Types.TraceInsightSets|null,
|
142
210
|
parsedTrace: Trace.Handlers.Types.ParsedTrace|null,
|
143
211
|
insightSetKey: string,
|
144
212
|
): LitHtml.TemplateResult {
|
145
|
-
|
146
|
-
const insightComponents = [
|
147
|
-
Insights.InteractionToNextPaint.InteractionToNextPaint,
|
148
|
-
Insights.LCPPhases.LCPPhases,
|
149
|
-
Insights.LCPDiscovery.LCPDiscovery,
|
150
|
-
Insights.CLSCulprits.CLSCulprits,
|
151
|
-
Insights.RenderBlocking.RenderBlockingRequests,
|
152
|
-
Insights.DocumentLatency.DocumentLatency,
|
153
|
-
Insights.FontDisplay.FontDisplay,
|
154
|
-
Insights.Viewport.Viewport,
|
155
|
-
Insights.ThirdParties.ThirdParties,
|
156
|
-
Insights.SlowCSSSelector.SlowCSSSelector,
|
157
|
-
];
|
213
|
+
const insightComponents = this.#insightsForRendering();
|
158
214
|
// clang-format off
|
159
|
-
return
|
160
|
-
return
|
215
|
+
return html`${insightComponents.map(component => {
|
216
|
+
return html`<div data-single-insight-wrapper>
|
161
217
|
<${component.litTagName}
|
162
218
|
.insights=${insights}
|
163
219
|
.parsedTrace=${parsedTrace}
|
@@ -177,12 +233,12 @@ export class SidebarSingleInsightSet extends HTMLElement {
|
|
177
233
|
insightSetKey,
|
178
234
|
} = this.#data;
|
179
235
|
if (!parsedTrace || !insights || !insightSetKey) {
|
180
|
-
LitHtml.render(
|
236
|
+
LitHtml.render(html``, this.#shadow, {host: this});
|
181
237
|
return;
|
182
238
|
}
|
183
239
|
|
184
240
|
// clang-format off
|
185
|
-
LitHtml.render(
|
241
|
+
LitHtml.render(html`
|
186
242
|
<div class="navigation">
|
187
243
|
${this.#renderMetrics(insightSetKey)}
|
188
244
|
${this.#renderInsights(insights, parsedTrace, insightSetKey)}
|
@@ -0,0 +1,65 @@
|
|
1
|
+
// Copyright 2024 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 type * as Trace from '../../../models/trace/trace.js';
|
6
|
+
import {describeWithEnvironment} from '../../../testing/EnvironmentHelpers.js';
|
7
|
+
|
8
|
+
import * as Utils from './Utils.js';
|
9
|
+
|
10
|
+
describeWithEnvironment('Utils', () => {
|
11
|
+
describe('NumberWithUnit', () => {
|
12
|
+
const {NumberWithUnit} = Utils;
|
13
|
+
|
14
|
+
it('renders number with unit (formatMicroSecondsAsSeconds)', () => {
|
15
|
+
const result = NumberWithUnit.formatMicroSecondsAsSeconds(100_000 as Trace.Types.Timing.MicroSeconds);
|
16
|
+
assert.strictEqual(result.text, '0.10s');
|
17
|
+
assert.strictEqual(result.element.textContent, '0.10s');
|
18
|
+
assert.strictEqual(result.element.querySelector('.unit')?.textContent, 's');
|
19
|
+
});
|
20
|
+
|
21
|
+
it('renders number with unit (formatMicroSecondsAsMillisFixed)', () => {
|
22
|
+
const result = NumberWithUnit.formatMicroSecondsAsMillisFixed(100_000 as Trace.Types.Timing.MicroSeconds);
|
23
|
+
assert.strictEqual(result.text, '100ms');
|
24
|
+
assert.strictEqual(result.element.textContent, '100ms');
|
25
|
+
assert.strictEqual(result.element.querySelector('.unit')?.textContent, 'ms');
|
26
|
+
});
|
27
|
+
|
28
|
+
it('parse', () => {
|
29
|
+
// en
|
30
|
+
assert.deepStrictEqual(NumberWithUnit.parse('100[s]()'), {firstPart: '100', unitPart: 's', lastPart: ''});
|
31
|
+
assert.deepStrictEqual(NumberWithUnit.parse('100 [s]()'), {firstPart: '100 ', unitPart: 's', lastPart: ''});
|
32
|
+
|
33
|
+
// Decimal separators
|
34
|
+
assert.deepStrictEqual(
|
35
|
+
NumberWithUnit.parse('100.123[ms]()'), {firstPart: '100.123', unitPart: 'ms', lastPart: ''});
|
36
|
+
assert.deepStrictEqual(NumberWithUnit.parse('100,2[s]()'), {firstPart: '100,2', unitPart: 's', lastPart: ''});
|
37
|
+
|
38
|
+
// zh
|
39
|
+
assert.deepStrictEqual(NumberWithUnit.parse('100[毫秒]()'), {firstPart: '100', unitPart: '毫秒', lastPart: ''});
|
40
|
+
// zh-Hans-CN-u-nu-hanidec
|
41
|
+
assert.deepStrictEqual(
|
42
|
+
NumberWithUnit.parse('一〇〇[毫秒]()'), {firstPart: '一〇〇', unitPart: '毫秒', lastPart: ''});
|
43
|
+
|
44
|
+
// ar-SA (RTL language, but the UIString still places the number first in the string)
|
45
|
+
assert.deepStrictEqual(
|
46
|
+
NumberWithUnit.parse('١٠٠[ملي ثانية]()'), {firstPart: '١٠٠', unitPart: 'ملي ثانية', lastPart: ''});
|
47
|
+
|
48
|
+
// ar
|
49
|
+
assert.deepStrictEqual(
|
50
|
+
NumberWithUnit.parse('100[ملي ثانية]()'), {firstPart: '100', unitPart: 'ملي ثانية', lastPart: ''});
|
51
|
+
|
52
|
+
// sw (only one that places unit first)
|
53
|
+
assert.deepStrictEqual(NumberWithUnit.parse('[Sek]()100'), {firstPart: '', unitPart: 'Sek', lastPart: '100'});
|
54
|
+
assert.deepStrictEqual(NumberWithUnit.parse('[Sek]() 100'), {firstPart: '', unitPart: 'Sek', lastPart: ' 100'});
|
55
|
+
|
56
|
+
// error cases
|
57
|
+
assert.deepStrictEqual(NumberWithUnit.parse(''), null);
|
58
|
+
assert.deepStrictEqual(NumberWithUnit.parse('100s'), null);
|
59
|
+
assert.deepStrictEqual(NumberWithUnit.parse('100[s]('), null);
|
60
|
+
assert.deepStrictEqual(NumberWithUnit.parse('100[s]'), null);
|
61
|
+
assert.deepStrictEqual(NumberWithUnit.parse('100[s'), null);
|
62
|
+
assert.deepStrictEqual(NumberWithUnit.parse('100 s]('), null);
|
63
|
+
});
|
64
|
+
});
|
65
|
+
});
|
@@ -2,10 +2,32 @@
|
|
2
2
|
// Use of this source code is governed by a BSD-style license that can be
|
3
3
|
// found in the LICENSE file.
|
4
4
|
|
5
|
+
import * as i18n from '../../../core/i18n/i18n.js';
|
6
|
+
import * as Platform from '../../../core/platform/platform.js';
|
5
7
|
import type * as Trace from '../../../models/trace/trace.js';
|
6
8
|
import * as ThemeSupport from '../../../ui/legacy/theme_support/theme_support.js';
|
7
9
|
import * as VisualLogging from '../../../ui/visual_logging/visual_logging.js';
|
8
10
|
|
11
|
+
const UIStrings = {
|
12
|
+
/**
|
13
|
+
*@description ms is the short form of milli-seconds and the placeholder is a decimal number.
|
14
|
+
* The shortest form or abbreviation of milliseconds should be used, as there is
|
15
|
+
* limited room in this UI.
|
16
|
+
*@example {2.14} PH1
|
17
|
+
*/
|
18
|
+
fms: '{PH1}[ms]()',
|
19
|
+
/**
|
20
|
+
*@description s is short for seconds and the placeholder is a decimal number
|
21
|
+
* The shortest form or abbreviation of seconds should be used, as there is
|
22
|
+
* limited room in this UI.
|
23
|
+
*@example {2.14} PH1
|
24
|
+
*/
|
25
|
+
fs: '{PH1}[s]()',
|
26
|
+
};
|
27
|
+
|
28
|
+
const str_ = i18n.i18n.registerUIStrings('panels/timeline/components/Utils.ts', UIStrings);
|
29
|
+
const i18nString = i18n.i18n.getLocalizedString.bind(undefined, str_);
|
30
|
+
|
9
31
|
export enum NetworkCategory {
|
10
32
|
DOC = 'Doc',
|
11
33
|
CSS = 'CSS',
|
@@ -136,3 +158,98 @@ export function renderMetricValue(
|
|
136
158
|
|
137
159
|
return metricValueEl;
|
138
160
|
}
|
161
|
+
|
162
|
+
export type NumberWithUnitString = {
|
163
|
+
element: HTMLElement,
|
164
|
+
text: string,
|
165
|
+
};
|
166
|
+
|
167
|
+
/**
|
168
|
+
* These methods format numbers with units in a way that allows the unit portion to be styled specifically.
|
169
|
+
* They return a text string (the usual string resulting from formatting a number), and an HTMLSpanElement.
|
170
|
+
* The element contains the formatted number, with a nested span element for the unit portion: `.unit`.
|
171
|
+
*
|
172
|
+
* This formatting is locale-aware. This is accomplished by utilizing the fact that UIStrings passthru
|
173
|
+
* markdown link syntax: `[text that will be translated](not translated)`. The result
|
174
|
+
* is a translated string like this: `[t̂éx̂t́ t̂h́ât́ ŵíl̂ĺ b̂é t̂ŕâńŝĺât́êd́](not translated)`. This is used within
|
175
|
+
* insight components to localize markdown content. But here, we utilize it to parse a localized string.
|
176
|
+
*
|
177
|
+
* If the parsing fails, we fallback to i18n.TimeUtilities, and there will be no `.unit` element.
|
178
|
+
*
|
179
|
+
* As of this writing, our only locale where the unit comes before the number is `sw`, ex: `Sek {PH1}`.
|
180
|
+
*
|
181
|
+
new Intl.NumberFormat('sw', {
|
182
|
+
style: 'unit',
|
183
|
+
unit: 'millisecond',
|
184
|
+
unitDisplay: 'narrow'
|
185
|
+
}).format(10); // 'ms 10'
|
186
|
+
*
|
187
|
+
*/
|
188
|
+
export namespace NumberWithUnit {
|
189
|
+
export function parse(text: string): {firstPart: string, unitPart: string, lastPart: string}|null {
|
190
|
+
const startBracket = text.indexOf('[');
|
191
|
+
const endBracket = startBracket !== -1 && text.indexOf(']', startBracket);
|
192
|
+
const startParen = endBracket && text.indexOf('(', endBracket);
|
193
|
+
const endParen = startParen && text.indexOf(')', startParen);
|
194
|
+
if (!endParen || endParen === -1) {
|
195
|
+
return null;
|
196
|
+
}
|
197
|
+
|
198
|
+
const firstPart = text.substring(0, startBracket);
|
199
|
+
const unitPart = text.substring(startBracket + 1, endBracket);
|
200
|
+
const lastPart = text.substring(endParen + 1); // skips `]()`
|
201
|
+
return {firstPart, unitPart, lastPart};
|
202
|
+
}
|
203
|
+
|
204
|
+
export function formatMicroSecondsAsSeconds(time: Platform.Timing.MicroSeconds): NumberWithUnitString {
|
205
|
+
const element = document.createElement('span');
|
206
|
+
element.classList.add('number-with-unit');
|
207
|
+
const milliseconds = Platform.Timing.microSecondsToMilliSeconds(time);
|
208
|
+
const seconds = Platform.Timing.milliSecondsToSeconds(milliseconds);
|
209
|
+
const text = i18nString(UIStrings.fs, {PH1: (seconds).toFixed(2)});
|
210
|
+
|
211
|
+
const result = parse(text);
|
212
|
+
if (!result) {
|
213
|
+
// Some sort of problem with parsing, so fallback to not marking up the unit.
|
214
|
+
element.textContent = i18n.TimeUtilities.formatMicroSecondsAsSeconds(time);
|
215
|
+
return {text, element};
|
216
|
+
}
|
217
|
+
|
218
|
+
const {firstPart, unitPart, lastPart} = result;
|
219
|
+
if (firstPart) {
|
220
|
+
element.append(firstPart);
|
221
|
+
}
|
222
|
+
element.createChild('span', 'unit').textContent = unitPart;
|
223
|
+
if (lastPart) {
|
224
|
+
element.append(lastPart);
|
225
|
+
}
|
226
|
+
|
227
|
+
return {text: element.textContent ?? '', element};
|
228
|
+
}
|
229
|
+
|
230
|
+
export function formatMicroSecondsAsMillisFixed(time: Platform.Timing.MicroSeconds, fractionDigits = 0):
|
231
|
+
NumberWithUnitString {
|
232
|
+
const element = document.createElement('span');
|
233
|
+
element.classList.add('number-with-unit');
|
234
|
+
const milliseconds = Platform.Timing.microSecondsToMilliSeconds(time);
|
235
|
+
const text = i18nString(UIStrings.fms, {PH1: (milliseconds).toFixed(fractionDigits)});
|
236
|
+
|
237
|
+
const result = parse(text);
|
238
|
+
if (!result) {
|
239
|
+
// Some sort of problem with parsing, so fallback to not marking up the unit.
|
240
|
+
element.textContent = i18n.TimeUtilities.formatMicroSecondsAsMillisFixed(time);
|
241
|
+
return {text, element};
|
242
|
+
}
|
243
|
+
|
244
|
+
const {firstPart, unitPart, lastPart} = result;
|
245
|
+
if (firstPart) {
|
246
|
+
element.append(firstPart);
|
247
|
+
}
|
248
|
+
element.createChild('span', 'unit').textContent = unitPart;
|
249
|
+
if (lastPart) {
|
250
|
+
element.append(lastPart);
|
251
|
+
}
|
252
|
+
|
253
|
+
return {text: element.textContent ?? '', element};
|
254
|
+
}
|
255
|
+
}
|