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
- Admin used a helper to generate Gravatar URLs for members
- This change switches to using the `avatar_image` returned by the Member API
- The helper predates the existence of `member.avatar_image`, and is no longer required
refs https://github.com/TryGhost/Ghost/issues/14101
- we have ~1000 linter warnings from historic code that is awaiting transforms as part of the Ember Octane migration
- the warning delay time of 30 days is too short, we keep hitting it because work on the migration has stalled
- keeping the linting errors in place is useful because the rules are useful for new code and the todo file helps track migration progress
- increased the ignore->warn decay time to 120 days, with a warn->fail time of 60 days after that giving us some time to clear up any remaining issues or add them back to the ignore list before builds start failing
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
refs https://ghost.slack.com/archives/C02G9E68C/p1651773627838629?thread_ts=1651771893.729649&cid=C02G9E68C
The chart was not reloading when the fake data toggle was changed. This code is only used when using mocked data. So if you loaded the page without mocked data, everything was working fine and the chart did show the right data. If you then enabled fake data, the chart just won’t reload and would keep showing the initial data (so it wasn’t always showing mocked data, just the initial data).
refs https://github.com/TryGhost/Team/issues/1582
- The draggable object container was too small and didn't include the drag handle
- Increased the size of the draggable object to include the drag handle by adding a container div
- The drag handle now doesn't require you to hover the card before becoming visible
- Fixed a bug where some newsletters would show the drag handle even when they were not hovered when you were dragging a different newsletter. When dragging, now only the dragged newsletter will show the drag handle, so it is more clear where you are dragging to.
- Fixed fading animation of the drag handle (visibilty animation needed step-start and step-end added)
- Fixed jumpiness when dragging or moving the last newsletter card, due to animated margin updates after a drag
- Fixed padding issue for newsletter cards on smaller devices (padding did increase) breaking the animation
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
closes https://github.com/TryGhost/Team/issues/1593
- swapped `recipientFilter` for `selectedRecipientFilter` tracked property with a default value of `undefined`
- added `defaultRecipientFilter` getter that uses settings and post attributes to return a filter string that matches the defined default recipient settings
- added `recipientFilter` getter to replace the previous tracked property, this checks `selectedRecipientFilter` being `undefined` and will return `defaultRecipientFilter` instead
- changing the filter updates `selectedRecipientFilter` acting as an override of the default
- keeping `recipientFilter` naming means the options part of the flow requires no changes
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)
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