From c783f129cc2703971725b898ec6fcb56217a70e5 Mon Sep 17 00:00:00 2001 From: dtoro Date: Mon, 18 May 2026 23:25:10 +0200 Subject: [PATCH] preview: serve fit_1280 + tighten timeline grid padding MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit InlinePreview was requesting fit_1920 for both the still image and the video poster — roughly 3× the pixel count of what the pane actually needs. Drop to fit_1280: still sharp inside the inline pane (which the user resizes around 300–500px tall in practice) while cutting payload by ~⅔. Timeline: pull the grid wrapper padding in from `p-6 pb-24` to `pr-2 pl-2 pb-2 overflow-x-hidden` now that the SplitGrid preview pane sits above the grid — the old generous padding existed to breathe under a full-screen modal that no longer renders inline. Co-Authored-By: Claude Opus 4.7 (1M context) --- .../components/preview/InlinePreview.svelte | 4 +- web/src/routes/+page.svelte | 213 +++++++++--------- 2 files changed, 109 insertions(+), 108 deletions(-) diff --git a/web/src/lib/components/preview/InlinePreview.svelte b/web/src/lib/components/preview/InlinePreview.svelte index e9ca698..560bc09 100644 --- a/web/src/lib/components/preview/InlinePreview.svelte +++ b/web/src/lib/components/preview/InlinePreview.svelte @@ -85,13 +85,13 @@ {#key vf.Hash} {/key} {:else} {photoQuery.data.OriginalName diff --git a/web/src/routes/+page.svelte b/web/src/routes/+page.svelte index f7d2e7e..886b369 100644 --- a/web/src/routes/+page.svelte +++ b/web/src/routes/+page.svelte @@ -811,122 +811,123 @@ -->
- {#snippet preview()} - - {/snippet} - {#snippet grid()} -
{ - visFirst = f; - visLast = l; - }, - sampleEvery: TILE_SAMPLE, - }} - > -
- {#if photosQuery.isPending} - - {:else if photosQuery.isError} -

- Failed to load photos: {photosQuery.error instanceof Error - ? photosQuery.error.message - : "unknown error"} -

- {:else if photos.length === 0} -

- {#if filters.section === "archive"} - Archive is empty. - {:else if filters.section === "review"} - Nothing left to review. Photos PhotoPrism's indexer wasn't sure - about land here — use Keep to accept them into the timeline or - Archive to set them aside. - {:else if filters.section === "hidden"} - No hidden photos. PhotoPrism auto-hides files it can't index - (broken files, very low quality); they only ever show up here. - {:else if filters.section === "heap"} - This heap has no photos yet. Select some photos and use the bulk - bar's "+ Add to heap" button. + {#snippet preview()} + + {/snippet} + {#snippet grid()} +

{ + visFirst = f; + visLast = l; + }, + sampleEvery: TILE_SAMPLE, + }} + > +
+ {#if photosQuery.isPending} + + {:else if photosQuery.isError} +

+ Failed to load photos: {photosQuery.error instanceof Error + ? photosQuery.error.message + : "unknown error"} +

+ {:else if photos.length === 0} +

+ {#if filters.section === "archive"} + Archive is empty. + {:else if filters.section === "review"} + Nothing left to review. Photos PhotoPrism's indexer wasn't + sure about land here — use Keep to accept them into the + timeline or Archive to set them aside. + {:else if filters.section === "hidden"} + No hidden photos. PhotoPrism auto-hides files it can't index + (broken files, very low quality); they only ever show up here. + {:else if filters.section === "heap"} + This heap has no photos yet. Select some photos and use the + bulk bar's "+ Add to heap" button. + {:else} + No photos. Index a folder via PhotoPrism's reindex command. + {/if} +

{:else} - No photos. Index a folder via PhotoPrism's reindex command. - {/if} -

- {:else} -
- {#each rows as row (row.kind === "header" ? `h:${row.key}` : `t:${row.photo.UID}`)} - {#if row.kind === "header"} - -

- {row.label} - - {row.count} - -

- {:else} - {@const photo = row.photo} - {@const i = row.tileIndex} - {@const inWindow = i >= renderFirst && i <= renderLast} - -
- {#if inWindow} - {@const sel = - selectedIds.has(photo.UID) || focusedUid === photo.UID} - onTileClick(e, photo.UID)} - onDblclick={(e) => onTileDblclick(e, photo.UID)} - /> +
+ {#if inWindow} + {@const sel = + selectedIds.has(photo.UID) || + focusedUid === photo.UID} + onTileClick(e, photo.UID)} + onDblclick={(e) => onTileDblclick(e, photo.UID)} + /> + {/if} +
{/if} -
- {/if} - {/each} -
+ {/each} +
- - - {#if photosQuery.isFetchingNextPage} -

- Loading more… -

- {/if} - {/if} -
-
- {/snippet} + + {#if photosQuery.isFetchingNextPage} +

+ Loading more… +

+ {/if} + {/if} +
+ + {/snippet}