Skip to content

refactor(album): remove preview image animation to avoid flickering caused by potential conflicts with NextImage. - #535

Merged
besscroft merged 3 commits into
mainfrom
fix/issue-527
Jun 12, 2026
Merged

refactor(album): remove preview image animation to avoid flickering caused by potential conflicts with NextImage.#535
besscroft merged 3 commits into
mainfrom
fix/issue-527

Conversation

@besscroft

@besscroft besscroft commented Jun 12, 2026

Copy link
Copy Markdown
Owner

No description provided.

…aused by potential conflicts with NextImage.
@besscroft besscroft added the 🐛bug Something isn't working label Jun 12, 2026
@vercel

vercel Bot commented Jun 12, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
picimpact Ready Ready Preview, Comment Jun 12, 2026 1:50pm

@besscroft
besscroft merged commit 94ae5f5 into main Jun 12, 2026
6 checks passed
Zheaoli added a commit that referenced this pull request Jun 12, 2026
fix(detail): stop switch/load flicker — pin image height, letterbox blur, keep tone panel (on top of #535)
pull Bot pushed a commit to candies404/PicImpact that referenced this pull request Jun 12, 2026
…letterbox blur, keep tone panel)

Rebuilt on top of besscroft#535 (which removed the preview fade animation). besscroft#535 alone
did not fix the dominant flicker because it kept `object-contain md:max-h-[90vh]`
and didn't touch the info panel. This adds the remaining, verified fixes:

- Image height: `<img>` (preview + high-res) `md:max-h-[90vh]` →
  `object-contain w-full sm:h-full`, and the ProgressiveImage root wrapper
  `relative` → `relative sm:h-full` so the height:100% chain resolves
  (container sm:h-[90vh] → viewport → slide → wrapper → img). The img element
  then stays a constant 90vh for every aspect ratio instead of resizing
  ~607↔1366px and overflowing on each switch. Verified live: injecting the
  wrapper height made the slide img go 607→810px.

- Blur placeholder: `style={{ objectFit: 'contain' }}` on the preview image so
  next/image renders the blur with `background-size: contain` (it reads
  style.objectFit, not the className) — otherwise the blur filled the fixed box
  via `cover` and the real image shrank to letterbox on load = a load flash.

- Tone analysis panel: `if (loading)` → `if (loading && !toneData)` so a switch
  keeps the previous tone values rendered instead of collapsing to a spinner and
  shifting the whole info panel's layout. Mirrors the histogram guard from besscroft#532
  (which was never applied to tone analysis).

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
pull Bot pushed a commit to candies404/PicImpact that referenced this pull request Jun 12, 2026
…tion

Deploys repeatedly drifted from the branch HEAD (a manual build run before
the latest commit, a stale `:latest` pull, the besscroft#534-vs-besscroft#535 mixup), and the
only way to tell what was actually live was to hand-inspect rendered DOM
classes. Make the deployed commit verifiable at a glance.

- build-main: pass the short commit SHA as a `BUILD_SHA` build-arg and also
  tag the pushed image `:git-<sha>` alongside `:latest`, so the image is
  identifiable by commit.
- Dockerfile: accept `BUILD_SHA` (default `unknown`) and set it as a runtime
  env in the runner stage.
- Add GET /api/public/version returning `{ sha }` (the build's commit) so a
  running deploy can be checked with `curl /api/public/version` — it should
  report the commit you expect — instead of guessing whether `:latest` is the
  branch HEAD.

Local/dev builds without the arg report "unknown". No app behaviour change.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@besscroft
besscroft deleted the fix/issue-527 branch July 1, 2026 10:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

🐛bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

【Bug】图片预览原图加载闪烁问题

1 participant