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

Introduce AVIF displaying support #12835

Merged
merged 9 commits into from
Oct 30, 2024
Merged

Conversation

ThomazFB
Copy link
Contributor

@ThomazFB ThomazFB commented Oct 29, 2024

Summary

Depends on wordpress-mobile/WordPress-Utils-Android#154

Fix issue #12810 by introducing an update from the PhotonUtils in the WordPress-Utils-Android and adding the AVIF integration to the Glide dependency.

There's no code to cover with unit tests in the PR changelog.

How to Test

To test this, you will need at least one product configured with an image in the AVIF format. I highly recommend using this one from an open source AVIF samples repository.

Please bear in mind that the AVIF format supports multiple different metadata and configurations, and the Android OS doesn't support them all, some AVIF images will load, while others may not.

The testing should ensure that sections like Orders, Product Details, Product List, Product Gallery, and related sections successfully display the image in the AVIF format.

Reviewer (or Author, in the case of optional code reviews):

Please make sure these conditions are met before approving the PR, or request changes if the PR needs improvement:

  • The PR is small and has a clear, single focus, or a valid explanation is provided in the description. If needed, please request to split it into smaller PRs.
  • Ensure Adequate Unit Test Coverage: The changes are reasonably covered by unit tests or an explanation is provided in the PR description.
  • Manual Testing: The author listed all the tests they ran, including smoke tests when needed (e.g., for refactorings). The reviewer confirmed that the PR works as expected on big (tablet) and small (phone) in case of UI changes, and no regressions are added.

@dangermattic
Copy link
Collaborator

dangermattic commented Oct 29, 2024

1 Warning
⚠️ This PR is assigned to the milestone 21.0. The due date for this milestone has already passed.
Please assign it to a milestone with a later deadline or check whether the release for this milestone has already been finished.

Generated by 🚫 Danger

@wpmobilebot
Copy link
Collaborator

wpmobilebot commented Oct 29, 2024

Project dependencies changes

The following changes in project dependencies were detected (configuration vanillaReleaseRuntimeClasspath):

list
New Dependencies
com.github.bumptech.glide:avif-integration:4.16.0
org.aomedia.avif.android:avif:0.11.1.3c786d2

Upgraded Dependencies
org.wordpress:utils:3.15.0, (changed from 3.5.0)
tree
-+--- org.wordpress:utils:3.5.0
-|    +--- org.apache.commons:commons-text:1.10.0
-|    |    \--- org.apache.commons:commons-lang3:3.12.0
-|    +--- com.android.volley:volley:1.2.0
-|    +--- com.google.android.material:material:1.2.1 -> 1.12.0 (*)
-|    +--- androidx.swiperefreshlayout:swiperefreshlayout:1.1.0
-|    |    +--- androidx.annotation:annotation:1.1.0 -> 1.8.0 (*)
-|    |    +--- androidx.core:core:1.1.0 -> 1.13.1 (*)
-|    |    \--- androidx.interpolator:interpolator:1.0.0 (*)
-|    +--- androidx.recyclerview:recyclerview:1.0.0 -> 1.3.2 (*)
-|    +--- org.greenrobot:eventbus:3.3.1
-|    |    \--- org.greenrobot:eventbus-java:3.3.1
-|    +--- androidx.core:core-ktx:1.5.0 -> 1.13.1 (*)
-|    \--- org.jetbrains.kotlin:kotlin-stdlib-jdk7:1.6.10 -> 1.9.10 (*)
++--- org.wordpress:utils:3.15.0
+|    +--- org.apache.commons:commons-text:1.10.0
+|    |    \--- org.apache.commons:commons-lang3:3.12.0
+|    +--- com.google.android.material:material:1.2.1 -> 1.12.0 (*)
+|    +--- androidx.swiperefreshlayout:swiperefreshlayout:1.1.0
+|    |    +--- androidx.annotation:annotation:1.1.0 -> 1.8.0 (*)
+|    |    +--- androidx.core:core:1.1.0 -> 1.13.1 (*)
+|    |    \--- androidx.interpolator:interpolator:1.0.0 (*)
+|    +--- androidx.recyclerview:recyclerview:1.0.0 -> 1.3.2 (*)
+|    +--- org.greenrobot:eventbus:3.3.1
+|    |    \--- org.greenrobot:eventbus-java:3.3.1
+|    +--- org.greenrobot:eventbus-java:3.3.1
+|    +--- androidx.core:core:1.5.0 -> 1.13.1 (*)
+|    \--- org.jetbrains.kotlin:kotlin-stdlib:1.9.24 -> 1.9.25 (*)
 \--- com.automattic.tracks:experimentation:5.0.0
-     \--- org.wordpress:utils:2.3.0 -> 3.5.0 (*)
+     \--- org.wordpress:utils:2.3.0 -> 3.15.0 (*)
+\--- com.github.bumptech.glide:avif-integration:4.16.0
+     +--- com.github.bumptech.glide:glide:4.16.0 (*)
+     +--- org.aomedia.avif.android:avif:0.11.1.3c786d2
+     \--- com.google.guava:guava:28.1-android -> 33.1.0-android (*)

@wpmobilebot
Copy link
Collaborator

wpmobilebot commented Oct 29, 2024

📲 You can test the changes from this Pull Request in WooCommerce-Wear Android by scanning the QR code below to install the corresponding build.
App Name WooCommerce-Wear Android
Platform⌚️ Wear OS
FlavorJalapeno
Build TypeDebug
Commita37683d
Direct Downloadwoocommerce-wear-prototype-build-pr12835-a37683d.apk

@wpmobilebot
Copy link
Collaborator

wpmobilebot commented Oct 29, 2024

📲 You can test the changes from this Pull Request in WooCommerce Android by scanning the QR code below to install the corresponding build.

App Name WooCommerce Android
Platform📱 Mobile
FlavorJalapeno
Build TypeDebug
Commita37683d
Direct Downloadwoocommerce-prototype-build-pr12835-a37683d.apk

@ThomazFB ThomazFB modified the milestones: 21.1, 21.0 Oct 29, 2024
@ThomazFB ThomazFB changed the title [Photo Support] Introduce avif support [Photo Support] Introduce AVIF displaying support Oct 29, 2024
@ThomazFB ThomazFB changed the title [Photo Support] Introduce AVIF displaying support Introduce AVIF displaying support Oct 29, 2024
@ThomazFB ThomazFB marked this pull request as ready for review October 29, 2024 17:13
@ThomazFB ThomazFB added type: enhancement A request for an enhancement. feature: order details Related to order details. feature: product details Related to adding or editing products, includes product settings. feature: product list Related to the product list. labels Oct 29, 2024
Copy link
Contributor

@atorresveiga atorresveiga left a comment

Choose a reason for hiding this comment

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

Looks great @ThomazFB! Simple and nice solution.

The only thing I noted was that the image on the product selection does not seem to have the same style. This is not related to your changes, so I'm approving the PR.

@ThomazFB ThomazFB merged commit ab75773 into trunk Oct 30, 2024
15 checks passed
@ThomazFB ThomazFB deleted the issue/introduce-avif-support branch October 30, 2024 05:56
@ThomazFB ThomazFB linked an issue Oct 30, 2024 that may be closed by this pull request
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature: order details Related to order details. feature: product details Related to adding or editing products, includes product settings. feature: product list Related to the product list. type: enhancement A request for an enhancement.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Support AVIF Image format
4 participants