Skip to content

Migrate from coil2 to coil3 #1860

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

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

SimonMarquis
Copy link
Contributor

  • Use BOM platform dependency.
  • Remove -kt suffix from dependency name has they serve no real purpose.
  • Add coil-network artifact to configure CallFactory.
  • Although "First party Decoder" SvgDecoder is now automatically added to each new ImageLoader through a service loader, keeping it in code prevents us from removing the dependency that would appear unused otherwise.
  • Replace explicit respectCacheHeaders(false) with CacheStrategy::DEFAULT which does not respect cache-control headers.
  • Migrate ImageLoaderFactory to SingletonImageLoader.Factory
  • Inline TOML dependencies (see Cleanup Gradle dependencies and miscellaneous improvements #1856)

docs: https://coil-kt.github.io/coil/upgrading_to_coil3/

- Use BOM platform dependency.
- Remove -kt suffix from dependency name has they serve no real purpose.
- Add `coil-network` artifact to configure `CallFactory`.
- Although "First party Decoder" `SvgDecoder` is now automatically added to each new ImageLoader through a service loader, keeping it in code prevents us from removing the dependency that would appear unused otherwise.
- Replace explicit `respectCacheHeaders(false)` with `CacheStrategy::DEFAULT` which does not respect cache-control headers.
- Migrate `ImageLoaderFactory` to `SingletonImageLoader.Factory`
- Inline TOML dependencies (see android#1856)

docs: https://coil-kt.github.io/coil/upgrading_to_coil3/
…ckException

```
Roborazzi: Error: [AccessibilityViewCheckResult check=AccessibilityHierarchyCheckResult ERROR SpeakableTextPresentCheck 4 [ViewHierarchyElement class=android.view.View testTag=newsResourceCard:3 bounds=Rect(1058, 2126 - 1947, 2523)] null num_answers:0 view=null]
```
@@ -118,6 +118,7 @@ fun NewsResourceCardExpanded(
// Pass null for action to only override the label and not the actual action.
modifier = modifier
.semantics {
contentDescription = clickActionLabel
Copy link
Contributor Author

@SimonMarquis SimonMarquis Apr 5, 2025

Choose a reason for hiding this comment

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

Let me know if you prefer to use userNewsResource.title or if another workaround might be better (adding a header semantic somewhere in the card maybe?)

(error logs)

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.

1 participant