Files
buzz/mobile/lib/shared/widgets
Tom Brow 1a0dae77bf fix(mobile): shimmer loading photos in the iOS carousel (#9167)
On iOS, a message with several photos renders them in a native UIKit
carousel. While a thumbnail downloads, each cell showed the words
"Loading image". Single images and the Flutter carousel already show a
shimmering skeleton, so the native carousel stood out.

Native carousel cells now show the same shimmer as Flutter's
`SkeletonShimmer`: a fill in the theme's primary color at 10% opacity,
with a lighter band sweeping across every two seconds. Flutter passes
the primary color to the native view along with the brightness. With
Reduce Motion on, the fill stays still. Once the thumbnail arrives the
shimmer hides. If the thumbnail fails, the cell shows its existing
"Image unavailable" message on the plain surface.

### Demo

A synthetic private chat with a four-photo message, reopened on a cold
launch. To make the loading state easy to see, both builds were patched
locally to delay thumbnail delivery by 4 seconds (the patch is not part
of this PR).

Before (main): each cell shows the words "Loading image" until the
thumbnail arrives.


https://github.com/user-attachments/assets/3724873d-4f33-4db7-af16-634dce3371ac

After (this PR): each cell shimmers in the theme's primary color until
the thumbnail arrives.


https://github.com/user-attachments/assets/20f65789-de3f-4e13-892f-3b2d9a0461cc

### Validation

- `just mobile-check` and the full `just mobile-test` suite pass.
- Automated simulator run (iPhone 17 Pro, debug build): posted four
photos to a synthetic private chat from the app's photo picker,
relaunched, and opened the chat on both main and this branch. Before
shows "Loading image"; after shows the shimmer, which gives way to the
photo when it arrives. Limitations: light mode only, and the 4 second
thumbnail delay was a local patch to make the state observable. Dark
mode, Reduce Motion and the failed-thumbnail state were not exercised.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

---------

Signed-off-by: Tom Brow <tomb@squareup.com>
Co-authored-by: Tom Brow <tomb@squareup.com>
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-07 15:40:05 -08:00
..