You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
perf(platform): open image documents with a pane-sized variant #5301
Part of #5251 (the in-app image audit of part 3 of #4686). Claims checked at tale-project/tale24a091dddf6d1d7f81aaaa214cd0523806d8c049 (feature-train).
What happens
The document preview of an image file hands the original's presigned URL to ZoomPanViewer (services/platform/app/features/documents/components/document-preview-image.tsx:62-70). The pane is about 790 CSS px wide, so at rest a 4000 px photo or scan downloads several times the pixels the pane can show (about 2.5 times its width at DPR 2); zooming in (up to 5×) is the only time the original's resolution is needed.
Proposed change
Open the preview with a variant sized for the pane at DPR 2 (a ladder width from @tale/ui/images/responsive), and load the original only when the reader zooms past what the variant resolves, or when they download the file. The variant can share the mechanism of the chat thumbnails (#5298).
Acceptance criteria
An image document opens with a variant no wider than the pane at DPR 2.
Zooming past the variant's resolution swaps in the original, without a visible jump.
Activity
perf(ui): size readme tiles, video posters and the social card
perf(ui): size readme tiles, video posters and the social card
perf(ui): size readme tiles, video posters and the social card
perf(ui): size readme tiles, video posters and the social card
perf(ui): size readme tiles, video posters and the social card
perf(ui): size readme tiles, video posters and the social card
perf(ui): size readme tiles, video posters and the social card
perf(ui): size readme tiles, video posters and the social card
perf(ui): size readme tiles, video posters and the social card
perf(ui): size readme tiles, video posters and the social card
perf(ui): size readme tiles, video posters and the social card
perf(ui): size readme tiles, video posters and the social card
perf(ui): size readme tiles, video posters and the social card
perf(ui): size readme tiles, video posters and the social card
perf(ui): size readme tiles, video posters and the social card
perf(ui): size readme tiles, video posters and the social card
perf(ui): size readme tiles, video posters and the social card