From 65bef89b18420050308141893f7ad4134bda6892 Mon Sep 17 00:00:00 2001 From: julieg18 Date: Thu, 15 Jun 2023 12:36:04 -0500 Subject: [PATCH 1/6] Point users to Python extension in DVC Setup --- .../setup/components/dvc/CliUnavailable.tsx | 53 +++++++++++++++---- .../components/remotes/ShowExtension.tsx | 14 ++--- .../setup/components/shared/ExtensionLink.tsx | 24 +++++++++ 3 files changed, 71 insertions(+), 20 deletions(-) create mode 100644 webview/src/setup/components/shared/ExtensionLink.tsx diff --git a/webview/src/setup/components/dvc/CliUnavailable.tsx b/webview/src/setup/components/dvc/CliUnavailable.tsx index bb90afc650..5047eb2469 100644 --- a/webview/src/setup/components/dvc/CliUnavailable.tsx +++ b/webview/src/setup/components/dvc/CliUnavailable.tsx @@ -10,6 +10,28 @@ import { updatePythonEnvironment } from '../../util/messages' import { Warning } from '../../../shared/components/icons' +import { ExtensionLink } from '../shared/ExtensionLink' +import Tooltip from '../../../shared/components/tooltip/Tooltip' + +const PythonExtensionTooltip: React.FC< + PropsWithChildren<{ disabled: boolean }> +> = ({ disabled, children }) => ( + + Install the{' '} + + Python extension + + . + + } + interactive={true} + disabled={disabled} + > + {children} + +) export const CliUnavailable: React.FC = ({ children }) => { const { pythonBinPath, isPythonExtensionUsed, isPythonEnvironmentGlobal } = @@ -35,21 +57,17 @@ export const CliUnavailable: React.FC = ({ children }) => { )} .

-
-
) : ( <>

{installationSentence} DVC & DVCLive cannot be auto-installed as Python - was not located. + was not located. Install the{' '} + + Python extension + {' '} + to detect or create python environments.

-