no refs
The new dev script allows running `yarn dev` on the Portal code to make Portal development easier as well as integrate more easily with Ghost config. The script runs a local development server that serves portal bundle, which allows for static `portal` config to be used in Ghost for pointing to Portal script. It also watches the files for any changes, and auto re-builds and bundles latest Portal code.
refs https://github.com/TryGhost/Team/issues/718
Instead of using default prices, Portal goes through active prices of all available products to use for query in data attributes
refs https://github.com/TryGhost/Team/issues/718
We passthrough any unknown price ids directly to checkout session as it currently Portal cannot verify prices across all products
refs https://github.com/TryGhost/Team/issues/753
We reverted back to using named plan values - `monthly`, `yearly` - in `portal_plans` setting to allow us to easily handle active prices for a product. This change handles the updated values in `portal_plans` to use new values.
no refs
The master -> main rename was missed for test workflows as well as Readme badge, which caused the error reporting to incorrectly report passing tests on `master` while they were failing on `main`
no refs
We need the Portal preview container on Admin to re-adjust based on height of Portal container. This change adds a resizeObserver for portal container and fires a postMessage with height for Admin to listen and update the iframe height based on height of portal container
Updated resize observer to fire on update
Cleanup
no refs
The purpose of broadcasting portal-ready event is it allows Preview in Admin to have better UX with showing Portal when its ready than show the site while its loading. Having a strict target origin like site url won't work when sites have custom domains as it browser security will block the event due to origin mismatch.
Since `portal-ready` is just an event message and doesn't contain any sensitive data that needs to be restricted to origin, this bumps it to `*` which allows any site listening to be able to read the message.
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