Skip to content

Commit 8100228

Browse files
committed
fix(sidebar): reorder debug action and tighten restart banner UI
1 parent ad96fae commit 8100228

2 files changed

Lines changed: 23 additions & 20 deletions

File tree

src/features/app/components/SidebarCornerActions.tsx

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -121,6 +121,17 @@ export function SidebarCornerActions({
121121
>
122122
<Settings size={14} aria-hidden />
123123
</button>
124+
{showDebugButton && (
125+
<button
126+
className="ghost sidebar-corner-button"
127+
type="button"
128+
onClick={onOpenDebug}
129+
aria-label="Open debug log"
130+
title="Debug log"
131+
>
132+
<ScrollText size={14} aria-hidden />
133+
</button>
134+
)}
124135
{restartNotice.required && (
125136
<div className="sidebar-restart-banner-wrap">
126137
<button
@@ -132,7 +143,7 @@ export function SidebarCornerActions({
132143
aria-describedby="sidebar-restart-tooltip"
133144
>
134145
<RotateCcw size={12} aria-hidden />
135-
<span>{restartingServer ? "Restarting..." : "Config changed"}</span>
146+
<span>{restartingServer ? "Restarting..." : "Restart"}</span>
136147
</button>
137148
<div
138149
id="sidebar-restart-tooltip"
@@ -144,17 +155,6 @@ export function SidebarCornerActions({
144155
</div>
145156
</div>
146157
)}
147-
{showDebugButton && (
148-
<button
149-
className="ghost sidebar-corner-button"
150-
type="button"
151-
onClick={onOpenDebug}
152-
aria-label="Open debug log"
153-
title="Debug log"
154-
>
155-
<ScrollText size={14} aria-hidden />
156-
</button>
157-
)}
158158
{showAccountSwitcher && (
159159
<div className="sidebar-account-menu" ref={accountMenuRef}>
160160
<button

src/styles/sidebar.css

Lines changed: 11 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1336,7 +1336,7 @@
13361336
}
13371337

13381338
.sidebar-restart-banner-wrap {
1339-
position: relative;
1339+
position: static;
13401340
display: inline-flex;
13411341
align-items: center;
13421342
}
@@ -1345,16 +1345,18 @@
13451345
display: inline-flex;
13461346
align-items: center;
13471347
gap: 6px;
1348-
padding: 6px 10px;
1348+
padding: 5px 9px;
13491349
border-radius: 999px;
13501350
border: 1px solid rgba(245, 172, 70, 0.34);
13511351
background:
13521352
linear-gradient(180deg, rgba(245, 172, 70, 0.16), rgba(245, 172, 70, 0.08)),
13531353
rgba(18, 22, 30, 0.86);
13541354
color: rgba(255, 228, 181, 0.96);
1355-
font-size: 11px;
1355+
font-size: 10px;
13561356
font-weight: 600;
1357+
line-height: 1;
13571358
letter-spacing: 0.01em;
1359+
white-space: nowrap;
13581360
box-shadow: 0 6px 16px rgba(0, 0, 0, 0.22);
13591361
transition: transform 120ms ease, background-color 120ms ease, border-color 120ms ease;
13601362
}
@@ -1381,9 +1383,9 @@
13811383

13821384
.sidebar-restart-tooltip {
13831385
position: absolute;
1384-
right: 0;
1386+
left: calc((var(--sidebar-width, 280px) - (var(--sidebar-padding) * 2)) / 2);
13851387
bottom: calc(100% + 10px);
1386-
width: min(248px, calc(var(--sidebar-width, 280px) - (var(--sidebar-padding) * 2)));
1388+
width: min(236px, calc(var(--sidebar-width, 280px) - (var(--sidebar-padding) * 2)));
13871389
min-width: 0;
13881390
display: grid;
13891391
gap: 4px;
@@ -1398,7 +1400,7 @@
13981400
white-space: normal;
13991401
overflow-wrap: break-word;
14001402
opacity: 0;
1401-
transform: translateY(4px);
1403+
transform: translate(-50%, 4px);
14021404
pointer-events: none;
14031405
transition: opacity 120ms ease, transform 120ms ease;
14041406
z-index: 20;
@@ -1413,14 +1415,15 @@
14131415
.sidebar-restart-banner-wrap:hover .sidebar-restart-tooltip,
14141416
.sidebar-restart-banner-wrap:focus-within .sidebar-restart-tooltip {
14151417
opacity: 1;
1416-
transform: translateY(0);
1418+
transform: translate(-50%, 0);
14171419
}
14181420

14191421
.sidebar-restart-tooltip::after {
14201422
content: "";
14211423
position: absolute;
1422-
right: 18px;
1424+
left: 50%;
14231425
top: 100%;
1426+
transform: translateX(-50%);
14241427
border: 6px solid transparent;
14251428
border-top-color: rgba(10, 13, 18, 0.96);
14261429
}

0 commit comments

Comments
 (0)