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

Onboarding Improvements: New Login Epilogue Screen Design #15036

Merged
merged 25 commits into from
Jul 21, 2021

Conversation

ParaskP7
Copy link
Contributor

@ParaskP7 ParaskP7 commented Jul 16, 2021

Parent #14990

This PR adds a couple of new designs to the login epilogue screen, the normal and expanded ones.

  • The normal design is the one that will be shown when the number of sites equal to 2-3 or less.
  • The expanded design is the one that will be shown when the number of sites end up being more than 3.
Sites Existing New
2-3 or less
(normal)
existing_normal new_normal
More than 3
(expanded)
existing_expanded new_expanded

To test:

Scenario: normal

  1. Find an account which has lots of sites and log-in to the app.
  2. Go to the Side Chooser screen and hide all but 3 of the existing sites. You should at max have no more than 3 sites shown.
  3. Go to My Site -> App Settings -> Test feature configuration.
  4. Enable the OnboardingImprovementsFeatureConfig feature flag.
  5. Log-out and log-in to the app again.
  6. Make sure the new Login Epilogue screen looks as expected, the normal design is shown.

Scenario: expanded

  1. Find an account which has lots of sites and log-in to the app.
  2. Go to the Side Chooser screen and unhide all sites. You should at least have more that 3 sites shown.
  3. Go to My Site -> App Settings -> Test feature configuration.
  4. Enable the OnboardingImprovementsFeatureConfig feature flag.
  5. Log-out and log-in to the app again.
  6. Make sure the new Login Epilogue screen looks as expected, the expanded design is shown.

Merge Instructions:

  • @osullivanchris to do a design review of both the new Login Epilogue screens (normal and expanded).
  • Remove the [Status] Needs Design Review.
  • Merge WordPress-Login-Flow-Android#60.
  • Update Login hash from the PR (60-{sha1}) to develop-{sha1}.
  • Merge this PR.

Notes

This PR is UI related only, the below functionality will be handled in separate PRs:

  • Selecting a Site, which will either show the Quick Start Prompt or navigate to My Site directly.
  • Clicking the Create a new site button, which will start the WordPress.com site creation flow.
  • Landscape UI, which requires a bit more fine tuning before being ready.

Regression Notes

  1. Potential unintended areas of impact

The existing Login Epilogue screen might be somehow affected by all the changes in this PR since all 3 screen are sharing all the logic, that is code-wise.

  1. What I did to test those areas of impact (or what existing automated tests I relied on)

See To test section above.

  1. 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.

This way every parameter ends up being on a separate line, thus making
the 'new SitePickerAdapter(...)' constructor read better.
This way every parameter ends up being on a separate line, thus making
the 'holder.showSitesHeading(...)' call read better.
This new login epilogue header will be shown when the
'Onboarding Improvements' feature flag gets enabled, else the existing
login epilogue header will be shown.

PS: The design on this new login epilogue header is not final yet. More
refinements are due when the design gets finalized.
With the new login epilogue header the logic of inflating the layout and
showing/hiding the site headings needs to be altered. This commit is
utilizing the 'Onboarding Improvements' logic to alternate between the
new and existing login epilogue header logic.
The design updates is based on final designs as those were provided
by the designer.
Those newly extracted method will help with readability and making sure
that the logic can be easily updated based on a feature flags being
enabled/disabled, especially for the 'footerHandler()' method.
This new login epilogue screen will be shown when the
'Onboarding Improvements' feature flag gets enabled, else the existing
login epilogue screen will be shown.

PS: This new login epilogue screen will be shown for 2-3 sites or
less only. For more than 3 sites, another new login epilogue screen will
be shown instead.
This new expanded login epilogue screen will be shown when the
'Onboarding Improvements' feature flag gets enabled and when the number
of sites exceeds the expected number, else the existing login epilogue
screen will be shown.

PS: This new expanded login epilogue screen will be shown for more
that 3 sites. For 2-3 sites or less, the non-expanded new login epilogue
screen will be shown instead.
This is done since there are actually two dividers, the 'divider' and
the 'item_diver' views, which do not appear on the same screen and as
such when one is present the other one is not, and vice versa.
This is a new requirement as per the updated design.
This method will be utilized within the 'LoginEpilogueFragment' to help
identify whether the new login epilogue sceen UI needs to be shown or
the new expanded one instead (for more than 3 sites).
This is done because this 'bottom_shadow' view will not appear on the
same screen every time and it will only appear under sertain condition,
like with the existing UI or the new expanded UI.
Instead of initializing the 'SitePickerAdapter' during
'setupContent(...)', this is now done during the 'onCreate(...)' phase
of this screen's lifecycle. This is due to the fact that this adapter
and its publicly made 'getBlogsForCurrentView()' method will be required
to be available during 'createMainView(...)' so that the appropriate new
login epiloge screen is being picked up (the normal or expanded one).
This commit is utilizing the 'Onboarding Improvements' feature flag to
alternate between the new and existing login epilogue screens.
This commit is utilizing the 'EXPANDED_UI_THRESHOLD' logic to
alternate between the expanded and normal new login epilogue screens.
@ParaskP7 ParaskP7 added this to the 17.9 milestone Jul 16, 2021
@ParaskP7 ParaskP7 self-assigned this Jul 16, 2021
@peril-wordpress-mobile
Copy link

peril-wordpress-mobile bot commented Jul 16, 2021

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

@ParaskP7 ParaskP7 changed the title Onboarding Improvements: New Epilogue Screen Design Onboarding Improvements: New Login Epilogue Screen Design Jul 16, 2021
@peril-wordpress-mobile
Copy link

peril-wordpress-mobile bot commented Jul 16, 2021

You can test the changes on this Pull Request by downloading the APKs:

@ParaskP7 ParaskP7 requested a review from ashiagr July 16, 2021 13:00
@ParaskP7 ParaskP7 marked this pull request as ready for review July 16, 2021 13:00
Copy link

@osullivanchris osullivanchris left a comment

Choose a reason for hiding this comment

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

Thanks for sharing @ParaskP7 , its looking great already. Here are a few things I noticed:

  • the dividing line is going straight through the 'or' text, rather than breaking either side
  • in landscape mode, with only one site, the 'create site' button is not sticky and is off screen for me. I think it should always be sticky in landscape mode for both 1-3 sites and more site versions.
  • the buttons are not wired up yet. I couldn't tap a site. 'Create new site' took me to My Site. Assume this is just not done yet.
  • Seeing the 'Choose a site to open' text in serif, I'm not sure we've got the balance right with type sizes yet. Let's discuss options together next week.

Copy link
Contributor

@ashiagr ashiagr left a comment

Choose a reason for hiding this comment

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

Great job @ParaskP7! Changes are coming along really nicely 🙌. Also, appreciate the in-between refactoring you did to make the code more readable and robust.

I only left one suggestion and a warning for you to consider. Hope it helps.

@ParaskP7
Copy link
Contributor Author

👋 @osullivanchris !

Thanks for much for this detailed review! 🙏

  • the dividing line is going straight through the 'or' text, rather than breaking either side

You are totally right, really good eye, I totally missed that. It is very strange that this is happening since I copy-pasted the component from the Google sign-in form as it was specified there, thus I never even bother to notice it afterwards. Hmmm... I wonder... I'll update it asap and let you know! 👍

  • in landscape mode, with only one site, the 'create site' button is not sticky and is off screen for me. I think it should always be sticky in landscape mode for both 1-3 sites and more site versions.
  • the buttons are not wired up yet. I couldn't tap a site. 'Create new site' took me to My Site. Assume this is just not done yet.

I have left a note on my description on all that. Selecting a Site, Clicking the Create a new site button and the Landscape UI will be done in individual PR, separate to this one, you can also check the list of todos in the parent issue, here. Also, I just added the Jetpack App todo item, which will be done in a separate PR as well. Divide and conquer! 😄

  • Seeing the 'Choose a site to open' text in serif, I'm not sure we've got the balance right with type sizes yet. Let's discuss options together next week.

Definitely, let's discuss our options together. In this instance I used the @style/Widget.LoginFlow.Button.Secondary style that is already the style for the secondary (white) button during the login flow, as it is already defined by the library. I didn't want to make any changes to that before you can see the result and suggest updates to the button. 👍

@osullivanchris
Copy link

Thanks for the reply @ParaskP7

You are totally right, really good eye, I totally missed that. It is very strange that this is happening since I copy-pasted the component from the Google sign-in form as it was specified there, thus I never even bother to notice it afterwards. Hmmm... I wonder... I'll update it asap and let you know! 👍

strange! Thanks for taking a look into it!

I have left a note on my description on all that. Selecting a Site, Clicking the Create a new site button and the Landscape UI will be done in individual PR, separate to this one, you can also check the list of todos in the parent issue, here. Also, I just added the Jetpack App todo item, which will be done in a separate PR as well. Divide and conquer! 😄

Nice! Sorry I missed that. I'll have a look at the parent task!

Definitely, let's discuss our options together. In this instance I used the @style/Widget.LoginFlow.Button.Secondary style that is already the style for the secondary (white) button during the login flow, as it is already defined by the library. I didn't want to make any changes to that before you can see the result and suggest updates to the button. 👍

Is that the button you're referring to? I was talking about the subheading. We can discuss on our call in a bit 😄

@ParaskP7
Copy link
Contributor Author

Thank YOU @osullivanchris !

strange! Thanks for taking a look into it!

True, it was just our IDE messing with reordering XML elements automatically, which is causing that, and this is because of the predefined setup we are all using. We also talked with @ashiagr to extract this login in a separate layout and make it reusable. This will avoid further such problems in the future and make it easier for anyone else to reuse this component. 👍

Nice! Sorry I missed that. I'll have a look at the parent task!

The description was long, of course! 🌟

Is that the button you're referring to? I was talking about the subheading. We can discuss on our call in a bit 😄

Oh, you are right, I misread, this is not about the button, but rather the subheading. In any ways, I am open for any suggestions you might have for me! 👍

This 'Login' hash updates 'Login' library to that 'PR' version where
the 'login_or_layout' layout has been extracted and can be now reused.
@ashiagr ashiagr self-requested a review July 20, 2021 08:50
After talking with the designer it was decided that the best choice is
to go with the 'textAppearanceSubtitle1' for now.
@ParaskP7
Copy link
Contributor Author

👋 @osullivanchris !

Oh, you are right, I misread, this is not about the button, but rather the subheading. In any ways, I am open for any suggestions you might have for me! 👍

As discussed, I have just pushed a fix which updates the textAppearanceHeadline6 text appearance to textAppearanceSubtitle1. I have also updated the description with the new screenshots. Please do let me know if everything looks ok now and thank you a lot for all your support. 🙏

@osullivanchris
Copy link

Looks good @ParaskP7 and thanks for the chat! I'm updating zeplin to reflect the same change 😄

This 'Login' hash updates 'Login' library to that 'develop' version
where the 'login_or_layout' layout has been extracted and can be now
reused.
@ParaskP7 ParaskP7 removed the [Status] Needs Design Review A designer needs to sign off on the implemented design. label Jul 21, 2021
@ParaskP7 ParaskP7 merged commit d9e67ee into develop Jul 21, 2021
@ParaskP7 ParaskP7 deleted the issue/14990-epilogue-screen-new-design branch July 21, 2021 06:47
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.

None yet

3 participants