no issue
- it was possible to enter invalid times when scheduling in the publish flow, in which case the underlying schedule date was not updated but the input still showed the invalid time
- added passthrough of the blur event in `<GhDateTimePicker>` to the `setTime` action so we have access to the input field, then updated the `setTime` action to set the time input value back to the currently set schedule time when an invalid time is entered so the UI matches the actually set value
no issue
- `publishOptions.willEmail` doesn't work for the conditional because it will be false when no email will be sent, which is the case when a recipient filter is the equivalent of "none"
- switched to being conditional on the publish type and added a separate "Not sent to any members" conditional for `recipientFilter` being blank so we're not showing an incorrect count of members
no issue
- there are no restrictions on Editor/Author emailing on the API side
- removed `user.canEmail` computed property as it's only contributors that don't have publish/email permissions and they aren't shown the publishing flow anyway
no issue
- used CSS rather than `{{capitalize}}` to avoid multiple conditionals for something that's edge-case and will eventually disappear once member counts are available to all roles that can send email
closes https://github.com/TryGhost/Team/issues/1622
- we were setting selected hour/minute on a supposedly site-timezone date before converting to UTC but we were using a local timezone date instead meaning the conversion to UTC didn't match resulting in the time being altered incorrectly after the time input loses focus
no issue
- show the newsletter a post was/will be sent to if there's more than just the default newsletter or the newsletter that was emailed is now archived
refs https://github.com/TryGhost/Team/issues/1621
- copied existing preview modal over to `editor-labs/modals` directory
- old modal will be deleted in cleanup
- moved "Preview" button from editor template to the `<PublishManagement>` component
- allows for preview modal to be controlled alongside the publish flow modal
- added `togglePreviewPublish()` action to `<PublishManagement>`
- opens whichever of preview/publish is not currently open, this opens the new modal on top of the old modal
- waits for the modal animation duration to pass then closes the modal that's now underneath, this prevents the flashing that occurs when modals are both opening and closing at the same time because that results in a 50% opacity of both modals during the middle of the animation
- updated preview modal and publish-flow modals to have "Publish" and "Preview" buttons respectively that call the `togglePreviewPublish` action
- updated preview modal to be fullscreen to better match the publish modal
refs https://github.com/TryGhost/Team/issues/1621
- the old publish menu will be fully deleted soon
- removing it from the preview modal is the minimal "fix" for interoperability with the new publish flow
- pre-cursor to tighter preview/publish modal integration
no issue
- roles that don't have email permissions also don't have permissions to read newsletters so we shouldn't attempt to fetch any during PublishOptions setup
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`
refs: https://github.com/TryGhost/Team/issues/1145
- this should allow us to remove the /products endpoint in v5
It avoids:
- `kg-product-card`, that really is meant to say product
- `product-cadence` on offers
Co-authored-by: Rishabh <zrishabhgarg@gmail.com>
no issue
- `PublishOptions` was exported from the `<EditorLabs::PublishManagement>` component as a convenience when development started but both have now grown in size and are easier to read as separate files
closes https://github.com/TryGhost/Team/issues/1584
refs https://github.com/TryGhost/Team/issues/1605
- added email limit check to PublishOptions setup
- moved email disabled messaging from the email recipients option to the publish type option
- it was confusing to have the email publish type options disabled without any indication of why, with the message hidden within the closed email recipients option