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
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
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
closes https://github.com/TryGhost/Team/issues/1555
closes https://github.com/TryGhost/Team/issues/1588
- added task to the confirm component's backing class so it can be wrapped in step-specific error handling
- added display of general/email error message above the confirm button
- fixed error state of the confirm button showing as green and having incorrect spacing due to the icon being hidden in CSS rather than not displayed
no issue
- it's useful to see an indication of how many overall members are subscribed to each newsletter when selecting which newsletter to send to
- added `?include=count.members` to the newsletter fetch query so the counts are available to show in the dropdown
refs 46f01c2d8f
- if you had previously had emails enabled and you had sent a post as an email, when disabling members/emails all email related UI was hidden except for the "Already sent as email" message when publishing which was confusing as there is no other indication anywhere about emails and no way to view it
- added `emailDisabledInSettings` getter to PublishOptions
- used in `emailUnavailable` getter in place of a duplicate read of the settings
- used in the `<PublishFlow::Options>` component to conditionally hide the "Already sent" message
no issue
- when email is unavailable (members/email disabled, already emailed, publishing a page) don't show any email options in the publish flow so there's no confusion and a cleaner options list
- if a post has already been emailed indicate that with a "Already sent as email" when only one newsletter exists or "Already sent to {newlsetter name}" when multiple exist
no issue
- the button text would still say "Publish & send" when no members were selected
- changed from comparing `publishOptions.publishType` directly to using the `willPublish` and `willEmail` convenience getters so the button text better matches the action being taken
refs https://github.com/orgs/TryGhost/projects/59/views/20
- before the publish/update flow modals are opened, perform a `post.validate()` call, if it fails show the red error bar and don't open the modal
- shows validation errors early rather than being hidden until a save occurs at the end of the publish flow
refs https://github.com/TryGhost/Team/issues/1598
- added `<GhPostBookmark>` card for displaying a bookmark card style representation of a post
- updated designsandbox route to include it for easier styling without needing to constantly go through the publish flow to see changes whilst styling
- updated publish flow complete step to render a bookmark card if a post/page was published
- added `{{post-author-names}}` helper so the author name concatenation logic can be re-used across the posts list and bookmark component
refs https://github.com/TryGhost/Team/issues/1576
- Recipient counts in scheduled post status at top of editor fixed for selected newsletter
- Added `fullRecipientFilter` getter on post model which includes the newsletter's recipientFilter
- Updated scheduled notification (used in old publishing flow or via preview)
refs https://github.com/TryGhost/Team/issues/1598
- pre-fetch post count when reaching the confirm step so it's available once save is complete
- updated copy on complete step to reflect the action that occurred, including the number of published posts when a post was published
- added `{{is-moment-today someDate}}` helper so we can switch between "today" and another date format
no issue
- `@publishOptions.willEmail` is derived state that changes when the model status changes, this was causing the text to momentarily change when confirming because saving requires the post status to be changed from `draft` to `published/scheduled`
- added static `willPublish` and `willEmail` properties to the confirm step component's backing class that are set from the data passed in during construction so we don't end up with changing copy due to underlying model updates
refs 713e2b5ecc
- added a timeout to wait for the modal animation to finish before changing the post status and saving so we're not causing copy changes whilst the modal is still visible
no issue
- we were comparing the wrong `publishType` value
- we were accessing `this.willEmail` _after_ setting model properties that would change it's value so we grab the value before making any changes
refs https://github.com/TryGhost/Team/issues/1597
- disabled automatic reset of the `<GhTaskButton>` used for saving so we don't have conflicting timeouts (button state auto reset is 2.5sec, display of save button before it's removed is 3sec)
no issue
When reverting a post/page to a draft we were applying the model changes, saving, then closing the modal. This had the unwanted effect of updating the modal's copy whilst the save was in progress because it's all derived state and we're changing that state.
- changed revert button behaviour to instantly close the modal with a return value that lets the publish management know to run the revert task once the modal has closed
- added a popup notification to confirm successful revert
refs 756f5094b4
- `saveTask` was renamed to `publishTask` then repurposed as a general `saveTask` but the `revertToDraftTask` wasn't updated to reflect the rename
refs https://github.com/TryGhost/Team/issues/1597
- added "Save" button to editor for scheduled and published posts when any edits have been made
- shows "Saving..." then "Saved" for 3 seconds before disappearing
- replaces "Saving..." indicator shown in status bar on the left
- added `showIcon` argument to `<GhTaskButton>` so it can be used for text style buttons
- changed editor status behaviour to only show "Scheduled" by default with the full text shown on hover
no issue
- in the update flow we were always using `post.email.emailCount` but scheduled posts won't yet have a `post.email` record
- switched to showing a count of members based on the post's newsletter slug and `emailRecipientFilter`
no issue
- `this.willEmail` was changed to include the post status as we only allow sending an email for draft posts but that meant the order of operations in the save task was wrong because we checked `willEmail` _after_ changing the status on a post meaning the newsletter/recipient filter query params were never attached when publishing
no issue
- button text changed to include the post type and time of publish
- the button text has become more complex than a static string so the logic was moved into a getter on the confirm component backing class
no issue
- highlight all/free/paid/specific in the recipient overview wording in the options and confirmation stages of the publish flow
- fix "change settings" button on confirm step closing instead of going back to the options stage