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

Implement Gravatar QuickEditor #21312

Merged
merged 10 commits into from
Nov 15, 2024
Merged

Conversation

AdamGrzybkowski
Copy link
Contributor

@AdamGrzybkowski AdamGrzybkowski commented Oct 18, 2024

This PR implements the QuickEditor from the Gravatar SDK. It fully replaces the Avatar update flow, including uploading already existing photos or new ones from the camera.

A few things worth noting:

  • One of Gravatar's compose dependencies bumps the foundation library. This caused the WP build to fail because a few things got deprecated. These issues were fixed in 5b1adac. If you would prefer, I can update the compose BOM (only this specific artifact) and apply those changes in a separate PR.
  • Gravatar uses UCrop like the WP app. We found an issue where the cropped image size (file size) is not changed. We've tried to fix that in UCrop (PR) but things aren't moving fast there, so we released the Automattic fork with the fix applied. I had to update WP to the Automattic version to not cause conflicts.
  • I've added a feature flag for the QuickEditor. Its purpose is a safety mechanism to be able to turn off the integration in case something doesn't work as it should. I'm not sure where to set this remotely or whether this has to happen now or when it's needed. Can you guide me here?

Here's how the QuickEditor looks like in WP on the MeFragment

jp_gravatar.mp4

And here's the SignupEpilogueFragment

sign-up_qe.mp4

To Test:

  1. Go through the sign-up flow
  2. On the SignupEpilogueFragment tap the avatar to upload a new image
  3. Confirm the avatar was uploaded
  4. Continue and go to the MeFragment by tapping the Me option
  5. Tap on the avatar
  6. Confirm the QuickEditor was opened
  7. Upload a new avatar, play with the QE.
  8. Modify the GRAVATAR_QUICK_EDITOR feature flag in build.gradle to false
  9. Repeat steps 1-7 - this should behave same as it works now without the QuickEditor.

Regression Notes

  1. Potential unintended areas of impact

    • no

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.

Testing Checklist (strike-out the not-applying and unnecessary ones):

  • WordPress.com sites and self-hosted Jetpack sites.
  • 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)

@AdamGrzybkowski AdamGrzybkowski added the Do Not Merge In PRs with this label, our automation will fail a require check, preventing accidental merging label Oct 18, 2024
@dangermattic
Copy link
Collaborator

dangermattic commented Oct 18, 2024

1 Warning
⚠️ Class GravatarQuickEditorFeatureConfig is missing tests, but unit-tests-exemption label was set to ignore this.

Generated by 🚫 Danger

@wpmobilebot
Copy link
Contributor

wpmobilebot commented Oct 18, 2024

Project dependencies changes

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

list
New Dependencies
androidx.browser:browser:1.8.0
androidx.compose.material3.adaptive:adaptive:1.0.0
androidx.compose.material3.adaptive:adaptive-android:1.0.0
androidx.datastore:datastore:1.1.1
androidx.datastore:datastore-android:1.1.1
androidx.datastore:datastore-core:1.1.1
androidx.datastore:datastore-core-android:1.1.1
androidx.datastore:datastore-core-okio:1.1.1
androidx.datastore:datastore-core-okio-jvm:1.1.1
androidx.datastore:datastore-preferences:1.1.1
androidx.datastore:datastore-preferences-android:1.1.1
androidx.datastore:datastore-preferences-core:1.1.1
androidx.datastore:datastore-preferences-core-jvm:1.1.1
androidx.window.extensions.core:core:1.0.0
androidx.window:window-core:1.3.0
androidx.window:window-core-android:1.3.0
com.automattic:ucrop:2.2.10
com.caverock:androidsvg-aar:1.4
com.composables:core:1.15.0
com.composables:core-android:1.15.0
com.gravatar:gravatar-quickeditor:2.0.1
com.gravatar:gravatar-ui:2.0.1
io.coil-kt:coil-svg:2.7.0
io.github.osipxd:encrypted-datastore:1.1.1-beta03
io.github.osipxd:encrypted-datastore-bom:1.1.1-beta03
io.github.osipxd:encrypted-datastore-preferences:1.1.1-beta03
io.github.osipxd:security-crypto-datastore:1.1.1-beta03
io.github.osipxd:security-crypto-datastore-preferences:1.1.1-beta03
org.jetbrains.compose.foundation:foundation:1.6.11

Removed Dependencies
com.github.yalantis:ucrop:2.2.9

Upgraded Dependencies
androidx.window:window:1.3.0, (changed from 1.0.0)
com.google.crypto.tink:tink-android:1.13.0, (changed from 1.5.0)
tree
 +--- androidx.navigation:navigation-compose:2.8.4
-|    +--- androidx.activity:activity-compose:1.8.0 -> 1.9.3
-|    |    \--- androidx.compose.runtime:runtime:1.0.1 -> 1.7.5
-|    |         \--- androidx.compose.runtime:runtime-android:1.7.5
-|    |              \--- org.jetbrains.kotlin:kotlin-stdlib-common:1.8.22 -> 2.0.21
-|    |                   \--- org.jetbrains.kotlin:kotlin-stdlib:2.0.21 (*)
 |    +--- androidx.navigation:navigation-runtime-ktx:2.8.4
 |    |    \--- androidx.navigation:navigation-common-ktx:2.8.4
 |    |         \--- androidx.navigation:navigation-common:2.8.4
 |    |              \--- org.jetbrains.kotlinx:kotlinx-serialization-core:1.6.3
 |    |                   \--- org.jetbrains.kotlinx:kotlinx-serialization-core-jvm:1.6.3
-|    |                        \--- org.jetbrains.kotlin:kotlin-stdlib-common:1.9.22 -> 2.0.21 (*)
+|    |                        \--- org.jetbrains.kotlin:kotlin-stdlib-common:1.9.22 -> 2.0.21
+|    |                             \--- org.jetbrains.kotlin:kotlin-stdlib:2.0.21 (*)
 +--- project :libs:analytics
 |    \--- androidx.preference:preference:1.2.1
 |         \--- androidx.slidingpanelayout:slidingpanelayout:1.2.0
-|              \--- androidx.window:window:1.0.0
-|                   +--- org.jetbrains.kotlin:kotlin-stdlib:1.6.0 -> 2.0.21 (*)
-|                   +--- org.jetbrains.kotlinx:kotlinx-coroutines-android:1.5.2 -> 1.8.1 (*)
-|                   +--- androidx.annotation:annotation:1.2.0 -> 1.9.1 (*)
-|                   +--- androidx.collection:collection:1.1.0 -> 1.4.4 (*)
-|                   \--- androidx.core:core:1.3.2 -> 1.13.1 (*)
+|              \--- androidx.window:window:1.0.0 -> 1.3.0
+|                   +--- androidx.annotation:annotation:1.3.0 -> 1.9.1 (*)
+|                   +--- androidx.collection:collection:1.1.0 -> 1.4.4 (*)
+|                   +--- androidx.core:core:1.8.0 -> 1.13.1 (*)
+|                   +--- androidx.window.extensions.core:core:1.0.0
+|                   |    +--- androidx.annotation:annotation:1.6.0 -> 1.9.1 (*)
+|                   |    \--- org.jetbrains.kotlin:kotlin-stdlib:1.8.20 -> 2.0.21 (*)
+|                   +--- org.jetbrains.kotlin:kotlin-stdlib:1.8.22 -> 2.0.21 (*)
+|                   +--- org.jetbrains.kotlinx:kotlinx-coroutines-android:1.7.3 -> 1.8.1 (*)
+|                   \--- androidx.window:window-core:1.3.0 (c)
 +--- project :libs:image-editor
+|    \--- com.automattic:ucrop:2.2.10
+|         +--- androidx.appcompat:appcompat:1.6.1 -> 1.7.0 (*)
+|         +--- androidx.exifinterface:exifinterface:1.3.6 -> 1.3.7
+|         |    \--- androidx.annotation:annotation:1.2.0 -> 1.9.1 (*)
+|         +--- androidx.transition:transition:1.4.1 -> 1.5.0 (*)
+|         \--- com.squareup.okhttp3:okhttp:3.12.13 -> 4.12.0 (*)
-|    \--- com.github.yalantis:ucrop:2.2.9
-|         +--- androidx.exifinterface:exifinterface:1.3.6 -> 1.3.7
-|         |    \--- androidx.annotation:annotation:1.2.0 -> 1.9.1 (*)
-|         +--- androidx.transition:transition:1.4.1 -> 1.5.0 (*)
-|         \--- com.squareup.okhttp3:okhttp:3.12.13 -> 4.12.0 (*)
 +--- project :libs:fluxc
 |    \--- androidx.security:security-crypto:1.0.0
-|         \--- com.google.crypto.tink:tink-android:1.5.0
+|         \--- com.google.crypto.tink:tink-android:1.5.0 -> 1.13.0
+|              +--- androidx.annotation:annotation:1.5.0 -> 1.9.1 (*)
+|              +--- com.google.code.findbugs:jsr305:3.0.2
+|              +--- com.google.code.gson:gson:2.10.1 -> 2.11.0 (*)
+|              \--- com.google.errorprone:error_prone_annotations:2.22.0 -> 2.27.0
-+--- com.github.yalantis:ucrop:2.2.9 (*)
-+--- androidx.compose:compose-bom:2024.11.00
-|    +--- androidx.compose.animation:animation:1.7.5 (c)
-|    +--- androidx.compose.foundation:foundation:1.7.5 (c)
-|    +--- androidx.compose.foundation:foundation-layout:1.7.5 (c)
-|    +--- androidx.compose.material:material:1.7.5 (c)
-|    +--- androidx.compose.material3:material3:1.3.1 (c)
-|    +--- androidx.compose.runtime:runtime:1.7.5 (c)
-|    +--- androidx.compose.runtime:runtime-livedata:1.7.5 (c)
-|    +--- androidx.compose.runtime:runtime-saveable:1.7.5 (c)
-|    +--- androidx.compose.ui:ui:1.7.5 (c)
-|    +--- androidx.compose.ui:ui-graphics:1.7.5 (c)
-|    +--- androidx.compose.ui:ui-text:1.7.5 (c)
-|    +--- androidx.compose.ui:ui-tooling:1.7.5 (c)
-|    +--- androidx.compose.ui:ui-tooling-preview:1.7.5 (c)
-|    +--- androidx.compose.ui:ui-unit:1.7.5 (c)
-|    +--- androidx.compose.material3:material3-android:1.3.1 (c)
-|    +--- androidx.compose.animation:animation-android:1.7.5 (c)
-|    +--- androidx.compose.foundation:foundation-android:1.7.5 (c)
-|    +--- androidx.compose.foundation:foundation-layout-android:1.7.5 (c)
-|    +--- androidx.compose.material:material-android:1.7.5 (c)
-|    +--- androidx.compose.runtime:runtime-android:1.7.5 (c)
-|    +--- androidx.compose.runtime:runtime-saveable-android:1.7.5 (c)
-|    +--- androidx.compose.ui:ui-android:1.7.5 (c)
-|    +--- androidx.compose.ui:ui-graphics-android:1.7.5 (c)
-|    +--- androidx.compose.ui:ui-text-android:1.7.5 (c)
-|    +--- androidx.compose.ui:ui-tooling-android:1.7.5 (c)
-|    +--- androidx.compose.ui:ui-tooling-preview-android:1.7.5 (c)
-|    +--- androidx.compose.ui:ui-unit-android:1.7.5 (c)
-|    +--- androidx.compose.ui:ui-util:1.7.5 (c)
-|    +--- androidx.compose.animation:animation-core:1.7.5 (c)
-|    +--- androidx.compose.material:material-icons-core:1.7.5 (c)
-|    +--- androidx.compose.material:material-ripple:1.7.5 (c)
-|    +--- androidx.compose.ui:ui-geometry:1.7.5 (c)
-|    +--- androidx.compose.ui:ui-tooling-data:1.7.5 (c)
-|    +--- androidx.compose.ui:ui-util-android:1.7.5 (c)
-|    +--- androidx.compose.animation:animation-core-android:1.7.5 (c)
-|    +--- androidx.compose.material:material-icons-core-android:1.7.5 (c)
-|    +--- androidx.compose.material:material-ripple-android:1.7.5 (c)
-|    +--- androidx.compose.ui:ui-geometry-android:1.7.5 (c)
-|    \--- androidx.compose.ui:ui-tooling-data-android:1.7.5 (c)
++--- com.gravatar:gravatar-quickeditor:2.0.1
+|    +--- com.gravatar:gravatar:2.0.1 (*)
+|    +--- com.gravatar:gravatar-ui:2.0.1
+|    |    +--- androidx.core:core-ktx:1.13.1 (*)
+|    |    +--- androidx.appcompat:appcompat:1.7.0 (*)
+|    |    +--- com.google.android.material:material:1.12.0 (*)
+|    |    +--- io.coil-kt:coil-compose:2.7.0
+|    |    |    +--- io.coil-kt:coil-compose-base:2.7.0
+|    |    |    |    +--- androidx.core:core-ktx:1.12.0 -> 1.13.1 (*)
+|    |    |    |    +--- com.google.accompanist:accompanist-drawablepainter:0.32.0 (*)
+|    |    |    |    +--- io.coil-kt:coil-base:2.7.0
+|    |    |    |    |    +--- androidx.annotation:annotation:1.7.1 -> 1.9.1 (*)
+|    |    |    |    |    +--- androidx.appcompat:appcompat-resources:1.6.1 -> 1.7.0 (*)
+|    |    |    |    |    +--- androidx.collection:collection:1.4.0 -> 1.4.4 (*)
+|    |    |    |    |    +--- androidx.core:core-ktx:1.12.0 -> 1.13.1 (*)
+|    |    |    |    |    +--- androidx.exifinterface:exifinterface:1.3.7 (*)
+|    |    |    |    |    +--- androidx.profileinstaller:profileinstaller:1.3.1 -> 1.4.0 (*)
+|    |    |    |    |    +--- androidx.lifecycle:lifecycle-runtime:2.7.0 -> 2.8.7 (*)
+|    |    |    |    |    +--- org.jetbrains.kotlinx:kotlinx-coroutines-android:1.8.1 (*)
+|    |    |    |    |    +--- org.jetbrains.kotlin:kotlin-stdlib:2.0.0 -> 2.0.21 (*)
+|    |    |    |    |    +--- com.squareup.okhttp3:okhttp:4.12.0 (*)
+|    |    |    |    |    \--- com.squareup.okio:okio:3.9.0 (*)
+|    |    |    |    +--- androidx.compose.foundation:foundation:1.6.8 -> 1.7.5 (*)
+|    |    |    |    \--- org.jetbrains.kotlin:kotlin-stdlib:2.0.0 -> 2.0.21 (*)
+|    |    |    +--- io.coil-kt:coil:2.7.0
+|    |    |    |    +--- io.coil-kt:coil-base:2.7.0 (*)
+|    |    |    |    \--- org.jetbrains.kotlin:kotlin-stdlib:2.0.0 -> 2.0.21 (*)
+|    |    |    \--- org.jetbrains.kotlin:kotlin-stdlib:2.0.0 -> 2.0.21 (*)
+|    |    +--- io.coil-kt:coil-svg:2.7.0
+|    |    |    +--- androidx.core:core-ktx:1.12.0 -> 1.13.1 (*)
+|    |    |    +--- com.caverock:androidsvg-aar:1.4
+|    |    |    +--- io.coil-kt:coil-base:2.7.0 (*)
+|    |    |    \--- org.jetbrains.kotlin:kotlin-stdlib:2.0.0 -> 2.0.21 (*)
+|    |    +--- com.gravatar:gravatar:2.0.1 (*)
+|    |    +--- androidx.compose:compose-bom:2024.02.00 -> 2024.11.00
+|    |    |    +--- androidx.compose.animation:animation:1.7.5 (c)
+|    |    |    +--- androidx.compose.foundation:foundation:1.7.5 (c)
+|    |    |    +--- androidx.compose.foundation:foundation-layout:1.7.5 (c)
+|    |    |    +--- androidx.compose.material:material:1.7.5 (c)
+|    |    |    +--- androidx.compose.material3:material3:1.3.1 (c)
+|    |    |    +--- androidx.compose.material3.adaptive:adaptive:1.0.0 (c)
+|    |    |    +--- androidx.compose.runtime:runtime:1.7.5 (c)
+|    |    |    +--- androidx.compose.runtime:runtime-livedata:1.7.5 (c)
+|    |    |    +--- androidx.compose.runtime:runtime-saveable:1.7.5 (c)
+|    |    |    +--- androidx.compose.ui:ui:1.7.5 (c)
+|    |    |    +--- androidx.compose.ui:ui-graphics:1.7.5 (c)
+|    |    |    +--- androidx.compose.ui:ui-text:1.7.5 (c)
+|    |    |    +--- androidx.compose.ui:ui-tooling:1.7.5 (c)
+|    |    |    +--- androidx.compose.ui:ui-tooling-preview:1.7.5 (c)
+|    |    |    +--- androidx.compose.ui:ui-unit:1.7.5 (c)
+|    |    |    +--- androidx.compose.material3:material3-android:1.3.1 (c)
+|    |    |    +--- androidx.compose.material3.adaptive:adaptive-android:1.0.0 (c)
+|    |    |    +--- androidx.compose.animation:animation-android:1.7.5 (c)
+|    |    |    +--- androidx.compose.foundation:foundation-android:1.7.5 (c)
+|    |    |    +--- androidx.compose.foundation:foundation-layout-android:1.7.5 (c)
+|    |    |    +--- androidx.compose.material:material-android:1.7.5 (c)
+|    |    |    +--- androidx.compose.runtime:runtime-android:1.7.5 (c)
+|    |    |    +--- androidx.compose.runtime:runtime-saveable-android:1.7.5 (c)
+|    |    |    +--- androidx.compose.ui:ui-android:1.7.5 (c)
+|    |    |    +--- androidx.compose.ui:ui-graphics-android:1.7.5 (c)
+|    |    |    +--- androidx.compose.ui:ui-text-android:1.7.5 (c)
+|    |    |    +--- androidx.compose.ui:ui-tooling-android:1.7.5 (c)
+|    |    |    +--- androidx.compose.ui:ui-tooling-preview-android:1.7.5 (c)
+|    |    |    +--- androidx.compose.ui:ui-unit-android:1.7.5 (c)
+|    |    |    +--- androidx.compose.ui:ui-util:1.7.5 (c)
+|    |    |    +--- androidx.compose.animation:animation-core:1.7.5 (c)
+|    |    |    +--- androidx.compose.material:material-icons-core:1.7.5 (c)
+|    |    |    +--- androidx.compose.material:material-ripple:1.7.5 (c)
+|    |    |    +--- androidx.compose.ui:ui-geometry:1.7.5 (c)
+|    |    |    +--- androidx.compose.ui:ui-tooling-data:1.7.5 (c)
+|    |    |    +--- androidx.compose.ui:ui-util-android:1.7.5 (c)
+|    |    |    +--- androidx.compose.animation:animation-core-android:1.7.5 (c)
+|    |    |    +--- androidx.compose.material:material-icons-core-android:1.7.5 (c)
+|    |    |    +--- androidx.compose.material:material-ripple-android:1.7.5 (c)
+|    |    |    +--- androidx.compose.ui:ui-geometry-android:1.7.5 (c)
+|    |    |    \--- androidx.compose.ui:ui-tooling-data-android:1.7.5 (c)
+|    |    +--- androidx.compose.ui:ui -> 1.7.5 (*)
+|    |    +--- androidx.compose.ui:ui-tooling-preview -> 1.7.5 (*)
+|    |    +--- androidx.compose.material3:material3 -> 1.3.1
+|    |    |    \--- androidx.compose.material3:material3-android:1.3.1
+|    |    |         +--- androidx.activity:activity-compose:1.8.2 -> 1.9.3 (*)
+|    |    |         +--- androidx.annotation:annotation:1.1.0 -> 1.9.1 (*)
+|    |    |         +--- androidx.annotation:annotation-experimental:1.4.0 -> 1.4.1 (*)
+|    |    |         +--- androidx.collection:collection:1.4.0 -> 1.4.4 (*)
+|    |    |         +--- androidx.compose.animation:animation-core:1.6.0 -> 1.7.5 (*)
+|    |    |         +--- androidx.compose.foundation:foundation:1.7.0 -> 1.7.5 (*)
+|    |    |         +--- androidx.compose.foundation:foundation-layout:1.7.0 -> 1.7.5 (*)
+|    |    |         +--- androidx.compose.material:material-icons-core:1.6.0 -> 1.7.5
+|    |    |         |    \--- androidx.compose.material:material-icons-core-android:1.7.5
+|    |    |         |         +--- androidx.compose.ui:ui:1.6.0 -> 1.7.5 (*)
+|    |    |         |         +--- org.jetbrains.kotlin:kotlin-stdlib:1.8.22 -> 2.0.21 (*)
+|    |    |         |         \--- org.jetbrains.kotlin:kotlin-stdlib-common:1.8.22 -> 2.0.21 (*)
+|    |    |         +--- androidx.compose.material:material-ripple:1.7.0 -> 1.7.5 (*)
+|    |    |         +--- androidx.compose.runtime:runtime:1.7.0 -> 1.7.5 (*)
+|    |    |         +--- androidx.compose.ui:ui:1.6.0 -> 1.7.5 (*)
+|    |    |         +--- androidx.compose.ui:ui-text:1.6.0 -> 1.7.5 (*)
+|    |    |         +--- androidx.compose.ui:ui-util:1.6.0 -> 1.7.5 (*)
+|    |    |         +--- androidx.lifecycle:lifecycle-common-java8:2.6.1 -> 2.8.7 (*)
+|    |    |         \--- org.jetbrains.kotlin:kotlin-stdlib-common:1.8.22 -> 2.0.21 (*)
+|    |    \--- org.jetbrains.kotlin:kotlin-stdlib:1.9.25 -> 2.0.21 (*)
+|    +--- androidx.browser:browser:1.8.0
+|    |    +--- androidx.annotation:annotation:1.2.0 -> 1.9.1 (*)
+|    |    +--- androidx.annotation:annotation-experimental:1.4.0 -> 1.4.1 (*)
+|    |    +--- androidx.collection:collection:1.1.0 -> 1.4.4 (*)
+|    |    +--- androidx.concurrent:concurrent-futures:1.0.0 -> 1.1.0 (*)
+|    |    +--- androidx.core:core:1.1.0 -> 1.13.1 (*)
+|    |    +--- androidx.interpolator:interpolator:1.0.0 (*)
+|    |    \--- com.google.guava:listenablefuture:1.0 -> 9999.0-empty-to-avoid-conflict-with-guava
+|    +--- androidx.appcompat:appcompat:1.7.0 (*)
+|    +--- androidx.lifecycle:lifecycle-viewmodel-compose:2.8.3 -> 2.8.7 (*)
+|    +--- androidx.navigation:navigation-compose:2.8.1 -> 2.8.4 (*)
+|    +--- io.github.osipxd:security-crypto-datastore-preferences:1.1.1-beta03
+|    |    +--- io.github.osipxd:encrypted-datastore-preferences:1.1.1-beta03
+|    |    |    +--- io.github.osipxd:encrypted-datastore-bom:1.1.1-beta03
+|    |    |    |    +--- io.github.osipxd:encrypted-datastore-preferences:1.1.1-beta03 (c)
+|    |    |    |    +--- io.github.osipxd:security-crypto-datastore:1.1.1-beta03 (c)
+|    |    |    |    +--- io.github.osipxd:security-crypto-datastore-preferences:1.1.1-beta03 (c)
+|    |    |    |    +--- androidx.datastore:datastore-preferences:1.1.1 (c)
+|    |    |    |    +--- io.github.osipxd:encrypted-datastore:1.1.1-beta03 (c)
+|    |    |    |    +--- androidx.datastore:datastore-preferences-core:1.1.1 (c)
+|    |    |    |    +--- androidx.datastore:datastore:1.1.1 (c)
+|    |    |    |    \--- androidx.datastore:datastore-core:1.1.1 (c)
+|    |    |    +--- io.github.osipxd:encrypted-datastore:1.1.1-beta03
+|    |    |    |    +--- io.github.osipxd:encrypted-datastore-bom:1.1.1-beta03 (*)
+|    |    |    |    +--- org.jetbrains.kotlin:kotlin-stdlib:1.9.23 -> 2.0.21 (*)
+|    |    |    |    +--- androidx.datastore:datastore-core:1.1.1
+|    |    |    |    |    \--- androidx.datastore:datastore-core-android:1.1.1
+|    |    |    |    |         +--- androidx.annotation:annotation:1.7.0 -> 1.9.1 (*)
+|    |    |    |    |         +--- org.jetbrains.kotlin:kotlin-parcelize-runtime:1.9.22 -> 2.0.21 (*)
+|    |    |    |    |         +--- org.jetbrains.kotlin:kotlin-stdlib:1.8.22 -> 2.0.21 (*)
+|    |    |    |    |         +--- org.jetbrains.kotlinx:kotlinx-coroutines-core:1.7.3 -> 1.8.1 (*)
+|    |    |    |    |         +--- androidx.datastore:datastore:1.1.1 (c)
+|    |    |    |    |         +--- androidx.datastore:datastore-core-okio:1.1.1 (c)
+|    |    |    |    |         +--- androidx.datastore:datastore-preferences:1.1.1 (c)
+|    |    |    |    |         \--- androidx.datastore:datastore-preferences-core:1.1.1 (c)
+|    |    |    |    \--- com.google.crypto.tink:tink-android:1.13.0 (*)
+|    |    |    +--- androidx.datastore:datastore-preferences-core:1.1.1
+|    |    |    |    \--- androidx.datastore:datastore-preferences-core-jvm:1.1.1
+|    |    |    |         +--- androidx.datastore:datastore-core:1.1.1 (*)
+|    |    |    |         +--- androidx.datastore:datastore-core-okio:1.1.1
+|    |    |    |         |    \--- androidx.datastore:datastore-core-okio-jvm:1.1.1
+|    |    |    |         |         +--- androidx.datastore:datastore-core:1.1.1 (*)
+|    |    |    |         |         +--- com.squareup.okio:okio:3.4.0 -> 3.9.0 (*)
+|    |    |    |         |         +--- org.jetbrains.kotlin:kotlin-stdlib:1.8.22 -> 2.0.21 (*)
+|    |    |    |         |         +--- org.jetbrains.kotlinx:kotlinx-coroutines-core:1.7.3 -> 1.8.1 (*)
+|    |    |    |         |         +--- androidx.datastore:datastore:1.1.1 (c)
+|    |    |    |         |         +--- androidx.datastore:datastore-core:1.1.1 (c)
+|    |    |    |         |         +--- androidx.datastore:datastore-preferences:1.1.1 (c)
+|    |    |    |         |         \--- androidx.datastore:datastore-preferences-core:1.1.1 (c)
+|    |    |    |         +--- com.squareup.okio:okio:3.4.0 -> 3.9.0 (*)
+|    |    |    |         +--- org.jetbrains.kotlin:kotlin-stdlib:1.8.22 -> 2.0.21 (*)
+|    |    |    |         +--- androidx.datastore:datastore:1.1.1 (c)
+|    |    |    |         +--- androidx.datastore:datastore-core:1.1.1 (c)
+|    |    |    |         +--- androidx.datastore:datastore-core-okio:1.1.1 (c)
+|    |    |    |         \--- androidx.datastore:datastore-preferences:1.1.1 (c)
+|    |    |    \--- org.jetbrains.kotlin:kotlin-stdlib:1.9.23 -> 2.0.21 (*)
+|    |    +--- io.github.osipxd:encrypted-datastore-bom:1.1.1-beta03 (*)
+|    |    +--- io.github.osipxd:security-crypto-datastore:1.1.1-beta03
+|    |    |    +--- io.github.osipxd:encrypted-datastore:1.1.1-beta03 (*)
+|    |    |    +--- io.github.osipxd:encrypted-datastore-bom:1.1.1-beta03 (*)
+|    |    |    +--- androidx.datastore:datastore:1.1.1
+|    |    |    |    \--- androidx.datastore:datastore-android:1.1.1
+|    |    |    |         +--- androidx.annotation:annotation:1.2.0 -> 1.9.1 (*)
+|    |    |    |         +--- androidx.datastore:datastore-core:1.1.1 (*)
+|    |    |    |         +--- androidx.datastore:datastore-core-okio:1.1.1 (*)
+|    |    |    |         +--- com.squareup.okio:okio:3.4.0 -> 3.9.0 (*)
+|    |    |    |         +--- org.jetbrains.kotlin:kotlin-stdlib:1.8.22 -> 2.0.21 (*)
+|    |    |    |         +--- org.jetbrains.kotlinx:kotlinx-coroutines-core:1.7.3 -> 1.8.1 (*)
+|    |    |    |         +--- androidx.datastore:datastore-core:1.1.1 (c)
+|    |    |    |         +--- androidx.datastore:datastore-core-okio:1.1.1 (c)
+|    |    |    |         +--- androidx.datastore:datastore-preferences:1.1.1 (c)
+|    |    |    |         \--- androidx.datastore:datastore-preferences-core:1.1.1 (c)
+|    |    |    +--- androidx.security:security-crypto:1.0.0 (*)
+|    |    |    \--- org.jetbrains.kotlin:kotlin-stdlib:1.9.23 -> 2.0.21 (*)
+|    |    +--- androidx.datastore:datastore-preferences:1.1.1
+|    |    |    \--- androidx.datastore:datastore-preferences-android:1.1.1
+|    |    |         +--- androidx.datastore:datastore:1.1.1 (*)
+|    |    |         +--- androidx.datastore:datastore-preferences-core:1.1.1 (*)
+|    |    |         +--- org.jetbrains.kotlin:kotlin-stdlib:1.8.22 -> 2.0.21 (*)
+|    |    |         +--- org.jetbrains.kotlinx:kotlinx-coroutines-core:1.7.3 -> 1.8.1 (*)
+|    |    |         +--- androidx.datastore:datastore:1.1.1 (c)
+|    |    |         +--- androidx.datastore:datastore-core:1.1.1 (c)
+|    |    |         +--- androidx.datastore:datastore-preferences-core:1.1.1 (c)
+|    |    |         \--- androidx.datastore:datastore-core-okio:1.1.1 (c)
+|    |    \--- org.jetbrains.kotlin:kotlin-stdlib:1.9.23 -> 2.0.21 (*)
+|    +--- androidx.startup:startup-runtime:1.1.1 (*)
+|    +--- io.coil-kt:coil-compose:2.7.0 (*)
+|    +--- com.squareup.retrofit2:retrofit:2.11.0 (*)
+|    +--- com.squareup.retrofit2:converter-moshi:2.11.0 (*)
+|    +--- com.automattic:ucrop:2.2.10 (*)
+|    +--- androidx.compose:compose-bom:2024.02.00 -> 2024.11.00 (*)
+|    +--- androidx.compose.ui:ui -> 1.7.5 (*)
+|    +--- androidx.compose.ui:ui-tooling-preview -> 1.7.5 (*)
+|    +--- androidx.compose.material3:material3 -> 1.3.1 (*)
+|    +--- androidx.activity:activity-compose:1.9.2 -> 1.9.3 (*)
+|    +--- androidx.compose.material3.adaptive:adaptive:1.0.0
+|    |    \--- androidx.compose.material3.adaptive:adaptive-android:1.0.0
+|    |         +--- androidx.annotation:annotation:1.1.0 -> 1.9.1 (*)
+|    |         +--- androidx.annotation:annotation-experimental:1.4.0 -> 1.4.1 (*)
+|    |         +--- androidx.compose.foundation:foundation:1.6.5 -> 1.7.5 (*)
+|    |         +--- androidx.compose.ui:ui-geometry:1.6.5 -> 1.7.5 (*)
+|    |         +--- androidx.window:window:1.3.0 (*)
+|    |         +--- androidx.window:window-core:1.3.0
+|    |         |    \--- androidx.window:window-core-android:1.3.0
+|    |         |         +--- androidx.annotation:annotation:1.7.0 -> 1.9.1 (*)
+|    |         |         +--- org.jetbrains.kotlin:kotlin-stdlib:1.8.22 -> 2.0.21 (*)
+|    |         |         \--- androidx.window:window:1.3.0 (c)
+|    |         +--- org.jetbrains.kotlin:kotlin-stdlib:1.8.22 -> 2.0.21 (*)
+|    |         \--- org.jetbrains.kotlin:kotlin-stdlib-common:1.8.22 -> 2.0.21 (*)
+|    +--- com.composables:core:1.15.0
+|    |    \--- com.composables:core-android:1.15.0
+|    |         +--- androidx.activity:activity:1.9.0 -> 1.9.3 (*)
+|    |         +--- androidx.activity:activity-compose:1.9.0 -> 1.9.3 (*)
+|    |         +--- org.jetbrains.kotlin:kotlin-stdlib:2.0.10 -> 2.0.21 (*)
+|    |         \--- org.jetbrains.compose.foundation:foundation:1.6.11
+|    |              \--- androidx.compose.foundation:foundation:1.6.7 -> 1.7.5 (*)
+|    \--- org.jetbrains.kotlin:kotlin-stdlib:1.9.25 -> 2.0.21 (*)
++--- com.automattic:ucrop:2.2.10 (*)
++--- androidx.compose:compose-bom:2024.11.00 (*)
-+--- io.coil-kt:coil-compose:2.7.0
-|    +--- io.coil-kt:coil-compose-base:2.7.0
-|    |    +--- androidx.core:core-ktx:1.12.0 -> 1.13.1 (*)
-|    |    +--- com.google.accompanist:accompanist-drawablepainter:0.32.0 (*)
-|    |    +--- io.coil-kt:coil-base:2.7.0
-|    |    |    +--- androidx.annotation:annotation:1.7.1 -> 1.9.1 (*)
-|    |    |    +--- androidx.appcompat:appcompat-resources:1.6.1 -> 1.7.0 (*)
-|    |    |    +--- androidx.collection:collection:1.4.0 -> 1.4.4 (*)
-|    |    |    +--- androidx.core:core-ktx:1.12.0 -> 1.13.1 (*)
-|    |    |    +--- androidx.exifinterface:exifinterface:1.3.7 (*)
-|    |    |    +--- androidx.profileinstaller:profileinstaller:1.3.1 -> 1.4.0 (*)
-|    |    |    +--- androidx.lifecycle:lifecycle-runtime:2.7.0 -> 2.8.7 (*)
-|    |    |    +--- org.jetbrains.kotlinx:kotlinx-coroutines-android:1.8.1 (*)
-|    |    |    +--- org.jetbrains.kotlin:kotlin-stdlib:2.0.0 -> 2.0.21 (*)
-|    |    |    +--- com.squareup.okhttp3:okhttp:4.12.0 (*)
-|    |    |    \--- com.squareup.okio:okio:3.9.0 (*)
-|    |    +--- androidx.compose.foundation:foundation:1.6.8 -> 1.7.5 (*)
-|    |    \--- org.jetbrains.kotlin:kotlin-stdlib:2.0.0 -> 2.0.21 (*)
-|    +--- io.coil-kt:coil:2.7.0
-|    |    +--- io.coil-kt:coil-base:2.7.0 (*)
-|    |    \--- org.jetbrains.kotlin:kotlin-stdlib:2.0.0 -> 2.0.21 (*)
-|    \--- org.jetbrains.kotlin:kotlin-stdlib:2.0.0 -> 2.0.21 (*)
++--- io.coil-kt:coil-compose:2.7.0 (*)
-\--- androidx.compose.material3:material3:1.3.1
-     \--- androidx.compose.material3:material3-android:1.3.1
-          +--- androidx.activity:activity-compose:1.8.2 -> 1.9.3 (*)
-          +--- androidx.annotation:annotation:1.1.0 -> 1.9.1 (*)
-          +--- androidx.annotation:annotation-experimental:1.4.0 -> 1.4.1 (*)
-          +--- androidx.collection:collection:1.4.0 -> 1.4.4 (*)
-          +--- androidx.compose.animation:animation-core:1.6.0 -> 1.7.5 (*)
-          +--- androidx.compose.foundation:foundation:1.7.0 -> 1.7.5 (*)
-          +--- androidx.compose.foundation:foundation-layout:1.7.0 -> 1.7.5 (*)
-          +--- androidx.compose.material:material-icons-core:1.6.0 -> 1.7.5
-          |    \--- androidx.compose.material:material-icons-core-android:1.7.5
-          |         +--- androidx.compose.ui:ui:1.6.0 -> 1.7.5 (*)
-          |         +--- org.jetbrains.kotlin:kotlin-stdlib:1.8.22 -> 2.0.21 (*)
-          |         \--- org.jetbrains.kotlin:kotlin-stdlib-common:1.8.22 -> 2.0.21 (*)
-          +--- androidx.compose.material:material-ripple:1.7.0 -> 1.7.5 (*)
-          +--- androidx.compose.runtime:runtime:1.7.0 -> 1.7.5 (*)
-          +--- androidx.compose.ui:ui:1.6.0 -> 1.7.5 (*)
-          +--- androidx.compose.ui:ui-text:1.6.0 -> 1.7.5 (*)
-          +--- androidx.compose.ui:ui-util:1.6.0 -> 1.7.5 (*)
-          +--- androidx.lifecycle:lifecycle-common-java8:2.6.1 -> 2.8.7 (*)
-          \--- org.jetbrains.kotlin:kotlin-stdlib-common:1.8.22 -> 2.0.21 (*)
+\--- androidx.compose.material3:material3:1.3.1 (*)

@wpmobilebot
Copy link
Contributor

wpmobilebot commented Oct 18, 2024

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
Versionpr21312-9d32788
Commit9d32788
Direct Downloadjetpack-prototype-build-pr21312-9d32788.apk
Note: Google Login is not supported on these builds.

@wpmobilebot
Copy link
Contributor

wpmobilebot commented Oct 18, 2024

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
Versionpr21312-9d32788
Commit9d32788
Direct Downloadwordpress-prototype-build-pr21312-9d32788.apk
Note: Google Login is not supported on these builds.

@AdamGrzybkowski AdamGrzybkowski force-pushed the adam/gravatar_2.0.0 branch 2 times, most recently from 53bc90f to 926eb61 Compare October 25, 2024 12:47
@AdamGrzybkowski AdamGrzybkowski added the Gravatar Gravatar integration label Oct 28, 2024
@AdamGrzybkowski
Copy link
Contributor Author

I added unit-tests-exemption label because Danger was complaining about the lack of tests for GravatarQuickEditorFeatureConfig. From what I've checked, those types of classes are not tested in the WP repo.

@AdamGrzybkowski AdamGrzybkowski marked this pull request as ready for review October 28, 2024 13:51
@AdamGrzybkowski AdamGrzybkowski requested review from a team and nbradbury and removed request for a team October 28, 2024 13:52
@AdamGrzybkowski AdamGrzybkowski removed the Do Not Merge In PRs with this label, our automation will fail a require check, preventing accidental merging label Oct 28, 2024
@AdamGrzybkowski
Copy link
Contributor Author

There seems to be some kind of Lint issue with the navigation-compose library from the QuickEditor... I will mark it as a draft until I figure it out.

@AdamGrzybkowski AdamGrzybkowski marked this pull request as draft October 29, 2024 10:12
@AdamGrzybkowski AdamGrzybkowski marked this pull request as ready for review October 30, 2024 09:34
@@ -19,7 +19,7 @@ androidx-constraintlayout-compose = '1.0.1'
androidx-core = '1.13.1'
androidx-fragment = '1.8.4'
androidx-lifecycle = '2.8.5'
androidx-navigation = '2.7.7'
androidx-navigation = '2.8.3'
Copy link
Contributor Author

Choose a reason for hiding this comment

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

There's a bug in 2.8.1 (used by QuickEditor) that causes some Lint warnings. WP is configured to fail on those so I had to bump the library here to fix the issue.

Here's the issue tracker with a bit more info - https://issuetracker.google.com/issues/368070326

We will update the library in the Gravatar SDK as well, but for now, this should do the trick.

@nbradbury Any thoughts on this?

Copy link
Contributor

Choose a reason for hiding this comment

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

Normally I'd opt for updating a library in a dedicated PR, but I just tested the app separately with androidx-navigation v2.8.3 and ran into no problems, so I'm fine with updating it here.

Copy link

codecov bot commented Oct 30, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 38.44%. Comparing base (835f19a) to head (9d32788).
Report is 65 commits behind head on trunk.

Additional details and impacted files
@@            Coverage Diff             @@
##            trunk   #21312      +/-   ##
==========================================
- Coverage   39.49%   38.44%   -1.05%     
==========================================
  Files        2119      599    -1520     
  Lines       99459    28944   -70515     
  Branches    15285     3729   -11556     
==========================================
- Hits        39277    11128   -28149     
+ Misses      56701    16799   -39902     
+ Partials     3481     1017    -2464     

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

@nbradbury
Copy link
Contributor

The QuickEditor is very nice! I have some feedback on it that's separate from this PR.

If I deny camera permission then try to take a photo, I see this dialog. This is fine, but it would be nicer if the dialog enabled the user to go directly to the app settings.

permission

The QuickEditor has a "Done" button at the top left which seems odd to me. A standard X button seems better.

done

After I tap an image to make it my profile photo, there's a two-second delay before I see the toast informing me the photo was updated. Is there a way to provide immediate feedback? Also, the wording "May take a few minutes to appear everywhere" seems clipped. Should that be "It may take a few minutes to appear everywhere"?

delay.mp4

Copy link
Contributor

@nbradbury nbradbury left a comment

Choose a reason for hiding this comment

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

@AdamGrzybkowski I'm approving this PR, feel free to merge when ready but note that as with the parent PR, I'm unable to test the SignupEpilogueFragment.

@AdamGrzybkowski
Copy link
Contributor Author

If I deny camera permission then try to take a photo, I see this dialog. This is fine, but it would be nicer if the dialog enabled the user to go directly to the app settings.

That makes sense, I will see what can we do here from an SDK perspective. Issue created - Automattic/Gravatar-SDK-Android#422

The QuickEditor has a "Done" button at the top left which seems odd to me. A standard X button seems better.

We followed the designs, but yeah in the Android world an x is more common, I think. Will talk with the team.

After I tap an image to make it my profile photo, there's a two-second delay before I see the toast informing me the photo was updated. I see the toast informing me the photo was updated. Is there a way to provide immediate feedback?

We show the confirmation when the avatar is updated. We could assume a positive result and do that instantly, but we opted for a progress indicator instead. Have you missed it?

Also, the wording "May take a few minutes to appear everywhere" seems clipped. Should that be "It may take a few minutes to appear everywhere"?

Yes, thanks for catching that! Issue - Automattic/Gravatar-SDK-Android#423

@nbradbury
Copy link
Contributor

We could assume a positive result and do that instantly, but we opted for a progress indicator instead. Have you missed it?

Oh, yes - I did miss the progress indicator. It's a bit subtle, but I confess to not having super vision so it's likely my fault I missed it :)

@AdamGrzybkowski
Copy link
Contributor Author

Oh, yes - I did miss the progress indicator. It's a bit subtle, but I confess to not having super vision so it's likely my fault I missed it :)

I think we can work on a better contrast there as well. Thanks for the feedback!

@nbradbury nbradbury self-assigned this Oct 30, 2024
Base automatically changed from adam/gravatar_2.0.0 to trunk November 12, 2024 12:33
@AdamGrzybkowski
Copy link
Contributor Author

@hamorillo When you have time, would you mind reviewing and testing this integration? 🙏

@hamorillo
Copy link
Contributor

💡 I wonder if, after switching avatars, we should keep the forceRefresh enabled after every onResume to avoid the following case:

Kapture.2024-11-12.at.15.50.43.mp4

Appart from that, LGTM!

@hamorillo
Copy link
Contributor

Another minor detail (which probably is easy to say but more complicated to fix) is that we are not updating the avatar in the bottom bar:

image

@AdamGrzybkowski
Copy link
Contributor Author

Another minor detail (which probably is easy to say but more complicated to fix) is that we are not updating the avatar in the bottom bar:

I know about this, but this issue was there before. So it should be tackled separately as it's not directly tied to the QE.

@AdamGrzybkowski
Copy link
Contributor Author

💡 I wonder if, after switching avatars, we should keep the forceRefresh enabled after every onResume to avoid the following case:

I think we should, it's a bit annoying because the forceRefresh becomes the new default 🙄

@AdamGrzybkowski AdamGrzybkowski added this to the 25.8 milestone Nov 13, 2024
@hamorillo
Copy link
Contributor

I think we should, it's a bit annoying because the forceRefresh becomes the new default 🙄

I agree it's a pain. In this case, we can only enable it after switching avatars, which won't be very common. :(

@AdamGrzybkowski
Copy link
Contributor Author

I agree it's a pain. In this case, we can only enable it after switching avatars, which won't be very common. :(

I think I was able to solve this without using the forceRefresh too often. There's this bitmap cache that is used to store the Avatar so I'm now caching a new bitmap for the avatarUrl (without the force refresh random string query part) when a new one was selected.

@hamorillo Can you try it?

@AdamGrzybkowski
Copy link
Contributor Author

@nbradbury Could you give me access to Firebase or tell me which tests have failed? I'm running tests locally, but those that failed seem to be unrelated to my changes so I wonder if different ones failed on CI.

@nbradbury
Copy link
Contributor

nbradbury commented Nov 13, 2024

Could you give me access to Firebase or tell me which tests have failed?

@AdamGrzybkowski I'm not sure I can give you access to Firebase. @wzieba @ParaskP7 Is this something you can do?

I'm running tests locally, but those that failed seem to be unrelated to my changes so I wonder if different ones failed on CI.

You're right, it's the e2ee tests that are failing, which are unrelated. I'll do a rebuild in CI and see if that fixes the problem.

Update: Rebuilding solved the problem. Apologies for the false alarm!

@AdamGrzybkowski
Copy link
Contributor Author

@nbradbury Thanks! I rerun the build yesterday but it failed again. I guess some external factors were in play.

@ParaskP7
Copy link
Contributor

@AdamGrzybkowski I'm not sure I can give you access to Firebase. @wzieba @ParaskP7 Is this something you can do?

Hey @AdamGrzybkowski @nbradbury , thanks for the ping, you would need to post a System Request for Firebase access (example: pMz3w-c9y-p2).

@AdamGrzybkowski
Copy link
Contributor Author

@ParaskP7 No need for that. It seems like these were some flaky tests and I no longer need access to Firebase to check them.

Copy link
Contributor

@hamorillo hamorillo left a comment

Choose a reason for hiding this comment

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

@AdamGrzybkowski, I confirm it works great for me!

Copy link

sonarcloud bot commented Nov 14, 2024

@AdamGrzybkowski AdamGrzybkowski merged commit e9fd284 into trunk Nov 15, 2024
23 checks passed
@AdamGrzybkowski AdamGrzybkowski deleted the adam/gravatar_quickeditor branch November 15, 2024 09:14
@oguzkocer oguzkocer modified the milestones: 25.8, 25.5 Nov 15, 2024
@nbradbury nbradbury mentioned this pull request Nov 18, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants