-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
[Nullability Annotations to Java Classes] Use Updated and Null Proof MediaModel
Class (breaking
)
#19506
[Nullability Annotations to Java Classes] Use Updated and Null Proof MediaModel
Class (breaking
)
#19506
Conversation
This 'FluxC' PR hash updates the library to that branch version where the 'MediaModel' is updated to its new null proof version. FluxC PR: https://github.com/wordpress-mobile/ WordPress-FluxC-Android/pull/2886 This step is required in order to check that these 'FluxC' related changes work as expected for WPAndroid.
Warnings: - Kotlin: "'constructor MediaModel()' is deprecated. Deprecated in Java" - Java: "'MediaModel()' is deprecated"
FYI: This change changes the logic to only checking for not blank instead.
Detekt Warning: "SpreadOperator: In most cases using a spread operator causes a full copy of the array to be created before calling a method. This may result in a performance penalty." Now that this warning is suppressed close to source, it is no longer needed to be in the baseline.
📲 You can test the changes from this Pull Request in WordPress by scanning the QR code below to install the corresponding build.
|
📲 You can test the changes from this Pull Request in Jetpack by scanning the QR code below to install the corresponding build.
|
… into analysis/use-updated-and-null-proof-media-model-class # Conflicts: # build.gradle
This 'FluxC' PR hash updates the library to that branch version where the 'MediaModel' is updated to its new null proof version. FluxC PR: https://github.com/wordpress-mobile/ WordPress-FluxC-Android/pull/2886 This step is required in order to check that these 'FluxC' related changes work as expected for WPAndroid. ------------------------------------------------------------------------ FYI: This change is an addition to f6f9375. This change is necessary in order to overcome and resolve new merge conflicts.
FYI: I'll resolve the |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hey @ParaskP7
I have tested the following scenarios and gone through the code changes. Everything looks good to me 👍🏼
- Publish a post and page with featured image + without featured image
- Publish a post and page with image and video
- Edit the image in a post and page
- Upload image and video
- Add image from tenor library
- Update the title, description and caption of an image and a video through media
- Download/Save the media to the device - from the detail screen of image/video
- Delete an image/video
I am not sure if I have missed any other scenarios. I am approving but not merging so that you can take of care updating the fluxC version once the FluxC PR is merged.
Awesome, thank for reviewing and testing this @AjeshRPai , you rock! 🙇 ❤️ 🚀 FYI: I'll proceed with the merging myself. 🙏 |
… into analysis/use-updated-and-null-proof-media-model-class # Conflicts: # build.gradle
This 'FluxC' hash updates the library to that 'trunk' version where the 'Media' model classes are updated to their new null proof version. FluxC PR: https://github.com/wordpress-mobile/ WordPress-FluxC-Android/pull/2886
Generated by 🚫 Danger |
Found 1 violations: The PR caused the following dependency changes:-+--- org.wordpress:fluxc:{strictly trunk-8712ec791066f2d86bb9aa6d21710ee7075fac05} -> trunk-8712ec791066f2d86bb9aa6d21710ee7075fac05
-| +--- org.wordpress:wellsql:2.0.0
-| | +--- androidx.annotation:annotation:1.2.0 -> 1.6.0 (*)
-| | \--- org.wordpress.wellsql:wellsql-annotations:2.0.0
-| +--- org.wordpress.fluxc:fluxc-annotations:trunk-8712ec791066f2d86bb9aa6d21710ee7075fac05
-| +--- org.greenrobot:eventbus:3.3.1
-| | \--- org.greenrobot:eventbus-java:3.3.1
-| +--- com.squareup.okhttp3:okhttp:4.9.0 -> 4.11.0 (*)
-| +--- com.android.volley:volley:1.1.1 -> 1.2.1
-| +--- androidx.paging:paging-runtime:2.1.2
-| | +--- androidx.paging:paging-common:2.1.2
-| | | +--- androidx.annotation:annotation:1.0.0 -> 1.6.0 (*)
-| | | \--- androidx.arch.core:core-common:2.0.0 -> 2.2.0 (*)
-| | +--- androidx.arch.core:core-runtime:2.0.0 -> 2.2.0 (*)
-| | +--- androidx.lifecycle:lifecycle-runtime:2.0.0 -> 2.6.2 (*)
-| | +--- androidx.lifecycle:lifecycle-livedata:2.0.0 -> 2.6.2 (*)
-| | \--- androidx.recyclerview:recyclerview:1.0.0 -> 1.3.0 (*)
-| +--- com.goterl:lazysodium-android:5.0.2
-| +--- net.java.dev.jna:jna:5.5.0
-| +--- org.jetbrains.kotlin:kotlin-stdlib-jdk8:1.6.20 -> 1.8.21 (*)
-| +--- org.jetbrains.kotlin:kotlin-android-extensions-runtime:1.6.20 -> 1.8.21 (*)
-| +--- androidx.appcompat:appcompat:1.0.2 -> 1.6.1 (*)
-| +--- androidx.recyclerview:recyclerview:1.0.0 -> 1.3.0 (*)
-| +--- androidx.exifinterface:exifinterface:1.0.0 -> 1.3.6 (*)
-| +--- androidx.security:security-crypto:1.0.0
-| | +--- androidx.annotation:annotation:1.1.0 -> 1.6.0 (*)
-| | \--- com.google.crypto.tink:tink-android:1.5.0
-| +--- com.squareup.okhttp3:okhttp-urlconnection:4.9.0 -> 4.9.2 (*)
-| +--- com.google.code.gson:gson:2.8.5 -> 2.10.1
-| +--- org.apache.commons:commons-text:1.10.0
-| | \--- org.apache.commons:commons-lang3:3.12.0
-| +--- androidx.room:room-runtime:2.4.2 -> 2.5.0
-| | +--- androidx.annotation:annotation-experimental:1.1.0 -> 1.3.0 (*)
-| | +--- androidx.arch.core:core-runtime:2.0.1 -> 2.2.0 (*)
-| | +--- androidx.room:room-common:2.5.0
-| | | +--- androidx.annotation:annotation:1.3.0 -> 1.6.0 (*)
-| | | \--- org.jetbrains.kotlin:kotlin-stdlib-jdk8:1.7.20 -> 1.8.21 (*)
-| | +--- androidx.sqlite:sqlite:2.3.0
-| | | +--- androidx.annotation:annotation:1.0.0 -> 1.6.0 (*)
-| | | \--- org.jetbrains.kotlin:kotlin-stdlib:1.7.20 -> 1.8.22 (*)
-| | \--- androidx.sqlite:sqlite-framework:2.3.0
-| | +--- androidx.annotation:annotation:1.2.0 -> 1.6.0 (*)
-| | +--- androidx.sqlite:sqlite:2.3.0 (*)
-| | \--- org.jetbrains.kotlin:kotlin-stdlib:1.7.20 -> 1.8.22 (*)
-| +--- androidx.room:room-ktx:2.4.2
-| | +--- androidx.room:room-common:2.4.2 -> 2.5.0 (*)
-| | +--- androidx.room:room-runtime:2.4.2 -> 2.5.0 (*)
-| | +--- org.jetbrains.kotlin:kotlin-stdlib:1.6.10 -> 1.8.22 (*)
-| | \--- org.jetbrains.kotlinx:kotlinx-coroutines-android:1.5.2 -> 1.7.3 (*)
-| +--- com.google.dagger:dagger:2.42 -> 2.46.1
-| | \--- javax.inject:javax.inject:1
-| +--- org.jetbrains.kotlinx:kotlinx-coroutines-core:1.3.9 -> 1.7.3 (*)
-| \--- org.jetbrains.kotlinx:kotlinx-coroutines-android:1.3.9 -> 1.7.3 (*)
++--- org.wordpress:fluxc:{strictly trunk-e71a4dc765b7785f753e9224512e0a76c43104e4} -> trunk-e71a4dc765b7785f753e9224512e0a76c43104e4
+| +--- org.wordpress:wellsql:2.0.0
+| | +--- androidx.annotation:annotation:1.2.0 -> 1.6.0 (*)
+| | \--- org.wordpress.wellsql:wellsql-annotations:2.0.0
+| +--- org.wordpress.fluxc:fluxc-annotations:trunk-e71a4dc765b7785f753e9224512e0a76c43104e4
+| +--- org.greenrobot:eventbus:3.3.1
+| | \--- org.greenrobot:eventbus-java:3.3.1
+| +--- com.squareup.okhttp3:okhttp:4.9.0 -> 4.11.0 (*)
+| +--- com.android.volley:volley:1.1.1 -> 1.2.1
+| +--- androidx.paging:paging-runtime:2.1.2
+| | +--- androidx.paging:paging-common:2.1.2
+| | | +--- androidx.annotation:annotation:1.0.0 -> 1.6.0 (*)
+| | | \--- androidx.arch.core:core-common:2.0.0 -> 2.2.0 (*)
+| | +--- androidx.arch.core:core-runtime:2.0.0 -> 2.2.0 (*)
+| | +--- androidx.lifecycle:lifecycle-runtime:2.0.0 -> 2.6.2 (*)
+| | +--- androidx.lifecycle:lifecycle-livedata:2.0.0 -> 2.6.2 (*)
+| | \--- androidx.recyclerview:recyclerview:1.0.0 -> 1.3.0 (*)
+| +--- com.goterl:lazysodium-android:5.0.2
+| +--- net.java.dev.jna:jna:5.5.0
+| +--- org.jetbrains.kotlin:kotlin-stdlib-jdk8:1.6.20 -> 1.8.21 (*)
+| +--- org.jetbrains.kotlin:kotlin-android-extensions-runtime:1.6.20 -> 1.8.21 (*)
+| +--- androidx.appcompat:appcompat:1.0.2 -> 1.6.1 (*)
+| +--- androidx.recyclerview:recyclerview:1.0.0 -> 1.3.0 (*)
+| +--- androidx.exifinterface:exifinterface:1.0.0 -> 1.3.6 (*)
+| +--- androidx.security:security-crypto:1.0.0
+| | +--- androidx.annotation:annotation:1.1.0 -> 1.6.0 (*)
+| | \--- com.google.crypto.tink:tink-android:1.5.0
+| +--- com.squareup.okhttp3:okhttp-urlconnection:4.9.0 -> 4.9.2 (*)
+| +--- com.google.code.gson:gson:2.8.5 -> 2.10.1
+| +--- org.apache.commons:commons-text:1.10.0
+| | \--- org.apache.commons:commons-lang3:3.12.0
+| +--- androidx.room:room-runtime:2.4.2 -> 2.5.0
+| | +--- androidx.annotation:annotation-experimental:1.1.0 -> 1.3.0 (*)
+| | +--- androidx.arch.core:core-runtime:2.0.1 -> 2.2.0 (*)
+| | +--- androidx.room:room-common:2.5.0
+| | | +--- androidx.annotation:annotation:1.3.0 -> 1.6.0 (*)
+| | | \--- org.jetbrains.kotlin:kotlin-stdlib-jdk8:1.7.20 -> 1.8.21 (*)
+| | +--- androidx.sqlite:sqlite:2.3.0
+| | | +--- androidx.annotation:annotation:1.0.0 -> 1.6.0 (*)
+| | | \--- org.jetbrains.kotlin:kotlin-stdlib:1.7.20 -> 1.8.22 (*)
+| | \--- androidx.sqlite:sqlite-framework:2.3.0
+| | +--- androidx.annotation:annotation:1.2.0 -> 1.6.0 (*)
+| | +--- androidx.sqlite:sqlite:2.3.0 (*)
+| | \--- org.jetbrains.kotlin:kotlin-stdlib:1.7.20 -> 1.8.22 (*)
+| +--- androidx.room:room-ktx:2.4.2
+| | +--- androidx.room:room-common:2.4.2 -> 2.5.0 (*)
+| | +--- androidx.room:room-runtime:2.4.2 -> 2.5.0 (*)
+| | +--- org.jetbrains.kotlin:kotlin-stdlib:1.6.10 -> 1.8.22 (*)
+| | \--- org.jetbrains.kotlinx:kotlinx-coroutines-android:1.5.2 -> 1.7.3 (*)
+| +--- com.google.dagger:dagger:2.42 -> 2.46.1
+| | \--- javax.inject:javax.inject:1
+| +--- org.jetbrains.kotlinx:kotlinx-coroutines-core:1.3.9 -> 1.7.3 (*)
+| \--- org.jetbrains.kotlinx:kotlinx-coroutines-android:1.3.9 -> 1.7.3 (*)
\--- org.wordpress:login:trunk-9963d78096edf65f8704b803e5b93c08fc9174cd
- \--- org.wordpress:fluxc:2.21.0 -> trunk-8712ec791066f2d86bb9aa6d21710ee7075fac05 (*)
+ \--- org.wordpress:fluxc:2.21.0 -> trunk-e71a4dc765b7785f753e9224512e0a76c43104e4 (*)
Please review and act accordingly
|
Parent FluxC#2799
Accompanying FluxC#2886
This PR accompanying the above FluxC PR, and uses an updated and null-proof MediaModel.java class.
FYI: This change is
breaking
, meaning that any client that depended on the MediaModel.java model should update to the new APIs (non-default constructors
) as the existing API (default constructor
) are now deprecated. As such, this change is inherentlyrisky
, meaning that there are compile-time changes associated with this change and thus needs testing to verify correctness, both on the library's and client's side.@AjeshRPai I added you as the main reviewer, not so randomly (it being a continuation of FluxC#2878 and #19428), since I just wanted someone from the Jetpack/WordPress mobile team to be aware of and sign-off on that change. Feel free to merge this PR directly yourself if you deem so.
FluxC Update List:
Deprecation Resolution List (
breaking
):Nullability Checks List:
Warnings Suppression List:
To Test (
REST
):To Test (
XMLRPC
):Media Screens [MediaBrowserActivity.java + MediaGridFragment.kt + MediaSettingsActivity.java + MediaPreviewActivity.java + MediaPreviewFragment.java]
ℹ️ This test applies to both, the
Jetpack
andWordPress
app.Media
screen, verify it is shown and functioning as expected.Media Settings
screen is shown and functioning as expected.Media Preview
screen is shown and functioning as expected.Merge instructions:
wordPressFluxCVersion
to point to thetrunk
hash that includes the above solution.[Status] Not Ready for Merge
label.Regression Notes
Potential unintended areas of impact
What I did to test those areas of impact (or what existing automated tests I relied on)
To test
section above.What automated tests I added (or what prevented me from doing so)
PR submission checklist:
RELEASE-NOTES.txt
if necessary.UI Changes testing checklist: