From 147b0fcd8216675946fae46240d2e3c6832d28cf Mon Sep 17 00:00:00 2001 From: Don McKenzie Date: Tue, 12 Nov 2024 10:50:07 -0500 Subject: [PATCH 1/3] feat: change version info from tooltip to contextual help component --- .../src/settings/SettingsMenu.scss | 1 + .../code-studio/src/settings/SettingsMenu.tsx | 50 ++++++++++--------- 2 files changed, 28 insertions(+), 23 deletions(-) diff --git a/packages/code-studio/src/settings/SettingsMenu.scss b/packages/code-studio/src/settings/SettingsMenu.scss index eff06753df..97f1c579e0 100644 --- a/packages/code-studio/src/settings/SettingsMenu.scss +++ b/packages/code-studio/src/settings/SettingsMenu.scss @@ -204,4 +204,5 @@ $settings-menu-z-index: $zindex-modal; grid-template-columns: auto auto; gap: $spacer-1 $spacer-3; text-align: left; + margin-bottom: $spacer-2; } diff --git a/packages/code-studio/src/settings/SettingsMenu.tsx b/packages/code-studio/src/settings/SettingsMenu.tsx index d715ccc0e7..5c56ce96b5 100644 --- a/packages/code-studio/src/settings/SettingsMenu.tsx +++ b/packages/code-studio/src/settings/SettingsMenu.tsx @@ -9,7 +9,6 @@ import { vsClose, vsWatch, vsRecordKeys, - vsInfo, vsLayers, vsPaintcan, dhUserIncognito, @@ -19,10 +18,12 @@ import { } from '@deephaven/icons'; import { Button, + ContextualHelp, + Heading, + Content, CopyButton, GLOBAL_SHORTCUTS, Logo, - Tooltip, } from '@deephaven/components'; import { type ServerConfigValues, type User, store } from '@deephaven/redux'; import { @@ -383,27 +384,30 @@ export class SettingsMenu extends Component<
Version
- {deephavenVersion} - -
- {Object.entries(versionInfo).map(([key, value]) => - getRow(key, value) - )} -
- `${key}: ${value}`) - .join('\n')} - > - Copy Versions - ({copyShortcut}) - -
+ {deephavenVersion} + + Version Info + +
+ {Object.entries(versionInfo).map(([key, value]) => + getRow(key, value) + )} +
+ `${key}: ${value}`) + .join('\n')} + > + Copy Versions + ({copyShortcut}) + +
+
From 688cf3786cde1d4030dfb12e7d550677c7ab6735 Mon Sep 17 00:00:00 2001 From: Don McKenzie Date: Tue, 12 Nov 2024 11:21:25 -0500 Subject: [PATCH 2/3] add python, groovy and clarifiy OS is UA reported --- packages/code-studio/src/settings/SettingsUtils.tsx | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/packages/code-studio/src/settings/SettingsUtils.tsx b/packages/code-studio/src/settings/SettingsUtils.tsx index a05da35448..f4ef082c45 100644 --- a/packages/code-studio/src/settings/SettingsUtils.tsx +++ b/packages/code-studio/src/settings/SettingsUtils.tsx @@ -49,13 +49,17 @@ export function getFormattedVersionInfo( Number(parseFloat(ua.browser.version ?? '')) || '' }`; const os = `${ua.os.name ?? ''} ${ua.os.version ?? ''}`; + const pythonVersion = serverConfigValues.get('python.version') ?? ''; return { 'Engine Version': serverConfigValues.get('deephaven.version') ?? 'Unknown', 'Web UI Version': import.meta.env.npm_package_version ?? 'Unknown', + // Python version is only available in python sessions + ...(pythonVersion !== '' ? { 'Python Version': pythonVersion } : {}), 'Java Version': serverConfigValues.get('java.version') ?? 'Unknown', + 'Groovy Version': serverConfigValues.get('groovy.version') ?? 'Unknown', 'Barrage Version': serverConfigValues.get('barrage.version') ?? 'Unknown', 'Browser Name': browser.trim() || 'Unknown', - 'OS Name': os.trim() || 'Unknown', + 'User Agent OS': os.trim() || 'Unknown', }; } From 89c56c537192f0dd49f144fa0a1f683c424c9cf8 Mon Sep 17 00:00:00 2001 From: Don McKenzie Date: Tue, 12 Nov 2024 11:39:21 -0500 Subject: [PATCH 3/3] look at us having tests and stuff --- packages/code-studio/src/settings/SettingsUtils.test.tsx | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/packages/code-studio/src/settings/SettingsUtils.test.tsx b/packages/code-studio/src/settings/SettingsUtils.test.tsx index 6786a42ddb..43430a8957 100644 --- a/packages/code-studio/src/settings/SettingsUtils.test.tsx +++ b/packages/code-studio/src/settings/SettingsUtils.test.tsx @@ -4,6 +4,8 @@ describe('getFormattedVersionInfo', () => { it('should return the formatted version information', () => { const serverConfigValues = new Map(); serverConfigValues.set('deephaven.version', '1.0.0'); + serverConfigValues.set('python.version', '3.9.7'); + serverConfigValues.set('groovy.version', '11.0.1'); serverConfigValues.set('java.version', '11.0.1'); serverConfigValues.set('barrage.version', '2.3.4'); @@ -20,10 +22,12 @@ describe('getFormattedVersionInfo', () => { expect(result).toEqual({ 'Engine Version': '1.0.0', 'Web UI Version': '0.0.1', + 'Python Version': '3.9.7', 'Java Version': '11.0.1', + 'Groovy Version': '11.0.1', 'Barrage Version': '2.3.4', 'Browser Name': 'Chrome 96', - 'OS Name': 'Windows NT 10.0', + 'User Agent OS': 'Windows NT 10.0', }); }); @@ -43,9 +47,10 @@ describe('getFormattedVersionInfo', () => { 'Engine Version': 'Unknown', 'Web UI Version': '0.0.1', 'Java Version': 'Unknown', + 'Groovy Version': 'Unknown', 'Barrage Version': 'Unknown', 'Browser Name': 'Unknown', - 'OS Name': 'Unknown', + 'User Agent OS': 'Unknown', }); }); });