From 37fcbd28d9b70a450d1418f1823d149efeee47d2 Mon Sep 17 00:00:00 2001 From: cc Date: Thu, 3 Dec 2026 17:00:34 +0100 Subject: [PATCH] fix(ui): review pass on labels and small-screen layout - bin: Copy XML / Download sit on the path row, labelled; the code block no longer starts with a blank band reserved for floating buttons - diff: an empty diff names both versions - find: count no longer repeats the version from the header switcher; a uniform value is a value chip; the toolbar aligns left on phones and the breadcrumb stays on one line, truncating a long namespace - header: Keys / Files tabs keep an accessible name when only icons show Co-Authored-By: Claude Opus 5.5 --- src/app/globals.css | 2 +- src/app/os/bin/page.tsx | 31 +++++++++++------ src/app/os/find/page.tsx | 56 +++++++++++++++--------------- src/components/copy-button.tsx | 22 +++++++++--- src/components/diff-viewer.tsx | 3 +- src/components/download-button.tsx | 14 ++++++-- src/components/navtop.tsx | 4 +++ 7 files changed, 85 insertions(+), 47 deletions(-) diff --git a/src/app/globals.css b/src/app/globals.css index db84fae..312613e 100644 --- a/src/app/globals.css +++ b/src/app/globals.css @@ -168,7 +168,7 @@ */ .plist-code { margin: 0; - padding: 2.5rem 1rem 1rem 0; + padding: 1rem 1rem 1rem 0; border-radius: 0.5rem; border: 1px solid var(--border); background: var(--muted); diff --git a/src/app/os/bin/page.tsx b/src/app/os/bin/page.tsx index d46da73..4abf49d 100644 --- a/src/app/os/bin/page.tsx +++ b/src/app/os/bin/page.tsx @@ -229,9 +229,25 @@ export default function BinaryDetail() { {/* Main content */}
-

- {path} -

+ {/* The path, with the XML's actions on its row: floating over the + code block they pushed its first line down. */} +
+

+ {path} +

+ {!loading && !compareWith && xml && ( +
+ + +
+ )} +
{loading && (
@@ -254,14 +270,7 @@ export default function BinaryDetail() { )} {!loading && !compareWith && xml && ( -
-
- - -
+
{crumbs.map((crumb, i) => ( - + {i > 0 && ( - + )} @@ -441,32 +448,25 @@ export default function FindByKey() {
-
+
+ {/* The version is in the header's switcher; not repeated here. */} {!loading && ( {isFiltering ? `${list.length} of ${paths.length}` : paths.length}{" "} {paths.length === 1 ? "binary" : "binaries"} - {currentVersion && ( - <> - {" "} - in {currentVersion.version} - {currentVersion.beta && ( - - - - )} - - )} - {uniformValue !== undefined && ( - <> - , all{" "} - - {typeof uniformValue === "string" - ? `"${uniformValue}"` - : atomOf(uniformValue)} - - - )} + + )} + {!loading && uniformValue !== undefined && ( + + all + + {typeof uniformValue === "string" + ? `"${uniformValue}"` + : atomOf(uniformValue)} + )} diff --git a/src/components/copy-button.tsx b/src/components/copy-button.tsx index 1e8922c..47982d3 100644 --- a/src/components/copy-button.tsx +++ b/src/components/copy-button.tsx @@ -1,10 +1,16 @@ "use client"; +import { Check, Copy } from "lucide-react"; import { useState } from "react"; -import { Copy, Check } from "lucide-react"; import { Button } from "./ui/button"; -export function CopyButton({ text }: { text: string }) { +export function CopyButton({ + text, + label = "Copy", +}: { + text: string; + label?: string; +}) { const [copied, setCopied] = useState(false); const handleCopy = () => { @@ -15,11 +21,19 @@ export function CopyButton({ text }: { text: string }) { return ( ); } diff --git a/src/components/diff-viewer.tsx b/src/components/diff-viewer.tsx index 7e5a160..9b7e291 100644 --- a/src/components/diff-viewer.tsx +++ b/src/components/diff-viewer.tsx @@ -40,7 +40,8 @@ export function DiffViewer({ if (!hasChanges) { return (
- No changes between versions + No changes between {oldLabel.split("_")[0]} and{" "} + {newLabel.split("_")[0]}.
); } diff --git a/src/components/download-button.tsx b/src/components/download-button.tsx index d15b0ae..c188e31 100644 --- a/src/components/download-button.tsx +++ b/src/components/download-button.tsx @@ -6,9 +6,11 @@ import { Button } from "./ui/button"; export function DownloadButton({ content, filename, + label = "Download", }: { content: string; filename: string; + label?: string; }) { const handleDownload = () => { const blob = new Blob([content], { type: "application/xml" }); @@ -23,8 +25,16 @@ export function DownloadButton({ }; return ( - ); } diff --git a/src/components/navtop.tsx b/src/components/navtop.tsx index 2afb10e..6243af6 100644 --- a/src/components/navtop.tsx +++ b/src/components/navtop.tsx @@ -54,6 +54,8 @@ function OSBreadcrumb({