Skip to content

Commit 7dfc317

Browse files
BillLeoutsakosvl346Bill Leoutsakos
andauthored
Centralize chat and logs status colours and presentation shadow (#8244)
Co-authored-by: Bill Leoutsakos <billleoutsakos@Bills-MacBook-Pro.local>
1 parent ef78d22 commit 7dfc317

6 files changed

Lines changed: 31 additions & 14 deletions

File tree

‎apps/sim/app/_styles/globals.css‎

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -433,6 +433,15 @@
433433
--auth-primary-btn-hover-border: #e0e0e0;
434434
--auth-primary-btn-hover-text: #000000;
435435

436+
/* Chat navigation and log history keep their existing state colours. */
437+
--chat-status-active: var(--color-yellow-500);
438+
--logs-status-success: color-mix(in oklab, var(--color-emerald-400) 90%, transparent);
439+
--logs-status-warning: color-mix(in oklab, var(--color-amber-400) 90%, transparent);
440+
--logs-status-error: color-mix(in oklab, var(--color-red-400) 90%, transparent);
441+
442+
/* The rendered presentation sheet uses this same shadow in both viewer modes. */
443+
--shadow-presentation-slide: 0 2px 8px rgba(0, 0, 0, 0.15);
444+
436445
/* z-index scale. The toast/notification stack is ambient: it sits above page
437446
content but BELOW the modal and the transient poppers (menus, selects,
438447
popovers, tooltips), so an open modal or dropdown menu is never occluded by
@@ -800,6 +809,7 @@ html[data-sim-desktop-title-bar="inset"]
800809
--error-emphasis: #b91c1c;
801810
--caution: #f59e0b;
802811
--success: #22c55e;
812+
--logs-status-empty: color-mix(in oklab, var(--color-gray-300) 60%, transparent);
803813

804814
/* Brand extended */
805815
--brand-knowledge: #00b0b0;
@@ -918,6 +928,8 @@ html[data-sim-desktop-title-bar="inset"]
918928
--usage-agent: var(--color-violet-500);
919929
--usage-other: #8a8a8a;
920930

931+
--logs-status-empty: color-mix(in oklab, var(--color-gray-500) 40%, transparent);
932+
921933
/* Inverted surface (in dark mode, falls back to standard surfaces) */
922934
--surface-inverted: #242424;
923935
--surface-inverted-hover: #363636;

‎apps/sim/app/o/[organizationId]/components/organization-sidebar/components/chats-section/chats-section.tsx‎

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -71,8 +71,10 @@ function ChatRow({
7171
showStatusDot ? (
7272
<span
7373
aria-hidden='true'
74-
className='size-[6px] rounded-full'
75-
style={{ backgroundColor: chat.isActive ? '#EAB308' : 'var(--brand-accent)' }}
74+
className={cn(
75+
'size-[6px] rounded-full',
76+
chat.isActive ? 'bg-[var(--chat-status-active)]' : 'bg-[var(--brand-accent)]'
77+
)}
7678
/>
7779
) : chat.isPinned ? (
7880
<Pin aria-hidden='true' className='size-[12px] text-[var(--text-icon)]' />

‎apps/sim/app/workspace/[workspaceId]/components/conversation-list-item/conversation-list-item.tsx‎

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -27,10 +27,11 @@ export function ConversationListItem({
2727
{showStatusDot && (
2828
<span
2929
aria-hidden='true'
30-
className={cn('size-[6px] shrink-0 rounded-full', statusIndicatorClassName)}
31-
style={{
32-
backgroundColor: isActive ? '#EAB308' : 'var(--brand-accent)',
33-
}}
30+
className={cn(
31+
'size-[6px] shrink-0 rounded-full',
32+
isActive ? 'bg-[var(--chat-status-active)]' : 'bg-[var(--brand-accent)]',
33+
statusIndicatorClassName
34+
)}
3435
/>
3536
)}
3637
{actions && <div className='ml-auto flex shrink-0 items-center'>{actions}</div>}

‎apps/sim/app/workspace/[workspaceId]/logs/components/dashboard/components/status-bar/status-bar.tsx‎

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -66,16 +66,16 @@ function StatusBarInner({
6666
let color: string
6767
let hoverBrightness: string
6868
if (!segment.hasExecutions) {
69-
color = 'bg-gray-300/60 dark:bg-gray-500/40'
69+
color = 'bg-[var(--logs-status-empty)]'
7070
hoverBrightness = 'hover-hover:brightness-200'
7171
} else if (segment.successRate === 100) {
72-
color = 'bg-emerald-400/90'
72+
color = 'bg-[var(--logs-status-success)]'
7373
hoverBrightness = 'hover-hover:brightness-106'
7474
} else if (segment.successRate >= 95) {
75-
color = 'bg-amber-400/90'
75+
color = 'bg-[var(--logs-status-warning)]'
7676
hoverBrightness = 'hover-hover:brightness-106'
7777
} else {
78-
color = 'bg-red-400/90'
78+
color = 'bg-[var(--logs-status-error)]'
7979
hoverBrightness = 'hover-hover:brightness-106'
8080
}
8181

‎apps/sim/app/workspace/[workspaceId]/w/components/sidebar/sidebar.tsx‎

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -280,8 +280,10 @@ const SidebarChatItem = memo(function SidebarChatItem({
280280
showStatusDot ? (
281281
<span
282282
aria-hidden='true'
283-
className='size-[6px] rounded-full'
284-
style={{ backgroundColor: isActive ? '#EAB308' : 'var(--brand-accent)' }}
283+
className={cn(
284+
'size-[6px] rounded-full',
285+
isActive ? 'bg-[var(--chat-status-active)]' : 'bg-[var(--brand-accent)]'
286+
)}
285287
/>
286288
) : isPinned ? (
287289
<Pin aria-hidden='true' className='size-[12px] text-[var(--text-icon)]' />

‎apps/sim/lib/pptx-renderer/core/viewer.ts‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -614,7 +614,7 @@ export class PptxViewer extends EventTarget {
614614
Object.assign(wrapper.style, {
615615
width: `${displayWidth}px`,
616616
height: `${displayHeight}px`,
617-
boxShadow: '0 2px 8px rgba(0,0,0,0.15)',
617+
boxShadow: 'var(--shadow-presentation-slide)',
618618
overflow: 'hidden',
619619
position: 'relative',
620620
background: 'var(--white)',
@@ -866,7 +866,7 @@ export class PptxViewer extends EventTarget {
866866
margin: '0 auto',
867867
overflow: 'hidden',
868868
position: 'relative',
869-
boxShadow: '0 2px 8px rgba(0,0,0,0.15)',
869+
boxShadow: 'var(--shadow-presentation-slide)',
870870
})
871871

872872
try {

0 commit comments

Comments
 (0)