preview: serve fit_1280 + tighten timeline grid padding

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) <noreply@anthropic.com>
This commit is contained in:
2026-05-18 23:25:10 +02:00
parent 24c449f475
commit c783f129cc
2 changed files with 109 additions and 108 deletions

View File

@@ -85,13 +85,13 @@
{#key vf.Hash}
<VideoPlayer
src={videoUrl(vf.Hash)}
poster={thumbUrl(pf.Hash, 'fit_1920')}
poster={thumbUrl(pf.Hash, 'fit_1280')}
title={photoQuery.data.OriginalName ?? pf.Name ?? ''}
/>
{/key}
{:else}
<img
src={thumbUrl(pf.Hash, 'fit_1920')}
src={thumbUrl(pf.Hash, 'fit_1280')}
alt={photoQuery.data.OriginalName ?? pf.Name ?? 'Photo'}
class="max-h-full max-w-full rounded-md object-contain shadow-2xl"
/>

View File

@@ -827,7 +827,7 @@
sampleEvery: TILE_SAMPLE,
}}
>
<div class="p-6 pb-24">
<div class="pr-2 pl-2 pb-2 overflow-x-hidden">
{#if photosQuery.isPending}
<SkeletonGrid />
{:else if photosQuery.isError}
@@ -841,15 +841,15 @@
{#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.
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.
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}
@@ -892,7 +892,8 @@
>
{#if inWindow}
{@const sel =
selectedIds.has(photo.UID) || focusedUid === photo.UID}
selectedIds.has(photo.UID) ||
focusedUid === photo.UID}
<PhotoTile
{photo}
selected={sel}