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

[Jetpack Content Migration Flow] Integrate local migration with UI #17516

Merged
merged 13 commits into from
Nov 23, 2022

Conversation

mkevins
Copy link
Contributor

@mkevins mkevins commented Nov 23, 2022

Fixes #17508

To test:

Enable the following flags in the build.gradle

        buildConfigField "boolean", "JETPACK_POWERED_BOTTOM_SHEET", "true"
        buildConfigField "boolean", "JETPACK_SHARED_LOGIN", "true"
        buildConfigField "boolean", "JETPACK_LOCAL_USER_FLAGS", "true"
        buildConfigField "boolean", "JETPACK_BLOGGING_REMINDERS_SYNC", "true"
        buildConfigField "boolean", "JETPACK_READER_SAVED_POSTS", "true"
        buildConfigField "boolean", "JETPACK_PROVIDER_SYNC", "true"
        buildConfigField "boolean", "JETPACK_MIGRATION_FLOW", "true"

Generate some local-only content:

Follow the steps in #17398

Testing steps:

Uninstall the Jetpack app or log out of Jetpack and delete all data.

  1. Run the Jetpack app from this branch
  2. Expect to be logged in automatically and see the list of your sites
  3. Press continue on the next screens
  4. Expect to see labels for local content in the post list

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)
    N/A

  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.

Since the number of flags has become quite large, this utility class can
be useful for conditioning the migration.
Though this emission does not signal failure (i.e. it can fail
silently), it can still be encapsulated within the login helper. Since
the token is persisted in a private shared preference, it should be less
error-prone. If it is necessary, later we can set the preference more
directly with `commit` instead of `apply`.
This is useful so we don't have to wait for syncing the account data
with the server to display the avatar in the welcome screen.
These are useful for wiring up the results in the migration to the UI.
This provides for a single mutable state flow to be consumed by the UI,
encapsulating the possible states of the data migration.
@mkevins mkevins force-pushed the try/integrate-local-migration-with-ui branch from 5cde933 to e8caa50 Compare November 23, 2022 06:58
@wpmobilebot
Copy link
Contributor

wpmobilebot commented Nov 23, 2022

WordPress📲 You can test these changes on WordPress by downloading wordpress-installable-build-pr17516-03837ef.apk
💡 Scan this QR code with your Android phone to download and install the APK directly on it.
AppWordPress
Build FlavorJalapeno
Build TypeDebug
Commit03837ef
Note: This installable build uses the JalapenoDebug build flavor, and does not support Google Login.

@wpmobilebot
Copy link
Contributor

wpmobilebot commented Nov 23, 2022

Jetpack📲 You can test these changes on Jetpack by downloading jetpack-installable-build-pr17516-03837ef.apk
💡 Scan this QR code with your Android phone to download and install the APK directly on it.
AppJetpack
Build FlavorJalapeno
Build TypeDebug
Commit03837ef
Note: This installable build uses the JalapenoDebug build flavor, and does not support Google Login.

Base automatically changed from try/migrate-pages-along-with-posts to trunk November 23, 2022 10:41
@antonis antonis self-requested a review November 23, 2022 10:41
@antonis antonis added this to the 21.3 milestone Nov 23, 2022
@antonis antonis marked this pull request as ready for review November 23, 2022 11:17
@antonis antonis enabled auto-merge November 23, 2022 11:49
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.

Great work @mkevins 👍
The code changes make sense to me and the UI is cleanly integrated with the migration flow. I've tested the flow on a Pixel 5 (Android 13) and everything worked as expected 🎉

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.

Approved ✅

@antonis antonis merged commit 5cbdd36 into trunk Nov 23, 2022
@antonis antonis deleted the try/integrate-local-migration-with-ui branch November 23, 2022 12:35
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.

Android - Wire up UI to data layer
3 participants