Skip to content

Commit 142e42b

Browse files
committed
polish: make raw diff metadata subtle
1 parent 43425b2 commit 142e42b

1 file changed

Lines changed: 5 additions & 4 deletions

File tree

src/context_room.mjs

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1721,9 +1721,10 @@ export function renderAppHtml() {
17211721
.diff-line.del { color: #ffc0c8; background: rgba(255,140,157,0.08); }
17221722
.diff-line.hunk { color: #b69cff; background: rgba(182,156,255,0.08); }
17231723
.diff-line.meta { color: var(--muted); }
1724-
.diff-raw-meta { margin: 10px 18px 0; padding: 10px 12px; border: 1px solid rgba(148,163,184,0.14); border-radius: 14px; background: rgba(255,255,255,0.035); color: var(--muted); font: 12px/1.5 ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace; }
1725-
.diff-raw-meta summary { cursor: pointer; font-family: Inter, ui-sans-serif, system-ui, sans-serif; font-weight: 850; color: #cbd7ec; }
1726-
.diff-raw-meta pre { margin: 9px 0 0; white-space: pre-wrap; }
1724+
.diff-raw-meta { margin: 6px 18px 0; color: rgba(148,163,184,0.62); font: 10px/1.45 ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace; }
1725+
.diff-raw-meta summary { cursor: pointer; width: fit-content; list-style: none; font-family: Inter, ui-sans-serif, system-ui, sans-serif; font-size: 10px; font-weight: 750; letter-spacing: 0.08em; text-transform: uppercase; color: rgba(148,163,184,0.48); }
1726+
.diff-raw-meta summary::-webkit-details-marker { display: none; }
1727+
.diff-raw-meta pre { margin: 6px 0 0; padding: 8px 10px; border-radius: 10px; background: rgba(255,255,255,0.025); white-space: pre-wrap; }
17271728
.diff-empty { padding: 18px; color: var(--muted); font: 14px/1.5 Inter, ui-sans-serif, system-ui, sans-serif; }
17281729
.file-header-copy { min-width: 0; display: grid; gap: 5px; }
17291730
.file-header-copy .diff-meta { white-space: normal; line-height: 1.35; }
@@ -2986,7 +2987,7 @@ function renderDiffPanel(diff) {
29862987
const lines = diff.patch.split("\n");
29872988
const gitMeta = lines.filter(isGitDiffMetadataLine);
29882989
const reviewLines = lines.filter((line) => !isGitDiffMetadataLine(line));
2989-
const rawMeta = gitMeta.length ? '<details class="diff-raw-meta"><summary>Git metadata</summary><pre>' + gitMeta.map(escapeHtml).join("\n") + '</pre></details>' : "";
2990+
const rawMeta = gitMeta.length ? '<details class="diff-raw-meta"><summary>raw</summary><pre>' + gitMeta.map(escapeHtml).join("\n") + '</pre></details>' : "";
29902991
const body = rawMeta + '<pre class="diff-code">' + reviewLines.map(renderDiffLine).join("") + '</pre>';
29912992
return '<section class="diff-panel"><div class="diff-header"><strong>Git diff</strong><div class="file-actions"><span class="diff-meta">' + escapeHtml(meta) + '</span><button class="file-action" type="button" data-hide-diff>Hide</button></div></div>' + body + '</section>';
29922993
}

0 commit comments

Comments
 (0)