Skip to content

Commit 262f6b7

Browse files
committed
feat: implement dark mode support and theme synchronization across components
1 parent 74f44d5 commit 262f6b7

35 files changed

Lines changed: 182 additions & 86 deletions

webapp/_webapp/src/components/code-block.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ export const CodeBlock = ({ code, className }: CodeBlockProps) => {
1919

2020
return (
2121
<pre
22-
className={`p-2 rounded-md bg-gray-200 text-sm text-wrap break-words ${className}`}
22+
className={`p-2 rounded-md bg-gray-200 dark:bg-default-200 text-sm text-wrap break-words ${className}`}
2323
dangerouslySetInnerHTML={{ __html: highlightedCode }}
2424
/>
2525
);

webapp/_webapp/src/components/loading-indicator.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -148,7 +148,7 @@ export const LoadingIndicator = ({ text = "Thinking", estimatedSeconds = 0, erro
148148

149149
{/* Progress Bar */}
150150
{estimatedSeconds > 0 && !isTimeout && !errorMessage && (
151-
<div className="w-full h-1 bg-gray-200 rounded-full overflow-hidden">
151+
<div className="w-full h-1 bg-gray-200 dark:bg-default-300 rounded-full overflow-hidden">
152152
<div
153153
className="h-full transition-all duration-300 ease-out"
154154
style={{

webapp/_webapp/src/components/logo.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ type LogoProps = {
66

77
export function Logo({ className }: LogoProps) {
88
return (
9-
<div className={cn("bg-gray-100 rounded-full p-4 mb-3", className)}>
9+
<div className={cn("bg-gray-100 dark:bg-default-200 rounded-full p-4 mb-3", className)}>
1010
<svg width="64" height="64" viewBox="0 0 320 320" fill="none" xmlns="http://www.w3.org/2000/svg">
1111
<rect width="320" height="320" fill="transparent" />
1212
<rect x="81" y="81" width="144" height="152" fill="transparent" />

webapp/_webapp/src/components/message-card.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ export const STYLES = {
2323
messageBox: {
2424
base: cn(),
2525
assistant: "px-3 pt-3 pb-1 my-2 !border !border-transparent",
26-
user: "px-3 py-2 bg-gray-100 self-end my-2",
26+
user: "px-3 py-2 bg-gray-100 dark:bg-default-200 self-end my-2",
2727
indicator: "px-3",
2828
},
2929
attachment: {

webapp/_webapp/src/components/message-entry-container/attachment-popover.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,8 @@ import { STYLES } from "../message-card";
44
// Components
55
export const AttachmentPopover = ({ attachment }: { attachment: string }) => (
66
<Popover placement="bottom" showArrow={true} className="!mt-1">
7-
<PopoverTrigger className="bg-gray-200 !rounded-xl !flex !w-fit mt-1 noselect">
8-
<span className="!text-xs !text-gray-400 border border-gray-300 !rounded-lg !px-1">attachment</span>
7+
<PopoverTrigger className="bg-gray-200 dark:bg-default-200 !rounded-xl !flex !w-fit mt-1 noselect">
8+
<span className="!text-xs !text-gray-400 dark:text-default-500 border border-gray-300 dark:border-default-300 !rounded-lg !px-1">attachment</span>
99
</PopoverTrigger>
1010
<PopoverContent className={STYLES.attachment.content}>
1111
<div className="!px-1 !py-2" style={{ overflowWrap: "anywhere" }}>

webapp/_webapp/src/components/message-entry-container/tools/general.tsx

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -115,8 +115,12 @@ export const GeneralToolCard = ({ functionName, message, animated, isCollapsed:
115115
<div className="overflow-hidden">
116116
<div className={cn(
117117
"canselect rounded-md !border px-2 py-1 mt-1 transition-opacity duration-200 relative",
118-
isCollapsed ? "opacity-0" : "opacity-100 !border-gray-200"
119-
)}>
118+
isCollapsed ? "opacity-0" : "opacity-100"
119+
)}
120+
style={{
121+
borderColor: "var(--pd-border-color) !important",
122+
}}
123+
>
120124
{/* Scrollable content with max height - hide scrollbar */}
121125
<div
122126
ref={scrollContainerRef}

webapp/_webapp/src/components/message-entry-container/tools/paper-score-comment/comment-item.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ export const CommentItem = ({ comment, isSelected, onToggle }: CommentItemProps)
2020

2121
return (
2222
<div
23-
className={cn("border-t border-b !p-3 !transition-colors", isSelected ? "!bg-primary-50/50" : "!bg-white")}
23+
className={cn("border-t border-b !p-3 !transition-colors", isSelected ? "!bg-primary-50/50 dark:!bg-primary-500/20" : "!bg-white dark:!bg-default-100")}
2424
id={comment.commentId}
2525
>
2626
<div className="!flex !items-center !justify-between !mb-2">
@@ -55,7 +55,7 @@ export const CommentItem = ({ comment, isSelected, onToggle }: CommentItemProps)
5555
{comment.quoteText && (
5656
<div className="!mb-2">
5757
<div className="!text-xs font-bold !text-gray-900 !mb-1">Section: {comment.section}</div>
58-
<div className="!bg-gray-100 !border-l-4 !border-primary-500 !pl-3 !py-2 !text-sm !text-gray-800 !italic">
58+
<div className="!bg-gray-100 dark:!bg-default-200 !border-l-4 !border-primary-500 !pl-3 !py-2 !text-sm !text-gray-800 dark:!text-default-200 !italic">
5959
"{isExpanded ? comment.quoteText : truncatedQuoteText}"
6060
{comment.quoteText.length > 100 && (
6161
<button

webapp/_webapp/src/components/message-entry-container/tools/paper-score-comment/filter-controls.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ export const FilterControls = ({
7979
"!px-2 !py-1 !text-xs !rounded !border !transition-colors",
8080
filterImportance === importance
8181
? "!bg-primary-100 !text-primary-800 !border-primary-300"
82-
: "!bg-gray-100 !text-gray-600 !border-gray-300 hover:!bg-gray-200",
82+
: "!bg-gray-100 dark:!bg-default-200 !text-gray-600 dark:!text-default-300 !border-gray-300 dark:!border-default-200 hover:!bg-gray-200 dark:hover:!bg-default-300",
8383
)}
8484
>
8585
{importance}

webapp/_webapp/src/components/message-entry-container/tools/xtramcp/review-paper.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ const renderSeverityLevels = (threshold: string) => {
1616
<code
1717
className={cn(
1818
"text-xs px-1.5 py-0.5 rounded",
19-
index < thresholdIndex ? "line-through text-gray-400 bg-gray-100" : "text-gray-700 bg-gray-100"
19+
index < thresholdIndex ? "line-through text-gray-400 dark:text-default-500 bg-gray-100 dark:bg-default-200" : "text-gray-700 dark:text-default-200 bg-gray-100 dark:bg-default-200"
2020
)}
2121
>
2222
{level}
@@ -33,7 +33,7 @@ const renderSections = (sections: Array<string>) => {
3333
<span>
3434
{sections.map((section, index) => (
3535
<span key={section}>
36-
<code className="text-xs px-1.5 py-0.5 rounded text-gray-700 bg-gray-100">
36+
<code className="text-xs px-1.5 py-0.5 rounded text-gray-700 dark:text-default-200 bg-gray-100 dark:bg-default-200">
3737
{section}
3838
</code>
3939
{index < sections.length - 1 && ", "}

webapp/_webapp/src/components/message-entry-container/tools/xtramcp/verify-citations.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -96,15 +96,15 @@ export const VerifyCitationsCard = ({ functionName, message, preparing, animated
9696
<span>
9797
{files.map((file, index) => (
9898
<span key={file}>
99-
<code className="px-1 py-0.5 bg-gray-100 rounded text-gray-700 font-mono text-xs">
99+
<code className="px-1 py-0.5 bg-gray-100 dark:bg-default-200 rounded text-gray-700 dark:text-default-200 font-mono text-xs">
100100
{file}
101101
</code>
102102
{index < files.length - 1 && ", "}
103103
</span>
104104
))}
105105
</span>
106106
) : (
107-
<code className="px-1 py-0.5 bg-gray-100 rounded text-gray-700 font-mono text-xs">
107+
<code className="px-1 py-0.5 bg-gray-100 dark:bg-default-200 rounded text-gray-700 dark:text-default-200 font-mono text-xs">
108108
{files}
109109
</code>
110110
)}

0 commit comments

Comments
 (0)