Skip to content

Commit cdb3f55

Browse files
committed
feat: fix git graph continuous line, improve theme color inheritance
1 parent 789ee25 commit cdb3f55

File tree

3 files changed

+24
-27
lines changed

3 files changed

+24
-27
lines changed

clif-pad-ide/src-tauri/Cargo.lock

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

clif-pad-ide/src/components/git/GitGraphRow.tsx

Lines changed: 10 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -97,37 +97,20 @@ const GitGraphRow: Component<{
9797
class="shrink-0 flex items-center justify-center"
9898
style={{ width: "20px", "min-height": "28px", position: "relative" }}
9999
>
100-
{/* Vertical line segment - extends through this row to the next */}
101-
<div
102-
style={{
103-
position: "absolute",
104-
left: "50%",
105-
top: "0",
106-
bottom: props.isLast ? "50%" : "0",
107-
width: "2px",
108-
background: props.entry.is_head
109-
? "var(--accent-blue)"
110-
: props.isMerge
111-
? "var(--accent-yellow)"
112-
: "var(--accent-green)",
113-
opacity: "0.5",
114-
"z-index": "1",
115-
transform: "translateX(-1px)",
116-
}}
117-
/>
118100
{/* The commit dot - centered vertically in the row */}
119101
<div
120102
style={{
121103
width: props.entry.is_head ? "12px" : "10px",
122104
height: props.entry.is_head ? "12px" : "10px",
123105
"border-radius": "50%",
124106
background: props.entry.is_head
125-
? "var(--accent-blue)"
107+
? "var(--accent-primary)"
126108
: props.isMerge
127109
? "var(--accent-yellow)"
128-
: "var(--accent-green)",
129-
border: props.entry.is_head ? "2px solid var(--accent-blue)" : "none",
130-
"box-shadow": props.entry.is_head ? "0 0 8px rgba(59,130,246,0.6)" : "0 0 4px var(--accent-green)",
110+
: "var(--accent-primary)",
111+
opacity: props.entry.is_head ? "1" : "0.6",
112+
border: props.entry.is_head ? "2px solid var(--accent-primary)" : "none",
113+
"box-shadow": props.entry.is_head ? "0 0 8px var(--accent-primary)" : "none",
131114
"z-index": "2",
132115
position: "relative",
133116
transform: hovered() ? "scale(1.4)" : "scale(1)",
@@ -146,8 +129,9 @@ const GitGraphRow: Component<{
146129
class="px-1 rounded font-mono"
147130
style={{
148131
"font-size": "0.75em", "line-height": "1.4",
149-
background: ref.isHead ? "var(--accent-blue)" : BRANCH_COLORS[i() % BRANCH_COLORS.length],
150-
color: "#fff", opacity: ref.isHead ? "1" : "0.85",
132+
background: ref.isHead ? "var(--accent-primary)" : BRANCH_COLORS[i() % BRANCH_COLORS.length],
133+
color: "var(--accent-text)",
134+
opacity: ref.isHead ? "1" : "0.9",
151135
}}
152136
>
153137
{ref.label}
@@ -244,8 +228,8 @@ const GitGraphRow: Component<{
244228
class="px-1 rounded font-mono"
245229
style={{
246230
"font-size": "0.8em", "line-height": "1.5",
247-
background: ref.isHead ? "var(--accent-blue)" : BRANCH_COLORS[i() % BRANCH_COLORS.length],
248-
color: "#fff",
231+
background: ref.isHead ? "var(--accent-primary)" : BRANCH_COLORS[i() % BRANCH_COLORS.length],
232+
color: "var(--accent-text)",
249233
}}
250234
>
251235
{ref.label}

clif-pad-ide/src/components/layout/RightSidebar.tsx

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1028,6 +1028,19 @@ const RightSidebar: Component<{ onOpenFolder?: () => void; onOpenRecent?: (path:
10281028
</span>
10291029
</div>
10301030
<div class="overflow-y-auto min-h-0 flex-1" style={{ position: "relative" }}>
1031+
{/* Single continuous vertical line behind all dots */}
1032+
<div
1033+
style={{
1034+
position: "absolute",
1035+
left: "17px", // 8px (px-2 padding) + 10px (half of 20px dot column) - 1px (half of 2px line)
1036+
top: "0",
1037+
bottom: "0",
1038+
width: "2px",
1039+
background: "var(--accent-primary)",
1040+
opacity: "0.35",
1041+
"z-index": "0",
1042+
}}
1043+
/>
10311044
<For each={commitLog()}>
10321045
{(entry, idx) => (
10331046
<GitGraphRow

0 commit comments

Comments
 (0)