8000 MBL-1420: Webp format now supported for animated gifs by Arkariang · Pull Request #2039 · kickstarter/android-oss · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

MBL-1420: Webp format now supported for animated gifs #2039

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

Merged
merged 15 commits into from
May 15, 2024

Conversation

Arkariang
Copy link
Contributor
@Arkariang Arkariang commented May 14, 2024

📲 What

  • Added GlideWebpDecoder is a Glide integration library for decoding and displaying webp images on Android platforms.
  • Apply WebpDrawableTransformation to wrap the original BitmapTransformation when loading webp images with Glide request.
  • Placeholder removed when dealing with RequestListener for resources (Images on project campaign), when there was some issue loading the image the placeholder will not be removed.
  • DiskCacheStrategy.AUTOMATIC intelligently chooses a cache strategy based on the resource, added for gifs, webp, and images on project campaign description.

🤔 Why

  • Animated webp gifs were not visible on campaign description for some projects like: runa , or formosa-tea

🛠 How

  • The parser was able to return the URL, but as it was an unexpected format never rendered.
  • Had to add [GlideWebpDecoder] to be able to render animated webp gifs on android.

👀 See

Gifs loading! before there was a transparent rectangle presented (placeholder) when something was not loading right, or directly not appearing at all.

Gifs.mp4

| | |

📋 QA

  • Load as many project campaigns as possible, compare them with the we version and make sure the gifs are loading correctly. This two projects contain webp gifs runa , or formosa-tea

Story 📖

MBL-1420

return isFirstResource
}
})
.placeholder(ColorDrawable(Color.TRANSPARENT))
.diskCacheStrategy(DiskCacheStrategy.ALL)
.diskCacheStrategy(DiskCacheStrategy.AUTOMATIC)
Copy link
Contributor Author
@Arkariang Arkariang May 14, 2024

Choose a reason for hiding this comment

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

DiskCacheStrategy.AUTOMATIC intelligently chooses a cache strategy based on the resource & placeholder removed

@codecov-commenter
Copy link

Codecov Report

Attention: Patch coverage is 4.34783% with 22 lines in your changes are missing coverage. Please review.

Project coverage is 67.82%. Comparing base (9ded302) to head (7e4b88c).

Files Patch % Lines
...java/com/kickstarter/ui/extensions/ImageViewExt.kt 0.00% 21 Missing ⚠️
...com/kickstarter/libs/utils/extensions/StringExt.kt 50.00% 0 Missing and 1 partial ⚠️

❗ Your organization needs to install the Codecov GitHub app to enable full functionality.

Additional details and impacted files
@@             Coverage Diff              @@
##             master    #2039      +/-   ##
============================================
- Coverage     67.86%   67.82%   -0.05%     
  Complexity     2096     2096              
============================================
  Files           353      353              
  Lines         21539    21554      +15     
  Branches       3040     3043       +3     
============================================
  Hits          14618    14618              
- Misses         5282     5295      +13     
- Partials       1639     1641       +2     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@Arkariang Arkariang changed the title Imartin/mbl 1420 MBL-1420: Webp format now supported for animated gifs May 14, 2024
@Arkariang Arkariang marked this pull request as ready for review May 14, 2024 22:29
@Arkariang Arkariang self-assigned this May 14, 2024
@Arkariang Arkariang merged commit 4ce4997 into master May 15, 2024
3 checks passed
@Arkariang Arkariang deleted the imartin/MBL-1420 branch May 15, 2024 16:58
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.

3 participants
0