Commit Graph

6 Commits

Author SHA1 Message Date
Simon Backx
1f2857e0e4
Reduced amount of member count queries when opening the editor (#19474)
no issue

When we open the editor, we fire 4 requests to fetch member counts. This
commit fixes this by replacing those calls with the members count cache
service.
2024-01-13 19:13:49 +01:00
Kevin Ansfield
8cc4c6c4a1 Dropped ember-concurrency-decorators dependency
no issue

- since `ember-concurrency@2.0` it's possible to use the standard imports as decorators removing the need for the extra `ember-concurrency-decorators` dependency and imports
2022-02-09 10:49:38 +00:00
Kevin Ansfield
0642a8b3cc Fixed email segment selector counts not taking subscription status into account
refs https://github.com/TryGhost/Team/issues/496
refs https://github.com/TryGhost/Team/issues/581

- added ability to pass an enforced filter to the segment count component
- used the enforced filter to add `subscribed:true` to segment counts where we're counting the number of members that would receive an email
2021-05-07 12:04:01 +01:00
Kevin Ansfield
0caa539330 Added label and product options for email recipients (#1947)
refs https://github.com/TryGhost/Team/issues/581
requires https://github.com/TryGhost/Ghost/pull/12932

- added segment option and select to default newsletter recipients setting
- updated segment selector to fetch labels/products and show as options
- updated segment selector and count component to call an action when count changes so we can use it in the email confirmation modal
- removed usage and mapping of older `'none'`, `'all'`, `'free'`, and `'paid'` email recipient filter values
2021-05-07 11:58:05 +01:00
Kevin Ansfield
fa454a8e47 Hid segment count for non-admins
refs https://github.com/TryGhost/Team/issues/496
refs https://github.com/TryGhost/Team/issues/581

Only owners and admins have browse access to members so they are the only ones able to fetch member counts. Don't render segment counts if there's no permission because we'll get errors back from the API and the count will be useless.
2021-05-07 10:25:44 +01:00
Kevin Ansfield
da49dc4922 Added default newsletter recipients setting (#1946)
refs https://github.com/TryGhost/Team/issues/496
reqs https://github.com/TryGhost/Ghost/pull/12925

The publish menu was meant to default to matching post visibility but that wasn't working consistently and didn't make sense for sites which don't email every post to their members.

A "Default newsletter recipients" option has been added to the "Email newsletter" settings screen and the publish menu updated to reflect the option. The free/paid toggles in the publish menu have also been swapped out for a multi-select style component that will cater to more complex member segmentation.
2021-05-07 10:02:19 +01:00