From f5adc3063ef6f4f753f18a766b7f6542f53f748f Mon Sep 17 00:00:00 2001 From: pablodanswer Date: Tue, 24 Sep 2024 11:01:08 -0700 Subject: [PATCH] Update theming (#2552) * update theming * update * update theming --- backend/danswer/server/manage/llm/api.py | 2 +- web/src/app/chat/ChatPage.tsx | 8 +- web/src/app/chat/input/ChatInputBar.tsx | 8 +- web/src/app/chat/message/Messages.tsx | 6 +- .../chat/sessionSidebar/HistorySidebar.tsx | 5 +- web/src/app/chat/sessionSidebar/PagesTab.tsx | 8 +- .../shared_chat_search/BlurBackground.tsx | 7 ++ web/src/app/globals.css | 6 +- web/src/components/BasicClickable.tsx | 1 - web/src/components/admin/ClientLayout.tsx | 106 ++++++++++++++---- .../admin/connectors/AdminSidebar.tsx | 6 +- web/src/components/header/LogoType.tsx | 5 +- web/src/components/search/DocumentDisplay.tsx | 2 +- web/src/components/search/SearchBar.tsx | 72 +++--------- .../search/SearchResultsDisplay.tsx | 4 +- web/src/components/search/SearchSection.tsx | 4 +- .../search/filtering/FilterDropdown.tsx | 39 ++++--- .../components/search/filtering/TagFilter.tsx | 2 +- web/tailwind-themes/tailwind.config.js | 38 ++++++- 19 files changed, 201 insertions(+), 128 deletions(-) create mode 100644 web/src/app/chat/shared_chat_search/BlurBackground.tsx diff --git a/backend/danswer/server/manage/llm/api.py b/backend/danswer/server/manage/llm/api.py index e0d80433d0e..23f16047e91 100644 --- a/backend/danswer/server/manage/llm/api.py +++ b/backend/danswer/server/manage/llm/api.py @@ -125,7 +125,7 @@ def list_llm_providers( def put_llm_provider( llm_provider: LLMProviderUpsertRequest, is_creation: bool = Query( - True, + False, description="True if updating an existing provider, False if creating a new one", ), _: User | None = Depends(current_admin_user), diff --git a/web/src/app/chat/ChatPage.tsx b/web/src/app/chat/ChatPage.tsx index 403c40b3dc4..29c80b48a40 100644 --- a/web/src/app/chat/ChatPage.tsx +++ b/web/src/app/chat/ChatPage.tsx @@ -104,6 +104,7 @@ import { classifyAssistants, orderAssistantsForUser, } from "@/lib/assistants/utils"; +import BlurBackground from "./shared_chat_search/BlurBackground"; const TEMP_USER_MESSAGE_ID = -1; const TEMP_ASSISTANT_MESSAGE_ID = -2; @@ -1833,6 +1834,7 @@ export function ChatPage({ onClose={() => setSharingModalVisible(false)} /> )} +
@@ -1842,7 +1844,7 @@ export function ChatPage({ flex-none fixed left-0 - z-30 + z-40 bg-background-100 h-screen transition-all @@ -1876,6 +1878,10 @@ export function ChatPage({
+ +
MAX_INPUT_HEIGHT @@ -634,7 +636,7 @@ export function ChatInputBar({ > )} diff --git a/web/src/app/chat/message/Messages.tsx b/web/src/app/chat/message/Messages.tsx index 9998c22465a..edb18138c79 100644 --- a/web/src/app/chat/message/Messages.tsx +++ b/web/src/app/chat/message/Messages.tsx @@ -686,7 +686,9 @@ export const HumanMessage = ({ onMouseEnter={() => setIsHovered(true)} onMouseLeave={() => setIsHovered(false)} > -
+
@@ -704,7 +706,7 @@ export const HumanMessage = ({ border border-border rounded-lg - bg-background-emphasis + bg-background-emphasis pb-2 [&:has(textarea:focus)]::ring-1 [&:has(textarea:focus)]::ring-black diff --git a/web/src/app/chat/sessionSidebar/HistorySidebar.tsx b/web/src/app/chat/sessionSidebar/HistorySidebar.tsx index 6096dcc9870..beb45e1775e 100644 --- a/web/src/app/chat/sessionSidebar/HistorySidebar.tsx +++ b/web/src/app/chat/sessionSidebar/HistorySidebar.tsx @@ -87,13 +87,12 @@ export const HistorySidebar = forwardRef( return ( <> {popup} -
( flex-col relative h-screen transition-transform - mt-2`} + pt-2`} > +
{folders && folders.length > 0 && (
@@ -92,14 +92,14 @@ export function PagesTab({ } rounded-md`} > {(page == "chat" || page == "search") && ( -

+

{page == "chat" && "Chat "} {page == "search" && "Search "} History

)} {isHistoryEmpty ? ( -

+

{page === "search" ? "Try running a search! Your search history will appear here." : "Try sending a message! Your chat history will appear here."} @@ -111,7 +111,7 @@ export function PagesTab({ return (

diff --git a/web/src/app/chat/shared_chat_search/BlurBackground.tsx b/web/src/app/chat/shared_chat_search/BlurBackground.tsx new file mode 100644 index 00000000000..e3e01296d70 --- /dev/null +++ b/web/src/app/chat/shared_chat_search/BlurBackground.tsx @@ -0,0 +1,7 @@ +export default function BlurBackground({ visible }: { visible: boolean }) { + return ( +
+ ); +} diff --git a/web/src/app/globals.css b/web/src/app/globals.css index 49142d065f6..145263ee359 100644 --- a/web/src/app/globals.css +++ b/web/src/app/globals.css @@ -75,8 +75,12 @@ /* blue-700 - Dark blue */ --error: #ef4444; /* red-500 - Bright red */ - --success: #059669; + --undo: #ef4444; + /* red-500 - Bright red */ + --success: #030706; /* emerald-600 - Deep green */ + --light-success: #22c55e; + /* green-500 */ --alert: #f59e0b; /* amber-600 - Orange */ --accent: #6366f1; diff --git a/web/src/components/BasicClickable.tsx b/web/src/components/BasicClickable.tsx index ffefc8b6310..650baf7dc90 100644 --- a/web/src/components/BasicClickable.tsx +++ b/web/src/components/BasicClickable.tsx @@ -91,7 +91,6 @@ export function BasicSelectable({ className={` rounded font-medium - text-emphasis text-sm ${padding == "normal" && "p-1"} ${padding == "extra" && "p-1.5"} diff --git a/web/src/components/admin/ClientLayout.tsx b/web/src/components/admin/ClientLayout.tsx index c50e08716de..961f5a9c21b 100644 --- a/web/src/components/admin/ClientLayout.tsx +++ b/web/src/components/admin/ClientLayout.tsx @@ -55,7 +55,7 @@ export function ClientLayout({ return (
-
+
- +
Existing Connectors
), @@ -73,7 +76,10 @@ export function ClientLayout({ { name: (
- +
Add Connector
), @@ -87,7 +93,10 @@ export function ClientLayout({ { name: (
- +
Document Sets
), @@ -96,7 +105,10 @@ export function ClientLayout({ { name: (
- +
Explorer
), @@ -105,7 +117,10 @@ export function ClientLayout({ { name: (
- +
Feedback
), @@ -119,7 +134,10 @@ export function ClientLayout({ { name: (
- +
Assistants
), @@ -130,7 +148,7 @@ export function ClientLayout({ { name: (
- +
Slack Bots
), @@ -139,7 +157,10 @@ export function ClientLayout({ { name: (
- +
Tools
), @@ -148,7 +169,10 @@ export function ClientLayout({ { name: (
- +
Prompt Library
), @@ -161,7 +185,10 @@ export function ClientLayout({ { name: (
- +
Standard Answers
), @@ -179,7 +206,10 @@ export function ClientLayout({ { name: (
- +
Groups
), @@ -197,7 +227,10 @@ export function ClientLayout({ { name: (
- +
LLM
), @@ -207,7 +240,7 @@ export function ClientLayout({ error: settings?.settings.needs_reindexing, name: (
- +
Search Settings
), @@ -221,7 +254,10 @@ export function ClientLayout({ { name: (
- +
Users
), @@ -232,7 +268,10 @@ export function ClientLayout({ { name: (
- +
Groups
), @@ -241,7 +280,10 @@ export function ClientLayout({ { name: (
- +
API Keys
), @@ -252,7 +294,10 @@ export function ClientLayout({ { name: (
- +
Token Rate Limits
), @@ -268,7 +313,10 @@ export function ClientLayout({ { name: (
- +
Usage Statistics
), @@ -277,7 +325,10 @@ export function ClientLayout({ { name: (
- +
Query History
), @@ -286,7 +337,10 @@ export function ClientLayout({ { name: (
- +
Custom Analytics
), @@ -302,7 +356,10 @@ export function ClientLayout({ { name: (
- +
Workspace Settings
), @@ -313,7 +370,10 @@ export function ClientLayout({ { name: (
- +
Whitelabeling
), diff --git a/web/src/components/admin/connectors/AdminSidebar.tsx b/web/src/components/admin/connectors/AdminSidebar.tsx index 5b1a8adc831..7ada0e52ed9 100644 --- a/web/src/components/admin/connectors/AdminSidebar.tsx +++ b/web/src/components/admin/connectors/AdminSidebar.tsx @@ -36,7 +36,7 @@ export function AdminSidebar({ collections }: { collections: Collection[] }) { const enterpriseSettings = combinedSettings.enterpriseSettings; return ( -
+