Skip to content

Commit e07ad4b

Browse files
authored
fix(ui): draw resize dividers as a thin line instead of a filled gutter bar (#104013)
1 parent 249e6ef commit e07ad4b

3 files changed

Lines changed: 41 additions & 9 deletions

File tree

‎ui/src/components/resizable-divider.ts‎

Lines changed: 37 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -23,8 +23,6 @@ export class ResizableDivider extends OpenClawLitElement {
2323
:host {
2424
width: 4px;
2525
cursor: col-resize;
26-
background: var(--border, #333);
27-
transition: background 150ms ease-out;
2826
flex-shrink: 0;
2927
position: relative;
3028
touch-action: none;
@@ -38,16 +36,31 @@ export class ResizableDivider extends OpenClawLitElement {
3836
right: -4px;
3937
bottom: 0;
4038
}
41-
:host(:hover) {
42-
background: var(--accent, #007bff);
39+
/* The visible divider is a centered hairline, not the whole gutter:
40+
filling the host paints a fat bar that stacks with neighboring pane
41+
borders into a multi-line smear while dragging. */
42+
:host::after {
43+
content: "";
44+
position: absolute;
45+
top: 0;
46+
bottom: 0;
47+
left: 50%;
48+
width: 1px;
49+
transform: translateX(-50%);
50+
background: var(--border, #333);
51+
transition:
52+
background 150ms ease-out,
53+
width 150ms ease-out;
4354
}
44-
:host(.dragging) {
55+
:host(:hover)::after,
56+
:host(.dragging)::after,
57+
:host(:focus-visible)::after {
58+
width: 2px;
4559
background: var(--accent, #007bff);
4660
}
4761
:host(:focus-visible) {
4862
outline: 2px solid var(--accent, #007bff);
4963
outline-offset: 2px;
50-
background: var(--accent, #007bff);
5164
}
5265
:host([orientation="horizontal"]) {
5366
width: auto;
@@ -60,6 +73,24 @@ export class ResizableDivider extends OpenClawLitElement {
6073
right: 0;
6174
bottom: -4px;
6275
}
76+
:host([orientation="horizontal"])::after {
77+
top: 50%;
78+
bottom: auto;
79+
left: 0;
80+
right: 0;
81+
width: auto;
82+
height: 1px;
83+
transform: translateY(-50%);
84+
transition:
85+
background 150ms ease-out,
86+
height 150ms ease-out;
87+
}
88+
:host([orientation="horizontal"]:hover)::after,
89+
:host([orientation="horizontal"].dragging)::after,
90+
:host([orientation="horizontal"]:focus-visible)::after {
91+
width: auto;
92+
height: 2px;
93+
}
6394
`;
6495

6596
override render() {

‎ui/src/styles/chat/sidebar.css‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -161,10 +161,11 @@
161161
transition: flex 250ms ease-out;
162162
}
163163

164+
/* No border-left: the resizable divider rendered next to this panel draws
165+
the separator line; a border here doubles it. */
164166
.chat-sidebar {
165167
flex: 1;
166168
min-width: 300px;
167-
border-left: 1px solid var(--border);
168169
display: flex;
169170
flex-direction: column;
170171
overflow: hidden;
@@ -1370,6 +1371,5 @@
13701371
.chat-split-container--open .chat-sidebar {
13711372
width: 100%;
13721373
min-width: 0;
1373-
border-left: none;
13741374
}
13751375
}

‎ui/src/styles/layout.css‎

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -664,13 +664,14 @@ html.openclaw-native-macos .shell-nav-expand {
664664
display: none;
665665
}
666666

667+
/* 1px overlay on the nav border edge; the divider paints its own centered
668+
line, so the host needs no background here. */
667669
.sidebar-resizer {
668670
grid-area: nav;
669671
align-self: stretch;
670672
justify-self: end;
671673
z-index: 20;
672674
width: 1px;
673-
background: transparent;
674675
}
675676

676677
.shell:has(.sidebar-resizer.dragging) {

0 commit comments

Comments
 (0)