From 514ea52b0bb5d9d5fbe010280ace25c3d33a0d1d Mon Sep 17 00:00:00 2001 From: Matt Seddon Date: Tue, 14 Mar 2023 12:41:27 +1100 Subject: [PATCH] self review --- extension/package.json | 9 --------- extension/src/setup/register.ts | 2 +- webview/src/setup/components/App.tsx | 10 +++++----- .../{SectionContainer.tsx => SetupContainer.tsx} | 8 ++++---- 4 files changed, 10 insertions(+), 19 deletions(-) rename webview/src/setup/components/{SectionContainer.tsx => SetupContainer.tsx} (75%) diff --git a/extension/package.json b/extension/package.json index 2a842fea82..b8bb435266 100644 --- a/extension/package.json +++ b/extension/package.json @@ -399,11 +399,6 @@ "command": "dvc.showCommands", "category": "DVC" }, - { - "title": "Open Studio Settings", - "command": "dvc.showStudioSettings", - "category": "DVC" - }, { "title": "Show Experiments", "command": "dvc.showExperiments", @@ -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" diff --git a/extension/src/setup/register.ts b/extension/src/setup/register.ts index 1087ac6097..756e1ebaab 100644 --- a/extension/src/setup/register.ts +++ b/extension/src/setup/register.ts @@ -66,6 +66,6 @@ export const registerSetupCommands = ( } ) - registerSetupStudioCommands(setup, internalCommands) registerSetupConfigCommands(setup, internalCommands) + registerSetupStudioCommands(setup, internalCommands) } diff --git a/webview/src/setup/components/App.tsx b/webview/src/setup/components/App.tsx index 1d1b86474e..b733b04e6a 100644 --- a/webview/src/setup/components/App.tsx +++ b/webview/src/setup/components/App.tsx @@ -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' @@ -79,7 +79,7 @@ export const App: React.FC = () => { return ( <> - { projectInitialized={projectInitialized} pythonBinPath={pythonBinPath} /> - - + { shareLiveToStudio={shareLiveToStudio} setShareLiveToStudio={setShareLiveToStudio} /> - + ) } diff --git a/webview/src/setup/components/SectionContainer.tsx b/webview/src/setup/components/SetupContainer.tsx similarity index 75% rename from webview/src/setup/components/SectionContainer.tsx rename to webview/src/setup/components/SetupContainer.tsx index 26817b2c75..c2f5b781c4 100644 --- a/webview/src/setup/components/SectionContainer.tsx +++ b/webview/src/setup/components/SetupContainer.tsx @@ -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 @@ -18,7 +18,7 @@ export const SectionContainer: React.FC<{ setSectionCollapsed, title }) => ( - {children} - + )