Asset images are loaded asynchronously on Android
Nobody has claimed this yet.
- Dominant language
- Swift
- Stars
- 330
- Forks
- 76
- Avg merge
- 3h 6m
- Merged PRs (30d)
- 1
Description
All asset images are being loaded with coil3.compose.SubcomposeAsyncImage.
As a result, when you navigate to the Image playground in the showcase, on Android, you see a layout shift as the asset images pop in, but on iOS, there isn't.
Ordinarily when using AsyncImage I'd use its placeholder: argument to prevent layout shift, but this is just a simple Image, so there's no way to use a placeholder.
Ideally, asset images should loaded synchronously by default. If not that, then there should be some way to load asset images synchronously. If not that, then there should at least be a way to provide a placeholder for asynchronously loaded asset images, and this should be documented.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start at Sources/SkipUI/SkipUI/Components/Image.swift around line 155 and inspect how asset images use coil3.compose.SubcomposeAsyncImage on Android. Compare the Android behavior with the iOS implementation and the Image playground in the showcase. Done means the Android asset images no longer cause a layout shift, or the supported placeholder behavior is documented if synchronous loading is not possible.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- android, swift
- Domain
- mobile
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 48/100