From dfa0e8bf356e8d9ff636e4bb239c6a648822cb85 Mon Sep 17 00:00:00 2001 From: Max Schmitt Date: Tue, 1 Oct 2024 18:38:59 +0200 Subject: [PATCH] cherry-pick(#32905): chore: remove 'screenshot instead of snapshot' usages --- packages/trace-viewer/src/ui/snapshotTab.tsx | 4 ++-- packages/trace-viewer/src/ui/workbench.tsx | 13 ++----------- 2 files changed, 4 insertions(+), 13 deletions(-) diff --git a/packages/trace-viewer/src/ui/snapshotTab.tsx b/packages/trace-viewer/src/ui/snapshotTab.tsx index b845c60cd5..82e4282c6f 100644 --- a/packages/trace-viewer/src/ui/snapshotTab.tsx +++ b/packages/trace-viewer/src/ui/snapshotTab.tsx @@ -20,7 +20,7 @@ import type { ActionTraceEvent } from '@trace/trace'; import { context, type MultiTraceModel, pageForAction, prevInList } from './modelUtil'; import { Toolbar } from '@web/components/toolbar'; import { ToolbarButton } from '@web/components/toolbarButton'; -import { clsx, useMeasure, useSetting } from '@web/uiUtils'; +import { clsx, useMeasure } from '@web/uiUtils'; import { InjectedScript } from '@injected/injectedScript'; import { Recorder } from '@injected/recorder/recorder'; import ConsoleAPI from '@injected/consoleApi'; @@ -52,7 +52,7 @@ export const SnapshotTabsView: React.FunctionComponent<{ openPage?: (url: string, target?: string) => Window | any, }> = ({ action, sdkLanguage, testIdAttributeName, isInspecting, setIsInspecting, highlightedLocator, setHighlightedLocator, openPage }) => { const [snapshotTab, setSnapshotTab] = React.useState<'action'|'before'|'after'>('action'); - const [showScreenshotInsteadOfSnapshot] = useSetting('screenshot-instead-of-snapshot', false); + const showScreenshotInsteadOfSnapshot = false; const snapshots = React.useMemo(() => { return collectSnapshots(action); diff --git a/packages/trace-viewer/src/ui/workbench.tsx b/packages/trace-viewer/src/ui/workbench.tsx index 5a5d285d11..8f8206170a 100644 --- a/packages/trace-viewer/src/ui/workbench.tsx +++ b/packages/trace-viewer/src/ui/workbench.tsx @@ -41,7 +41,6 @@ import type { Entry } from '@trace/har'; import './workbench.css'; import { testStatusIcon, testStatusText } from './testUtils'; import type { UITestStatus } from './testUtils'; -import { SettingsView } from './settingsView'; export const Workbench: React.FunctionComponent<{ model?: modelUtil.MultiTraceModel, @@ -69,7 +68,7 @@ export const Workbench: React.FunctionComponent<{ const [highlightedLocator, setHighlightedLocator] = React.useState(''); const [selectedTime, setSelectedTime] = React.useState(); const [sidebarLocation, setSidebarLocation] = useSetting<'bottom' | 'right'>('propertiesSidebarLocation', 'bottom'); - const [showScreenshot, setShowScreenshot] = useSetting('screenshot-instead-of-snapshot', false); + const showScreenshot = false; const setSelectedAction = React.useCallback((action: modelUtil.ActionTraceEventInContext | undefined) => { setSelectedCallId(action?.callId); @@ -310,13 +309,6 @@ export const Workbench: React.FunctionComponent<{ title: 'Metadata', component: }; - const settingsTab: TabbedPaneTabModel = { - id: 'settings', - title: 'Settings', - component: , - }; return
{!hideTimeline && } sidebar={