refs 8fb0d6ebb2
- logic for showing the "sent to x" wording on the published update flow was incorrect meaning it was showing for published posts/pages when nothing had been emailed
closes https://github.com/TryGhost/Team/issues/1589
closes https://github.com/TryGhost/Team/issues/1590
When a post is already scheduled or published the "Publish" button changes to "Update" and when clicked shows details about the last publish / upcoming schedule along with buttons to save any changes or revert to a draft.
- added separate `update-flow` modal with the save/revert options to keep the main `publish-flow` cleaner and focused just on the draft->publish flow
refs: https://github.com/TryGhost/Team/issues/1531
- any triple column collapses down to one and sits underneath each other
- the mini charts' legends disappear and they also then go full width underneath each other
- the resources module loses it's thumbnail at smaller widths
- the 2/3 resources column goes to 1/2
- everything worth having has truncation that is only seen at very small sizes
no issue
We still had some old components and templates from the `members-email` settings that were only were used when the (now GA) `multipleNewsletters` flag was disabled. I’ve removed them and renamed all routes and components from `members-email` and `members-email-labs` to just `newsletters` because it was sometimes hard to understand if a given components was still used or not when fixing issues.
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
no issue
In the new publish flow we use `{{members-count-fetcher}}` to show member counts as needed in the template without needing to worry about manually fetching counts in the backing classes. However, when switching between states in the flow the count would be re-requested resulting in some glitchy looking async count rendering. By changing `{{members-count-fetcher}}` to use our `members-count-cache` service internally we reduce the likelihood of an async count being triggered when switching between publish flow states.
- updated `members-count-cache` service methods to work with filter strings or full query objects
- switched `members-count-fetcher` resource to use `members-count-cache` in place of directly querying the store
refs: https://github.com/TryGhost/Team/issues/1531
- we've had to use a 99% width hack to ensure ChartJS is responsive
- this introduces a small negative margin to fix the container whilst keeping hack
refs: https://github.com/TryGhost/Team/issues/1531
- fixed up the hover states for staff picks and what's new
- matched padding and text baseline alignment for both boxes
- added in some truncation to stop breakage
refs: https://github.com/TryGhost/Team/issues/1531
- made whole row clickable
- added in hover state based on posts table style
- added in event icons for activity
- increased row spacing
- other subtle tweaks based on feedback
refs https://github.com/TryGhost/Team/issues/1542
- extracted before/after save routines in the editor controller into separate actions
- allows saving to occur in the publish flow without it needing any editor-specific knowledge
- allows for easier cleanup of email related logic from the editor save tasks later on
- added `saveTask` to `PublishOptions`
- applies the selected options to the post model where they correspond to model attributes and keeps the previous values in memory so the changes can be undone on failure - this keeps the local model state in sync because if a publish fails we want the editor to continue showing the draft state, non-scheduled publish time, and not have an unexpected email-only state
- saves the post model directly passing `adapterOptions` so the save request query params match the chosen publish options
- added a `saveTask` to the `<PublishManagement>` component
- passed through to the `publish-flow` modal and is triggered by the confirm button on the confirmation screen
- runs the before/afterSave arguments passed in from the editor
- runs the `saveTask` on `PublishOptions` which handles everything needed to change status and send emails
- polls the post after saving to wait for the attached email to switch to submitted/failed which lets us show a failure message and retry button as required (message + retry not yet implemented)
- adds "complete" state to publish flow once save has finished
- confirms what just happened based on saved post data rather than chosen publish options
- has a link to the view the post
refs https://github.com/TryGhost/Team/issues/1563
- Check if we have multiple newsletters in the members-events-fetcher
- Pass the resulting value to the `parse-member-event` helper
- Pass the value to the activity feed table and table-row components
The exit clause of the mergeDates function should return an array rather
than an object, to ensure that an array is always returned. Because we
are using the concat method when recursing, this continues to work for
longer lists.
We want to return an empty array if list is empty, this protects against
returning [undefined]
refs https://github.com/TryGhost/Team/issues/1572
When fetching the newsletters, other resources were included. Now we filter
on the newsletter tag so we only include newsletter and not normal resources.
refs https://github.com/TryGhost/Team/issues/1542
- added `willPublish` and `willEmail` convenience getters to `PublishOptions`
- added confirmation step that is switched to when clicking the Continue button in the publish flow
- separated options and confirmation steps into discrete components used by the `publish-flow` modal
refs https://github.com/TryGhost/Team/issues/1542
- assigning the result of `peekAll('newsletter').filter()` to `newsletters` doesn't work because the live peekAll array gets transformed to a static array so it was always blank
- assigned result of `peekAll('newsletter')` to `allNewsletters` and replaced `newsletters` property with a getter that uses `allNewsletters` to return an array of filtered and sorted newsletters
- fixed incorrect sort order for `defaultNewsletter`
- assigned default newsletter to tracked `newsletter` property as part of setup once newsletters have been fetched
- updated publish-flow template to show a real count and newsletter name
refs https://github.com/TryGhost/Toolbox/issues/308
- this endpoint is being switched to return a 204 with no body upon success
- if we don't change this code, the button will get stuck in a red Retry
state because it reads the `undefined` body and thinks it's an error
- this commit makes sure we return true if the POST is successful
refs https://github.com/TryGhost/Toolbox/issues/308
- we have a pattern of splitting words via an underscore in the API, so
v5 splits apart `passwordreset` to `password_reset`
- I'll follow up whether we want to fixup the `passwordreset` body
object
refs https://github.com/TryGhost/Toolbox/issues/308
- we have a pattern of using plurals for endpoints but `email_preview`
was implemented without it
- in v5, we're fixing that so we need to update Admin to take that into
account