refs https://github.com/TryGhost/Team/issues/1554
With multiple newsletters, the subscribed property on a member is replaced by newsletter(s) [] which defines member's subscription instead.
- wires existing subscribe toggle on account home to new newsletter backend
refs https://github.com/TryGhost/Team/issues/1543
In some cases, when the background of page has scroll, scrolling inside Portal popup also scrolls the background page which causes confusion. To avoid this, we set the body of site to overflow hidden when Portal popup is opened to freeze the background, and then reset it back to original state when portal popup is hidden.
refs https://github.com/TryGhost/Team/issues/1490
Updates newsletter selection flow on signup to render content inside the signup page, so we can keep the common header and popup modal for both pages.
refs https://github.com/TryGhost/Team/issues/1469
- wires newsletters data on email preference page to real data for view/edit
- allows members to control email preference to multiple newsletters
- Adjusted fading cover for sticky buttons
- Adjusted bottom margin of invite only popup
- Updated input font-size for mobile to prevent input focus zooming
One of the early betas for multiple products allowed adding custom description for prices, which Portal had an extra check for when rendering. The price description is not a valid scenario anymore, and this change allows Portal to ignore description of prices so it shows consistent layout for single tier scenario.
refs https://github.com/TryGhost/Team/issues/1440
- adds static email preferences section in account home page
- adds new account email page for preferences
- adds new fixture for multiple newsletters
- adds basic helper for multiple newsletters
On the heels of multiple tiers going GA, this change brings a massive visual overhaul to Portal for almost all pages and flows, along with adding consistency between different multiple tier flows. It also overhauls the tests to match our new UI/UX for Portal.
Co-authored-by: Peter Zimon <peter.zimon@gmail.com>
refs https://github.com/TryGhost/Team/issues/1428
Editing a comped member's name doesn't return the dummy subscription object in API response, causing unexpected crash in Portal when setting Plan label as it expect's a subscription for a paid member. This change gracefully handles the crash and instead shows empty information for plan label so member can continue using Portal as expected.
Ref: https://github.com/TryGhost/Casper/issues/850
Portal has a bug that the scrollbars for the popup wrapper are always
visible which results in double scrollbars for certian viewports.
This commit hides the wrapper's scrollbars, so only the site scrollbars
will be visible (if the content requires it).
The first product selection failed in case of multiple products when viewing in preview, as the id was not updating correctly. This fixes the selected product for products section to ensure there is always valid product selected.
refs https://github.com/TryGhost/Team/issues/1387
We have moved away from the portal_products and portal_plans settings to using the visibility property on tiers to determine whether or not a tier should be visible in Portal. This updates Portal to use new tier visibility property to determine visibility at base API level, and in future we will update to remove all usage of portal settings.
- for logged in members, offer screen was not using the existing name/email values in stripe checkout request
- this did not have side effects as we still attach member session identity in checkout request,
- updates portal to send the name/email when present to checkout request
refs https://github.com/TryGhost/Team/issues/1345
- updates App setup to take custom api prop
- adds new signup flow test to check functional behavior of App for specific site settings
- cleanup
refs 579b34434f
As part of the work of automatically logging members in after payment, we added a new action type for signup - `signup-paid` - which allows custom message for a member that is already signed up and doesn't need to confirm their subscription. The new action - `signup-paid` - wasn't added to Portal notification handler which then fallbacks to showing just `Success` as the message. This change -
- handles new `signup-paid` action type allowing Portal to show proper success message
- fixes a bug that avatars for logged in members didn't appear on the trigger button (bottom right) when the setting for the button was set to 'Text only'
closes https://github.com/TryGhost/Team/issues/1301
- if a logged in member doesn't a name stored, the offer page for them gets bricked while trying to redeem as the UI doesn't allow submit.
- removes name field for logged-in member if empty
refs https://github.com/TryGhost/Team/issues/1037
Free tier is now setup the same way as other tiers, to allow custom description/benefits. This change -
- adds custom description and benefits UI for free tier when tiers beta is enabled
- updates fixtures structure
- fixes react overlay error for fast refresh
Co-authored-by: Peter Zimon <peter.zimon@gmail.com>
refs https://github.com/TryGhost/Team/issues/1269
- accessing an archived offer url was incorrectly showing the offer page, as we were not checking for the status of offer
- the archived offer redemption was working correctly as it was blocked on API, this change updates the ui to hide offer screen for archived as well
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
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.
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
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.
refs https://developer.apple.com/forums/thread/682332
Mac OS Monterey by default listens on ports 5000 and 7000 for new AirPlay functionality. Since portal dev mode also runs on port 5000 and gets blocked due to this, the default port is now updated to use 5368 instead.
Note: Its still possible to choose a different port while starting portal in dev mode by running `yarn start:dev --port=xxxx`
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
refs linear.app/tryghost/issue/CORE-74/improve-the-test-situation
- this commit adds the codecov GitHub Action into CI so we can upload
coverage reports
- the coverage files need to be in XML for them to work with
codecov, so this commit also adds cobertura (XML) as a reporter
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
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
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.
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
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
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
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
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
refs https://github.com/TryGhost/Team/issues/1061
- Stripe checkout metadata only accepts value as string for a key, and ghost_analytics was incorrectly attaching object for entry id and source url
refs https://github.com/TryGhost/Ghost/security/advisories/GHSA-65p7-pjj8-ggmr
We were originally overloading the signup/signin flow for changing email
addresses, which was a security flaw because this route is
unauthenticated. This functionality has been removed and replaced with a
dedicated flow.
refs https://github.com/TryGhost/Team/issues/1061
Member activity is a labs alpha feature which aims at capturing member events for site owner if switched on. The event metadata captures the site page/post where the event originates from, and the post/page id is included as content of new ghost analytics meta tag.
This change passes the event metadata to member frontend requests which allows server to capture event information for member actions when the analytics is switched on.
refs https://github.com/TryGhost/Team/issues/1063
refs https://github.com/TryGhost/Team/issues/1062
Member activity is a labs alpha feature which aims at capturing member events for site owner if switched on. The event metadata captures the site page/post where the event originates from, and the post/page id is included as content of new ghost analytics meta tag.
This change sets up new analytics script in portal if analytics is switched on, and fires post/page view event when a valid analytics id is found.
refs https://github.com/TryGhost/Team/issues/1062
Member activity is a labs alpha feature which aims at capturing member events for site owner if switched on. The event metadata captures the site page/post where the event originates from, and the post/page id is included as content of new ghost analytics meta tag.
This change adds a new alpha API endpoint for pushing events to new ingress endpoint, which Portal's new analytics script can use to push events upstream.
closes https://github.com/TryGhost/Team/issues/1038
- FirstPromoter integration needs the referral tracking id information as part of checkout session object to correctly attribute member referrals
- Adds `fp_tid` metadata key for FirstPromoter to correctly attribute paid signups
refs https://github.com/TryGhost/Team/issues/877
Refactors the change plan UI when a site has more than one product, using the Monthly/Yearly switch and the plan selection exactly how it's on the signup screen. To show the current plan, the M/Y switch is selected according to the user's subscription which lets us indicate the current price. To make the stacked prices lightweight, we also show benefits only for the price that is currently selected.
refs https://github.com/TryGhost/Team/issues/560
The endpoint `/members/api/session/` is used by Portal for fetching member session while setting up and redirecting to Stripe Checkout flow. The status code returned by API for logged out member is changed from 4xx Unauthorized to 204 No Content, which is consistent with member API response.
refs 859043e22e
- fixes context member incorrectly picking dev member state in some edge cases due to missing custom site url
- fixes complimentary member check to handle no member logged in
This reverts commit c2707d426a.
The changes for 1.7.3 were reverted as a temporary step due to a major bug in Portal link handling.
This commit brings back the changes followed by a patch for new release
closes https://github.com/TryGhost/Team/issues/825
With multiple products, it's possible to link to any products from themes. The links area in Portal settings now handles signup links for multiple products. This change -
- updates portal to handle custom product monthly/yearly signup links - `signup/PRODUCT_ID/monthly` OR `signup/PRODUCT_ID/yearly`
no refs
With multiple products, its possible to assign a member complimentary product without active subscription.
- updates complimentary member helper to check for `paid` without subscription
- updates account home page to consider complimentary member without subscription
closes https://github.com/TryGhost/Team/issues/835
- updates change flow to consider portal_plans setting
- updates confirm subscription screen to show product name
- removed discount benefit on yearly if only one plan
refs https://github.com/TryGhost/Team/issues/824
- updates the change plan flow for multiple products flag
- adds new plan components for change plan flow
- updates helpers
- updates fixtures
refs https://github.com/TryGhost/Team/issues/796
- adds new helper for explicit feature flag for multiple products
- updated single product signup ui to include benefits
- added new component for single product ui
no refs
- in a rare scenario when monthly/yearly price comes as empty object, which happens if the price is missing in DB, this adds a guard to ignore the product than cause an error
no refs
- in a rare edge case, its possible that `contentDocument` is not available due to component unmount, guards against erroring in such scenarios
no refs
By default, Sentry will pick up any uncaught error triggered from the site, which adds a lot of noise as we only want to listen to Portal specific errors. This change adds portal's unpkg script as the only allowed url for Sentry error reporting.
refs https://github.com/TryGhost/Team/issues/767
- updates plan upgrade page to use multiple products UI if available
- filters products based on active currency if logged in member
no refs
- since portal script is loaded with `crossorigin:anonymous` now, we need to pass in the access control headers for script to bypass cors check
no refs
- adds `access-control-allow-origin: *` headers for dev mode
- portal script will be loaded with `cross-origin=anonymous`, access control header is needed to allow script to load
- mimics unpkg which already adds `access-control-allow-origin: *`
refs https://github.com/TryGhost/Team/issues/768
- updates available prices data based on available products
- updates available products to check portal products (which is behind a flag)
no issues
- adds new start-combined script which combines all chunks in `yarn start` for local portal development
- allows easier loading of local portal bundle in ghost via load-portal script, which needs to inject single script
- updates `yarn start:dev` to use updated script which uses the combined mode for better local development
refs
https://gist.github.com/simpixelated/90a3c16c3ed268fe24f5e5c9585ced2f
refs https://github.com/TryGhost/Team/issues/767
- adds dynamic calculation of frame styles based on site data
- handles product grid style based on no of products available
refs https://github.com/TryGhost/Team/issues/767
- free product is shown based on other site settings like `allowSelfSignup` and `portalPlans`
- fixed product/price selection to handle selected interval
- updated default product/price handling
no refs
Using NODE_PATH is deprecated in future versions of Create React App in favor of using jsconfig.json , this change removes files relying on NODE_PATH and uses relative path instead till we update usage to jsconfig in future as needed.
refs https://github.com/TryGhost/Team/issues/767
- handles product selection on full product card instead of just small surface area on checkbox
- removes dummy product card method