- state data is not available in actions when signing up directly via signup or offer query on page load
- adds tier and cadence data directly to the action to bypass state data need when available
- with content api, site support address can have value of default `noreply`
- adds the default site domain for support address in case of missing domain
refs https://github.com/TryGhost/Team/issues/397
- the logic for default support address domain was not removing `www`, causing address to be formed as `noreply@www.example.com` instead of `noreply@example.com`
- removes `www` from the domain for support email address
- adds new `/account/newsletters` portal link for member's to see their email preference
- redirects to signin if member is not logged in
- updates newsletter page for logged out members
refs https://github.com/TryGhost/Team/issues/1599
- old settings `allow_self_signup` and `is_stripe_configured` and `member_signup_access` are now removed in site data, and are replaced by new settings.
- this change maps the new settings to old settings so Portal behavior remains the same
- long term, we'll update usages in Portal to rely on new settings only
refs TryGhost/Team#1495
For single newsletters, the unsubscribe link on emails auto unsubscribed member from the newsletter. In case of multiple newsletters, we were missing the newsletter information on unsubscribe URL that will allow us to auto unsubscribe member from that specific newsletter as they intended, while allowing them option to manage other newsletter preferences.
This change handles the newsletter param in unsubscribe link and auto unsubscribes the member from that newsletter.
refs https://github.com/TryGhost/Team/issues/1495
With the addition of multiple newsletters, members can now view and mange their newsletter preferences via Portal when on the site.
This change allows members to manage their newsletter subscription via unsubscribe link on emails.
- adds new Unsubscribe page in portal to manage member's unsubscribe link handling
- adds 2 new endpoints to fetch/update member's newsletters via UUID
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