chrome-devtools-frontend 1.0.1535712 → 1.0.1537268
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/docs/contributing/images/issues-nearestslo.png +0 -0
- package/docs/contributing/issues.md +17 -21
- package/front_end/core/common/Console.ts +1 -8
- package/front_end/core/common/ParsedURL.ts +10 -20
- package/front_end/core/common/SegmentedRange.ts +1 -2
- package/front_end/core/common/StringOutputStream.ts +1 -4
- package/front_end/core/host/AidaClient.ts +64 -5
- package/front_end/core/host/DispatchHttpRequestClient.ts +62 -0
- package/front_end/core/host/GdpClient.ts +8 -57
- package/front_end/core/host/host.ts +2 -0
- package/front_end/core/i18n/i18nImpl.ts +0 -24
- package/front_end/core/protocol_client/CDPConnection.ts +10 -8
- package/front_end/core/protocol_client/InspectorBackend.ts +36 -42
- package/front_end/core/sdk/AnimationModel.ts +1 -2
- package/front_end/core/sdk/CSSMatchedStyles.ts +2 -2
- package/front_end/core/sdk/CSSModel.ts +1 -1
- package/front_end/core/sdk/CSSProperty.ts +3 -6
- package/front_end/core/sdk/CSSStyleDeclaration.ts +4 -4
- package/front_end/core/sdk/DebuggerModel.ts +1 -2
- package/front_end/core/sdk/EnhancedTracesParser.ts +24 -5
- package/front_end/core/sdk/RehydratingConnection.ts +112 -4
- package/front_end/core/sdk/RehydratingObject.ts +8 -0
- package/front_end/core/sdk/SourceMap.ts +2 -3
- package/front_end/core/sdk/TraceObject.ts +5 -1
- package/front_end/entrypoints/node_app/NodeConnectionsPanel.ts +2 -1
- package/front_end/generated/InspectorBackendCommands.js +1 -2
- package/front_end/generated/SupportedCSSProperties.js +19 -0
- package/front_end/generated/protocol.ts +0 -27
- package/front_end/models/javascript_metadata/NativeFunctions.js +1 -1
- package/front_end/models/trace/types/File.ts +9 -0
- package/front_end/panels/accessibility/AccessibilityNodeView.ts +18 -17
- package/front_end/panels/accessibility/AccessibilitySidebarView.ts +9 -12
- package/front_end/panels/ai_assistance/AiAssistancePanel.ts +5 -9
- package/front_end/panels/ai_assistance/components/ChatView.ts +63 -74
- package/front_end/panels/application/AppManifestView.ts +7 -6
- package/front_end/panels/application/ApplicationPanelSidebar.ts +4 -4
- package/front_end/panels/application/BackForwardCacheTreeElement.ts +2 -6
- package/front_end/panels/application/OpenedWindowDetailsView.ts +6 -6
- package/front_end/panels/application/StorageView.ts +9 -8
- package/front_end/panels/application/components/BackForwardCacheView.ts +366 -342
- package/front_end/panels/application/components/FrameDetailsView.ts +8 -11
- package/front_end/panels/application/components/OriginTrialTreeView.ts +65 -69
- package/front_end/panels/application/components/ProtocolHandlersView.ts +3 -2
- package/front_end/panels/application/components/backForwardCacheView.css +4 -0
- package/front_end/panels/application/components/badge.css +1 -1
- package/front_end/panels/application/preloading/components/PreloadingDisabledInfobar.ts +2 -1
- package/front_end/panels/browser_debugger/CategorizedBreakpointsSidebarPane.ts +44 -53
- package/front_end/panels/browser_debugger/ObjectEventListenersSidebarPane.ts +8 -8
- package/front_end/panels/common/BadgeNotification.ts +2 -1
- package/front_end/panels/common/GdpSignUpDialog.ts +2 -1
- package/front_end/panels/console/ConsoleInsightTeaser.ts +8 -2
- package/front_end/panels/console/ConsolePinPane.ts +12 -7
- package/front_end/panels/developer_resources/DeveloperResourcesView.ts +9 -9
- package/front_end/panels/elements/ComputedStyleWidget.ts +7 -7
- package/front_end/panels/elements/EventListenersWidget.ts +9 -9
- package/front_end/panels/elements/NodeStackTraceWidget.ts +6 -6
- package/front_end/panels/elements/PlatformFontsWidget.ts +5 -5
- package/front_end/panels/elements/PropertiesWidget.ts +8 -8
- package/front_end/panels/layer_viewer/Layers3DView.ts +2 -1
- package/front_end/panels/layer_viewer/PaintProfilerView.ts +3 -3
- package/front_end/panels/network/RequestCookiesView.ts +2 -1
- package/front_end/panels/network/RequestTimingView.ts +2 -1
- package/front_end/panels/recorder/RecorderController.ts +33 -23
- package/front_end/panels/recorder/components/CreateRecordingView.ts +259 -226
- package/front_end/panels/security/CookieControlsView.ts +2 -1
- package/front_end/panels/security/CookieReportView.ts +3 -2
- package/front_end/panels/settings/AISettingsTab.ts +164 -172
- package/front_end/panels/settings/KeybindsSettingsTab.ts +6 -0
- package/front_end/panels/settings/SettingsScreen.ts +3 -7
- package/front_end/panels/settings/aiSettingsTab.css +151 -148
- package/front_end/panels/settings/components/SyncSection.ts +2 -1
- package/front_end/panels/settings/settings-meta.ts +1 -2
- package/front_end/panels/sources/AddSourceMapURLDialog.ts +23 -26
- package/front_end/panels/sources/DebuggerPausedMessage.ts +4 -3
- package/front_end/panels/sources/ResourceOriginPlugin.ts +3 -2
- package/front_end/panels/sources/SourcesNavigator.ts +2 -1
- package/front_end/panels/sources/TabbedEditorContainer.ts +3 -2
- package/front_end/panels/sources/WatchExpressionsSidebarPane.ts +9 -9
- package/front_end/panels/timeline/TimelinePanel.ts +60 -11
- package/front_end/panels/timeline/TimelineUIUtils.ts +3 -2
- package/front_end/panels/timeline/components/DetailsView.ts +5 -4
- package/front_end/panels/timeline/components/ExportTraceOptions.ts +33 -34
- package/front_end/panels/timeline/components/FieldSettingsDialog.ts +2 -1
- package/front_end/panels/timeline/components/LiveMetricsView.ts +5 -4
- package/front_end/panels/timeline/components/MetricCompareStrings.ts +25 -24
- package/front_end/panels/timeline/components/insights/LCPDiscovery.ts +2 -1
- package/front_end/third_party/chromium/README.chromium +2 -2
- package/front_end/third_party/puppeteer/README.chromium +2 -2
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/api/Browser.d.ts +9 -1
- 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 +2 -2
- 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/Page.d.ts +13 -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/BrowserContext.d.ts +2 -2
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/bidi/BrowserContext.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/bidi/BrowserContext.js +5 -2
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/bidi/BrowserContext.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/bidi/Page.d.ts +2 -2
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/bidi/Page.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/bidi/Page.js +3 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/bidi/Page.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/bidi/core/Realm.d.ts +1 -12
- 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/cdp/Accessibility.d.ts +6 -0
- 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 +1 -0
- 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/Browser.d.ts +2 -2
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/cdp/Browser.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/cdp/Browser.js +6 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/cdp/Browser.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/cdp/BrowserContext.d.ts +2 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/cdp/BrowserContext.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/cdp/BrowserContext.js +2 -2
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/cdp/BrowserContext.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/cdp/Page.d.ts +2 -2
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/cdp/Page.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/cdp/Page.js +3 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/cdp/Page.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/revisions.d.ts +3 -3
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/revisions.js +3 -3
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/revisions.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/util/Mutex.d.ts +2 -2
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/util/disposable.d.ts +2 -2
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/util/disposable.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/util/disposable.js +3 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/util/disposable.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/util/util.d.ts +1 -0
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/util/util.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/util/util.js +1 -0
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/util/util.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/util/version.d.ts +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/util/version.js +1 -1
- package/front_end/third_party/puppeteer/package/lib/es5-iife/puppeteer-core-browser.d.ts +28 -3
- package/front_end/third_party/puppeteer/package/lib/es5-iife/puppeteer-core-browser.js +21 -10
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/api/Browser.d.ts +9 -1
- 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 +2 -2
- 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/Input.d.ts +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/api/Input.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/api/Page.d.ts +13 -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/BrowserContext.d.ts +2 -2
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/bidi/BrowserContext.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/bidi/BrowserContext.js +5 -2
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/bidi/BrowserContext.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/bidi/Page.d.ts +2 -2
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/bidi/Page.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/bidi/Page.js +3 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/bidi/Page.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/bidi/core/Realm.d.ts +1 -12
- 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/cdp/Accessibility.d.ts +6 -0
- 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 +1 -0
- 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/Browser.d.ts +2 -2
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/cdp/Browser.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/cdp/Browser.js +6 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/cdp/Browser.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/cdp/BrowserContext.d.ts +2 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/cdp/BrowserContext.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/cdp/BrowserContext.js +2 -2
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/cdp/BrowserContext.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/cdp/Page.d.ts +2 -2
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/cdp/Page.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/cdp/Page.js +3 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/cdp/Page.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/revisions.d.ts +3 -3
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/revisions.js +3 -3
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/revisions.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/util/disposable.d.ts +2 -2
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/util/disposable.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/util/disposable.js +2 -2
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/util/disposable.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/util/util.d.ts +1 -0
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/util/util.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/util/util.js +1 -0
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/util/util.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/util/version.d.ts +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/util/version.js +1 -1
- package/front_end/third_party/puppeteer/package/lib/types.d.ts +28 -3
- package/front_end/third_party/puppeteer/package/package.json +2 -2
- package/front_end/third_party/puppeteer/package/src/api/Browser.ts +13 -1
- package/front_end/third_party/puppeteer/package/src/api/BrowserContext.ts +7 -2
- package/front_end/third_party/puppeteer/package/src/api/Page.ts +14 -1
- package/front_end/third_party/puppeteer/package/src/bidi/BrowserContext.ts +8 -5
- package/front_end/third_party/puppeteer/package/src/bidi/Page.ts +5 -2
- package/front_end/third_party/puppeteer/package/src/cdp/Accessibility.ts +8 -0
- package/front_end/third_party/puppeteer/package/src/cdp/Browser.ts +11 -2
- package/front_end/third_party/puppeteer/package/src/cdp/BrowserContext.ts +3 -2
- package/front_end/third_party/puppeteer/package/src/cdp/Page.ts +5 -5
- package/front_end/third_party/puppeteer/package/src/revisions.ts +3 -3
- package/front_end/third_party/puppeteer/package/src/util/disposable.ts +2 -2
- package/front_end/third_party/puppeteer/package/src/util/util.ts +1 -0
- package/front_end/third_party/puppeteer/package/src/util/version.ts +1 -1
- package/front_end/ui/components/docs/tooltip/basic.ts +1 -1
- package/front_end/ui/components/text_editor/AiCodeCompletionProvider.ts +280 -0
- package/front_end/ui/components/text_editor/text_editor.ts +1 -0
- package/front_end/ui/components/tooltips/Tooltip.ts +33 -18
- package/front_end/ui/i18n/i18n.ts +31 -0
- package/front_end/ui/legacy/Dialog.ts +0 -1
- package/front_end/ui/legacy/SettingsUI.ts +0 -14
- package/front_end/ui/legacy/SoftDropDown.ts +1 -12
- package/front_end/ui/legacy/ViewManager.ts +2 -4
- package/front_end/ui/legacy/Widget.ts +33 -17
- package/front_end/ui/legacy/XLink.ts +0 -3
- package/front_end/ui/legacy/components/data_grid/DataGridElement.ts +9 -0
- package/front_end/ui/legacy/components/object_ui/ObjectPropertiesSection.ts +2 -1
- package/front_end/ui/legacy/components/utils/Linkifier.ts +9 -3
- package/front_end/ui/legacy/legacy.ts +0 -2
- package/front_end/ui/visual_logging/KnownContextValues.ts +4 -1
- package/mcp/mcp.ts +6 -0
- package/package.json +1 -1
- package/front_end/models/ai_assistance/data_formatters/PerformanceTraceFormatterBounds.snapshot.txt +0 -4
- package/front_end/ui/components/docs/breadcrumbs_perf/initial-breadcrumb-perf.html +0 -20
- package/front_end/ui/components/docs/breadcrumbs_perf/initial-breadcrumb-perf.ts +0 -25
- package/front_end/ui/components/docs/breadcrumbs_perf/nested-breadcrumbs-perf.html +0 -20
- package/front_end/ui/components/docs/breadcrumbs_perf/nested-breadcrumbs-perf.ts +0 -36
- package/front_end/ui/components/docs/recorder_create_recording_view/basic.html +0 -20
- package/front_end/ui/components/docs/recorder_create_recording_view/basic.ts +0 -27
- package/front_end/ui/legacy/ThrottledWidget.ts +0 -48
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
// Copyright 2024 The Chromium Authors
|
|
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
|
-
/* eslint-disable @devtools/no-lit-render-outside-of-view */
|
|
5
4
|
|
|
6
5
|
import * as Common from '../../core/common/common.js';
|
|
7
6
|
import * as Host from '../../core/host/host.js';
|
|
@@ -11,15 +10,15 @@ import * as Root from '../../core/root/root.js';
|
|
|
11
10
|
import * as AiAssistanceModel from '../../models/ai_assistance/ai_assistance.js';
|
|
12
11
|
import * as Buttons from '../../ui/components/buttons/buttons.js';
|
|
13
12
|
import * as Input from '../../ui/components/input/input.js';
|
|
14
|
-
import * as LegacyWrapper from '../../ui/components/legacy_wrapper/legacy_wrapper.js';
|
|
15
13
|
import * as Switch from '../../ui/components/switch/switch.js';
|
|
14
|
+
import * as uiI18n from '../../ui/i18n/i18n.js';
|
|
16
15
|
import * as UI from '../../ui/legacy/legacy.js';
|
|
17
16
|
import * as Lit from '../../ui/lit/lit.js';
|
|
18
17
|
import * as VisualLogging from '../../ui/visual_logging/visual_logging.js';
|
|
19
18
|
|
|
20
19
|
import aiSettingsTabStyles from './aiSettingsTab.css.js';
|
|
21
20
|
|
|
22
|
-
const {html, Directives: {ifDefined, classMap}} = Lit;
|
|
21
|
+
const {html, nothing, render, Directives: {ifDefined, classMap}} = Lit;
|
|
23
22
|
|
|
24
23
|
const UIStrings = {
|
|
25
24
|
/**
|
|
@@ -230,8 +229,143 @@ interface AiSettingParams {
|
|
|
230
229
|
};
|
|
231
230
|
}
|
|
232
231
|
|
|
233
|
-
|
|
234
|
-
|
|
232
|
+
interface ViewInput {
|
|
233
|
+
disabledReasons: string[];
|
|
234
|
+
sharedDisclaimerBulletPoints: Array<{icon: string, text: Common.UIString.LocalizedString|Lit.TemplateResult}>;
|
|
235
|
+
settingToParams: Map<Common.Settings.Setting<boolean>, AiSettingParams>;
|
|
236
|
+
expandSetting(setting: Common.Settings.Setting<boolean>): void;
|
|
237
|
+
toggleSetting(setting: Common.Settings.Setting<boolean>, ev: Event): void;
|
|
238
|
+
}
|
|
239
|
+
|
|
240
|
+
type View = (input: ViewInput, output: undefined, target: HTMLElement) => void;
|
|
241
|
+
|
|
242
|
+
export const AI_SETTINGS_TAB_DEFAULT_VIEW: View = (input, _output, target): void => {
|
|
243
|
+
// Disabled until https://crbug.com/1079231 is fixed.
|
|
244
|
+
// clang-format off
|
|
245
|
+
const disabledReasonsExplainer = input.disabledReasons.length ? html`
|
|
246
|
+
<div class="disabled-explainer">
|
|
247
|
+
${input.disabledReasons.map(reason => html`
|
|
248
|
+
<div class="disabled-explainer-row">
|
|
249
|
+
<devtools-icon name="warning" class="medium" style="color: var(--icon-warning);">
|
|
250
|
+
</devtools-icon>
|
|
251
|
+
${reason}
|
|
252
|
+
</div>
|
|
253
|
+
`)}
|
|
254
|
+
</div>
|
|
255
|
+
` : nothing;
|
|
256
|
+
|
|
257
|
+
const sharedDisclaimer = html`
|
|
258
|
+
<div class="shared-disclaimer">
|
|
259
|
+
<h2>${i18nString(UIStrings.boostYourProductivity)}</h2>
|
|
260
|
+
<h3 class="disclaimer-list-header">${i18nString(UIStrings.thingsToConsider)}</h3>
|
|
261
|
+
<div class="disclaimer-list">
|
|
262
|
+
${input.sharedDisclaimerBulletPoints.map(item =>
|
|
263
|
+
html`<div><devtools-icon .name=${item.icon} class="medium"></devtools-icon>
|
|
264
|
+
</div><div>${item.text}</div>`
|
|
265
|
+
)}
|
|
266
|
+
</div>
|
|
267
|
+
</div>
|
|
268
|
+
`;
|
|
269
|
+
|
|
270
|
+
const renderSettingItem = (settingItem: SettingItem): Lit.TemplateResult => {
|
|
271
|
+
return html`
|
|
272
|
+
<div>
|
|
273
|
+
<devtools-icon class="extra-large" .name=${settingItem.iconName}>
|
|
274
|
+
</devtools-icon>
|
|
275
|
+
</div>
|
|
276
|
+
<div class="padded">${settingItem.text}</div>
|
|
277
|
+
`;
|
|
278
|
+
};
|
|
279
|
+
|
|
280
|
+
const isDisabled = input.disabledReasons.length > 0;
|
|
281
|
+
const disabledReasonsJoined = input.disabledReasons.join('\n') || undefined;
|
|
282
|
+
const settings = Array.from(input.settingToParams.keys()).map(setting => {
|
|
283
|
+
const settingData = input.settingToParams.get(setting);
|
|
284
|
+
if (!settingData) {
|
|
285
|
+
return nothing;
|
|
286
|
+
}
|
|
287
|
+
const detailsClasses = {
|
|
288
|
+
'whole-row': true,
|
|
289
|
+
open: settingData.settingExpandState.isSettingExpanded,
|
|
290
|
+
};
|
|
291
|
+
const tabindex = settingData.settingExpandState.isSettingExpanded ? '0' : '-1';
|
|
292
|
+
return html`
|
|
293
|
+
<div class="accordion-header" @click=${input.expandSetting.bind(this, setting)}>
|
|
294
|
+
<div class="icon-container centered">
|
|
295
|
+
<devtools-icon name=${settingData.iconName}></devtools-icon>
|
|
296
|
+
</div>
|
|
297
|
+
<div class="setting-card">
|
|
298
|
+
<h2>${settingData.settingName}</h2>
|
|
299
|
+
<div class="setting-description">${settingData.settingDescription}</div>
|
|
300
|
+
</div>
|
|
301
|
+
<div class="dropdown centered">
|
|
302
|
+
<devtools-button
|
|
303
|
+
.data=${{
|
|
304
|
+
title: settingData.settingExpandState.isSettingExpanded ? i18nString(UIStrings.showLess) : i18nString(UIStrings.showMore),
|
|
305
|
+
size: Buttons.Button.Size.SMALL,
|
|
306
|
+
iconName: settingData.settingExpandState.isSettingExpanded ? 'chevron-up' : 'chevron-down',
|
|
307
|
+
variant: Buttons.Button.Variant.ICON,
|
|
308
|
+
jslogContext: settingData.settingExpandState.expandSettingJSLogContext,
|
|
309
|
+
} as Buttons.Button.ButtonData}
|
|
310
|
+
></devtools-button>
|
|
311
|
+
</div>
|
|
312
|
+
</div>
|
|
313
|
+
<div class="divider"></div>
|
|
314
|
+
<div class="toggle-container centered"
|
|
315
|
+
title=${ifDefined(disabledReasonsJoined)}
|
|
316
|
+
@click=${input.toggleSetting.bind(this, setting)}
|
|
317
|
+
>
|
|
318
|
+
<devtools-switch
|
|
319
|
+
.checked=${Boolean(setting.get()) && !isDisabled}
|
|
320
|
+
.jslogContext=${setting.name || ''}
|
|
321
|
+
.disabled=${isDisabled}
|
|
322
|
+
.label=${disabledReasonsJoined || settingData.enableSettingText}
|
|
323
|
+
data-testid=${settingData.enableSettingText}
|
|
324
|
+
@switchchange=${input.toggleSetting.bind(this, setting)}
|
|
325
|
+
></devtools-switch>
|
|
326
|
+
</div>
|
|
327
|
+
<div class=${classMap(detailsClasses)}>
|
|
328
|
+
<div class="overflow-hidden">
|
|
329
|
+
<div class="expansion-grid">
|
|
330
|
+
<h3 class="expansion-grid-whole-row">${i18nString(UIStrings.whenOn)}</h3>
|
|
331
|
+
${settingData.settingItems.map(item => renderSettingItem(item))}
|
|
332
|
+
<h3 class="expansion-grid-whole-row">${i18nString(UIStrings.thingsToConsider)}</h3>
|
|
333
|
+
${settingData.toConsiderSettingItems.map(item => renderSettingItem(item))}
|
|
334
|
+
<div class="expansion-grid-whole-row">
|
|
335
|
+
<x-link
|
|
336
|
+
href=${settingData.learnMoreLink.url}
|
|
337
|
+
class="link"
|
|
338
|
+
tabindex=${tabindex}
|
|
339
|
+
jslog=${VisualLogging.link(settingData.learnMoreLink.linkJSLogContext).track({
|
|
340
|
+
click: true,
|
|
341
|
+
})}
|
|
342
|
+
>${i18nString(UIStrings.learnMore)}</x-link>
|
|
343
|
+
</div>
|
|
344
|
+
</div>
|
|
345
|
+
</div>
|
|
346
|
+
</div>
|
|
347
|
+
`;
|
|
348
|
+
});
|
|
349
|
+
|
|
350
|
+
render(html`
|
|
351
|
+
<style>${Input.checkboxStyles}</style>
|
|
352
|
+
<style>${aiSettingsTabStyles}</style>
|
|
353
|
+
<div class="ai-settings-container">
|
|
354
|
+
<div class="settings-container-wrapper" jslog=${VisualLogging.pane('chrome-ai')}>
|
|
355
|
+
${sharedDisclaimer}
|
|
356
|
+
${input.settingToParams.size ? html`
|
|
357
|
+
${disabledReasonsExplainer}
|
|
358
|
+
<div class="settings-container">
|
|
359
|
+
${settings}
|
|
360
|
+
</div>
|
|
361
|
+
` : nothing}
|
|
362
|
+
</div></div>
|
|
363
|
+
`, target);
|
|
364
|
+
// clang-format on
|
|
365
|
+
};
|
|
366
|
+
|
|
367
|
+
export class AISettingsTab extends UI.Widget.VBox {
|
|
368
|
+
#view: View;
|
|
235
369
|
#consoleInsightsSetting?: Common.Settings.Setting<boolean>;
|
|
236
370
|
#aiAnnotationsSetting?: Common.Settings.Setting<boolean>;
|
|
237
371
|
#aiAssistanceSetting?: Common.Settings.Setting<boolean>;
|
|
@@ -242,7 +376,7 @@ export class AISettingsTab extends LegacyWrapper.LegacyWrapper.WrappableComponen
|
|
|
242
376
|
// To display a a setting, it needs to be added to this map.
|
|
243
377
|
#settingToParams = new Map<Common.Settings.Setting<boolean>, AiSettingParams>();
|
|
244
378
|
|
|
245
|
-
constructor() {
|
|
379
|
+
constructor(view?: View) {
|
|
246
380
|
super();
|
|
247
381
|
try {
|
|
248
382
|
this.#consoleInsightsSetting = Common.Settings.Settings.instance().moduleSetting('console-insights-enabled');
|
|
@@ -268,15 +402,31 @@ export class AISettingsTab extends LegacyWrapper.LegacyWrapper.WrappableComponen
|
|
|
268
402
|
|
|
269
403
|
this.#boundOnAidaAvailabilityChange = this.#onAidaAvailabilityChange.bind(this);
|
|
270
404
|
this.#initSettings();
|
|
405
|
+
this.#view = view ?? AI_SETTINGS_TAB_DEFAULT_VIEW;
|
|
271
406
|
}
|
|
272
407
|
|
|
273
|
-
|
|
408
|
+
override performUpdate(): void {
|
|
409
|
+
const disabledReasons = AiAssistanceModel.AiUtils.getDisabledReasons(this.#aidaAvailability);
|
|
410
|
+
const viewInput: ViewInput = {
|
|
411
|
+
disabledReasons,
|
|
412
|
+
sharedDisclaimerBulletPoints: this.#getSharedDisclaimerBulletPoints(),
|
|
413
|
+
settingToParams: this.#settingToParams,
|
|
414
|
+
expandSetting: this.#expandSetting.bind(this),
|
|
415
|
+
toggleSetting: this.#toggleSetting.bind(this),
|
|
416
|
+
};
|
|
417
|
+
this.#view(viewInput, undefined, this.contentElement);
|
|
418
|
+
}
|
|
419
|
+
|
|
420
|
+
override wasShown(): void {
|
|
421
|
+
super.wasShown();
|
|
274
422
|
Host.AidaClient.HostConfigTracker.instance().addEventListener(
|
|
275
423
|
Host.AidaClient.Events.AIDA_AVAILABILITY_CHANGED, this.#boundOnAidaAvailabilityChange);
|
|
276
424
|
void this.#onAidaAvailabilityChange();
|
|
425
|
+
this.requestUpdate();
|
|
277
426
|
}
|
|
278
427
|
|
|
279
|
-
|
|
428
|
+
override willHide(): void {
|
|
429
|
+
super.willHide();
|
|
280
430
|
Host.AidaClient.HostConfigTracker.instance().removeEventListener(
|
|
281
431
|
Host.AidaClient.Events.AIDA_AVAILABILITY_CHANGED, this.#boundOnAidaAvailabilityChange);
|
|
282
432
|
}
|
|
@@ -399,7 +549,7 @@ export class AISettingsTab extends LegacyWrapper.LegacyWrapper.WrappableComponen
|
|
|
399
549
|
const currentAidaAvailability = await Host.AidaClient.AidaClient.checkAccessPreconditions();
|
|
400
550
|
if (currentAidaAvailability !== this.#aidaAvailability) {
|
|
401
551
|
this.#aidaAvailability = currentAidaAvailability;
|
|
402
|
-
|
|
552
|
+
this.requestUpdate();
|
|
403
553
|
}
|
|
404
554
|
}
|
|
405
555
|
|
|
@@ -437,7 +587,7 @@ export class AISettingsTab extends LegacyWrapper.LegacyWrapper.WrappableComponen
|
|
|
437
587
|
return;
|
|
438
588
|
}
|
|
439
589
|
settingData.settingExpandState.isSettingExpanded = !settingData.settingExpandState.isSettingExpanded;
|
|
440
|
-
|
|
590
|
+
this.requestUpdate();
|
|
441
591
|
}
|
|
442
592
|
|
|
443
593
|
#toggleSetting(setting: Common.Settings.Setting<boolean>, ev: Event): void {
|
|
@@ -476,24 +626,10 @@ export class AISettingsTab extends LegacyWrapper.LegacyWrapper.WrappableComponen
|
|
|
476
626
|
// If the "AI Assistance" is toggled off, we remove all the history entries related to the feature.
|
|
477
627
|
void AiAssistanceModel.AiHistoryStorage.AiHistoryStorage.instance().deleteAll();
|
|
478
628
|
}
|
|
479
|
-
|
|
480
|
-
}
|
|
481
|
-
|
|
482
|
-
#renderSharedDisclaimerItem(icon: string, text: Common.UIString.LocalizedString|Lit.TemplateResult):
|
|
483
|
-
Lit.TemplateResult {
|
|
484
|
-
// Disabled until https://crbug.com/1079231 is fixed.
|
|
485
|
-
// clang-format off
|
|
486
|
-
return html`
|
|
487
|
-
<div>
|
|
488
|
-
<devtools-icon .name=${icon} class="medium">
|
|
489
|
-
</devtools-icon>
|
|
490
|
-
</div>
|
|
491
|
-
<div>${text}</div>
|
|
492
|
-
`;
|
|
493
|
-
// clang-format on
|
|
629
|
+
this.requestUpdate();
|
|
494
630
|
}
|
|
495
631
|
|
|
496
|
-
#
|
|
632
|
+
#getSharedDisclaimerBulletPoints(): Array<{icon: string, text: Common.UIString.LocalizedString|Lit.TemplateResult}> {
|
|
497
633
|
const tosLink = UI.XLink.XLink.create(
|
|
498
634
|
'https://policies.google.com/terms', i18nString(UIStrings.termsOfService), undefined, undefined,
|
|
499
635
|
'terms-of-service');
|
|
@@ -503,7 +639,7 @@ export class AISettingsTab extends LegacyWrapper.LegacyWrapper.WrappableComponen
|
|
|
503
639
|
const noLogging = Root.Runtime.hostConfig.aidaAvailability?.enterprisePolicyValue ===
|
|
504
640
|
Root.Runtime.GenAiEnterprisePolicyValue.ALLOW_WITHOUT_LOGGING;
|
|
505
641
|
|
|
506
|
-
|
|
642
|
+
return [
|
|
507
643
|
{icon: 'psychiatry', text: i18nString(UIStrings.experimentalFeatures)},
|
|
508
644
|
{
|
|
509
645
|
icon: 'google',
|
|
@@ -515,155 +651,11 @@ export class AISettingsTab extends LegacyWrapper.LegacyWrapper.WrappableComponen
|
|
|
515
651
|
},
|
|
516
652
|
{
|
|
517
653
|
icon: 'policy',
|
|
518
|
-
text: html`${
|
|
654
|
+
text: html`${uiI18n.getFormatLocalizedString(str_, UIStrings.termsOfServicePrivacyNotice, {
|
|
519
655
|
PH1: tosLink,
|
|
520
656
|
PH2: privacyNoticeLink,
|
|
521
657
|
})}`,
|
|
522
658
|
},
|
|
523
659
|
];
|
|
524
|
-
|
|
525
|
-
return html`
|
|
526
|
-
<div class="shared-disclaimer">
|
|
527
|
-
<h2>${i18nString(UIStrings.boostYourProductivity)}</h2>
|
|
528
|
-
<h3 class="disclaimer-list-header">${i18nString(UIStrings.thingsToConsider)}</h3>
|
|
529
|
-
<div class="disclaimer-list">
|
|
530
|
-
${bulletPoints.map(item => this.#renderSharedDisclaimerItem(item.icon, item.text))}
|
|
531
|
-
</div>
|
|
532
|
-
</div>
|
|
533
|
-
`;
|
|
534
|
-
}
|
|
535
|
-
|
|
536
|
-
#renderSettingItem(settingItem: SettingItem): Lit.TemplateResult {
|
|
537
|
-
// Disabled until https://crbug.com/1079231 is fixed.
|
|
538
|
-
// clang-format off
|
|
539
|
-
return html`
|
|
540
|
-
<div>
|
|
541
|
-
<devtools-icon class="extra-large" .name=${settingItem.iconName}>
|
|
542
|
-
</devtools-icon>
|
|
543
|
-
</div>
|
|
544
|
-
<div class="padded">${settingItem.text}</div>
|
|
545
|
-
`;
|
|
546
|
-
// clang-format on
|
|
547
|
-
}
|
|
548
|
-
|
|
549
|
-
#renderSetting(setting: Common.Settings.Setting<boolean>): Lit.LitTemplate {
|
|
550
|
-
const settingData = this.#settingToParams.get(setting);
|
|
551
|
-
if (!settingData) {
|
|
552
|
-
return Lit.nothing;
|
|
553
|
-
}
|
|
554
|
-
const disabledReasons = AiAssistanceModel.AiUtils.getDisabledReasons(this.#aidaAvailability);
|
|
555
|
-
const isDisabled = disabledReasons.length > 0;
|
|
556
|
-
const disabledReasonsJoined = disabledReasons.join('\n') || undefined;
|
|
557
|
-
const detailsClasses = {
|
|
558
|
-
'whole-row': true,
|
|
559
|
-
open: settingData.settingExpandState.isSettingExpanded,
|
|
560
|
-
};
|
|
561
|
-
const tabindex = settingData.settingExpandState.isSettingExpanded ? '0' : '-1';
|
|
562
|
-
|
|
563
|
-
// Disabled until https://crbug.com/1079231 is fixed.
|
|
564
|
-
// clang-format off
|
|
565
|
-
return html`
|
|
566
|
-
<div class="accordion-header" @click=${this.#expandSetting.bind(this, setting)}>
|
|
567
|
-
<div class="icon-container centered">
|
|
568
|
-
<devtools-icon name=${settingData.iconName}></devtools-icon>
|
|
569
|
-
</div>
|
|
570
|
-
<div class="setting-card">
|
|
571
|
-
<h2>${settingData.settingName}</h2>
|
|
572
|
-
<div class="setting-description">${settingData.settingDescription}</div>
|
|
573
|
-
</div>
|
|
574
|
-
<div class="dropdown centered">
|
|
575
|
-
<devtools-button
|
|
576
|
-
.data=${{
|
|
577
|
-
title: settingData.settingExpandState.isSettingExpanded ? i18nString(UIStrings.showLess) : i18nString(UIStrings.showMore),
|
|
578
|
-
size: Buttons.Button.Size.SMALL,
|
|
579
|
-
iconName: settingData.settingExpandState.isSettingExpanded ? 'chevron-up' : 'chevron-down',
|
|
580
|
-
variant: Buttons.Button.Variant.ICON,
|
|
581
|
-
jslogContext: settingData.settingExpandState.expandSettingJSLogContext,
|
|
582
|
-
} as Buttons.Button.ButtonData}
|
|
583
|
-
></devtools-button>
|
|
584
|
-
</div>
|
|
585
|
-
</div>
|
|
586
|
-
<div class="divider"></div>
|
|
587
|
-
<div class="toggle-container centered"
|
|
588
|
-
title=${ifDefined(disabledReasonsJoined)}
|
|
589
|
-
@click=${this.#toggleSetting.bind(this, setting)}
|
|
590
|
-
>
|
|
591
|
-
<devtools-switch
|
|
592
|
-
.checked=${Boolean(setting.get()) && !isDisabled}
|
|
593
|
-
.jslogContext=${setting.name || ''}
|
|
594
|
-
.disabled=${isDisabled}
|
|
595
|
-
.label=${disabledReasonsJoined || settingData.enableSettingText}
|
|
596
|
-
data-testid=${settingData.enableSettingText}
|
|
597
|
-
@switchchange=${this.#toggleSetting.bind(this, setting)}
|
|
598
|
-
></devtools-switch>
|
|
599
|
-
</div>
|
|
600
|
-
<div class=${classMap(detailsClasses)}>
|
|
601
|
-
<div class="overflow-hidden">
|
|
602
|
-
<div class="expansion-grid">
|
|
603
|
-
<h3 class="expansion-grid-whole-row">${i18nString(UIStrings.whenOn)}</h3>
|
|
604
|
-
${settingData.settingItems.map(item => this.#renderSettingItem(item))}
|
|
605
|
-
<h3 class="expansion-grid-whole-row">${i18nString(UIStrings.thingsToConsider)}</h3>
|
|
606
|
-
${settingData.toConsiderSettingItems.map(item => this.#renderSettingItem(item))}
|
|
607
|
-
<div class="expansion-grid-whole-row">
|
|
608
|
-
<x-link
|
|
609
|
-
href=${settingData.learnMoreLink.url}
|
|
610
|
-
class="link"
|
|
611
|
-
tabindex=${tabindex}
|
|
612
|
-
jslog=${VisualLogging.link(settingData.learnMoreLink.linkJSLogContext).track({
|
|
613
|
-
click: true,
|
|
614
|
-
})}
|
|
615
|
-
>${i18nString(UIStrings.learnMore)}</x-link>
|
|
616
|
-
</div>
|
|
617
|
-
</div>
|
|
618
|
-
</div>
|
|
619
|
-
</div>
|
|
620
|
-
`;
|
|
621
|
-
// clang-format on
|
|
622
|
-
}
|
|
623
|
-
|
|
624
|
-
#renderDisabledExplainer(disabledReasons: string[]): Lit.LitTemplate {
|
|
625
|
-
// Disabled until https://crbug.com/1079231 is fixed.
|
|
626
|
-
// clang-format off
|
|
627
|
-
return html`
|
|
628
|
-
<div class="disabled-explainer">
|
|
629
|
-
${disabledReasons.map(reason => html`
|
|
630
|
-
<div class="disabled-explainer-row">
|
|
631
|
-
<devtools-icon name="warning" class="medium" style="color: var(--icon-warning);">
|
|
632
|
-
</devtools-icon>
|
|
633
|
-
${reason}
|
|
634
|
-
</div>
|
|
635
|
-
`)}
|
|
636
|
-
</div>
|
|
637
|
-
`;
|
|
638
|
-
// clang-format on
|
|
639
|
-
}
|
|
640
|
-
|
|
641
|
-
override async render(): Promise<void> {
|
|
642
|
-
const disabledReasons = AiAssistanceModel.AiUtils.getDisabledReasons(this.#aidaAvailability);
|
|
643
|
-
|
|
644
|
-
// Disabled until https://crbug.com/1079231 is fixed.
|
|
645
|
-
// clang-format off
|
|
646
|
-
Lit.render(html`
|
|
647
|
-
<style>${Input.checkboxStyles}</style>
|
|
648
|
-
<style>${aiSettingsTabStyles}</style>
|
|
649
|
-
<div class="settings-container-wrapper" jslog=${VisualLogging.pane('chrome-ai')}>
|
|
650
|
-
${this.#renderSharedDisclaimer()}
|
|
651
|
-
${this.#settingToParams.size > 0 ? html`
|
|
652
|
-
${disabledReasons.length ? this.#renderDisabledExplainer(disabledReasons) : Lit.nothing}
|
|
653
|
-
<div class="settings-container">
|
|
654
|
-
${this.#settingToParams.keys().map(setting => this.#renderSetting(setting))}
|
|
655
|
-
</div>
|
|
656
|
-
` : Lit.nothing}
|
|
657
|
-
</div>
|
|
658
|
-
`, this.#shadow, {host: this});
|
|
659
|
-
// clang-format on
|
|
660
|
-
}
|
|
661
|
-
}
|
|
662
|
-
|
|
663
|
-
customElements.define('devtools-settings-ai-settings-tab', AISettingsTab);
|
|
664
|
-
|
|
665
|
-
declare global {
|
|
666
|
-
interface HTMLElementTagNameMap {
|
|
667
|
-
'devtools-settings-ai-settings-tab': AISettingsTab;
|
|
668
660
|
}
|
|
669
661
|
}
|
|
@@ -42,6 +42,11 @@ const UIStrings = {
|
|
|
42
42
|
* @description Link text in the settings pane to add another shortcut for an action
|
|
43
43
|
*/
|
|
44
44
|
addAShortcut: 'Add a shortcut',
|
|
45
|
+
/**
|
|
46
|
+
* @description Placeholder text in the settings pane when adding a new shortcut.
|
|
47
|
+
* Explaining that key strokes are going to be recoded.
|
|
48
|
+
*/
|
|
49
|
+
recordingKeys: 'Recoding keys',
|
|
45
50
|
/**
|
|
46
51
|
* @description Label for a button in the settings pane that confirms changes to a keyboard shortcut
|
|
47
52
|
*/
|
|
@@ -446,6 +451,7 @@ export class ShortcutListItem {
|
|
|
446
451
|
if (this.isEditing) {
|
|
447
452
|
const shortcutInput = shortcutElement.createChild('input', 'harmony-input');
|
|
448
453
|
shortcutInput.setAttribute('jslog', `${VisualLogging.textField().track({change: true})}`);
|
|
454
|
+
shortcutInput.setAttribute('placeholder', i18nString(UIStrings.recordingKeys));
|
|
449
455
|
shortcutInput.spellcheck = false;
|
|
450
456
|
shortcutInput.maxLength = 0;
|
|
451
457
|
this.shortcutInputs.set(shortcut, shortcutInput);
|
|
@@ -328,11 +328,9 @@ export class GenericSettingsTab extends UI.Widget.VBox implements SettingsTab {
|
|
|
328
328
|
|
|
329
329
|
private createExtensionSection(settings: Common.Settings.SettingRegistration[]): void {
|
|
330
330
|
const sectionName = Common.Settings.SettingCategory.EXTENSIONS;
|
|
331
|
-
const settingUI = Components.Linkifier.LinkHandlerSettingUI.instance()
|
|
331
|
+
const settingUI = Components.Linkifier.LinkHandlerSettingUI.instance();
|
|
332
332
|
const element = settingUI.settingElement();
|
|
333
|
-
|
|
334
|
-
this.createStandardSectionElement(sectionName, settings, element);
|
|
335
|
-
}
|
|
333
|
+
this.createStandardSectionElement(sectionName, settings, element);
|
|
336
334
|
}
|
|
337
335
|
|
|
338
336
|
private createSectionElement(
|
|
@@ -403,15 +401,13 @@ export class ExperimentsSettingsTab extends UI.Widget.VBox implements SettingsTa
|
|
|
403
401
|
render(
|
|
404
402
|
html`
|
|
405
403
|
<devtools-toolbar>
|
|
406
|
-
<devtools-toolbar-input type="filter" placeholder=${
|
|
404
|
+
<devtools-toolbar-input autofocus type="filter" placeholder=${
|
|
407
405
|
i18nString(UIStrings.searchExperiments)} style="flex-grow:1" @change=${
|
|
408
406
|
this.#onFilterChanged.bind(this)}></devtools-toolbar-input>
|
|
409
407
|
</devtools-toolbar>
|
|
410
408
|
`,
|
|
411
409
|
filterSection);
|
|
412
410
|
this.renderExperiments('');
|
|
413
|
-
const filter = filterSection.querySelector('devtools-toolbar-input') as HTMLElement;
|
|
414
|
-
this.setDefaultFocusedElement(filter);
|
|
415
411
|
}
|
|
416
412
|
|
|
417
413
|
#onFilterChanged(e: CustomEvent<string>): void {
|