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

Unified Login: Step 1 - fix merge conficts and get a working build #2722

Merged
merged 5 commits into from
Aug 14, 2020

Conversation

AmandaRiu
Copy link
Contributor

Closes #2655. This PR merges in the latest unified login changes from the WordPressLoginFlow library which included fixing merge conflicts and doing the minimum amount of work required to get a successful build. This was done to keep the PR review process as manageable as possible.

Note that while this branch should build successfully, login is broken. Login will be fixed in later PRs.

To Test

Pull down this branch and verify it builds.

Update release notes:

  • I have considered if this change warrants user-facing release notes and have added them to RELEASE-NOTES.txt if necessary.

7a466b6 Merge pull request #42 from wordpress-mobile/merge/WordPress-Android/12538
69420f4 Disable continue button when verification code is empty
a651591 Merge pull request #41 from wordpress-mobile/merge/uls-changes
4a0f98e Update signatures of LoginAnalyticsListener methods that receive properties
34c2a67 Update LoginEmailFragment to avoid trying to disable nonexistent button
db4a99e Merge pull request #12503 from wordpress-mobile/add-source-to-account-created-event
e703eb9 Update trackCreatedAccount to use CreatedAccountSource
9dfa359 Introduce CreatedAccountSource to LoginAnalyticsListener
2d4870d Convert LoginAnalyticsListener to Kotlin
5680616 Remove temporary GravatarUtils from AvatarHelper
4aaa456 Update AvatarHelper to use fixed GravatarUtils
f35f72f Bump Utils library version in the Login library
92fb182 Merge pull request #12415 from wordpress-mobile/feature/disable-primary-buttons-on-empty-fields
0dc932d Remove unnecessary non-null checks
28fa9f7 Merge branch 'develop' into feature/unified-login-signup
2549443 Merge pull request #12010 from wordpress-mobile/merge/loginlib/woo-dark-mode
5014577 Merge pull request #12425 from wordpress-mobile/issue/unified-login-signup-theming-issues
7ce7661 Stop using the default Gravatar placeholder on Login Epilogue
b8b08ae Update placeholder color to ensure compatibility on older API levels
e486867 Disable primary button when username or password are missing
1d3b66e Disable primary button when password is not filled in
1ace43e Disable continue button when email is empty
581c9e9 Update LoginFlow theme to ensure compatibility on older API levels
b2971aa Remove nested selectors to ensure compatibility on older API levels
0844510 Merge pull request #12294 from wordpress-mobile/fix/remove-unused-click-event
c970ac3 Merge branch 'develop' into feature/unified-login-signup
17e0788 Remove event that's never triggered in the new flow
f87d1e5 Add missing click tracking to magic link screens
f9ea9f6 Add click tracking to Signup Confirmation screen
23a0b27 Add screen tracking to Signup Confirmation screen
4976862 Fix a bug when flow is switched when returning from the google flow
1636465 Merge branch 'feature/unified-login-failure-tracking' into feature/unified-login-interaction-tracking
18d01c6 Move google error tracking to LoginActivity.java
6ce30e4 Merge branch 'feature/unified-login-signup' into feature/unified-login-failure-tracking
c2ecfda Merge pull request #12056 from wordpress-mobile/issue/11785-add-signup-confirmation-screen
effb35b Fix indentation issue
cbc341d Add tracking for the email hints dialog
17cee3e Add email click tracking
d3c5f3f Add click tracking to help
f772966 Merge branch 'feature/unified-login-failure-tracking' into feature/unified-login-interaction-tracking
6fbfcd7 Add error logging where it was missing
7cadea4 Cleanup failure tracking
646ba2d Merge branch 'feature/unified-login-signup' into feature/unified-login-failure-tracking
cbec230 Merge pull request #12048 from wordpress-mobile/issue/11785-update-login-flow-layouts
546fb2b Implement help dialog on the signup confirmation screen
fa0db85 Implement signup confirmation screen for google signup
9cdcbc7 Implement signup confirmation screen for email signup
dd7b673 Update TOS links colors
b42a8b1 Merge pull request #12047 from wordpress-mobile/issue/11785-update-login-flow-theme
855ac52 Extract avatar loading logic to a helper class
30f1fad Update email header component layout
7bdca2d Update Signup Magic Link screen
7ca256a Rename Signup Magic Link screen layout file
06a2d4c Update Signup Email screen
fcd4a97 Rename Signup Email screen layout file
0048078 Update Login Username Password screen
21b3fbb Update Login Site Address screen
9a453c4 Update Login 2FA screen
1c2610f Update Login Email Password screen
a06c6bd Update Login Magic Link Sent screen
951456a Extract magic link header to a separate layout file
1a41006 UI update to Magic Link Request screen
1c2526d Update base form layout
668da0a Extract old Login Email screen to a separate layout file
5e942b4 UI update to Login Email screen
80a4c0d Update login theme and styles
16dac21 Merge pull request #11944 from wordpress-mobile/issue/11783-update-epilogue-ui
b3d8998 Merge commit '46923a963c480113b797856bfaf179dad5044d2d' into merge/loginlib/woo-dark-mode
4f1af83 Fix NPE when primary button is missing
d0cfd5e End progress when the login fragment is destroyed
a3a1c83 Merge pull request #37 from wordpress-mobile/merge/woocommerce-android/dark-mode
2274f87 Add click tracking to unified login and signup flow
81c9fee Use universal method for failure tracking
9e5f139 First step of failure tracking
9cebf7a Remove method that's not tracking screen change
c6469d5 Add source to tracking events
eefd096 Add screen tracking to login and signup
fdc65a5 Bump login library minSdkVersion to 21 and targetSdkVersion to 29
990df94 Merge pull request #40 from wordpress-mobile/fix/9905_Crash_InflateException_Binary_XML_file_line_NEW
dfd3ed8 Fix password drawable
44e989e Merge pull request #12000 from wordpress-mobile/fix/9905_Crash_InflateException_Binary_XML_file_line_NEW
bf3e2f3 Merge pull request #38 from wordpress-mobile/fix/11307-The-wrong-icon-is-used-when-a-Password-is-visible
1428361 Merge pull request #39 from wordpress-mobile/merge/WordPress-Android/11934-take2
eac3784 Revert unintentional change during merge
5502b85 Merge commit 'd4d2d895dd0c1469adf230607fe801146f9f91ff' into merge/loginlib/woo-dark-mode
1f1f283 Merge pull request #11934 from wordpress-mobile/update/fragments
0c40f73 Set password icon programmatically
b77a144 using getViewLifecycleOwner() for observers
e2f7c1c Replace wrong icon with the right one
eb8ed26 Fix wrong password icon
f0e7106 Remove unused resources
044893c Update login epilogue secondary button strings
c5c7981 Update signup epilogue primary button string
fb1712a fixed lint error and replaced all observers owner parameter with viewLifecycleOwner
05af8f4 Remove unused strings from the login library
0f40e7e Add ability to enable login via site address from the prologue screen
689b1d9 Add ability to disable login via site address from the email screen
cfc0675 Add title to the layout override for the site help dialog
fd236a3 Merge pull request #11717 from wordpress-mobile/issue/11705-google-sign-in
92ef161 Move @OverRide annotation to conform with the current code style
8871b22 Merge branch 'feature/unified-login-signup' into feature/introduce-kotlin
debde7c Add library version locally to the login library
e7e8df0 Move progress dialog to better handle configuration changes
1c871c9 Update log messages for sign-up from login functionality
9c13cb0 Add flag to turn the sign-up from login functionality on
3cae24c Add loading dialog to LoginGoogleFragment
a00ec92 Update LoginGoogleFragment so it supports sign-up from login
a09bdda Use correct versions to fix build
217b13f Introduce kotlin to LoginFlow and bump libraries
79c4db7 Add flag to turn the sign-up from login functionality on
beff169 Update LoginEmailFragment so it supports sign-up from login
63fc73e Use wrap_content for image width so wider images will scale better
68b0c58 Merge commit '8487e6f4cfee09193f48b803fcf1eb2252355022' into darkmode/login-theme-1
40824a4 Merge commit '0c3930794ed0c77e4926d334674e85263ef2a651' into update_login_lib_with_signup_sheet_nav_bar_buttons_visibility_fix
d634c91 Merge commit '371f14160a780fbd7797d71921859d0fee5764d5' into update-login-lib-with-password-toggle-fix
a87d595 Merge pull request #1796 from woocommerce/release/merge-3.3
e407a7f Revert erroneously deleted code during merge
821d29b Revert erroneously deleted code during merge
188cc0e Check if view is null before accessing property
1a4414e Merge commit 'bd659986940153549bfc26a8f6a4104bf748fe3c' into hotfix/1778-npe
d2b8135 Added logic to fetch the correct SiteModel from the local db for the incoming url
3421ca9 Merge branch 'develop' into test
a20471e Merge branch 'develop' of https://github.com/woocommerce/woocommerce-android into feature/refund-by-items-master
7757f05 Merge branch 'develop' into feature/edit-product-master
f869be0 Merge branch 'feature/refund-by-items-master' into 0nko/refund-items-list
6467816 check if listener is null before handling discovery error
1de03a5 check if listener is null before handling discovery error
a6e0946 Update gradle plugin to version 3.5.3
2dd431c Updated Glide version in the login lib
d5e8683 Added period to login with site credentials
eee4c53 Fixed bug when the forgot password url in username password screen was not valid
2810b14 Upgrade gradle plugin to version 3.5.2
daf7384 Merge pull request #1552 from woocommerce/login-lib-changes
f75cbaa Merge commit '4e588147352f8fe88f1417a03a00114dd7d51640' into login-lib-changes

git-subtree-dir: libs/login
git-subtree-split: 7a466b6
These will be populated in a different PR. The purpose of this PR is simply to get the repo to build.
@AmandaRiu AmandaRiu added this to the 4.9 milestone Aug 12, 2020
@AmandaRiu AmandaRiu requested a review from a team August 12, 2020 21:41
@peril-woocommerce
Copy link

peril-woocommerce bot commented Aug 12, 2020

Fails
🚫

Danger failed to run /app/danger-0.9go5jor9ifd.ts.

🚫

Danger failed to run /app/danger-0.7fenpwjfdi7.ts.

Warnings
⚠️ PR has more than 500 lines of code changing. Consider splitting into smaller PRs if possible.
Messages
📖

This PR contains changes in the subtree libs/login/. It is your responsibility to ensure these changes are merged back into wordpress-mobile/WordPress-Login-Flow-Android. Follow these handy steps!
WARNING: Make sure your git version is 2.19.x or lower - there is currently a bug in later versions that will corrupt the subtree history!

  1. cd woocommerce-android
  2. git checkout issue/2655-unified-login-1
  3. git subtree push --prefix=libs/login/ https://github.com/wordpress-mobile/WordPress-Login-Flow-Android.git merge/woocommerce-android/2722
  4. Browse to https://github.com/wordpress-mobile/WordPress-Login-Flow-Android/pull/new/merge/woocommerce-android/2722 and open a new PR.

Error TypeError

Cannot read property 'added' of null
TypeError: Cannot read property 'added' of null
    at Object.exports.default (/app/danger-0.9go5jor9ifd.ts:16:44)
    at process._tickCallback (internal/process/next_tick.js:68:7)

Dangerfile

11|         warn("The PlayStoreStrings.po file must be updated any time changes are made to release notes");
12|     }
13| 
14|     // If changes were made to the strings, make sure they follow our guidelines
15|     const modifiedStrings = modifiedFiles.filter((path: string) => path.endsWith('values/strings.xml'))
----------------------------------------------^
16| 
17|     for (let file of modifiedStrings) {        
18|         const stringDiffs = await danger.git.diffForFile(file)
19| 

Error TypeError

Cannot read property 'diff' of null
TypeError: Cannot read property 'diff' of null
    at checkCommitDiffs (/app/danger-0.7fenpwjfdi7.ts:43:49)
    at process._tickCallback (internal/process/next_tick.js:68:7)

Dangerfile

38|         if (git === undefined) {
39|             console.log("About to crash due to an error")
40|             console.log("File:", thisFile)
41|             console.log("Danger Object: ", danger)
42| 
---------------------------------------------------^
43|             if (danger !== undefined) {
44|                 console.log("Danger is no longer defined")
45|             }
46|             else {

Generated by 🚫 dangerJS

@peril-woocommerce
Copy link

You can test the changes on this Pull Request by downloading the APK here.

@anitaa1990 anitaa1990 self-assigned this Aug 14, 2020
Copy link
Contributor

@anitaa1990 anitaa1990 left a comment

Choose a reason for hiding this comment

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

App builds as expected :shipit:

@anitaa1990 anitaa1990 merged commit de617fa into feature/unified-login Aug 14, 2020
@anitaa1990 anitaa1990 deleted the issue/2655-unified-login-1 branch August 14, 2020 09:08
@AmandaRiu AmandaRiu mentioned this pull request Sep 15, 2020
1 task
@designsimply designsimply added feature: login Related to any part of the log in or sign in flow, or authentication. and removed Login labels May 6, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature: login Related to any part of the log in or sign in flow, or authentication.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants