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

Feature/6881 what is wordpress #6891

Merged
merged 20 commits into from
Jul 10, 2022
Merged

Conversation

JorgeMucientes
Copy link
Contributor

@JorgeMucientes JorgeMucientes commented Jul 7, 2022

Closes: #6881

Description

Part of Experiment 2: Add more information about the login process in pe5sF9-6C-p2

Adds a new link to log in with WordPress email screen that redirects to web site explaining why WordPress.com is needed to log in inside WooCommerce

Additionally this PR decouples LoginSiteAddressFragment and LoginEmailFragment from WordPress login library. This enables us to add changes to the UI in these 2 screens without updating the library.

Testing instructions

  • Open Login prologue screen and click "Continue with WordPress.com"
  • Click on link "What is WordPress.com?" and see the navigates to link correctly
  • Check that event unified_login_interaction, Properties: {"source":"default","flow":"wordpress_com","step":"enter_email_address","click":"what_is_wordpress_com","is_debug":true} with property value "click":"what_is_wordpress_com" is tracked in console log.

Images/gif

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

@peril-woocommerce
Copy link

peril-woocommerce bot commented Jul 7, 2022

You can trigger optional UI/connected tests for these changes by visiting CircleCI here.

@JorgeMucientes JorgeMucientes added feature: login Related to any part of the log in or sign in flow, or authentication. type: enhancement A request for an enhancement. labels Jul 7, 2022
@JorgeMucientes JorgeMucientes added this to the 9.6 milestone Jul 7, 2022
@@ -0,0 +1,18 @@
package com.woocommerce.android.di
Copy link
Contributor Author

Choose a reason for hiding this comment

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

WordPress login lib uses Dagger to inject deps on fragments. Since WooLoginEmailFragment and WooLoginSiteAddressFragment inherit from fragments that belong to the Login lib that are injecting their deps using:

    @Override
    public void onAttach(Context context) {
        AndroidSupportInjection.inject(this);
        super.onAttach(context);
    }

So we need this module for injected deps in these fragments to work. The Hilt approach of annotating the fragment with @AndroidEntryPoint won't work if the fragment also invokes:
AndroidSupportInjection.inject(this);

@wpmobilebot
Copy link
Collaborator

wpmobilebot commented Jul 7, 2022

You can test the changes on this Pull Request by downloading an installable build, or scanning this QR code:

@codecov-commenter
Copy link

codecov-commenter commented Jul 7, 2022

Codecov Report

Merging #6891 (67273db) into trunk (ee8a73b) will decrease coverage by 0.01%.
The diff coverage is 100.00%.

❗ Current head 67273db differs from pull request most recent head 259680a. Consider uploading reports for the commit 259680a to get more accurate results

@@             Coverage Diff              @@
##              trunk    #6891      +/-   ##
============================================
- Coverage     44.57%   44.56%   -0.02%     
- Complexity     3007     3008       +1     
============================================
  Files           539      539              
  Lines         29828    29819       -9     
  Branches       3945     3942       -3     
============================================
- Hits          13296    13289       -7     
+ Misses        15291    15289       -2     
  Partials       1241     1241              
Impacted Files Coverage Δ
...oocommerce/android/ui/login/UnifiedLoginTracker.kt 42.53% <100.00%> (+0.43%) ⬆️
...ndroid/ui/cardreader/hub/CardReaderHubViewModel.kt 98.66% <0.00%> (+0.01%) ⬆️
...rdreader/onboarding/CardReaderOnboardingChecker.kt 93.61% <0.00%> (+0.02%) ⬆️
...reader/onboarding/CardReaderOnboardingViewModel.kt 96.25% <0.00%> (+0.40%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update ced3b09...259680a. Read the comment docs.

@hichamboushaba hichamboushaba self-assigned this Jul 8, 2022
Comment on lines +70 to +80
<com.google.android.material.button.MaterialButton
android:id="@+id/login_what_is_wordpress"
style="@style/Widget.LoginFlow.Button.Tertiary"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginStart="@dimen/margin_extra_large"
android:layout_marginEnd="@dimen/margin_extra_large"
android:text="@string/what_is_wordpress_link"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/login_continue_button" />
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Copy pasted this layout file from the WordPress login library and then added this change.

@peril-woocommerce
Copy link

Warnings
⚠️ This PR is assigned to a milestone which is closing in less than 4 days Please, make sure to get it merged by then or assign it to a later expiring milestone

Generated by 🚫 dangerJS

Copy link
Member

@hichamboushaba hichamboushaba left a comment

Choose a reason for hiding this comment

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

Code looks good, and feature works good :shipit:

@hichamboushaba
Copy link
Member

@JorgeMucientes this can be merged after fixing the merge conflict

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. type: enhancement A request for an enhancement.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

What is WordPress.com? link in "Continue with WordPress.com" flow
4 participants