no issue
- switched to listening to Portal's `message` events that now include a height
- removes need to reach into Portal preview iframe contents which is blocked by browser security when working cross-origin
no issue
- when signup access is set to "none" the portal preview will be blank and the settings not available so it doesn't make sense to make the customise portal modal available
no issue
- flash was occurring because as soon as the setting was changed we switched to showing the portal preview but at that time the preview URL is still set to an old url value. The url doesn't get changed until the settings save completes which gives enough time for a non-portal page to load before being replaced
- added a `switchFromNoneTask` that is triggered when switching away from a saved none value and updated the template to stay on the "disabled" view until the save has completed so we don't trigger multiple page loads
no issue
- dropped use of `@guid` tracked param in favour of adding query param to URL in `updatePortalPreview()` and making sure we only update it when necessary
no issue
- property is specific to the membership portal preview rather than all site iframes
- fixes page-height scrollbar appearing on portal preview height animation
refs https://github.com/TryGhost/Team/issues/701
requires Portal@1.4.2 or later
- changed `<GhSiteIframe @invisibleUntilLoaded>` to accept a string in place of a `true/false` value
- if a string is passed then we'll set up a message event listener than listens for a `postMessage` from the iframe with data that matches the supplied string
- updated `<GhSiteIframe>` usage for portal previews to use `@invisibleUntilLoaded="portal-ready"` so they listen for a message event rather than displaying as soon as we get a load event
no issue
- updated `<GhFullscreenModal>` to pass `@modifier` and `@updateModifier` through to child modal components so they can adjust their own classes
- added an `updateSuccessModifier()` action to `<ModalStripeConnect>` to set the modal size when first opening and on `@onConnected/Disconnected` actions passed to the `<GhMembersPaymentsSetting>` component
- updated `<GhMembersPaymentsSetting>` to call passed in `onConnected/Disconnected` actions when connection or disconnection is finalised
no issue
When members signup access is saved as "none" the front-end won't inject the portal script when rendering meaning changing to "all" or "invite" in Admin will show the preview but there's no portal script injected for the portal to show up.
- detect when we're switching from a saved "none" state and force a save and full refresh of the iframe
no issue
- store current stripe connection status when opening the stripe connect modal and if it's different when the modal is closed force a save and refresh of the portal preview
no issue
- passed correct action for opening stripe connect modal through to portal settings modal
- updated `<GhTaskButton>` to accept a `@unlinkedTask=true/false` property
- ember-concurrency will throw warnings about unsafe task cancellation if the initiator of a task is destroyed due to the actions of a task. Eg. the stripe connect button being replaced with the plan checkboxes because stripe connect details are added to settings
- to avoid warnings ember-concurrency expects the task initiation to be marked as "unlinked" so that the task is allowed to continue even though the initiator is destroyed
- updated `<GhSiteIframe>` to force a refresh when the `@guid` property changes
- we want the portal preview to fully reload so that it can fetch server data and see that stripe is connected
- updated portal settings modal to initiate a refresh when switching from "connect to stripe" to the plans checkboxes that happens automatically after a successful stripe connection
no issue
On the membership screen we save settings before opening the portal settings modal but we weren't waiting for the save to finish which meant that the portal settings modal could load using stale data.
- passed the save settings task in via the portal settings modal's model
- added a `finishPreloading` action that contains all of the dynamic setup tasks that were previously in the component's `init` method
- if a preload task was passed in and it's currently running (as it would be if the modal is opened via the membership screen button) then it will wait for the task to finish before running the setup tasks
- trigger the `finishPreloading` action when the modal is rendered
- show a loading spinner in place of the modal contents whilst pre-loading
refs https://github.com/TryGhost/Team/issues/598
Stripe Webhooks require SSL in production, and so we should not be
allowing connecting to Stripe in production mode unless the site is
running with SSL. This change -
- Updates Setup wizard to skip Stripe Connect steps if site is not on SSL in production
- Adds warning on set subscriptions page
Co-authored-by: Peter Zimon <zimo@ghost.org>
no issue
- added `@onDestroyed` argument to `<GhSiteIframe>` so consumers can clean up any references
- used `@onLoaded` and `@onDestroyed` to handle a reference to the preview iframe
- updated portal preview load handler and update method to trigger a resize task
- add a 100ms delay to allow for portal to re-render itself
- reach through the two iframes to get the portal container element and use it's height to set the style attribute on the portal preview container element
no refs
Portal plans setting contains list of prices that are allowed by site owner to use in Portal UI. Since we now switch monthly/yearly prices dynamically, we need to update portal plans on price change to still reflect updated monthly/yearly prices in Portal UI.
no issue
- added `@invisibleUntilLoaded` boolean argument to `<GhSiteIframe>`
- when set to true add `.invisible` class until iframe's `load` event is triggered
- removed manual iframe hiding with 1.2sec delay from portal settings modal
- added `@onLoad` argument to `<GhSiteIframe>` for consumers to hook in if needed
no refs
Previously, we were fetching product and prices in the constructor of the controller which did not guarantee settings were updated when picking active prices from the price list. This updates the setup to use `did-insert` modifier to correctly fetch and populate product/price data.
no issue
- fixed styling issues
- fixed portal preview taking over the screen by adding `position: relative` to the container
- fixed portal preview being interactive by disabling pointer events
- added portal preview URL generation to memberships controller
- moved much of the preview params knowledge/calculations from the `<ModalPortalSettings>` component into the `members-utils` service so that a portal preview URL can be generated from anywhere using current settings values rather than the method consumer needing to have knowledge of all params and how to generate them
- updated actions in controller that modify settings to also update the preview url
- added `onChange` event to the `<Settings/MembersSubscriptionAccess>` component so the controller can react and update preview
- used `<GhSiteIframe>` with generated portal preview URL for live display of portal changes on memberships screen
no refs
- Wired Premium membership UI to existing monthly/yearly prices in the default product
- Wired free membership UI to redirect URI setting
- Updated save to validate settings/errors
no issue
- added actions for handling close/confirm/cancel of portal settings rather than re-using the route-level leave modal because the portal settings modal does not need any knowledge of the route
- added controller reset that is called when the route is exited to ensure no modals are shown when navigating back to the membership screen
- fixed "cannot set on destroyed" error when portal settings are opened and closed quickly
- removed usage of old `{{action}}` helper - this has been replaced with `{{on}}` and `{{fn}}`
no issue
- provides clearer indication of current setting without having to expand anything
- has more minimal UI which helps when settings screen has multiple areas
no issue
- the membership setting screen will be covering a lot of areas, having individual settings as discrete components allows for easier re-organisation and cleaner parent templates and controllers
no issue
Members related settings are being consolidated into a single screen.
- renamed access to membership as the starting point for redesign and consolidation of other settings screens