Skip to content

feat: native shimmer and image loading redesign#3467

Open
isekovanic wants to merge 39 commits intodevelopfrom
feat/native-shimmer
Open

feat: native shimmer and image loading redesign#3467
isekovanic wants to merge 39 commits intodevelopfrom
feat/native-shimmer

Conversation

@isekovanic
Copy link
Contributor

@isekovanic isekovanic commented Mar 7, 2026

🎯 Goal

In this PR, we redesign the implementation of ImageLoadingIndicator to present as a gradient shimmer with an activity indicator. Since we tried a couple of approaches (one with LinearGradient from RNSVG), at the end we settled for a purely native implementation for performance reasons. Having that many animated views be potentially active on the screen tanks scrolling performance of the MessageList (i.e a lot of images loading, perhaps with poor network conditions if they aren't cached). The shimmer is Fabric only, lives in shared native sources, and is exposed through the native handler registration flow for consistent integration across the current SDK setup.

Visuals and behaviour are aligned between Android and iOS, keeping a single moving shimmer gradient, and tuning width/shape/alpha for a smoother effect closer to the previous output.

For packaging and local development flow, native source sync is now driven from shared-native as the source of truth so local dev and release packaging stay aligned, with build/script flow updated so copies refresh automatically when running the sample app. I'm not yet sure this is the correct approach, but since this is relatively new as we didn't have that many native implementations in the SDK in the past it'll have to do for now and we'll of course refine it as we go on.

Just for reference, the native shimmer implementation improves:

  • Scrolling on Android by about 30-40 FPS (yes, really)
  • Scrolling on iOS by about 10 FPS (it was fine-ish before as well)

compared to a LinearGradient and Animated.View approach for rendering a shimmer.

TODO:

  • Write docs for the native side
  • Some additional cleanup
  • Maybe tweak/polish the shimmer/gradient a little bit more
  • Consolidate where we copy resources from (probably one folder for the shared stuff, and we always copy from there) so that future native implementations are trivial to add and all of the tooling works
  • Have another run at the build.gradle copying edge cases, I think this can be done simpler

🛠 Implementation details

🎨 UI Changes

iOS
Before After
Android
Before After

🧪 Testing

☑️ Checklist

  • I have signed the Stream CLA (required)
  • PR targets the develop branch
  • Documentation is updated
  • New code is tested in main example apps, including all possible scenarios
    • SampleApp iOS and Android
    • Expo iOS and Android

khushal87 and others added 27 commits March 6, 2026 15:18
@Stream-SDK-Bot
Copy link
Contributor

Stream-SDK-Bot commented Mar 7, 2026

SDK Size

title develop branch diff status
js_bundle_size 369 KB 369 KB -180 B 🚀

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.

3 participants