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

Shipping Labels Onboarding: Pre-install screen #6797

Merged
merged 12 commits into from
Jun 22, 2022

Conversation

hichamboushaba
Copy link
Member

Part of: #6587

Description

This PR adds the following changes:

  1. Refactoring of the installation ViewModel to allow multiple states.
  2. Adds pre-install screen.
  3. Handle animation between the CTA and Pre-install screen.

Testing instructions

  1. Make sure your store is in US, and uses USD as the currency, but doesn't have WCShip.
  2. Create an order eligible for shipping label creation (ie: not virtual/downloadable and not eligible for IPP).
  3. Open the order in the app.
  4. Click on the "Get WooCommerce Shipping" button.
  5. Click on "Add extension" to the store.
  6. Confirm the pre-install screen is displayed with appropriate animation.

Images/gif

Screen.Recording.2022-06-22.at.11.32.45.mov
  • 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 Jun 22, 2022

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

@peril-woocommerce
Copy link

peril-woocommerce bot commented Jun 22, 2022

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

Generated by 🚫 dangerJS

@hichamboushaba hichamboushaba added type: enhancement A request for an enhancement. feature: shipping labels Related to creating, ordering, or printing shipping labels. labels Jun 22, 2022
@hichamboushaba hichamboushaba added this to the 9.5 milestone Jun 22, 2022
@wpmobilebot
Copy link
Collaborator

wpmobilebot commented Jun 22, 2022

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

import javax.inject.Inject

@HiltViewModel
class InstallWCShippingViewModel @Inject constructor(
Copy link
Member Author

Choose a reason for hiding this comment

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

The diff is misleading, the file was renamed, and this caused Github to mark everything as added, but I think it's not a bad thing, reviewing the file as a whole can make things clearer.

@hichamboushaba hichamboushaba marked this pull request as ready for review June 22, 2022 10:50
@hichamboushaba hichamboushaba requested review from nbradbury and 0nko June 22, 2022 10:50
@codecov-commenter
Copy link

codecov-commenter commented Jun 22, 2022

Codecov Report

Merging #6797 (00fe3b6) into trunk (a8c09fd) will decrease coverage by 0.33%.
The diff coverage is 0.00%.

@@             Coverage Diff              @@
##              trunk    #6797      +/-   ##
============================================
- Coverage     45.21%   44.87%   -0.34%     
  Complexity     2964     2964              
============================================
  Files           531      533       +2     
  Lines         28962    29181     +219     
  Branches       3824     3859      +35     
============================================
  Hits          13094    13094              
- Misses        14656    14875     +219     
  Partials       1212     1212              
Impacted Files Coverage Δ
.../android/ui/orders/details/OrderDetailViewModel.kt 69.45% <0.00%> (ø)
...merce/android/ui/shipping/InstallWCShippingFlow.kt 0.00% <0.00%> (ø)
...android/ui/shipping/InstallWCShippingOnboarding.kt 0.00% <0.00%> (ø)
.../android/ui/shipping/InstallWCShippingViewModel.kt 0.00% <0.00%> (ø)

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 a8c09fd...00fe3b6. Read the comment docs.

@nbradbury nbradbury self-assigned this Jun 22, 2022
@nbradbury
Copy link
Contributor

@hichamboushaba This is unrelated to this PR, but I just wanted to make sure you were aware of #6674. To me the image looks like it needs some end padding, but perhaps this is what the design called for?

Screenshot_20220622_094044

durationMillis = 500,
delayMillis = 500,
// Ensure a bit of elasticity at the end of the animation
easing = CubicBezierEasing(0.7f, 0.6f, 0.74f, 1.3f)
Copy link
Contributor

Choose a reason for hiding this comment

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

Nice!

@nbradbury
Copy link
Contributor

nbradbury commented Jun 22, 2022

I have a few concerns about this screen:

  • It doesn't work well in landscape
  • Using "Cancel" at the top left is inconsistent in that we usually use an "X" button
  • Instead of "Proceed With Installation" how about just "Proceed" or, even better, simply "Continue"?

landscape

@hichamboushaba
Copy link
Member Author

hichamboushaba commented Jun 22, 2022

Thanks for the review @nbradbury

It doesn't work well in landscape

Yes, this is something I missed when I was concentrating on the animations, I'll update the content to make it scrollable.

  • Using "Cancel" at the top left is inconsistent in that we usually use an "X" button
  • Instead of "Proceed With Installation" how about just "Proceed" or, even better, simply "Continue"?

Both things come from the current designs, I'm not involved in the project from the beginning, but I believe the team discussed those aspects before giving the go to the implementation, and anyway we can always ask the design team if we need to 🙂, @joe-keenan WDYT?

@hichamboushaba
Copy link
Member Author

hichamboushaba commented Jun 22, 2022

@nbradbury I tried to fix the issue on landscape with the two commits 30f72ae and 00fe3b6, they make the content scrollable, and add a minimum height for the Spacers, ready for another round.

@hichamboushaba hichamboushaba requested a review from nbradbury June 22, 2022 16:56
@nbradbury
Copy link
Contributor

@hichamboushaba I'll approve and merge this, but I wanted to note that having the "Cancel" button scroll seems odd. Just like the back button or a "X" button, shouldn't that stay fixed in place?

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.

:shipit:

@nbradbury nbradbury merged commit 938b773 into trunk Jun 22, 2022
@nbradbury nbradbury deleted the issue/6587-wcship-installation-initial-screen branch June 22, 2022 20:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature: shipping labels Related to creating, ordering, or printing shipping labels. type: enhancement A request for an enhancement.
Projects
Development

Successfully merging this pull request may close these issues.

4 participants