From 57d94d2d449f1b58c27e5efb57707ce74f37b772 Mon Sep 17 00:00:00 2001 From: Andrew Pareles Date: Fri, 30 May 2025 00:54:59 -0700 Subject: [PATCH] fix spacing issues and make scroll whole settings page --- .../react/src/void-settings-tsx/Settings.tsx | 122 +++++++++--------- 1 file changed, 59 insertions(+), 63 deletions(-) diff --git a/src/vs/workbench/contrib/void/browser/react/src/void-settings-tsx/Settings.tsx b/src/vs/workbench/contrib/void/browser/react/src/void-settings-tsx/Settings.tsx index 6ae26df6..eeae0c09 100644 --- a/src/vs/workbench/contrib/void/browser/react/src/void-settings-tsx/Settings.tsx +++ b/src/vs/workbench/contrib/void/browser/react/src/void-settings-tsx/Settings.tsx @@ -22,7 +22,7 @@ import { TransferEditorType, TransferFilesInfo } from '../../../extensionTransfe // ───────────────────────────────────────────── // Sidebar navigation helpers // ───────────────────────────────────────────── -type SectionKey = +type Tab = | 'models' | 'localProviders' | 'providers' @@ -912,17 +912,17 @@ export const Settings = () => { const isDark = useIsDark() // ─── sidebar nav ────────────────────────── const [selectedSection, setSelectedSection] = - useState('models'); + useState('models'); - const navItems: { key: SectionKey; label: string }[] = [ - { key: 'models', label: 'Models' }, - { key: 'localProviders', label: 'Local Providers' }, - { key: 'providers', label: 'Providers' }, - { key: 'featureOptions', label: 'Feature Options' }, - { key: 'general', label: 'General' }, - { key: 'all', label: 'All Settings' }, + const navItems: { tab: Tab; label: string }[] = [ + { tab: 'models', label: 'Models' }, + { tab: 'localProviders', label: 'Local Providers' }, + { tab: 'providers', label: 'Other Providers' }, + { tab: 'featureOptions', label: 'Feature Options' }, + { tab: 'general', label: 'General' }, + { tab: 'all', label: 'All Settings' }, ]; - const show = (key: SectionKey) => selectedSection === 'all' || selectedSection === key; + const shouldShowTab = (tab: Tab) => selectedSection === 'all' || selectedSection === tab; const accessor = useAccessor() const commandService = accessor.get('ICommandService') const environmentService = accessor.get('IEnvironmentService') @@ -997,27 +997,27 @@ export const Settings = () => { return ( -
-
+
+
{/* ────────────── SIDEBAR ────────────── */} -