Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
83 changes: 51 additions & 32 deletions app/globals.css
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@
/* Zed buffer_line_height: comfortable */
--c-buffer-line-height: 1.618;
--c-gutter-w: 48px;
--c-panel-w: 260px;
--c-panel-w: 240px;
}

* {
Expand Down Expand Up @@ -240,48 +240,51 @@ button:disabled {
}

.zed-panel__header {
height: 32px;
height: 28px;
flex-shrink: 0;
display: flex;
align-items: center;
justify-content: space-between;
padding: 0 10px 0 12px;
padding: 0 6px 0 10px;
background: var(--c-surface);
border-bottom: 1px solid var(--c-border-variant);
}

.zed-panel__title {
color: var(--c-text-muted);
font-size: 11px;
font-weight: 600;
letter-spacing: 0.06em;
text-transform: uppercase;
font-weight: 500;
letter-spacing: 0.02em;
text-transform: none;
}

.zed-panel__actions {
display: flex;
align-items: center;
gap: 4px;
gap: 2px;
}

.zed-panel__list {
flex: 1;
overflow: auto;
padding: 8px;
padding: 4px 0;
display: flex;
flex-direction: column;
gap: 2px;
gap: 0;
}

.zed-panel__empty {
padding: 12px 8px;
padding: 10px 12px;
color: var(--c-text-placeholder);
font-size: 12px;
}

/* Dense list rows — Zed ListItem Dense / project panel */
.zed-note-item {
position: relative;
display: block;
border-radius: 6px;
margin: 0 4px;
border-radius: 4px;
}

.zed-note-item:hover {
Expand All @@ -294,23 +297,35 @@ button:disabled {

.zed-note-item__hit {
display: flex;
flex-direction: column;
align-items: stretch;
gap: 4px;
flex-direction: row;
align-items: center;
gap: 6px;
width: 100%;
padding: 10px 28px 10px 12px;
min-height: 24px;
padding: 2px 26px 2px 8px;
text-align: left;
}

.zed-note-item__icon {
flex-shrink: 0;
color: var(--c-text-placeholder);
}

.zed-note-item[data-active="true"] .zed-note-item__icon,
.zed-note-item:hover .zed-note-item__icon {
color: var(--c-text-muted);
}

.zed-note-item__title {
display: block;
flex: 1;
min-width: 0;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
color: var(--c-text-muted);
font-size: 13px;
font-weight: 500;
line-height: 1.35;
font-size: 12px;
font-weight: 400;
line-height: 1.3;
}

.zed-note-item[data-active="true"] .zed-note-item__title,
Expand All @@ -319,25 +334,28 @@ button:disabled {
}

.zed-note-item__date {
display: block;
flex-shrink: 0;
max-width: 72px;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
color: var(--c-text-placeholder);
font-size: 11px;
line-height: 1.3;
}

.zed-note-item__delete {
position: absolute;
top: 8px;
right: 8px;
top: 50%;
right: 4px;
transform: translateY(-50%);
display: none;
align-items: center;
justify-content: center;
width: 20px;
height: 20px;
border-radius: 4px;
width: 18px;
height: 18px;
border-radius: 3px;
color: var(--c-text-placeholder);
font-size: 14px;
line-height: 1;
}

.zed-note-item:hover .zed-note-item__delete,
Expand Down Expand Up @@ -554,20 +572,21 @@ button:disabled {
flex-shrink: 0;
display: flex;
align-items: center;
padding: 12px;
padding: 4px 6px 6px;
border-top: 1px solid var(--c-border-variant);
}

.zed-settings-btn {
display: inline-flex;
align-items: center;
gap: 8px;
gap: 6px;
width: 100%;
height: 32px;
padding: 0 10px;
border-radius: 6px;
height: 24px;
padding: 0 8px;
border-radius: 4px;
color: var(--c-text-muted);
font-size: 12px;
font-weight: 400;
}

.zed-settings-btn:hover,
Expand Down
63 changes: 63 additions & 0 deletions components/icons.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -135,3 +135,66 @@ export function SettingsIcon({ size = 16, className }: IconProps) {
</svg>
);
}

/** `close.svg` */
export function CloseIcon({ size = 14, className }: IconProps) {
return (
<svg
width={size}
height={size}
viewBox="0 0 16 16"
fill="none"
className={className}
aria-hidden
>
<path
d="M4.70581 4.5L11.294 11.5M11.294 4.5L4.70581 11.5"
stroke="currentColor"
strokeWidth="1.2"
strokeLinecap="round"
/>
</svg>
);
}

/** `file_text_outlined.svg` — project-panel–like row glyph */
export function FileTextIcon({ size = 14, className }: IconProps) {
return (
<svg
width={size}
height={size}
viewBox="0 0 16 16"
fill="none"
className={className}
aria-hidden
>
<path
d="M9 2V4.24394C9 4.5622 9.12643 4.86743 9.35147 5.09247C9.57652 5.31751 9.88174 5.44394 10.2 5.44394H12.5"
stroke="currentColor"
strokeWidth="1.2"
strokeLinejoin="round"
/>
<path
d="M10.4283 2.79015C9.95564 2.28602 9.29544 2 8.60442 2H4.625C4.32663 2 4.04048 2.12643 3.8295 2.35147C3.61853 2.57652 3.5 2.88174 3.5 3.2V12.8C3.5 13.1183 3.61853 13.4235 3.8295 13.6485C4.04048 13.8736 4.32663 14 4.625 14H11.375C11.6734 14 11.9595 13.8736 12.1705 13.6485C12.3815 13.4235 12.5 13.1183 12.5 12.8V5.98862C12.5 5.35347 12.2582 4.74213 11.8238 4.27877L10.4283 2.79015Z"
stroke="currentColor"
strokeWidth="1.2"
strokeLinecap="round"
strokeLinejoin="round"
/>
<path
d="M8.4534 8.5H5.73267"
stroke="currentColor"
strokeWidth="1.2"
strokeLinecap="round"
strokeLinejoin="round"
/>
<path
d="M10.2672 10.7207H5.73267"
stroke="currentColor"
strokeWidth="1.2"
strokeLinecap="round"
strokeLinejoin="round"
/>
</svg>
);
}
11 changes: 9 additions & 2 deletions components/memo-app.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,8 @@ import {
} from "@/lib/themes";
import { CodeMirrorEditor } from "./codemirror-editor";
import {
CloseIcon,
FileTextIcon,
PlusIcon,
SettingsIcon,
SidebarLeftClosedIcon,
Expand Down Expand Up @@ -563,6 +565,10 @@ export function MemoApp({ initialNotes }: { initialNotes: Note[] }) {
className="zed-note-item__hit"
onClick={() => selectNote(note)}
>
<FileTextIcon
size={14}
className="zed-note-item__icon"
/>
<span className="zed-note-item__title">{label}</span>
<span className="zed-note-item__date">{updatedLabel}</span>
</button>
Expand All @@ -571,8 +577,9 @@ export function MemoApp({ initialNotes }: { initialNotes: Note[] }) {
className="zed-note-item__delete"
onClick={() => void removeNote(note.id)}
aria-label="Delete note"
title="Delete note"
>
×
<CloseIcon size={12} />
</button>
</div>
);
Expand All @@ -586,7 +593,7 @@ export function MemoApp({ initialNotes }: { initialNotes: Note[] }) {
data-active={settingsOpen}
onClick={() => setSettingsOpen(true)}
>
<SettingsIcon />
<SettingsIcon size={14} />
Settings
</button>
</div>
Expand Down