Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use standard UIImages instead of custom LazyImages #654

Merged
merged 1 commit into from
Feb 11, 2021

Conversation

ejensen
Copy link
Contributor

@ejensen ejensen commented Feb 11, 2021

Changes

Replaces the custom LazyImage type with standard UIImages. This enabled the use of symbol images (SF Symbols), better supports dynamic image configurations, and reduces memory use.

This is a non-breaking change since there is a deprecated typeAlias for LazyImage that will automatically suggest migration to UIImage:
migration-auto-correct

References

Memory Usage

LazyImage UIImage
login - before login - after
signup - before signup - after

Testing

  • This change adds unit test coverage
  • This change has been tested on the latest version of the platform/language or why not

Checklist

This enables dynamic images needed to support dark mode and system symbols
@ejensen ejensen requested a review from a team as a code owner February 11, 2021 20:10
@Widcket
Copy link
Contributor

Widcket commented Feb 11, 2021

@ejensen Thanks for the PR. Given that LazyImage is a public type, replacing it is a source breaking change regardless of Xcode helpers. So unfortunately I can't merge this.

@Widcket Widcket closed this Feb 11, 2021
@ejensen
Copy link
Contributor Author

ejensen commented Feb 11, 2021

@Widcket Please see the note in the description about how this is not a breaking change because there is a typeAlias that handles references to LazyImage. Here's a screenshot of the sample app showing that existing references to LazyImage will continue to compile, and has a deprecation warning to optionally migrate to UIImage. I can remove the deprecation warning if you prefer.

This is a non-breaking change since there is a deprecated typeAlias for LazyImage that will automatically suggest migration to UIImage:
migration-auto-correct

@Widcket Widcket reopened this Feb 11, 2021
@Widcket Widcket merged commit 61f0172 into auth0:master Feb 11, 2021
@Widcket Widcket deleted the uiimage branch February 11, 2021 23:13
@Widcket
Copy link
Contributor

Widcket commented Feb 11, 2021

@ejensen indeed, I missed it. Thanks!

@Widcket Widcket added this to the vNext milestone Mar 9, 2021
@Widcket Widcket mentioned this pull request Mar 9, 2021
@Widcket
Copy link
Contributor

Widcket commented Mar 10, 2021

This is now out in v2.22.0.

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

Successfully merging this pull request may close these issues.

None yet

2 participants