diff --git a/packages/trace-viewer/src/ui/inspectorTab.tsx b/packages/trace-viewer/src/ui/inspectorTab.tsx index ba37cf1bd1..7b3a90b709 100644 --- a/packages/trace-viewer/src/ui/inspectorTab.tsx +++ b/packages/trace-viewer/src/ui/inspectorTab.tsx @@ -17,7 +17,7 @@ import { CodeMirrorWrapper } from '@web/components/codeMirrorWrapper'; import type { Language } from '@web/components/codeMirrorWrapper'; import { ToolbarButton } from '@web/components/toolbarButton'; -import { copy, useSetting } from '@web/uiUtils'; +import { copy } from '@web/uiUtils'; import * as React from 'react'; import './sourceTab.css'; @@ -27,12 +27,10 @@ export const InspectorTab: React.FunctionComponent<{ highlightedLocator: string, setHighlightedLocator: (locator: string) => void, }> = ({ sdkLanguage, setIsInspecting, highlightedLocator, setHighlightedLocator }) => { - const [showScreenshot] = useSetting('screenshot-instead-of-snapshot', false); - return
Locator
- { + { // Updating text needs to go first - react can squeeze a render between the state updates. setHighlightedLocator(text); setIsInspecting(false); diff --git a/packages/trace-viewer/src/ui/snapshotTab.tsx b/packages/trace-viewer/src/ui/snapshotTab.tsx index 229d9f8cef..835dcbebda 100644 --- a/packages/trace-viewer/src/ui/snapshotTab.tsx +++ b/packages/trace-viewer/src/ui/snapshotTab.tsx @@ -202,7 +202,7 @@ export const SnapshotTab: React.FunctionComponent<{ iframe={iframeRef1.current} iteration={loadingRef.current.iteration} /> - setIsInspecting(!isInspecting)} disabled={showScreenshotInsteadOfSnapshot} /> + setIsInspecting(!isInspecting)} /> {['action', 'before', 'after'].map(tab => { return ; })}
- { + { if (!openPage) openPage = window.open; const win = openPage(popoutUrl || '', '_blank'); @@ -230,10 +230,9 @@ export const SnapshotTab: React.FunctionComponent<{ transform: `translate(${translate.x}px, ${translate.y}px) scale(${scale})`, }}> - {(showScreenshotInsteadOfSnapshot && screencastFrame) && {`Screenshot ${renderTitle(snapshotTab)}`} src={`sha1/${screencastFrame.sha1}`} width={screencastFrame.width} height={screencastFrame.height} />} -
- - +
+ +