Skip to content

Commit

Permalink
self review
Browse files Browse the repository at this point in the history
  • Loading branch information
mattseddon committed Mar 14, 2023
1 parent 593d968 commit a8f98f4
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 19 deletions.
9 changes: 0 additions & 9 deletions extension/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -399,11 +399,6 @@
"command": "dvc.showCommands",
"category": "DVC"
},
{
"title": "Open Studio Settings",
"command": "dvc.showStudioSettings",
"category": "DVC"
},
{
"title": "Show Experiments",
"command": "dvc.showExperiments",
Expand Down Expand Up @@ -814,10 +809,6 @@
"command": "dvc.stopQueuedExperiments",
"when": "dvc.commands.available && dvc.project.available"
},
{
"command": "dvc.showStudioSettings",
"when": "dvc.commands.available && dvc.project.available && dvc.studio.connected"
},
{
"command": "dvc.selectForCompare",
"when": "false"
Expand Down
2 changes: 1 addition & 1 deletion extension/src/setup/register.ts
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,6 @@ export const registerSetupCommands = (
}
)

registerSetupStudioCommands(setup, internalCommands)
registerSetupConfigCommands(setup, internalCommands)
registerSetupStudioCommands(setup, internalCommands)
}
10 changes: 5 additions & 5 deletions webview/src/setup/components/App.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import {
import React, { useCallback, useState } from 'react'
import { Experiments } from './Experiments'
import { Studio } from './Studio'
import { SectionContainer } from './SectionContainer'
import { SetupContainer } from './SetupContainer'
import { useVsCodeMessaging } from '../../shared/hooks/useVsCodeMessaging'
import { sendMessage } from '../../shared/vscode'

Expand Down Expand Up @@ -79,7 +79,7 @@ export const App: React.FC = () => {

return (
<>
<SectionContainer
<SetupContainer
sectionKey={Section.EXPERIMENTS}
title={'Experiments'}
sectionCollapsed={sectionCollapsed}
Expand All @@ -95,8 +95,8 @@ export const App: React.FC = () => {
projectInitialized={projectInitialized}
pythonBinPath={pythonBinPath}
/>
</SectionContainer>
<SectionContainer
</SetupContainer>
<SetupContainer
sectionKey={Section.STUDIO}
title={'Studio'}
sectionCollapsed={sectionCollapsed}
Expand All @@ -107,7 +107,7 @@ export const App: React.FC = () => {
shareLiveToStudio={shareLiveToStudio}
setShareLiveToStudio={setShareLiveToStudio}
/>
</SectionContainer>
</SetupContainer>
</>
)
}
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@ import {
Section
} from 'dvc/src/setup/webview/contract'
import React from 'react'
import { SectionContainer as SharedSectionContainer } from '../../shared/components/sectionContainer/SectionContainer'
import { SectionContainer } from '../../shared/components/sectionContainer/SectionContainer'

export const SectionContainer: React.FC<{
export const SetupContainer: React.FC<{
children: React.ReactNode
sectionCollapsed: typeof DEFAULT_SECTION_COLLAPSED
sectionKey: Section
Expand All @@ -18,7 +18,7 @@ export const SectionContainer: React.FC<{
setSectionCollapsed,
title
}) => (
<SharedSectionContainer
<SectionContainer
sectionCollapsed={sectionCollapsed[sectionKey]}
sectionKey={sectionKey}
title={title}
Expand All @@ -30,5 +30,5 @@ export const SectionContainer: React.FC<{
}
>
{children}
</SharedSectionContainer>
</SectionContainer>
)

0 comments on commit a8f98f4

Please sign in to comment.