no refs
This adds a way for top level site/admin to detect when Portal is loaded on the site and is ready to render, which allows dynamic UI handling specially in Preview mode in Admin.
no refs
Previously, the site and member data needed by Portal were loaded sequentially, which delayed the first load slightly as both the requests can be instead made in parallel. This change updates the API init to load both requests in parallel.
no refs
Allows Portal preview to use `members_signup_access` setting from the URL instead of relying on saved setting to change the preview without saving on Admin.
no refs
For some boolean preview keys like `allowSelfSignup` and `disableBackground`, we ignored setting the falsy value which is incorrect and doesnt' load the expected Portal preview
refs https://github.com/TryGhost/Team/issues/695
refs 212be5fb02 (Patch)
Currently when we have a successful Stripe checkout session, we will always send the member an email confirming their signup when using data-members-* attributes.
This is considered a bug for members who have signed up as a free member first, meaning they have already received this email. This change passes a `checkoutType` metadata same as Portal to not send the email when member is already logged in.
refs https://github.com/TryGhost/Team/issues/560
refs 196cdafe6b
The endpoint `/members/api/member/` is used by Portal for fetching member details on site load to setup different flows. The response from this endpoint for logged out member has now changed from 401 Unauthorized to 204 No Content. This updates the API handling in Portal for updated response status.
This change also handles the visible error messages on console for Portal when it first loads and tries to establish member logged-in status, and instead handles it now behind the scenes. This also makes Portal functioning more transparent on the site.
no refs
Since custom prices now allow prices with multiple currencies to exist, till we have a default currency for a site, we use the currency for first paid price on the list as default currency for a free price visually on Portal UI
closes https://github.com/TryGhost/Team/issues/689
For invite only sites, the default page should be signin as it makes more sense and is actionable than a static signup page
refs https://github.com/TryGhost/Team/issues/643
With custom products and prices, the old data attributes for members functionality - `data-members-plan` - was still using the plan name for checkout session which won't work as it now expects a price ID. This change reworks how we setup to listen to `data-members-*` attributes and moves them inside App.js so they can work with API data fetched from site settings and use the price ID for the `monthly` and `yearly` names as fallback.
refs https://github.com/TryGhost/Team/issues/671
When turning on custom products, existing sites should have default price description that retains current behaviour. This change adds custom description with discount value for Yearly Plans to keep the existing behavior for sites that mimic the old setup.
refs https://github.com/TryGhost/Team/issues/637
Since we allow setting custom name and description for free price now, this wires up the values for free membership price settings to API
refs https://github.com/TryGhost/Team/issues/643
Previously, we always expected `Monthly` or `Yearly` prices to be available for attribtues/links as those were the only prices allowed in Portal. With custom prices, as prices can have dynamic names, we still support Monthly/Yearly prices for backwards compatibility.
The way Monthly/Yearly prices are determined with custom prices is first trying to find the first price by the name same as `Monthly` / `Yearly`, followed by finding a plan having interval `month`/`year`. This gives us the best possible window to continue supporting Monthly/Yearly till all themes have time to adapt to custom prices
refs https://github.com/TryGhost/Team/issues/643
Previously, Portal only worked with hardcoded `Monthly` and `Yearly` plans as those were the only possible prices available to members. With custom prices and products, Portal is now expanded to work with any number of custom prices as well as allow links/attributes for them to work via IDs.
Also, to continue backwards compatibility with Monthly/Yearly, Portal will support their data attributes/links, finding the first relevant Monthly/Yearly plan by nickname, falling back on interval if needed.
refs https://github.com/TryGhost/Team/issues/644
In Preview mode during launch wizard in Admin, we show owners dummy Monthly/Yearly plan since the prices are not yet created but will be created if everything looks good in the next step. This change handles the dummy Monthly/yearly prices without actually having the values in DB or settings.
refs https://github.com/TryGhost/Team/issues/579
We added a new setting to explicitly set `invite-only` mode which was not handled in the signup button and header icon for signup page
refs https://github.com/TryGhost/Team/issues/579
Admin preview screen now sends `allowSelfSignup` as a query param that allows customising the Portal preview UI based on the changes selected by the Admin. This change handles the new query param in Portal
refs https://github.com/TryGhost/Team/issues/579
A new setting `members_signup_access` can be set to `invite` by the site owner which explicitly makes Portal to behave invite only, this change updates Portal to handle the setting
refs https://github.com/TryGhost/Team/issues/530
This makes sure that sites not using the Portal modal will have their
cancel behaviour updated too.
* Added missing newline
refs https://github.com/TryGhost/Team/issues/530
A continueSubscription action has been added to handle continuing
subscriptions as a different flow since we now have `smart_cancel` for the cancellation. The "continue subscription" button in Portal is updated to use the new action to correctly continue a subscription instead of old action which did both cancel and continue.
refs https://github.com/TryGhost/Team/issues/530
The members-api now accepts the `smart_cancel` option when updating
subscriptions. This will automatically handle cancelling the
subscription if it is in an overdue state.
A continueSubscription action has been added to handle continuing
subscriptions.
refs https://github.com/TryGhost/Team/issues/536
From 4.0, we ensure and require that accent colour is always set. This change removes hardcoded accent color fallbacks to avoid confusion as well as cause accidental fallback that is undesired causing themes to look different
no refs
The portal links were not working in case of a trailing slash at the end, this fix updates the regex to allow and ignore the trailing slashes in portal links as it can be a common mistake to include trailing slashes.
SITE/#/portal/ - Did not work previously, now works
vs
SITE/#/portal - Works
no refs
Does member data refresh when hiding notification to ensure subscription data for member is fetched if Stripe webhooks are delayed on server and shows no subscription in first request.
no refs
- We updated site plans to use `currency_symbol` instead of `currency`, but missed updating it here so the popup showed `undefined` for the new plan on confirmation screen