From f67cdc24f8a1f6e7c6d5f8bf8d191449ff07b48f Mon Sep 17 00:00:00 2001 From: James Ketrenos Date: Thu, 24 Apr 2025 17:08:39 -0700 Subject: [PATCH] Tweaked styles --- frontend/src/App.tsx | 12 +++++++----- frontend/src/ChatBubble.tsx | 15 +++++++++++++++ frontend/src/DocumentViewer.tsx | 11 ++++++----- frontend/src/Message.tsx | 2 +- 4 files changed, 29 insertions(+), 11 deletions(-) diff --git a/frontend/src/App.tsx b/frontend/src/App.tsx index 3a8382a..83510a1 100644 --- a/frontend/src/App.tsx +++ b/frontend/src/App.tsx @@ -142,7 +142,7 @@ const App = () => { const chatPreamble: MessageList = [ { - role: 'info', + role: 'content', content: ` # Welcome to Backstory @@ -163,10 +163,12 @@ What would you like to know about James? , - - As with all LLM interactions, the results may not be 100% accurate. If you have questions about my career, - I'd love to hear from you. You can send me an email at **james_backstory@ketrenos.com**. - + + + As with all LLM interactions, the results may not be 100% accurate. If you have questions about my career, + I'd love to hear from you. You can send me an email at **james_backstory@ketrenos.com**. + + ]; diff --git a/frontend/src/ChatBubble.tsx b/frontend/src/ChatBubble.tsx index 237737d..ec857b1 100644 --- a/frontend/src/ChatBubble.tsx +++ b/frontend/src/ChatBubble.tsx @@ -87,6 +87,21 @@ function ChatBubble({ role, isFullWidth, children, sx, className }: ChatBubblePr padding: '10px 16px', boxShadow: '0 1px 3px rgba(216, 58, 58, 0.15)', // Subtle shadow with red tint }, + 'content': { + ...defaultStyle, + backgroundColor: '#F5F2EA', // Light cream background for easy reading + border: `1px solid ${theme.palette.custom.highlight}`, // Golden Ochre border + borderRadius: 0, + maxWidth: '100%', // Full width to maximize reading space + alignSelf: 'center', // Centered in the chat + color: theme.palette.text.primary, // Charcoal Black for maximum readability + padding: '8px 8px', // More generous padding for better text framing + marginBottom: '20px', // Space between content and conversation + boxShadow: '0 2px 4px rgba(0, 0, 0, 0.05)', // Subtle elevation + fontSize: '0.9rem', // Slightly smaller than default + lineHeight: '1.3', // More compact line height + fontFamily: theme.typography.fontFamily, // Consistent font with your theme + }, }; return ( diff --git a/frontend/src/DocumentViewer.tsx b/frontend/src/DocumentViewer.tsx index ff931a7..c1f041a 100644 --- a/frontend/src/DocumentViewer.tsx +++ b/frontend/src/DocumentViewer.tsx @@ -118,8 +118,8 @@ const DocumentViewer: React.FC = ({ }); if (reduced.length > 0) { - // First message is always 'info' - reduced[0].role = 'info'; + // First message is always 'user' + reduced[0].role = 'assistant'; setHasJobDescription(true); } @@ -173,8 +173,8 @@ const DocumentViewer: React.FC = ({ /* If there are any messages, there is a resume */ if (reduced.length > 0) { - // First message is always 'info' - reduced[0].role = 'info'; + // First message is always 'content' + reduced[0].role = 'content'; setHasResume(true); } @@ -198,7 +198,8 @@ const DocumentViewer: React.FC = ({ if (reduced[0].role === "user") { reduced.splice(0, 1); } - reduced[0].role = 'info'; + // First message is always 'content' + reduced[0].role = 'content'; setHasFacts(true); } diff --git a/frontend/src/Message.tsx b/frontend/src/Message.tsx index b7b1c18..23653fc 100644 --- a/frontend/src/Message.tsx +++ b/frontend/src/Message.tsx @@ -29,7 +29,7 @@ import { Tooltip } from '@mui/material'; import { VectorVisualizer } from './VectorVisualizer'; import { SetSnackType } from './Snack'; -type MessageRoles = 'info' | 'user' | 'assistant' | 'system' | 'status' | 'error'; +type MessageRoles = 'info' | 'user' | 'assistant' | 'system' | 'status' | 'error' | 'content'; type MessageData = { role: MessageRoles,