Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 5 additions & 2 deletions packages/trace-viewer/src/ui/inspectorTab.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -27,10 +27,11 @@ import type { Language } from '@isomorphic/locatorGenerators';

export const InspectorTab: React.FunctionComponent<{
sdkLanguage: Language,
isInspecting: boolean,
setIsInspecting: (isInspecting: boolean) => void,
highlightedElement: HighlightedElement,
setHighlightedElement: (element: HighlightedElement) => void,
}> = ({ sdkLanguage, setIsInspecting, highlightedElement, setHighlightedElement }) => {
}> = ({ sdkLanguage, isInspecting, setIsInspecting, highlightedElement, setHighlightedElement }) => {
const [ariaSnapshotErrors, setAriaSnapshotErrors] = React.useState<SourceHighlight[]>();
const onAriaEditorChange = React.useCallback((ariaSnapshot: string) => {
const { errors } = parseAriaSnapshot(yaml, ariaSnapshot, { prettyErrors: false });
Expand All @@ -50,7 +51,9 @@ export const InspectorTab: React.FunctionComponent<{

return <div style={{ flex: 'auto', backgroundColor: 'var(--vscode-sideBar-background)', padding: '0 10px 10px 10px', overflow: 'auto' }}>
<div className='hbox' style={{ lineHeight: '28px', color: 'var(--vscode-editorCodeLens-foreground)' }}>
<div style={{ flex: 'auto' }}>Locator</div>
<div>Locator</div>
<ToolbarButton style={{ margin: '0 4px' }} title='Pick locator' icon='target' toggled={isInspecting} onClick={() => setIsInspecting(!isInspecting)} />
<div style={{ flex: 'auto' }}></div>
<ToolbarButton icon='files' title='Copy locator' onClick={() => {
copy(highlightedElement.locator || '');
}}></ToolbarButton>
Expand Down
1 change: 1 addition & 0 deletions packages/trace-viewer/src/ui/workbench.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -181,6 +181,7 @@ export const Workbench: React.FunctionComponent<{
title: 'Locator',
render: () => <InspectorTab
sdkLanguage={sdkLanguage}
isInspecting={isInspecting}
setIsInspecting={setIsInspecting}
highlightedElement={highlightedElement}
setHighlightedElement={setHighlightedElement} />,
Expand Down
Loading