Skip to content

Commit 39ca976

Browse files
committed
updated componnet
1 parent 821d45c commit 39ca976

File tree

2 files changed

+21
-30
lines changed

2 files changed

+21
-30
lines changed

apps/sim/content/blog/v0-5/components/diff-controls-demo.tsx

Lines changed: 20 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -1,24 +1,11 @@
11
'use client'
22

3-
import { useEffect, useState } from 'react'
3+
import { useState } from 'react'
44

55
export function DiffControlsDemo() {
6-
const [mounted, setMounted] = useState(false)
76
const [rejectHover, setRejectHover] = useState(false)
87
const [acceptHover, setAcceptHover] = useState(false)
98

10-
useEffect(() => {
11-
setMounted(true)
12-
}, [])
13-
14-
if (!mounted) {
15-
return (
16-
<div
17-
style={{ display: 'flex', justifyContent: 'center', margin: '24px 0', height: '30px' }}
18-
/>
19-
)
20-
}
21-
229
return (
2310
<div style={{ display: 'flex', justifyContent: 'center', margin: '24px 0' }}>
2411
<div
@@ -41,23 +28,23 @@ export function DiffControlsDemo() {
4128
position: 'relative',
4229
display: 'flex',
4330
height: '100%',
44-
cursor: 'pointer',
4531
alignItems: 'center',
46-
border: rejectHover ? '1px solid #3d3d3d' : '1px solid #2c2c2c',
47-
backgroundColor: rejectHover ? '#363636' : '#292929',
32+
border: '1px solid #e0e0e0',
33+
backgroundColor: rejectHover ? '#f0f0f0' : '#f5f5f5',
4834
paddingRight: '20px',
4935
paddingLeft: '12px',
5036
fontWeight: 500,
5137
fontSize: '13px',
52-
color: rejectHover ? '#e6e6e6' : '#cccccc',
38+
color: rejectHover ? '#2d2d2d' : '#404040',
5339
clipPath: 'polygon(0 0, calc(100% + 10px) 0, 100% 100%, 0 100%)',
5440
borderRadius: '4px 0 0 4px',
55-
transition: 'background-color 0.15s, border-color 0.15s, color 0.15s',
41+
cursor: 'default',
42+
transition: 'color 150ms, background-color 150ms, border-color 150ms',
5643
}}
5744
>
5845
Reject
5946
</button>
60-
{/* Slanted divider */}
47+
{/* Slanted divider - split gray/green */}
6148
<div
6249
style={{
6350
pointerEvents: 'none',
@@ -67,7 +54,7 @@ export function DiffControlsDemo() {
6754
left: '66px',
6855
width: '2px',
6956
transform: 'skewX(-18.4deg)',
70-
background: 'linear-gradient(to right, #2c2c2c 50%, #238559 50%)',
57+
background: 'linear-gradient(to right, #e0e0e0 50%, #238458 50%)',
7158
zIndex: 10,
7259
}}
7360
/>
@@ -81,20 +68,20 @@ export function DiffControlsDemo() {
8168
position: 'relative',
8269
display: 'flex',
8370
height: '100%',
84-
cursor: 'pointer',
8571
alignItems: 'center',
86-
border: '1px solid rgba(0,0,0,0.15)',
72+
border: '1px solid rgba(0, 0, 0, 0.15)',
8773
backgroundColor: '#32bd7e',
8874
paddingRight: '12px',
8975
paddingLeft: '20px',
9076
fontWeight: 500,
9177
fontSize: '13px',
92-
color: '#1b1b1b',
78+
color: '#ffffff',
9379
clipPath: 'polygon(10px 0, 100% 0, 100% 100%, 0 100%)',
9480
borderRadius: '0 4px 4px 0',
9581
marginLeft: '-10px',
96-
filter: acceptHover ? 'brightness(1.1)' : 'brightness(1)',
97-
transition: 'filter 0.15s',
82+
cursor: 'default',
83+
filter: acceptHover ? 'brightness(1.1)' : undefined,
84+
transition: 'background-color 150ms, border-color 150ms',
9885
}}
9986
>
10087
Accept
@@ -104,11 +91,15 @@ export function DiffControlsDemo() {
10491
borderRadius: '4px',
10592
border: '1px solid rgba(255, 255, 255, 0.2)',
10693
backgroundColor: 'rgba(255, 255, 255, 0.1)',
107-
padding: '2px 6px',
94+
paddingLeft: '6px',
95+
paddingRight: '6px',
96+
paddingTop: '2px',
97+
paddingBottom: '2px',
10898
fontWeight: 500,
109-
fontFamily: 'sans-serif',
99+
fontFamily:
100+
'ui-sans-serif, system-ui, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji"',
110101
fontSize: '10px',
111-
color: '#1b1b1b',
102+
color: '#ffffff',
112103
}}
113104
>
114105
⇧⌘<span style={{ display: 'inline-block', transform: 'translateY(-1px)' }}></span>

apps/sim/content/blog/v0-5/index.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ The dashboard aggregates this data into queryable views:
6363
- **Trace spans**: Hierarchical view of block executions with timing waterfall
6464
- **Cost attribution**: Token usage and spend broken down by model per execution
6565
- **Error context**: Full stack traces with the block, input values, and failure reason
66-
- **Filtering**: Query by time range, trigger type (webhook, schedule, API, manual), workflow, or status
66+
- **Filtering**: Query by time range, trigger type, workflow, or status
6767
- **Execution snapshots**: Each run captures the workflow state at execution time—restore to see exactly what was running
6868

6969
This level of observability is necessary when workflows handle production traffic—sending customer emails, processing payments, or making API calls on behalf of users.

0 commit comments

Comments
 (0)