Commit Graph

699 Commits

Author SHA1 Message Date
Fabien egg O'Carroll
709b5b2af6 Removed logic to set default urls for checkout
refs https://github.com/TryGhost/Team/issues/1067

Checkout success/cancel URLs are handled by the server, and should only
be passed if we particularly want a custom one!
2021-12-01 20:11:16 +02:00
Rishabh
f4fdda94e5 🐛 Fixed incorrect price shown for offer page with fixed discount
no refs

the fixed discount is only applied to offer if the offer currency matches with original price currency. The bug happened due to case difference between the offer and price currencies which should be compared case insensitive
2021-11-22 18:19:00 +05:30
Peter Zimon
351e34d74c Fixed trigger button opacity bug
Fixed trigger button bug of not being displayed in Portal settings with
certain themes (e.g. Edition) because of setting opacity to 1 with
inline CSS. Added condition to only set this property in preview mode.
2021-11-05 09:27:12 +01:00
Rishabh
b2827b3d9f Added loading screen while opening direct Stripe checkout
refs https://github.com/TryGhost/Team/issues/1184

When Portal tries to open Stripe checkout directly without any popup UI, since the time taken by checkout session to open can be few seconds it can cause invisible delay on the screen for user which is confusing. This change adds a loading popup while Stripe checkout session is loaded
2021-11-02 19:35:40 +05:30
Rishabh
399bbc0977 Updated fixtures for site used in tests
no refs
2021-11-02 19:35:40 +05:30
Rishabh
1dab76a274 Cleaned up mode utils 2021-11-02 19:35:40 +05:30
Heath Raftery
e419c3f868 Updated check for showing upgrade CTA in account welcome page (#182)
Co-authored-by: Heath Raftery <heath@newie.ventures>

- removes upgrade CTA if there are no paid plans available in portal to upgrade

Context:

When first configuring Portal, it is reasonable and straight-forward to connect a Stripe account as instructed, but then disable the paid tiers to delay presenting paid memberships until the site is mature enough to warrant paid memberships.

This results in a very functional Portal, which prompts for, processes and accepts free membership. After logging into a free account however, the Portal displays a call-to-action paragraph encouraging the user to upgrade to a paid account. Obviously this is confusing for the user, given that there are no paid options.

The result is no change for sites that have paid memberships, or do not have Stripe configured. But if the only membership plan is free, then the cta text is not added to the page, just as it would not be if Stripe was not configured or the subscription was complimentary or cancelled.
2021-11-02 11:13:40 +05:30
Rishabh
1a2c00d914 Updated duration in months for offer in preview mode
no refs
2021-10-22 01:57:13 +05:30
Rishabh
d818ca5c4b Updated maxlength attribute on field
no refs
2021-10-21 23:08:53 +05:30
Rishabh
52826b2324 Updated fixtures for tests
no refs
2021-10-21 23:05:04 +05:30
Rishabh
909b81e7e4 Updated tier label when multiple tiers is disabled
refs https://github.com/TryGhost/Team/issues/1162
2021-10-21 23:02:04 +05:30
Peter Zimon
dd6c9220af Offer screen refinements 2021-10-21 19:00:39 +02:00
Rishabh
d85755d91b Handled offer urls redirect to checkout when portal button is hidden
refs https://github.com/TryGhost/Team/issues/1162

- if portal button is hidden/disabled by site owner, portal offer urls redirect straight to checkout instead of opening portal offer detail screen
2021-10-21 00:50:58 +05:30
Rishabh
ac9a631fe3 Updated copy for offer renewal info on offer screen
refs https://github.com/TryGhost/Team/issues/1162

- updates renewal info based on offer duration and cadence
2021-10-20 20:21:57 +05:30
Rishabh
aef59ebf2b Ignored offer urls for paid members
refs https://github.com/TryGhost/Team/issues/1138

- paid members shouldn't see the offer detail UI as there is no clear path to upgrade for them from offer detail page at the moment
2021-10-19 13:22:52 +05:30
Rishabh
f3a861379a Updated default cadence to yearly for signups
closes https://github.com/TryGhost/Team/issues/1143

The most common pattern for signup pages when monthly and yearly plans are available is to have "yearly" as a default. Portal had default as monthly earlier, and is now changed to yearly
2021-10-18 23:57:26 +05:30
Rishabh
c100e18f05 Fixed lint
no refs
2021-10-18 23:40:05 +05:30
Rishabh
d20be44ba8 Updated checkout behavior for logged-in members
closes https://github.com/TryGhost/Team/issues/1165

- allows Stripe checkout to work for Portal direct checkout urls to monthly/yearly prices of a tier for logged-in members
2021-10-18 23:39:05 +05:30
Rishabh
aa96956320 Pre-filled name and email for free members on offer screen
closes https://github.com/TryGhost/Team/issues/1139

- also removes the signin alternate for logged-in members
2021-10-18 23:35:00 +05:30
Rishabh
6374b32f55 Updated price values to round off to 2 decimal places
refs https://github.com/TryGhost/Team/issues/1162
2021-10-18 23:11:08 +05:30
Rishabh
09e9432c20 Added checkout on offer page
refs https://github.com/TryGhost/Team/issues/1138
2021-10-18 19:17:17 +05:30
Rishabh
c13516e7e5 Fixed portal preview for offers
no refs
2021-10-18 16:34:10 +05:30
Peter Zimon
68b7608301 Optimised Offers title and description UI 2021-10-18 12:25:26 +02:00
Peter Zimon
b0027a79ab Fixed long names wrapping for product cards 2021-10-18 12:10:49 +02:00
Rishabh
e821710d80 Fixed lint
no refs
2021-10-18 15:10:29 +05:30
Rishabh
fd273ecdfe Removed unused LinkPage
no refs

Link page was originally added for usage in Admin, but has since been replaced by a Link page directly added via Admin and Portal version for it is no more used anywhere.
2021-10-18 15:05:28 +05:30
Rishabh
3b734f5c84 Removed uuid usage in favor of local object id generation
no refs
2021-10-18 14:25:06 +05:30
Rishabh
24f087ddf2 Fixed empty benefits UI for offer page
no refs
2021-10-18 14:24:12 +05:30
Rishabh
6e8e5e27bb Added preview handling for offers
refs https://github.com/TryGhost/Team/issues/1137

- Adds portal offers preview url handling on App load
- adds new `offerPreview` mode as a subset of preview mode to allow changes to Portal when offer preview is on
- loads offers screen with params from url for preview mode
- hide trigger button on portal offer preview
2021-10-18 14:22:53 +05:30
Peter Zimon
37e9255550 Fixed powered badge bug in preview 2021-10-18 10:37:58 +02:00
Peter Zimon
e1468b25ac Offers refinements 2021-10-15 16:04:54 +02:00
Peter Zimon
d1d0fa093f Further responsive style improvements 2021-10-15 15:15:37 +02:00
Rishabh
940725d978 Allowed offers page load with fixtures
no refs
2021-10-15 17:57:07 +05:30
Peter Zimon
7f0e55e7cf Responsive style improvements 2021-10-15 14:09:13 +02:00
Peter Zimon
a109538898 Fixed discount label wrapping bug 2021-10-15 13:36:18 +02:00
Rishabh
39441c7268 Updated offer detail page with real offer data
refs https://github.com/TryGhost/Team/issues/1139

- updates offer UI with offer data fetched via API
2021-10-15 11:35:49 +05:30
Rishabh
89ce25488c Wired offer endpoint to offer details page
refs https://github.com/TryGhost/Team/issues/1138

Updates Portal url for offer to fetch offer details from id and show new offer details page for non-paid members
2021-10-15 11:35:13 +05:30
Rishabh
61c387b293 Fixed plan tests
no refs
2021-10-14 23:10:34 +05:30
Rishabh
cd2e30a337 Fixed helper tests
no refs

- updated regex in get price id method to parse id
2021-10-14 22:54:25 +05:30
Rishabh
2076bb2af0 Cleaned up fixtures setup and usage
no refs

- updates fixtures file with fixture functions to easily generate test data
- adds `uuid` as dep to allow for reliably create unique ids for fixtures
2021-10-14 21:49:28 +05:30
Peter Zimon
fabb4ebc16 Added offers static data 2021-10-14 13:19:32 +02:00
Rishabh
e34cf74735 Added WIP offer page shell
refs https://github.com/TryGhost/Team/issues/1139

- adds basic offer page shell for offer screen development
2021-10-13 19:33:41 +05:30
Rishabh
2536204c71 🐛 Fixed broken portal link for yearly tier price signup
closes https://github.com/TryGhost/Team/issues/1142

Portal signup URLs for yearly plans of a tier were broken and resulted in "Failed to signup error", due to incorrect parsing of the yearly query.

- fixes regex for parsing yearly price id for tiers from portal url
- adds unit test to cover parsing of price id from page query
2021-10-13 13:12:35 +05:30
Rishabh
bb98d924f3 Updated account page fallback to signin for logged out members
closes https://github.com/TryGhost/Team/issues/1123

- on accessing `/account/*` page by logged-out member, we now fallback to show `signin` page instead of `signup`
2021-10-07 01:46:47 +05:30
Fabien O'Carroll
56d9a5c919 Made offerId & priceId exclusive when creating checkout
refs https://github.com/TryGhost/Team/issues/1090

This is required by the API
2021-10-06 16:56:51 +02:00
Rishabh
e9ed922f37 Added test for canceling member subscription on hidden tier
refs https://github.com/TryGhost/Team/issues/1119
refs ba592e891e

Canceling a member on a subscription which is not in list of portal products was throwing an error earlier, this test -

- covers cancel subscription flow for a member on hidden product subscription
- validates fix for above issue by checking confirmation screen correctly shows for cancellation
2021-10-05 14:00:37 +05:30
Rishabh
53e463aa4b Fixed subscription cancellation not working for hidden tiers
closes https://github.com/TryGhost/Team/issues/1119

- updates fetching price from all available products and not just those available to show on Portal
- handles missing price/product on Portal UI gracefully
2021-10-05 11:00:20 +05:30
Rishabh
63ca3a00f3 Added first version for offer redirects
refs https://github.com/TryGhost/Team/issues/1086

- fires stripe checkout for new Portal link for offers - `/#/portal/offers/OFFER_ID` as prototype
2021-09-28 16:43:56 +05:30
Rishabh
e6feb460c0 Fixed hidden products direct checkout via Portal links not working
no refs

- Portal links for direct stripe checkout were incorrectly ignoring products that were not included in portal product UI list
2021-09-27 22:32:24 +05:30
Rishabh
19a8f6abb9 Fixed react key warnings
no refs

- fixes key warnings from react by cleaning up key references across products and benefits
2021-09-27 20:03:56 +05:30