realartists / shiphub-cocoa

MIT License
30 stars 5 forks source link

make Manage Subscriptions a modal window or sheet? #305

Closed fpotter closed 7 years ago

fpotter commented 7 years ago

The flow may feel better if we turn this into a sheet that auto-dismisses every time you click a Manage or Buy button.

As-is, it can get a little awkward in this scenario:

  1. From the Ship menu, you choose Manage Subscription....
  2. You click Buy to purchase a subscription and your focus changes to your browser.
  3. You complete a purchase and, from the Thank You page, you click Open Ship to return to Ship.
  4. Focus goes back to Ship but the Manage Subscription window is on top.

You don't want the Manage Subscription window to still be on top after you make a purchase.

james-howard commented 7 years ago

To play devil's advocate, it's nice to see in the window that your subscription status has updated.

fpotter commented 7 years ago

Yeah, it is. But, you do have that toolbar indicator as well.

Part of my concern is also the latency on that window updating to show your new subscription state. It doesn't refresh until ChargeBee delivers the webhook to our server, then our server delivers the sync to the client.

It can happen that if you quickly return to Ship after signup, you'll still see the Buy button for another 1-2 seconds. Not a huge deal of course, but confusing for a moment.

james-howard commented 7 years ago

Well, you wouldn't see the toolbar item go away either in that case. Maybe we should put an artificial delay in the confirmation page after signup?

james-howard commented 7 years ago

Here's the plan:

  1. Client will dismiss the subscription window if it is launched by ship+github://open?signup=complete. Additionally, it will open or bring to the foreground the overview window if necessary.

  2. We'll use a web redirect to update the chargebee state, instead of relying just on a webhook, since that will be faster.

  3. The signup web page will change the URL to the one shown above.