no issue
- added generic members filter component
- updated `<GhRecipientFilterCount />` to use the new generic component with `subscribed:true` added to the filter
closes https://github.com/TryGhost/Team/issues/776
Since switching to using a real NQL filter in the `posts.email_recipient_filter` field where we used to show `free members`, `paid members`, or `all members` we were showing `status:free`, `status:-free`, and `status:free,status:-free` respectively. If labels are used in a filter the text became even longer.
- added a `membersCountCache` service
- `.count(filter)` fetches a numeric count from the members API, if the filter has been counted in the last minute it returns the count directly from a cache instead to avoid hammering the members API when we show counts in multiple places across the UI
- `.countString(filter)` fetches a count but returns a humanized string with the logic extracted from what we displayed in the confirm email sending modal
- added a `<GhRecipientFilterCount @filter="" />` component that acts as a wrapper around the async count from `membersCountCache`
- updated confirm email send modal, plus save notification and editor status displays for scheduled posts to use the new service and component
fixes https://github.com/TryGhost/Team/issues/777
- the unsaved settings modal would come back if you left a settings
sub-page with unsaved changes and then came back to the page
- if you then clicked on "Leave", Admin would crash with a Sentry error
of `Cannot read property 'finally' of undefined`
- we had a similar bug in
39c850f4fe
and the fix was to remove the `.finally` because it assumed the
confirm action returned a promise
- this commit performs a similar fix and seems to resolve the problem
refs https://github.com/TryGhost/Team/issues/771
- updated `<GhImageUploaderWithPreview>` to take an `@includeMetadata` argument that shows a basic html supporting caption field underneath (ready for toggle between caption/alt but not fully implemented)
- added feature image alt/caption properties to post model
- updated UI behind "featureImageMeta" labs flag
- added the feature image uploader to the top of `<GhKoenigEditor>` for display above the editor title
- removed feature image uploader from post settings menu
- added labs flag checkbox
- Traditionally all of Ghost's public-facing text was written in British English
- We're changing that to US English because that's more common
- This PR mostly just fixes up the words customise/customisation and favourite
refs https://github.com/TryGhost/Team/issues/763
- Added dev experiments requirement for multiple product feature as its alpha
- Puts new multiple products UI in membership settings behind the feature flag
- Puts add comp sub popup prototype behind the feature flag
closes https://github.com/TryGhost/Team/issues/738
refs https://github.com/TryGhost/Admin/pull/1972
- when we switched from the segment select back to checkboxes and label select we lost the automatic member counting which meant other parts of the publishing workflow had no counts
- fixed subscribed status counts shown in publish menu
- added the async count back to the confirm modal, taking full free/paid/specific query into account
- added total subscribed member count back to the draft publish menu so the email options can be disabled when no subscribed members exist
- fixed missing disabled styling inside `<GhMembersRecipientSelect>`
no issue
- the `subscribed:true` filter was missed in the member count queries when we switched from `<GhMembersSegmentSelect>` to `<GhMembersRecipientSelect>` (https://github.com/TryGhost/Admin/pull/1972)
no issue
- browsers blocked links from opening in a new window due to the iframe sandbox permissions
- allowed popups so that it's possible to check links go where you expect them to before sending an email
- our email rendering adds `target="_blank"` to all links so they'll open in a new tab rather than clearing navigating away from the admin area
- Ensure the feature flag is available in the feature service so that it knows where to pull the setting from (labs)
- Added a toggle UI to the alpha features list in labs as this is a new feature and is therefore alpha
- Changed the old gh-feature-flag helper to use the switch class instead of checkbox as that's a new pattern since we used this helper
refs https://github.com/TryGhost/Team/issues/755
- added new `<GhFontSelector>` component that wraps PowerSelect to create a quick option for offering a serif/sans-serif dropdown
- replaced radio buttons in labs email customisation modal with the new font selector
refs 81de2fe223
refs https://github.com/TryGhost/Team/issues/758
The "Add complimentary" subscription button in members does not show up when members already have an existing zero amount subscription. But this was incorrectly not taking into account active subscriptions and was applying the rule to canceled subscriptions. Since the `comped` behaviour changed in 4.6 which caused member's existing comp subscription to be canceled, this bug did not allow the comped subscription to be added back.
refs https://github.com/TryGhost/Team/issues/755
reqs https://github.com/TryGhost/Ghost/pull/13006
- updated settings model to match new server-side settings
- updated email customisation modal behind the dev experiments flag
- adjusted layout to move to a fixed top bar and scrollable sidebar
- added image upload, toggles and selections for new settings
- updated preview to match selected settings
Co-authored-by: Sanne de Vries <sannedv@protonmail.com>
no refs
The `getAvailablePrices` method was removed from portal links as we no longer loop over prices for links but use monthly/yearly directly instead.
no refs
This change reverts the last commit to add portal option to product as it breaks the model that is passed to popup.
This reverts commit 5f538b5036.
refs https://github.com/TryGhost/Team/issues/715
By default, the first product/tier is available in Portal at the moment, this adds an attribute that can be used to denote which product is active in Portal in UI
refs https://github.com/TryGhost/Team/issues/721
The setup wizard in Admin handles creating default prices as well as handling new price changes on default Product. This change updates the handling to use updated Products API with support for `monthly/yearly_price` values that offloads price handling to backend and makes the logic simpler. Also updates the stripe connect flow to use new API for creating default prices.
closes https://github.com/TryGhost/Team/issues/742
The button to add a complimentary subscription for a member was visible even if Stripe was not connected on the site, and errored out with nasty red banner. This hides the `Add complimentary` button for member if stripe is not enabled on the site.
refs https://github.com/TryGhost/Team/issues/684
Removes now unused methods for fetching list of prices to show in Portal links, since it was reverted back to showing monthly/yearly prices only.
refs https://github.com/TryGhost/Team/issues/753
The portal_plans setting was previously storing price ids for active monthly/yearly prices for the default product, which was done to allow multiple prices in Portal. Since the portal_plans setting is now reverted to use `monthly`/`yearly` named values to denote the availability of active monthly/yearly pricing on a product, this change updates the handling in portal settings modal to work with new settings.
refs https://github.com/TryGhost/Team/issues/715
Adds new modal and component to handle managing a list of products(tiers) in Admin behind the developer experiments flag. Also adds a new helper for stripe prices to convert amount from decimal value.
no issue
- the modal wasn't overriding the default `confirm` action so an error was thrown and the confirm action not triggered when pressing <kbd>Enter</kbd> whilst the modal is shown
- resolves Sentry error `ADMIN-M`
no issue
- the modal component is using a native class but with the `@classic` decorator so it's still using pre-Glimmer component syntax where `this.args` doesn't exist
- fixes Sentry error `ADMIN-4C`
no issue
- the POST request made to fetch the preview was going to the non-trailing-slash version of the site URL which was resulting in a redirect to the trailing-slash version which then failed due to CORS
refs https://github.com/TryGhost/Team/issues/707
- the switch to a hard `'(Untitled)'` when you start typing is jarring and pulls you away from writing to want to set a title
- by changing the input to treat '(Untitled)' as a blank value the placeholder continues to be shown so flow isn't broken. Post validation and title display elsewhere in the app is unaffected because we're still setting `'(Untitled')` under the hood, it's only the editor display that changes
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
refs https://github.com/TryGhost/Team/issues/660
We added a guard to not send price object in a subscription when the data is missing from DB. This can cause the member details page to fail with the missing price object, so this change adds a guard against subscriptions with missing price.
Note: This is only a short-term fix till we add a proper fix to cleanup the DB in the subsequent release.
no issue
- add CSS transition for height attribute of portal preview container
- before adjusting height of container, apply styles to portal preview nested iframe to prevent scrollbars from showing
no issue
- moved `@onLoad` trigger from `load` event to the `makeVisible()` task so that consumer code isn't called before load has fully finished
- fixes issue with portal sometimes not being ready when we perform the resize on the membership screen
- added guid as a cache-busting `?v={guid}` query param
- fixes issue where preview iframe can load stale data after a settings change resulting in a blank preview after going from "nobody" to "invite/anybody" because the loaded homepage is stale and doesn't have the portal script injected
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 refs
Fixes a small bug in email retry logic meant we never timeout on polling for email retry while listening for the email status to see if it failed or submitted.
refs https://github.com/TryGhost/Team/issues/704
We try and create new default prices soon after Stripe Connect is completed, but it might take couple of seconds for backend to have Stripe config ready and in the meanwhile saving a product with new prices will fail with 409 Conflict error as it will be unable to create prices on Stripe. This change allows re-attempting saving a product with new prices soon after connect in case of a STRIPE_NOT_CONFIGURED error so that the default prices can be created properly.