diff --git a/news/2 Fixes/13543.md b/news/2 Fixes/13543.md new file mode 100644 index 000000000000..a28d14c7a03e --- /dev/null +++ b/news/2 Fixes/13543.md @@ -0,0 +1 @@ +Added tooltip to indicate status of server connection diff --git a/package.nls.json b/package.nls.json index 53bb5b2a73d0..2c096738b27d 100644 --- a/package.nls.json +++ b/package.nls.json @@ -179,6 +179,8 @@ "DataScience.connectingToJupyter": "Connecting to Jupyter server", "DataScience.connectingToIPyKernel": "Connecting to IPython kernel", "DataScience.connectedToIPyKernel": "Connected.", + "DataScience.connected": "Connected", + "DataScience.disconnected": "Disconnected", "Experiments.inGroup": "User belongs to experiment group '{0}'", "Interpreters.RefreshingInterpreters": "Refreshing Python Interpreters", "Interpreters.entireWorkspace": "Entire workspace", diff --git a/src/client/common/utils/localize.ts b/src/client/common/utils/localize.ts index 4f4c278f2ea9..f5027fa2d2da 100644 --- a/src/client/common/utils/localize.ts +++ b/src/client/common/utils/localize.ts @@ -1106,6 +1106,8 @@ export namespace DataScience { 'DataScience.previewNotebookOnlySupportedInVSCInsiders', 'The Preview Notebook Editor is supported only in the Insiders version of Visual Studio Code.' ); + export const connected = localize('DataScience.connected', 'Connected'); + export const disconnected = localize('DataScience.disconnected', 'Disconnected'); } export namespace StartPage { diff --git a/src/datascience-ui/interactive-common/jupyterInfo.tsx b/src/datascience-ui/interactive-common/jupyterInfo.tsx index be4fa975691d..441f477f255b 100644 --- a/src/datascience-ui/interactive-common/jupyterInfo.tsx +++ b/src/datascience-ui/interactive-common/jupyterInfo.tsx @@ -61,6 +61,7 @@ export class JupyterInfo extends React.Component { baseTheme={this.props.baseTheme} class="image-button-image kernel-status-icon" image={this.getIcon()} + title={this.getStatus()} />
@@ -113,4 +114,10 @@ export class JupyterInfo extends React.Component { ? ImageName.JupyterServerDisconnected : ImageName.JupyterServerConnected; } + + private getStatus() { + return this.props.kernel.jupyterServerStatus === ServerStatus.NotStarted + ? getLocString('DataScience.disconnected', 'Disconnected') + : getLocString('DataScience.connected', 'Connected'); + } } diff --git a/src/datascience-ui/react-common/image.tsx b/src/datascience-ui/react-common/image.tsx index 740e6aa5d66d..40b09332a062 100644 --- a/src/datascience-ui/react-common/image.tsx +++ b/src/datascience-ui/react-common/image.tsx @@ -238,6 +238,7 @@ interface IImageProps { baseTheme: string; image: ImageName; class: string; + title?: string; } export class Image extends React.Component { @@ -249,6 +250,6 @@ export class Image extends React.Component { const key = ImageName[this.props.image].toString(); const image = images.hasOwnProperty(key) ? images[key] : images.Cancel; // Default is cancel. const source = this.props.baseTheme.includes('dark') ? image.dark : image.light; - return ; + return ; } }