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

Notifications: New Order Details #431

Merged
merged 10 commits into from
Nov 16, 2018
Merged

Conversation

jleandroperez
Copy link
Collaborator

Details:

In this PR we're implementing a new "Loader", to be called OrderLoaderViewController.
This tool allows us to display a spinner, in place, async load an Order (given its orderID + siteID), and render the OrderDetails, right there, in place.

cc @bummytime @mindgraffiti
Thanks in advance!!

Testing: Successful Flow

  1. Log into Woo
  2. Open the Notifications Tab
  3. Press over a New Order row

Verify that a ViewController shows up immediately. A spinner should kick off, and the Order Details should appear shortly.

Testing: Failure Flow

  1. Checkout commit f3b54fb7
  2. Log into Woo
  3. Open the Notifications Tab
  4. Press over a New Order row

Verity that a spinner shows up immediately. Shortly after, the "Failure Overlay" should appear onscreen, with a retry button.

@jleandroperez jleandroperez added the feature: notifications Related to notifications or notifs. label Nov 14, 2018
@jleandroperez jleandroperez added this to the 0.11 milestone Nov 14, 2018
@jleandroperez jleandroperez self-assigned this Nov 14, 2018
@astralbodies astralbodies mentioned this pull request Nov 14, 2018
39 tasks
@wpmobilebot
Copy link
Collaborator

SwiftLint found issues

Warnings

File Line Reason
OrderLoaderViewController.swift 223 Arguments can be omitted when matching enums with associated types if they are not used.

Generated by 🚫 Danger

@jleandroperez jleandroperez added this to Review/Testing in MVLP Kanban Board Nov 14, 2018
Copy link
Contributor

@mindgraffiti mindgraffiti left a comment

Choose a reason for hiding this comment

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

✅ success flow
✅ failure flow
✅ code

(reminder) Dangerbot complaint

:shipit:

Copy link
Member

@bummytime bummytime left a comment

Choose a reason for hiding this comment

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

So I looked hard for something to complain about here — just couldn't find anything. :-)

I smoke tested this pretty well:
✅ All of the order details-specific functionality worked as expected (add a note, complete order, etc)
✅ Overall screen looks great on a variety of devices (portrait and land)
✅ Code is square
✅ Unit tests are good

:shipit:

// MARK: - OrderLoaderViewController: Loads asynchronously an Order (given it's OrderID + SiteID).
// On Success the OrderDetailsViewController will be rendered "in place".
//
class OrderLoaderViewController: UIViewController {
Copy link
Member

Choose a reason for hiding this comment

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

I like the entire concept of this VC subclass — very simple and straight-forward way to spin up the order details VC. A+

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Patching OrderDetailsViewController would have been a nightmare! Thank you Matt!!

@jleandroperez
Copy link
Collaborator Author

Thank you both!!

@jleandroperez jleandroperez merged commit 7773dd1 into develop Nov 16, 2018
MVLP Kanban Board automation moved this from Review/Testing to Done/Merged Nov 16, 2018
@jleandroperez jleandroperez deleted the issue/19-wiring-order-details branch November 16, 2018 12:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature: notifications Related to notifications or notifs.
Projects
No open projects
Development

Successfully merging this pull request may close these issues.

None yet

4 participants