Skip to content

[Due for payment 2025-12-12] [Due for payment 2025-11-26] Add clear migration guide and tooling for icons and illustrations #74599

Description

@mountiny

Coming from Slack here

Background:

We recently introduced lazy loading for icons and illustrations (see proposal and related PR) to improve startup performance by moving these assets into separate bundles. This approach keeps the main bundle smaller, allowing the app to load faster while deferring l assets until needed. To fully benefit, we need a consistent and enforced migration process so all assets use the new system and no new ones are added incorrectly

The app currently uses lazy loading for only part of its icon and illustration set. Many remaining assets still use the old import approach. There’s no documentation or tooling to help contributors migrate or verify new additions, which slows adoption and risks regression.

Problem:

When developers add or modify icons without guidance, they may skip lazy loading. As a result, icons remain in the main bundle, increasing its size and slowing down initial load time.

Solution:

  • Add documentation explaining how to migrate existing icons and handle new ones.
  • Create and use a script locally during the migration to scan the codebase and identify icons that haven’t yet been updated. Once the migration is complete, the script can be removed.
  • Add an ESLint rule to warn about direct imports in changed files.

Draft PR: #74169

Next steps:

  1. Create the guidelines
  2. List out all the icons and illustrations to lazy load
  3. Bundle them to buckets of roughly similar size and complexity to migrate
  4. Create issue for each of the bucket for the community to handle
  5. Use this issue as parent issue to track it
  6. How to ensure all new icons and illustrations are added as lazyloaded?
Issue OwnerCurrent Issue Owner: @bfitzexpensify

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

Awaiting PaymentAuto-added when associated PR is deployed to productionBugSomething is broken. Auto assigns a BugZero manager.WeeklyKSv2

Type

No type

Projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions