From a796a98cd45e2533c14b1e5c754ab7fb25c013f2 Mon Sep 17 00:00:00 2001 From: Enrico Ros Date: Tue, 13 May 2025 12:29:57 -0700 Subject: [PATCH] Composer: tint composer --- src/apps/chat/AppChat.tsx | 7 ++++--- src/apps/chat/components/composer/Composer.tsx | 11 ++++++++--- 2 files changed, 12 insertions(+), 6 deletions(-) diff --git a/src/apps/chat/AppChat.tsx b/src/apps/chat/AppChat.tsx index 23d5e825b..38a6510e0 100644 --- a/src/apps/chat/AppChat.tsx +++ b/src/apps/chat/AppChat.tsx @@ -34,7 +34,6 @@ import { gcChatImageAssets } from '~/common/stores/chat/chat.gc'; import { getChatLLMId } from '~/common/stores/llms/store-llms'; import { getConversation, getConversationSystemPurposeId, useConversation } from '~/common/stores/chat/store-chats'; import { optimaActions, optimaOpenModels, optimaOpenPreferences } from '~/common/layout/optima/useOptima'; -import { themeBgAppChatComposer } from '~/common/app.theme'; import { useFolderStore } from '~/common/stores/folders/store-chat-folders'; import { useIsMobile, useIsTallScreen } from '~/common/components/useMatchMedia'; import { useLLM } from '~/common/stores/llms/llms.hooks'; @@ -99,7 +98,8 @@ const composerOpenSx: SxProps = { // NOTE: disabled on 2025-03-05: conflicts with the GlobalDragOverlay's // zIndex: 21, // just to allocate a surface, and potentially have a shadow minWidth: { md: 480 }, // don't get compresses too much on desktop - backgroundColor: themeBgAppChatComposer, + // backgroundColor: themeBgAppChatComposer, // inlined in the Composer + transition: 'background-color 0.5s ease-out', borderTop: `1px solid`, borderTopColor: 'rgba(var(--joy-palette-neutral-mainChannel, 99 107 116) / 0.4)', // hack: eats the bottom of the last message (as it has a 1px divider) @@ -109,7 +109,8 @@ const composerOpenSx: SxProps = { const composerOpenMobileSx: SxProps = { zIndex: 21, // allocates the surface, possibly enables shadow if we like - backgroundColor: themeBgAppChatComposer, + // backgroundColor: themeBgAppChatComposer, // inlined in the Composer + transition: 'background-color 0.5s ease-out', borderTop: `1px solid`, borderTopColor: 'rgba(var(--joy-palette-neutral-mainChannel, 99 107 116) / 0.4)', pt: 0.5, // have some breathing room diff --git a/src/apps/chat/components/composer/Composer.tsx b/src/apps/chat/components/composer/Composer.tsx index e67e8c902..bc839771c 100644 --- a/src/apps/chat/components/composer/Composer.tsx +++ b/src/apps/chat/components/composer/Composer.tsx @@ -36,7 +36,7 @@ import { glueForMessageTokens, marshallWrapDocFragments } from '~/common/stores/ import { isValidConversation, useChatStore } from '~/common/stores/chat/store-chats'; import { getModelParameterValueOrThrow } from '~/common/stores/llms/llms.parameters'; import { launchAppCall, removeQueryParam, useRouterQuery } from '~/common/app.routes'; -import { lineHeightTextareaMd } from '~/common/app.theme'; +import { lineHeightTextareaMd, themeBgAppChatComposer } from '~/common/app.theme'; import { optimaOpenPreferences } from '~/common/layout/optima/useOptima'; import { platformAwareKeystrokes } from '~/common/components/KeyStroke'; import { supportsScreenCapture } from '~/common/util/screenCaptureUtils'; @@ -729,7 +729,12 @@ export function Composer(props: { }), [dragContainerSx]); return ( - + {!isMobile && labsShowShortcutBar && } @@ -874,7 +879,7 @@ export function Composer(props: { }} sx={{ height: '100%', - backgroundColor: 'background.level1', + backgroundColor: showTint ? undefined : 'background.level1', '&:focus-within': { backgroundColor: 'background.popup', '.within-composer-focus': { backgroundColor: 'background.popup' } }, lineHeight: lineHeightTextareaMd, }} />