From 84b1fd995c0906c7cd65658ace818738aca73f11 Mon Sep 17 00:00:00 2001 From: bubulux Date: Wed, 25 Nov 2026 17:42:31 +0100 Subject: [PATCH] Polish: hideable taskbar items, grey system folders, progressive photo, unclipped rings, stacked rows, unique app tiles (#426) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - Taskbar: switch project, search, theme, account and the clock can be hidden (Appearance › Taskbar); the launcher and the task view stay. - System folders (Desktop, Settings) in the system's grey, not a folder's blue. - Photo: the preview shows at once and the original replaces it once loaded; the Preview / Full size switch and its key are gone. - Property rows with a control: selection and focus rings are no longer clipped; too narrow for label and control side by side, the label goes above and the control takes the full width. Swatches have room for their ring. - App tiles: every app and extension its own, with an outlined tile variant (AppIcon colours 10–18); Flows has the bulb. Co-Authored-By: Claude Opus 5.5 --- apps/studio/src/apps/PhotoApp.tsx | 24 ++++++++++++++++-------- apps/studio/src/apps/SettingsApp.tsx | 8 ++++++-- apps/studio/src/apps/registry.ts | 10 +++++----- apps/studio/src/ext/flows/index.ts | 4 ++-- apps/studio/src/fileKinds.ts | 10 +++++----- apps/studio/src/layouts/layouts.css | 2 +- apps/studio/src/prefs.ts | 5 ++++- apps/studio/src/shell.css | 1 + apps/studio/src/shortcuts.ts | 1 - apps/studio/src/wm/Taskbar.tsx | 11 ++++++----- docs/features/desktop.md | 4 ++-- docs/features/files.md | 2 +- docs/features/media.md | 2 +- docs/shortcuts.md | 1 - packages/design/src/forms/forms.css | 2 +- packages/design/src/layout/layout.css | 10 +++++++++- packages/design/src/os/AppIcon.tsx | 7 +++++-- packages/design/src/os/os.css | 2 ++ packages/model/src/types.ts | 2 ++ 19 files changed, 69 insertions(+), 39 deletions(-) diff --git a/apps/studio/src/apps/PhotoApp.tsx b/apps/studio/src/apps/PhotoApp.tsx index 37763504..a2cd7b15 100644 --- a/apps/studio/src/apps/PhotoApp.tsx +++ b/apps/studio/src/apps/PhotoApp.tsx @@ -14,7 +14,7 @@ import type { AppProps } from "./registry"; /** * The Photo app (docs/rewrite/09-shells.md): one photo, large, with its facts. ← and → step through * the list it was opened from (or its collection, else its folder). The preview shows at once; the - * original is loaded on request. + * original replaces it as soon as it has loaded. */ /** One photo; opened without one, the start screen of the project's photos (#426). */ export function PhotoApp(p: AppProps) { @@ -28,11 +28,10 @@ function PhotoView({ win, resource, projectId, setTitle, setRoute }: AppProps) { const [id, setId] = useState(resource?.id ?? ""); useEffect(() => { if (resource?.id) setId(resource.id); }, [resource?.id, win.stateSeq]); const f = map.get(id); - const [full, setFull] = useState(false); + // The preview shows at once; the original replaces it as soon as it has loaded (#426: no Preview / Full size switch). const [loaded, setLoaded] = useState(null); const [name, setName] = useState(f?.name ?? ""); useEffect(() => { setName(f?.name ?? ""); }, [f?.id, f?.name]); - useEffect(() => { setFull(false); }, [id]); const [panels, setPanels] = useDockLayout("photo", { right: { tabs: ["facts"] } }); // The list to step through: the one it was opened from, else its collection, else its folder. @@ -45,12 +44,22 @@ function PhotoView({ win, resource, projectId, setTitle, setRoute }: AppProps) { // The window stands for the photo it shows (one window per file): stepping onto one open elsewhere brings that window up. const step = (d: number) => { const next = list[at + d]; if (next && wm.setResource(win.id, { type: "photo", id: next })) setId(next); }; useEffect(() => { if (f) { setTitle(f.name); setRoute(f.id); } }, [f?.id, f?.name]); - useKeys(bind("photo", { prev: () => step(-1), next: () => step(1), full: () => setFull((v) => !v) })); + useKeys(bind("photo", { prev: () => step(-1), next: () => step(1) })); + const originalUrl = f && f.photo?.stored.original && f.photo.media_type !== "image/heic" ? imageUrl(f.id, "original") : null; + useEffect(() => { + if (!originalUrl || loaded === originalUrl) return; + const img = new Image(); + img.onload = () => setLoaded(originalUrl); + img.src = originalUrl; + return () => { img.onload = null; }; + }, [originalUrl]); if (!files) return
; if (!f || f.type !== "photo" || !f.photo) return
It was deleted, or it is in the recycle bin.
; const p = f.photo; - const src = full && p.stored.original && p.media_type !== "image/heic" ? imageUrl(f.id, "original") : p.stored.preview ? imageUrl(f.id, "preview") : p.stored.thumbnail ? imageUrl(f.id, "thumbnail") : null; + const original = p.stored.original && p.media_type !== "image/heic" ? imageUrl(f.id, "original") : null; + const first = p.stored.preview ? imageUrl(f.id, "preview") : p.stored.thumbnail ? imageUrl(f.id, "thumbnail") : null; + const src = original && loaded === original ? original : first ?? original; const commit = () => { const to = name.trim(); if (!to || to === f.name) { setName(f.name); return; } void store.rename(f, to).catch((e) => { toastError(e); setName(f.name); }); }; return ( = list.length - 1} onClick={() => step(1)} /> setName(e.currentTarget.value)} onBlur={commit} onKeyDown={(e) => { if (e.key === "Enter") e.currentTarget.blur(); if (e.key === "Escape") { setName(f.name); e.currentTarget.blur(); } }} /> -