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

[Nullability Annotations to Java Classes] Use Updated and Null Proof Theme Payload Classes (safe) #19529

Merged

Conversation

ParaskP7
Copy link
Contributor

@ParaskP7 ParaskP7 commented Nov 3, 2023

Parent FluxC#2798
Accompanying FluxC#2893

This PR accompanying the above FluxC PR, and uses the updated and null-proof Theme payload classes.

FYI: This change is safe, meaning that there shouldn't be any (major) compile-time changes associated with this change.


@antonis I added you as the main reviewer, not so randomly, due to the fact that you're also reviewing FluxC#2893, and I wanted you from the Jetpack/WordPress mobile team again 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:

  1. Update fluxc version to pr hash (2893)
  2. Update fluxc version to pr hash (2893)
  3. Update fluxc version to trunk hash (2893)

Nullability Checks List:

  1. Un-guard usages of non-null on starter designs fetched designs

Test List:

  1. Resolve blaze campaign model parameter target urn related warnings (unrelated)

To Test (REST):

  • Smoke test any theme related functionality on both, the WordPress and Jetpack apps, and see if everything is working as expected. For a couple of examples, you can expand and follow the inner and more explicit test steps within:

To Test (XMLRPC):

N/A

1. [JP/WP] Themes Screen [ThemeBrowserActivity.java + ThemeBrowserFragment.kt]

ℹ️ This test applies to both, the Jetpack and WordPress apps.

  • Go to Themes screen, verify it is shown and functioning as expected.
  • For example try scrolling up-and-down and searching for a theme.
  • Check your current theme and tap on the Customize, Details and Support buttons. Verify that everything works as expected.
  • From the themes list, find your current theme on top, click on its menu items and again tap on the Customize, Details and Support buttons. Verify that everything works as expected.
  • From the themes list, find another theme, other than your current one, click on its menu items and again tap on the Details and Support buttons. Verify that everything works as expected.
  • Then, tap on the View and Try & Customize buttons. Verify that everything works as expected.
  • Finally, tap on Activate button. Verify that the selected theme is activated and that everything works as expected.
2. [JP] Site Creation Screens [SiteCreationActivity.kt + HomePagePickerFragment.kt + DesignPreviewFragment.kt]

ℹ️ This test applies to the Jetpack app only.

  • From Choose Site, tap on the + button on top and via the Create WordPress.com site, go to Site Creation screen, verify it is shown and functioning as expected.
  • For example, while on the What's your website about? screen, select a topic from the list of topics (ie. Food).
  • Then, while on the Choose a theme screen, select a theme from the list of themes (per category, ie About).
  • Finally, verify that the Preview screen is shown and functioning as expected.

Merge instructions:

  1. Wait for the accompanying FluxC#2893 PR to be merged.
  2. Update wordPressFluxCVersion to point to the trunk hash that includes the above solution.
  3. Remove the [Status] Not Ready for Merge label.
  4. Merge this PR.

Regression Notes

  1. Potential unintended areas of impact

    • N/A
  2. What I did to test those areas of impact (or what existing automated tests I relied on)

    • See To test section above.
  3. What automated tests I added (or what prevented me from doing so)

    • N/A

PR submission checklist:

  • I have completed the Regression Notes.
  • I have considered adding accessibility improvements for my changes.
  • I have considered if this change warrants user-facing release notes and have added them to RELEASE-NOTES.txt if necessary.

UI Changes testing checklist:

  • Portrait and landscape orientations.
  • Light and dark modes.
  • Fonts: Larger, smaller and bold text.
  • High contrast.
  • Talkback.
  • Languages with large words or with letters/accents not frequently used in English.
  • Right-to-left languages. (Even if translation isn’t complete, formatting should still respect the right-to-left layout)
  • Large and small screen sizes. (Tablet and smaller phones)
  • Multi-tasking: Split screen and Pop-up view. (Android 10 or higher)

This 'FluxC' PR hash updates the library to that branch version
where the 'Theme' payload classes are updated to their new null proof
version.

FluxC PR: https://github.com/wordpress-mobile/
WordPress-FluxC-Android/pull/2893

This step is required in order to check that these 'FluxC'
related changes work as expected for WPAndroid.
Warning: "No value passed for parameter 'targetUrn'"

FYI: These 'BlazeCampaignModel' test compile errors are unrelated to the
theme payload changes and only started to appear because 'FluxC' got
updated to that version where there is now a new 'targetUrn' constructor
argument on this model.

PS: At some point, WPAndroid should get updated accordingly anyway, but
until then this commit will at least fix any testing related CI issues.
@wpmobilebot
Copy link
Contributor

wpmobilebot commented Nov 3, 2023

WordPress📲 You can test the changes from this Pull Request in WordPress by scanning the QR code below to install the corresponding build.
App NameWordPress WordPress
FlavorJalapeno
Build TypeDebug
Versionpr19529-7f54686
Commit7f54686
Direct Downloadwordpress-prototype-build-pr19529-7f54686.apk
Note: Google Login is not supported on these builds.

@wpmobilebot
Copy link
Contributor

wpmobilebot commented Nov 3, 2023

Jetpack📲 You can test the changes from this Pull Request in Jetpack by scanning the QR code below to install the corresponding build.
App NameJetpack Jetpack
FlavorJalapeno
Build TypeDebug
Versionpr19529-7f54686
Commit7f54686
Direct Downloadjetpack-prototype-build-pr19529-7f54686.apk
Note: Google Login is not supported on these builds.

@antonis
Copy link
Contributor

antonis commented Nov 7, 2023

Resolve blaze campaign model parameter target urn related warnings (unrelated)

@ParaskP7 I just realised that you already handled this 🙇

@ParaskP7
Copy link
Contributor Author

ParaskP7 commented Nov 7, 2023

👋 @antonis !

@ParaskP7 I just realised that you already handled this 🙇

Yea, I did that just to get CI succeed as I was using a newer version of FluxC. 😊

Thanks for actually merging it to trunk yourself to help everyone else in the meanwhile! 🙇

… into analysis/use-updated-and-null-proof-theme-payload-classes

# Conflicts:
#	build.gradle
This 'FluxC' PR hash updates the library to that branch version
where the 'Theme' payload classes are updated to their new null proof
version.

FluxC PR: https://github.com/wordpress-mobile/
WordPress-FluxC-Android/pull/2893

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
6abaf13. This change is necessary in
order to overcome and resolve new merge conflicts.
Copy link
Contributor

@antonis antonis left a comment

Choose a reason for hiding this comment

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

Awesome work @ParaskP7 🙇
All LGTM in this and the accompanying PR wordpress-mobile/WordPress-FluxC-Android#2893 (review)

@ParaskP7
Copy link
Contributor Author

ParaskP7 commented Nov 7, 2023

Awesome @antonis , thank you so much for reviewing, testing, and following the merge instructions, you rock! 🙇 ❤️ 🚀

FYI: I'll now follow-up with the merge instructions and merge this myself when CI completes.

@antonis
Copy link
Contributor

antonis commented Nov 7, 2023

FYI: I'll now follow-up with the merge instructions and merge this myself when CI completes.

Thank you @ParaskP7 🙇

This 'FluxC' hash updates the library to that 'trunk' version
where the 'Theme' payload classes are updated to their new null proof
version.

FluxC PR: https://github.com/wordpress-mobile/
WordPress-FluxC-Android/pull/2893
@wpmobilebot
Copy link
Contributor

Found 1 violations:

The PR caused the following dependency changes:

-+--- org.wordpress:fluxc:{strictly trunk-82a701e28d0eeb8c1612b256fd9d772182a13b6a} -> trunk-82a701e28d0eeb8c1612b256fd9d772182a13b6a
-|    +--- 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-82a701e28d0eeb8c1612b256fd9d772182a13b6a
-|    +--- 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-7a028a40d0b015e8382c656b82064db2d887e578} -> trunk-7a028a40d0b015e8382c656b82064db2d887e578
+|    +--- 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-7a028a40d0b015e8382c656b82064db2d887e578
+|    +--- 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-82a701e28d0eeb8c1612b256fd9d772182a13b6a (*)
+     \--- org.wordpress:fluxc:2.21.0 -> trunk-7a028a40d0b015e8382c656b82064db2d887e578 (*)

Please review and act accordingly

@ParaskP7 ParaskP7 merged commit fb5384d into trunk Nov 7, 2023
2 checks passed
@ParaskP7 ParaskP7 deleted the analysis/use-updated-and-null-proof-theme-payload-classes branch November 7, 2023 15:08
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