Skip to content

Conversation

t0maboro
Copy link
Contributor

@t0maboro t0maboro commented Sep 15, 2025

Description

In the initial approach, we used Coil image loading library. However, after the 1st release, Coil has introduced several issues that had an impact on the stability and maintainability.

After reevaluating other options, we've decided to try migrating to Fresco. This choice aligns better because React Native also relies on Fresco internally. Using Fresco should improve consistency with the RN and reduce our maintenance overhead.

One known limitation is that Fresco doesn't support loading images in SVG format. We’ll need to explore alternative strategies to adapt.

Note:

Slightly depends on: #3214

Fresco doesn't support SVGs, so we decided to handle them by passing assets via the AndroidStudio as vector icons - this approach simplifies a lot of things, especially that

PlatformIconAndroid =
  | {
      type: 'drawableResourceAndroid';
      name: string;
    }

will cover SVGs, so we can omit adding a support here. I'll ensure to mention there that SVG should be passed with drawableResourceAndroid only.

Changes

  • Removed Coil
  • Replaced logic for Coil ImageLoader with Fresco APIs
  • Extracted ImageLoader to a separate file

Test code and steps to reproduce

Tested with BottomTabs example.

Checklist

  • Included code example that can be used to test this change
  • Ensured that CI passes

@t0maboro t0maboro marked this pull request as ready for review September 15, 2025 17:18
@t0maboro t0maboro changed the title feat(android, Tabs): Update approach for loading external sources for tab icons feat(Android, Tabs): Update approach for loading external sources for tab icons Sep 15, 2025
Copy link
Contributor

@kligarski kligarski left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I haven't checked the runtime but it looks good!

Copy link
Member

@kkafar kkafar left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code changes look good. Have a couple of questions / suggestions. Please answer them.

I'll test the runtime in a moment.

@t0maboro t0maboro requested a review from kkafar September 23, 2025 13:16
Copy link
Member

@kkafar kkafar left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's just make it internal and we're looking good.

I'll test runtime in a moment & if everything is fine, we can proceed.

Copy link
Member

@kkafar kkafar left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hey! Started to test the runtime & noticed that our TestBottomTabs require update!

Can we create dedicated test / example screen (maybe that's even better) that tests images with bottom tabs?

Edit: was checked out on wrong PR, sorry for confusion

Copy link
Member

@kkafar kkafar left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tested the runtime -- seems to work fine. Great job here.

Note

There is one thing I still don't like - and it is that we have a icon loading logic inside component view manager. I don't think this should block this PR from landing, however we should create a ticket for a small refactor (and first discussion about how it should be organised). Would you do it?

@t0maboro
Copy link
Contributor Author

@t0maboro t0maboro merged commit 618c21f into main Sep 23, 2025
5 checks passed
@t0maboro t0maboro deleted the @t0maboro/drop-coil-use-fresco branch September 23, 2025 15:25
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