From 324a8cd4cf9a09e1c120db7c661392c911996471 Mon Sep 17 00:00:00 2001 From: Siddhant Rai Date: Fri, 20 Mar 2026 17:10:27 +0530 Subject: [PATCH 1/8] refactor: update styles and improve accessibility across frontend - Updated text colors to use foreground and muted-foreground for better contrast. - Replaced hardcoded colors with theme-based classes for consistency. - Enhanced input fields with icons for improved usability. - Adjusted button styles for a more cohesive design. - Refactored search input components to use consistent styling and layout. - Improved layout and spacing in various components for better user experience. - Updated tool and source titles and subtitles for clarity. --- frontend/src/App.tsx | 2 +- frontend/src/Hero.tsx | 8 +- frontend/src/Navigation.tsx | 44 +-- frontend/src/PageNotFound.tsx | 4 +- frontend/src/agents/AgentCard.tsx | 8 +- frontend/src/agents/AgentLogs.tsx | 10 +- frontend/src/agents/AgentPreview.tsx | 2 +- frontend/src/agents/AgentsList.tsx | 36 +- frontend/src/agents/FolderCard.tsx | 8 +- frontend/src/agents/NewAgent.tsx | 96 +++-- frontend/src/agents/SharedAgent.tsx | 6 +- frontend/src/agents/SharedAgentCard.tsx | 14 +- frontend/src/agents/WorkflowBuilder.tsx | 54 +-- .../src/agents/components/AgentTypeModal.tsx | 16 +- .../src/agents/workflow/WorkflowBuilder.tsx | 100 +++--- .../src/agents/workflow/WorkflowPreview.tsx | 20 +- .../workflow/components/MobileBlocker.tsx | 8 +- .../workflow/components/PromptTextArea.tsx | 16 +- .../src/agents/workflow/nodes/BaseNode.tsx | 10 +- .../agents/workflow/nodes/ConditionNode.tsx | 12 +- frontend/src/agents/workflow/nodes/index.tsx | 2 +- frontend/src/components/Accordion.tsx | 2 +- frontend/src/components/ActionButtons.tsx | 4 +- frontend/src/components/ArtifactSidebar.tsx | 37 +- frontend/src/components/Chunks.tsx | 92 ++--- frontend/src/components/ConnectorAuth.tsx | 2 +- frontend/src/components/ConnectorTree.tsx | 20 +- frontend/src/components/ContextMenu.tsx | 6 +- frontend/src/components/CopyButton.tsx | 2 +- .../src/components/DocumentPagination.tsx | 10 +- frontend/src/components/Dropdown.tsx | 330 ++++++++++-------- frontend/src/components/DropdownMenu.tsx | 8 +- frontend/src/components/DropdownModel.tsx | 14 +- frontend/src/components/FilePicker.tsx | 14 +- .../src/components/FileSelectionSkeleton.tsx | 2 +- frontend/src/components/FileTree.tsx | 18 +- frontend/src/components/FileUpload.tsx | 4 +- frontend/src/components/GoogleDrivePicker.tsx | 2 +- frontend/src/components/Help.tsx | 8 +- frontend/src/components/Input.tsx | 12 +- frontend/src/components/MermaidRenderer.tsx | 31 +- frontend/src/components/MessageInput.tsx | 32 +- frontend/src/components/MultiSelectPopup.tsx | 12 +- frontend/src/components/Notification.tsx | 2 +- .../src/components/SearchableDropdown.tsx | 271 -------------- frontend/src/components/SettingsBar.tsx | 12 +- frontend/src/components/Sidebar.tsx | 4 +- frontend/src/components/SkeletonLoader.tsx | 12 +- frontend/src/components/SourcesPopup.tsx | 20 +- frontend/src/components/Table.tsx | 10 +- .../src/components/TextToSpeechButton.tsx | 4 +- frontend/src/components/ToggleSwitch.tsx | 2 +- frontend/src/components/ToolsPopup.tsx | 12 +- frontend/src/components/UploadToast.tsx | 32 +- .../src/components/types/Dropdown.types.ts | 45 --- frontend/src/components/ui/input.tsx | 4 +- frontend/src/components/ui/multi-select.tsx | 10 +- frontend/src/components/ui/select.tsx | 8 +- frontend/src/conversation/Conversation.tsx | 2 +- .../src/conversation/ConversationBubble.tsx | 96 ++--- .../src/conversation/ConversationMessages.tsx | 4 +- .../src/conversation/ConversationTile.tsx | 10 +- .../src/conversation/SharedConversation.tsx | 12 +- frontend/src/index.css | 122 +++---- frontend/src/locale/de.json | 4 + frontend/src/locale/en.json | 4 + frontend/src/locale/es.json | 4 + frontend/src/locale/jp.json | 4 + frontend/src/locale/ru.json | 4 + frontend/src/locale/zh-TW.json | 4 + frontend/src/locale/zh.json | 4 + frontend/src/modals/AddActionModal.tsx | 8 +- frontend/src/modals/AddToolModal.tsx | 8 +- frontend/src/modals/AgentDetailsModal.tsx | 31 +- frontend/src/modals/ConfigToolModal.tsx | 6 +- frontend/src/modals/ConfirmationModal.tsx | 8 +- frontend/src/modals/FolderManagementModal.tsx | 8 +- frontend/src/modals/ImportSpecModal.tsx | 28 +- frontend/src/modals/JWTModal.tsx | 4 +- frontend/src/modals/MCPServerModal.tsx | 12 +- frontend/src/modals/MoveToFolderModal.tsx | 34 +- .../src/modals/ShareConversationModal.tsx | 12 +- frontend/src/modals/WrapperModal.tsx | 4 +- frontend/src/preferences/PromptsModal.tsx | 30 +- frontend/src/settings/Analytics.tsx | 22 +- frontend/src/settings/General.tsx | 19 +- frontend/src/settings/Logs.tsx | 26 +- frontend/src/settings/Prompts.tsx | 12 +- frontend/src/settings/Sources.tsx | 30 +- frontend/src/settings/ToolConfig.tsx | 140 +++----- frontend/src/settings/Tools.tsx | 52 ++- frontend/src/settings/index.tsx | 2 +- frontend/src/upload/Upload.tsx | 28 +- 93 files changed, 1054 insertions(+), 1330 deletions(-) delete mode 100644 frontend/src/components/SearchableDropdown.tsx delete mode 100644 frontend/src/components/types/Dropdown.types.ts diff --git a/frontend/src/App.tsx b/frontend/src/App.tsx index ec50b83d..7e2b2ad8 100644 --- a/frontend/src/App.tsx +++ b/frontend/src/App.tsx @@ -37,7 +37,7 @@ function MainLayout() { const [navOpen, setNavOpen] = useState(!(isMobile || isTablet)); return ( -
+
; return ( -
+
{/* Header Section */}
-
+
DocsGPT docsgpt
@@ -44,9 +44,9 @@ export default function Hero({ )} -
+
DocsGPT
@@ -338,7 +338,7 @@ export default function Navigation({ navOpen, setNavOpen }: NavigationProps) { ref={navRef} className={`${ !navOpen && '-ml-96 md:-ml-72' - } bg-lotion dark:border-r-purple-taupe dark:bg-chinese-black fixed top-0 z-20 flex h-full w-72 flex-col border-r border-b-0 transition-all duration-300 ease-in-out dark:text-white`} + } bg-sidebar dark:border-r-sidebar-border fixed top-0 z-20 flex h-full w-72 flex-col border-r border-b-0 transition-all duration-300 ease-in-out dark:text-white`} >
`${ isActive ? 'bg-transparent' : '' - } group border-silver hover:border-rainy-gray dark:border-purple-taupe sticky mx-4 mt-4 flex cursor-pointer gap-2.5 rounded-3xl border p-3 hover:bg-transparent dark:text-white` + } group border-sidebar-border hover:border-sidebar-border sticky mx-4 mt-4 flex cursor-pointer gap-2.5 rounded-3xl border p-3 hover:bg-transparent dark:text-white` } > Create new chat -

+

{t('newChat')}

@@ -417,9 +417,9 @@ export default function Navigation({ navOpen, setNavOpen }: NavigationProps) { {recentAgents.map((agent, idx) => (
handleAgentClick(agent)} @@ -432,7 +432,7 @@ export default function Navigation({ navOpen, setNavOpen }: NavigationProps) { className="h-6 w-6 rounded-full object-contain" />
-

+

{agent.name}

@@ -456,7 +456,7 @@ export default function Navigation({ navOpen, setNavOpen }: NavigationProps) { ))}
{ dispatch(setSelectedAgent(null)); if (isMobile || isTablet) { @@ -472,7 +472,7 @@ export default function Navigation({ navOpen, setNavOpen }: NavigationProps) { className="h-[18px] w-[18px]" />
-

+

{t('manageAgents')}

@@ -480,7 +480,7 @@ export default function Navigation({ navOpen, setNavOpen }: NavigationProps) {
) : (
{ if (isMobile || isTablet) { setNavOpen(false); @@ -496,7 +496,7 @@ export default function Navigation({ navOpen, setNavOpen }: NavigationProps) { className="h-[18px] w-[18px]" />
-

+

{t('manageAgents')}

@@ -529,8 +529,8 @@ export default function Navigation({ navOpen, setNavOpen }: NavigationProps) { <> )}
-
-
+
+
{ if (isMobile || isTablet) { @@ -540,8 +540,8 @@ export default function Navigation({ navOpen, setNavOpen }: NavigationProps) { }} to="/settings" className={({ isActive }) => - `mx-4 my-auto flex h-9 cursor-pointer items-center gap-4 rounded-3xl hover:bg-gray-100 dark:hover:bg-[#28292E] ${ - isActive ? 'bg-gray-3000 dark:bg-transparent' : '' + `mx-4 my-auto flex h-9 cursor-pointer items-center gap-4 rounded-3xl hover:bg-sidebar-accent ${ + isActive ? 'bg-sidebar-accent' : '' }` } > @@ -552,12 +552,12 @@ export default function Navigation({ navOpen, setNavOpen }: NavigationProps) { height={21} className="my-auto ml-2 filter dark:invert" /> -

+

{t('settings.label')}

-
+
@@ -566,7 +566,7 @@ export default function Navigation({ navOpen, setNavOpen }: NavigationProps) { target="_blank" to={'https://discord.gg/vN7YFfdMpj'} className={ - 'rounded-full hover:bg-gray-100 dark:hover:bg-[#28292E]' + 'rounded-full hover:bg-sidebar-accent' } >
-
+
-
DocsGPT
+
DocsGPT
-

+

+

{t('pageNotFound.title')}

{t('pageNotFound.message')}

-

+

{t('agents.backToAll')}

-

+

{t('agents.logs.title')}

{agent && (
-

{agent.name}

-

+

{agent.name}

+

{agent.last_used_at ? t('agents.logs.lastUsedAt') + ' ' + diff --git a/frontend/src/agents/AgentPreview.tsx b/frontend/src/agents/AgentPreview.tsx index 149bc83b..b1c1cb46 100644 --- a/frontend/src/agents/AgentPreview.tsx +++ b/frontend/src/agents/AgentPreview.tsx @@ -131,7 +131,7 @@ export default function AgentPreview() { autoFocus={false} />

-

+

{t('agents.preview.testMessage')}

diff --git a/frontend/src/agents/AgentsList.tsx b/frontend/src/agents/AgentsList.tsx index e9aa1bcd..6bdda219 100644 --- a/frontend/src/agents/AgentsList.tsx +++ b/frontend/src/agents/AgentsList.tsx @@ -159,10 +159,10 @@ export default function AgentsList() { return (
-

+

{t('agents.title')}

-

+

{t('agents.description')}

@@ -178,7 +178,7 @@ export default function AgentsList() { value={searchQuery} onChange={(e) => setSearchQuery(e.target.value)} placeholder={t('agents.searchPlaceholder')} - className="h-11 w-full rounded-full border border-[#E5E5E5] bg-white py-2 pr-5 pl-11 text-sm shadow-[0_1px_4px_rgba(0,0,0,0.06)] transition-shadow outline-none placeholder:text-[#9CA3AF] focus:shadow-[0_2px_8px_rgba(0,0,0,0.1)] dark:border-[#3A3A3A] dark:bg-[#2C2C2C] dark:text-white dark:shadow-none dark:placeholder:text-[#6B7280]" + className="h-11 w-full rounded-full border border-border bg-card py-2 pr-5 pl-11 text-sm text-foreground shadow-[0_1px_4px_rgba(0,0,0,0.06)] transition-shadow outline-none placeholder:text-muted-foreground focus:shadow-[0_2px_8px_rgba(0,0,0,0.1)] dark:shadow-none" />
@@ -189,8 +189,8 @@ export default function AgentsList() { onClick={() => setActiveFilter(tab.id)} className={`rounded-full px-4 py-2 text-sm transition-colors ${ activeFilter === tab.id - ? 'bg-[#E0E0E0] text-[#18181B] dark:bg-[#4A4A4A] dark:text-white' - : 'dark:text-gray bg-transparent text-[#71717A] hover:bg-[#F5F5F5] dark:hover:bg-[#383838]/50' + ? 'bg-border text-foreground dark:bg-accent dark:text-white' + : 'dark:text-gray bg-transparent text-muted-foreground hover:bg-accent/50' }`} > {t(tab.labelKey)} @@ -224,7 +224,7 @@ export default function AgentsList() { ))} {showSearchEmptyState && ( -
+

{t('agents.noSearchResults')}

{t('agents.tryDifferentSearch')}

@@ -399,7 +399,7 @@ function AgentSection({ if (isFilteredView && isSearchingWithNoResults) { return ( -
+

{t('agents.noSearchResults')}

{t('agents.tryDifferentSearch')}

@@ -408,11 +408,11 @@ function AgentSection({ if (isFilteredView && hasNoAgentsAtAll) { return ( -
+

{t(`agents.sections.${config.id}.emptyState`)}

{config.showNewAgentButton && ( @@ -473,7 +473,7 @@ function AgentSection({ ) : ( @@ -485,7 +485,7 @@ function AgentSection({ t(`agents.sections.${config.id}.title`) )} -

+

{t(`agents.sections.${config.id}.description`)}

@@ -513,12 +513,12 @@ function AgentSection({ } }} placeholder={t('agents.folders.newFolder')} - className="w-28 rounded-full border border-[#E5E5E5] bg-white px-4 py-2 text-sm text-[#18181B] outline-none placeholder:text-[#9CA3AF] sm:w-auto dark:border-[#3A3A3A] dark:bg-[#2C2C2C] dark:text-white dark:placeholder:text-[#6B7280]" + className="w-28 rounded-full border border-border bg-card px-4 py-2 text-sm text-foreground outline-none placeholder:text-muted-foreground sm:w-auto" autoFocus /> ) : (
) : hasNoAgentsAtAll && currentLevelFolders.length === 0 ? ( -
+

{currentFolderId ? t('agents.folders.empty') @@ -587,7 +587,7 @@ function AgentSection({

{config.showNewAgentButton && !currentFolderId && ( -

+

{t('agents.backToAll')}

-

+

{modeConfig[effectiveMode].heading}

{agent.agent_type === 'workflow' && ( @@ -694,14 +694,14 @@ export default function NewAgent({ mode }: { mode: 'new' | 'edit' | 'draft' }) { )}
{modeConfig[effectiveMode].showDelete && agent.id && (
-
+
-
+

{t('agents.form.sections.meta')}

setAgent({ ...agent, name: e.target.value })} />