Skip to content

Commit dfa0e8b

Browse files
committed
cherry-pick(#32905): chore: remove 'screenshot instead of snapshot' usages
1 parent 7155356 commit dfa0e8b

File tree

2 files changed

+4
-13
lines changed

2 files changed

+4
-13
lines changed

packages/trace-viewer/src/ui/snapshotTab.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ import type { ActionTraceEvent } from '@trace/trace';
2020
import { context, type MultiTraceModel, pageForAction, prevInList } from './modelUtil';
2121
import { Toolbar } from '@web/components/toolbar';
2222
import { ToolbarButton } from '@web/components/toolbarButton';
23-
import { clsx, useMeasure, useSetting } from '@web/uiUtils';
23+
import { clsx, useMeasure } from '@web/uiUtils';
2424
import { InjectedScript } from '@injected/injectedScript';
2525
import { Recorder } from '@injected/recorder/recorder';
2626
import ConsoleAPI from '@injected/consoleApi';
@@ -52,7 +52,7 @@ export const SnapshotTabsView: React.FunctionComponent<{
5252
openPage?: (url: string, target?: string) => Window | any,
5353
}> = ({ action, sdkLanguage, testIdAttributeName, isInspecting, setIsInspecting, highlightedLocator, setHighlightedLocator, openPage }) => {
5454
const [snapshotTab, setSnapshotTab] = React.useState<'action'|'before'|'after'>('action');
55-
const [showScreenshotInsteadOfSnapshot] = useSetting('screenshot-instead-of-snapshot', false);
55+
const showScreenshotInsteadOfSnapshot = false;
5656

5757
const snapshots = React.useMemo(() => {
5858
return collectSnapshots(action);

packages/trace-viewer/src/ui/workbench.tsx

Lines changed: 2 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,6 @@ import type { Entry } from '@trace/har';
4141
import './workbench.css';
4242
import { testStatusIcon, testStatusText } from './testUtils';
4343
import type { UITestStatus } from './testUtils';
44-
import { SettingsView } from './settingsView';
4544

4645
export const Workbench: React.FunctionComponent<{
4746
model?: modelUtil.MultiTraceModel,
@@ -69,7 +68,7 @@ export const Workbench: React.FunctionComponent<{
6968
const [highlightedLocator, setHighlightedLocator] = React.useState<string>('');
7069
const [selectedTime, setSelectedTime] = React.useState<Boundaries | undefined>();
7170
const [sidebarLocation, setSidebarLocation] = useSetting<'bottom' | 'right'>('propertiesSidebarLocation', 'bottom');
72-
const [showScreenshot, setShowScreenshot] = useSetting('screenshot-instead-of-snapshot', false);
71+
const showScreenshot = false;
7372

7473
const setSelectedAction = React.useCallback((action: modelUtil.ActionTraceEventInContext | undefined) => {
7574
setSelectedCallId(action?.callId);
@@ -310,13 +309,6 @@ export const Workbench: React.FunctionComponent<{
310309
title: 'Metadata',
311310
component: <MetadataView model={model}/>
312311
};
313-
const settingsTab: TabbedPaneTabModel = {
314-
id: 'settings',
315-
title: 'Settings',
316-
component: <SettingsView settings={[
317-
{ value: showScreenshot, set: setShowScreenshot, title: 'Show screenshot instead of snapshot' }
318-
]}/>,
319-
};
320312

321313
return <div className='vbox workbench' {...(inert ? { inert: 'true' } : {})}>
322314
{!hideTimeline && <Timeline
@@ -351,8 +343,7 @@ export const Workbench: React.FunctionComponent<{
351343
openPage={openPage} />}
352344
sidebar={
353345
<TabbedPane
354-
// Hide settings tab for now, it only includes screenshots as snapshots option which is not ready yet.
355-
tabs={(showSettings && false) ? [actionsTab, metadataTab, settingsTab] : [actionsTab, metadataTab]}
346+
tabs={[actionsTab, metadataTab]}
356347
selectedTab={selectedNavigatorTab}
357348
setSelectedTab={setSelectedNavigatorTab}
358349
/>

0 commit comments

Comments
 (0)