Skip to content

feat: redesign image loading and error placeholders#3000

Merged
oliverlaz merged 4 commits intomasterfrom
feat/redesign-image-error-placeholder
Mar 11, 2026
Merged

feat: redesign image loading and error placeholders#3000
oliverlaz merged 4 commits intomasterfrom
feat/redesign-image-error-placeholder

Conversation

@oliverlaz
Copy link
Member

@oliverlaz oliverlaz commented Mar 11, 2026

🎯 Goal

Implement the REACT-834 media placeholder redesign for message attachments so image thumbnails handle both loading and failed-load states without causing layout jumps.

🛠 Implementation details

  • add a thumbnail-level failed-load state in ModalGallery with an inline retry control that remounts the image for a fresh load attempt instead of opening the gallery
  • preserve image sizing props for single-image attachments and lock gallery attachment dimensions so bubbles keep their final footprint while images are loading or failed
  • add a loading state for image thumbnails with a centered spinner and left-to-right shimmer treatment that uses the incoming/outgoing message backgrounds
  • make BaseImage's download fallback optional and disable it for this message-thumbnail surface so the retry indicator is the only error treatment shown here
  • extend BaseImage and ModalGallery tests to cover preserved sizing, loading overlays, retry remount behavior, and suppression of the legacy download fallback

🎨 UI Changes

Design reference: https://linear.app/stream/issue/REACT-834/redesign-image-placeholder-for-failed-to-load-images

Screen.Recording.2026-03-11.at.15.43.25.mov

Incoming and outgoing image attachment bubbles now reserve their final size immediately, show a shimmer plus centered loading indicator while media is loading, and swap to the reload indicator inside the same area when loading fails.

@oliverlaz oliverlaz changed the title REACT-834: redesign image placeholder for failed-to-load images feat: redesign image placeholder for failed-to-load images Mar 11, 2026
@github-actions
Copy link

github-actions bot commented Mar 11, 2026

Size Change: +1.23 kB (+0.29%)

Total Size: 429 kB

Filename Size Change
./dist/Channel-CtjGqF4y.js 20.2 kB +20.2 kB (new file) 🆕
./dist/Channel-iBbX1_YS.js 0 B -20.2 kB (removed) 🏆
./dist/cjs/emojis.js 2.98 kB +1 B (+0.03%)
./dist/cjs/index.js 214 kB +757 B (+0.35%)
./dist/css/index.css 42 kB +471 B (+1.14%)
ℹ️ View Unchanged
Filename Size
./dist/audioProcessing-BbOs2wMd.js 1.32 kB
./dist/ChannelPreview-7kWxXGw8.js 13.8 kB
./dist/cjs/experimental.js 3.81 kB
./dist/cjs/mp3-encoder.js 1.27 kB
./dist/css/v2/emoji-mart.css 1.84 kB
./dist/css/v2/emoji-replacement.css 300 B
./dist/css/v2/index.css 39.4 kB
./dist/css/v2/index.layout.css 22.8 kB
./dist/limits-CxyAOSJp.js 65.2 kB

compressed-size-action

@oliverlaz oliverlaz changed the title feat: redesign image placeholder for failed-to-load images REACT-834: redesign image loading and error placeholders Mar 11, 2026
@oliverlaz oliverlaz changed the title REACT-834: redesign image loading and error placeholders feat: redesign image loading and error placeholders Mar 11, 2026
@oliverlaz oliverlaz merged commit 3539020 into master Mar 11, 2026
6 of 8 checks passed
@oliverlaz oliverlaz deleted the feat/redesign-image-error-placeholder branch March 11, 2026 15:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant