Commit Graph

17 Commits

Author SHA1 Message Date
Chris Raible
6b8f5fe7aa
🐛 Fixed UI bug when selecting specific recipients by label (#16543)
closes TryGhost/Team#2859

- when removing all selected labels/newsletters, the UI would uncheck
the Specific People checkbox and hide the label/newsletter selection
- this change forces the Specific People checkbox to be checked even if
no labels/newsletters are selected
- test enhanced to cover this specific edge case
2023-04-03 14:45:58 -07:00
Kevin Ansfield
63b1e4e8ad
Resolved power-select related deprecation warnings for loading components by string (#15466)
no issue

- in many places we were passing a string as an argument to a `<PowerSelect>` related component that referred to a component name, that was throwing deprecation warnings because those strings were used dynamically with `{{component}}` later on which isn't statically analyzable
- switched to passing a component explicitly with `{{component}}`
- https://github.com/embroider-build/embroider/blob/main/REPLACING-COMPONENT-HELPER.md#when-youre-passing-a-component-to-someone-else
2022-09-24 17:00:05 +02:00
Sanne de Vries
fef8e59050 Formatted post and member counts in newsletter settings and publishing flow
No ref
2022-05-13 10:27:01 +01:00
Sanne de Vries
8932ba9b1a Added dropdown label for specific recipient selection in publish settings
Refs https://github.com/TryGhost/Team/issues/1544
2022-05-12 14:49:07 +01:00
Sanne de Vries
eafd2f901e Updated publishing flow email recipient filters
Refs https://github.com/TryGhost/Team/issues/1544
2022-05-12 13:30:14 +01:00
Sanne de Vries
f6b06ef9bf Updated email recipient filter design
Refs https://github.com/TryGhost/Team/issues/1544
2022-05-12 12:56:43 +01:00
Kevin Ansfield
6c079daafa Improved handling of missing member counts in publish flow
no issue

Only Admins/Owners can browse members to get member counts but Editors/Authors are allowed to send email. This means we need to account for the count figures being missing.

- added guard to the total member count fetch in `PublishOptions`
  - guard needed because the failed API request would abort setup
  - when the current user isn't an admin, set the total member count to 1 to avoid email options being disabled
- added guard in the `{{members-count-fetcher}}` resource so we're not triggering API errors and the count is kept as `null` so it's handled automatically if passed to `{{gh-pluralize}}`
- updated `<GhMembersRecipientSelect>` to not show counts (or the surrounding `()`) when the count is `null`
2022-05-11 18:56:29 +01:00
Sanne de Vries
f4405927ee Updated publish settings forms
Refs https://github.com/TryGhost/Team/issues/1544
2022-05-06 13:54:15 +01:00
Sanne de Vries
416976368b Updates publish settings
Refs https://github.com/TryGhost/Team/issues/1544
2022-05-06 08:06:45 +01:00
Simon Backx
26e441d88d Updated members recipient selector counts
refs https://github.com/TryGhost/Team/issues/1576
refs https://github.com/TryGhost/Team/issues/1592

Improved code to use the members count fetcher in the recipient selector.
2022-05-05 18:09:41 +02:00
Simon Backx
1f5f9645e6 Updated members count to use selected newsletter when publishing
refs https://github.com/TryGhost/Team/issues/1576

- Passes the selected newsletter to the recipient selector
- Added a `recipientFilter` getter to the newsletter model to make changes easier in the future
- Updates the `fullRecipientFilter` in the new publishing flow to use the newsletter's recipientFilter
- Already takes future paid only newsletters into account
- The counts in the status message after publishing is not updated yet (requires https://github.com/TryGhost/Team/issues/1569)
- The counts in the scheduled notification is not updated yet (requires https://github.com/TryGhost/Team/issues/1569)
2022-05-05 17:17:23 +02:00
Kevin Ansfield
67505f838c Added first pass of recipient options to new publish flow
closes https://github.com/TryGhost/Team/issues/1585

- adds newsletter select, free/paid checkboxes, and specific label select to the email recipients area in publish flow
- updated `PublishOptions`
  - `willEmail` getter now takes into account the recipient filter so when free+paid+specific are all unchecked the flow corresponds to email not being sent
  - save task passes through the real recipient filter
  - added `fullRecipientFilter` for use in count fetchers so the selected newsletter is taken into account whilst we use `recipientFilter` as the main filter value
- fixed issues with dropdowns being cut off
  - `{{liquid-if}}` uses `overflow: hidden` to make it's animation work, this means any popups that are larger than the expanded option size are cut off
  - switched away from rendering the selects inline so they aren't limited by parent container size
  - fixed `z-index` issues to they appear on top of the modal
2022-05-05 11:18:49 +01:00
Simon Backx
18f4748e8b Fixed tests partially for updated member counts
no issue

Also moves some reused test methods to the test helpers folder (wasn't able to move it to the fixtures because too many tests were failing):
- enableNewsletters helper
- enableStripe helper
- enableMailgun helper
2022-04-26 13:10:16 +01:00
Kevin Ansfield
bc5ddd9921 Resolved linter errors in <GhMembersRecipientSelect>
no issue

- fixed duplicate `id` attribute on the specific people checkbox
- switched toggle behaviour from a click event on the surrounding div to a change event on the checkbox
  - the surrounding `<label>` has appropriate `for` attribute so it acts as the click-to-change target
- added `aria-label` attributes to the checkboxes because the label element we're using does not surround any content that labels the checkbox
2022-03-11 11:06:13 +00:00
Rishabh
6c7309d9bd Fixed labels and tiers crammed in recipient select dropdown
closes https://github.com/TryGhost/Team/issues/983

- fixes overlap of labels and tiers when there are a lot of labels in the recipient select dropdown of publishing menu.
2021-08-23 16:15:31 +05:30
Kevin Ansfield
8f5e305721 🐛 Fixed member count not showing in send email confirmation modal
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>`
2021-06-08 13:07:16 +01:00
Kevin Ansfield
495e435daf Brought checkboxes back to publish menu recipient selection (#1972)
no issue

Free and Paid are by far the two most common options for email recipients so it makes more sense to have them as very clear options which we felt was not the case with the single token/segment select.

- created a new `<GhMembersRecipientSelect>` component that has individual checkboxes for free/paid/segment and when segment is selected an additional token input for specific labels
- updated draft and scheduled publish menu components to use the `<GhMembersRecipientSelect>`

Co-authored-by: Sanne de Vries <sannedv@protonmail.com>
2021-05-21 18:22:01 +01:00