chore: add excludeSidebarTabs

This commit is contained in:
Rui Figueira 2024-09-15 01:30:52 +01:00
parent a55a2d933c
commit 4538a82078
2 changed files with 4 additions and 3 deletions

View file

@ -91,7 +91,7 @@ export const IDEModeView: React.FunctionComponent = () => {
<div className='progress'>
<div className='inner-progress' style={{ width: progress.total ? (100 * progress.done / progress.total) + '%' : 0 }}></div>
</div>
<Workbench model={model} onSelectionChanged={selectionChanged} showSettings />
<Workbench model={model} onSelectionChanged={selectionChanged} showSettings excludeSidebarTabs={['source']} />
{!traceURLs.length && <div className='empty-state'>
<div className='title'>Select test to see the trace</div>
</div>}

View file

@ -59,7 +59,8 @@ export const Workbench: React.FunctionComponent<{
onOpenExternally?: (location: modelUtil.SourceLocation) => void,
revealSource?: boolean,
showSettings?: boolean,
}> = ({ model, showSourcesFirst, rootDir, fallbackLocation, initialSelection, onSelectionChanged, isLive, status, annotations, inert, openPage, onOpenExternally, revealSource, showSettings }) => {
excludeSidebarTabs?: string[]
}> = ({ model, showSourcesFirst, rootDir, fallbackLocation, initialSelection, onSelectionChanged, isLive, status, annotations, inert, openPage, onOpenExternally, revealSource, showSettings, excludeSidebarTabs }) => {
const [selectedAction, setSelectedActionImpl] = React.useState<modelUtil.ActionTraceEventInContext | undefined>(undefined);
const [revealedStack, setRevealedStack] = React.useState<StackFrame[] | undefined>(undefined);
const [highlightedAction, setHighlightedAction] = React.useState<modelUtil.ActionTraceEventInContext | undefined>();
@ -347,7 +348,7 @@ export const Workbench: React.FunctionComponent<{
}
/>}
sidebar={<TabbedPane
tabs={tabs}
tabs={excludeSidebarTabs ? tabs.filter(t => !excludeSidebarTabs.includes(t.id)) : tabs}
selectedTab={selectedPropertiesTab}
setSelectedTab={selectPropertiesTab}
rightToolbar={[