Commit Graph

9402 Commits

Author SHA1 Message Date
Kevin Ansfield
f137aaea5c Added auto-reset of time input if invalid time was entered
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
2022-05-12 14:23:56 +01:00
James Morris
34a45d99a2 Added in better empty states for Paid Mix for Candence and Tiers
refs: https://github.com/TryGhost/Team/issues/1531
2022-05-12 14:10:22 +01:00
Sanne de Vries
288ba328d7 Updated navigation between editor, publish, preview and update states
Refs https://github.com/TryGhost/Team/issues/1621
2022-05-12 14:03:21 +01:00
Peter Zimon
4b596e47c5 Improved neutral trend indicator on Dashboard metrics 2022-05-12 14:40:54 +02:00
Peter Zimon
ee744bda31 Updated resources box style 2022-05-12 14:35:39 +02:00
Peter Zimon
9a384857fd Updated bar thickness of Paid mix chart 2022-05-12 14:33:28 +02: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
Kevin Ansfield
2e6b219030 Fixed recipient select becoming disabled when all filters are turned off
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
2022-05-12 13:21:57 +01:00
Peter Zimon
f3e35bb164 Fixed chart re-rendering bug 2022-05-12 14:04:29 +02: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
4c0c5dcac6 Allowed Editor and Author roles to see email options when publishing
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
2022-05-12 12:47:45 +01:00
Kevin Ansfield
d36517fb1e Fixed capitalization of email recipients option when member counts aren't available
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
2022-05-12 12:47:45 +01:00
Peter Zimon
527b07b490 Fixed Paid mix padding 2022-05-12 13:33:05 +02:00
Peter Zimon
8a3a5dd217 Minichart refinements 2022-05-12 13:20:48 +02:00
Kevin Ansfield
dd551acf91 Fixed schedule time changing after setting if local and site tz don't match
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
2022-05-12 12:13:06 +01:00
Sanne de Vries
513c8655e4 Updated error and info boxes in publishing flow
Refs https://github.com/TryGhost/Team/issues/1544
2022-05-12 11:47:49 +01:00
Kevin Ansfield
cc8dd9dedf Added newsletter name to publish update flow copy
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
2022-05-12 11:44:10 +01:00
Djordje Vlaisavljevic
1349a03164 Updated modal title
refs https://github.com/TryGhost/Team/issues/1583
2022-05-12 12:16:12 +02:00
Sanne de Vries
af55c71a9e Updated publishing flow copy
Refs https://github.com/TryGhost/Team/issues/1544
2022-05-12 11:14:45 +01:00
James Morris
e0d61631d3 Tiny tweak to the community hover state
refs: https://github.com/TryGhost/Team/issues/1531
2022-05-12 10:20:41 +01:00
James Morris
da62c0c50b Fixed a z-index laying problem with the zero state on new Dashboard
refs: https://github.com/TryGhost/Team/issues/1531
2022-05-12 09:50:00 +01:00
Rishabh
72e78b2588 Renamed portalProducts setting
refs affe6743e5

- `portalProducts` setting got accidentally renamed to `portalTiers` as part of tiers rename
2022-05-12 14:00:22 +05:30
Kevin Ansfield
3f45375b5f Ignored linter errors in copied preview modal templates
refs cf8b372fed

- can be cleaned up later
2022-05-11 23:47:38 +01:00
Kevin Ansfield
cf8b372fed Added fullscreen preview with toggle to publish flow
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
2022-05-11 23:46:01 +01:00
Kevin Ansfield
b285205c53 Removed old publish menu from preview 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
2022-05-11 21:14:22 +01:00
Kevin Ansfield
e1c7360075 Fixed errors in publish flow for users who don't have email permission
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
2022-05-11 21:05:31 +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
Peter Zimon
02ccf5fe1a Added rounded corners to Paid mix 2022-05-11 19:52:32 +02:00
Peter Zimon
260d516ad5 Paid breakdown chart cleanup 2022-05-11 19:52:32 +02:00
Hannah Wolfe
affe6743e5 Renamed products to tiers (#2372)
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>
2022-05-11 22:41:54 +05:30
Kevin Ansfield
e852c29699 Extracted PublishOptions class into separate file
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
2022-05-11 17:51:53 +01:00
Kevin Ansfield
bea1ffe665 Updated copy for recipients option when post has already been emailed
refs https://github.com/TryGhost/Team/issues/1605

- added number and type of members/subscribers the post has been sent to
2022-05-11 17:45:22 +01:00
James Morris
2b69ec2cf3 Added in a basic community hover state
refs: https://github.com/TryGhost/Team/issues/1531
2022-05-11 17:39:51 +01:00
Sanne de Vries
221d520d11 Updated copy for published and scheduled posts
Refs https://github.com/TryGhost/Team/issues/1544
2022-05-11 17:09:22 +01:00
Kevin Ansfield
1c2ae5348d Fixed forced-error for email limit
refs f559170a39

- hangover from testing
2022-05-11 17:02:23 +01:00
Kevin Ansfield
f559170a39 Added email limit checks and email disabled messaging to publish flow
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
2022-05-11 17:00:30 +01:00
Peter Zimon
bb2b8fae27 Fixed gridlines density on dashboard 2022-05-11 17:57:39 +02:00
James Morris
dc8a431e45 Fixed up the empty list states if something fails for What's New or Staff Picks
refs: https://github.com/TryGhost/Team/issues/1531
2022-05-11 16:51:11 +01:00
Peter Zimon
a926b8fb39 Added rounded corner to Paid breakdown chart 2022-05-11 17:49:48 +02:00
Sanne de Vries
d239eb29ee Fixed broken calendar icon
No ref
2022-05-11 16:12:52 +01:00
James Morris
54e9c63a7f Adjusting the dropdown so it fits flush against the top header better
refs: https://github.com/TryGhost/Team/issues/1531
2022-05-11 16:08:18 +01:00
James Morris
cd9ec81006 Trying out moving the date dropdown
no issue

- seeing if this feels better up above than it is when inside the anchor
2022-05-11 16:08:18 +01:00
Sanne de Vries
dc14b9943f Updated publishing flow copy
Refs https://github.com/TryGhost/Team/issues/1544
2022-05-11 16:04:42 +01:00
James Morris
7e7c1e4bf5 Removed the unnecessary component code for the Community module in new Dashboard
refs: https://github.com/TryGhost/Team/issues/1531
2022-05-11 15:48:55 +01:00
Simon Backx
f6259f1f63 Moved dashboard control panel to developer experiments 2022-05-11 16:29:58 +02:00
James Morris
07b3f26e08 Fixed z-indexing that messed with some dropdowns and fixed the extra long widths on others
refs: https://github.com/TryGhost/Team/issues/1531
2022-05-11 14:32:55 +01:00
Kevin Ansfield
37aec66e83 Fixed linter error 2022-05-11 12:56:19 +01:00
Kevin Ansfield
627b6f259a Added error handling to publish flow confirm step
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
2022-05-11 12:48:31 +01:00
Peter Zimon
1fa86d8c0f Removed unused JS variable 2022-05-11 12:58:59 +02:00
Peter Zimon
d24ec03177 Updated Paid breakdown tooltip positioning 2022-05-11 12:50:05 +02:00
Peter Zimon
032e86c12e Fixed Paid breakdown chart bar thickness 2022-05-11 12:20:20 +02:00
Peter Zimon
c2b49028f1 Updated dashboard totals chart ticks
- set 30 days to show every other gridline
- set 90 days to show every 3rd gridline

Note that this required to add an extra day to the displayed number of days.
2022-05-11 12:16:31 +02:00
Simon Backx
2d4bbad094 Implemented newsletter limits
refs https://github.com/TryGhost/Team/issues/1583

- When adding a newsletter, check the limits (both via button and route)
- When unarchiving a newsletter, check the limits
- Bumped `@tryghost/limit-service` package, required to make limit checking work for newsletter
- Added the `getNewslettersCount` query to the `limit` service
2022-05-11 12:10:26 +02:00
James Morris
97553181ce Removed All Time from the graphs in the new Dashboard
refs: https://github.com/TryGhost/Team/issues/1531
2022-05-11 11:06:07 +01:00
Kevin Ansfield
e87e564462 Fixed published posts count in publish flow
no issue

- the count fetch was including all posts rather than just published ones so it never matched the expected count
2022-05-11 10:37:32 +01:00
Kevin Ansfield
ebcf4c7c16 Added member count to publish flow newsletter dropdown
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
2022-05-11 10:24:55 +01:00
Peter Zimon
6e3267315a Improved dashboard tooltip positioning 2022-05-11 10:51:46 +02:00
Kevin Ansfield
28919eb057 Fixed "Already sent" showing in publish options when email disabled in settings
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
2022-05-11 09:43:55 +01:00
Kevin Ansfield
46f01c2d8f Removed email publish options when email is disabled, added message if already emailed
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
2022-05-11 09:33:32 +01:00
Kevin Ansfield
8652f16005 Fixed publish confirmation button text
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
2022-05-11 09:33:32 +01:00
Peter Zimon
ce81b9c342 Fixed total charts tooltip offset 2022-05-11 10:30:15 +02:00
Peter Zimon
1310a092d1 Updated totals chart tooltip 2022-05-11 09:26:57 +02:00
Peter Zimon
fe3e8ee64d Updated Paid mix tooltips 2022-05-11 09:03:56 +02:00
Peter Zimon
6e7eeba94e Updated MRR chart tooltip 2022-05-11 08:29:44 +02:00
Peter Zimon
da3053b3ae Updated Paid breakdown tooltip 2022-05-11 07:54:36 +02:00
Sanne de Vries
e134e5b365 Updated publishing flow header
Refs https://github.com/TryGhost/Team/issues/1544
2022-05-10 21:10:17 +01:00
Kevin Ansfield
cf3f872fa6 Added client-side validation check for post before opening publish/update flows
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
2022-05-10 19:24:54 +01:00
James Morris
1c1dbc9310 Added a small right margin to the open rate bar graphs in new Dashboard
refs: https://github.com/TryGhost/Team/issues/1531
2022-05-10 19:05:44 +01:00
James Morris
236f6589c2 Removed a ton of unnecessary files and refactored the MRR component to be consistent
refs: https://github.com/TryGhost/Team/issues/1531
2022-05-10 18:54:41 +01:00
James Morris
c488ca4dc5 Fixed up a linting issue for the empty state for Paid Mix
refs: https://github.com/TryGhost/Team/issues/1531
2022-05-10 18:43:08 +01:00
James Morris
8bf30b3a68 Basic improvements to the Paid Mix empty state
refs: https://github.com/TryGhost/Team/issues/1531

- still not ideal, but better than it was and now not showing as broken
2022-05-10 18:40:27 +01:00
Sanne de Vries
d364116948 Updated publishing flow
Refs https://github.com/TryGhost/Team/issues/1544
2022-05-10 17:57:48 +01:00
James Morris
cf3650ddcc Better styling for the new empty state for new Dashboard
refs: https://github.com/TryGhost/Team/issues/1594
2022-05-10 17:39:36 +01:00
James Morris
9c98e2e094 Removed unneeded variables and functions based on pull request review
refs: https://github.com/TryGhost/Team/issues/1594
2022-05-10 17:39:36 +01:00
James Morris
c0fd3e288b Added in a better responsive design to the new empty state for new Dashboard
refs: https://github.com/TryGhost/Team/issues/1594
2022-05-10 17:39:36 +01:00
James Morris
53235a2c33 Added in the new copy for the empty state for new Dashboard
refs: https://github.com/TryGhost/Team/issues/1594
2022-05-10 17:39:36 +01:00
James Morris
d6e98eca68 Fixed up linting errors for new empty state for new Dashboard
refs: https://github.com/TryGhost/Team/issues/1594
2022-05-10 17:39:36 +01:00
James Morris
f9231afa2a Further refinements to the new empty state for 0 members in new Dashboard
refs: https://github.com/TryGhost/Team/issues/1594

- this much more matches the style of the design
- it now covers the anchor and engagement charts
- has better fake data for all charts under the notice
- tweaked things for this in dark mode
2022-05-10 17:39:36 +01:00
James Morris
8af605babe Basic working empty state for the anchor chart when there are 0 members
refs: https://github.com/TryGhost/Team/issues/1594

- has new loading checks to see if there are 0 members
- has a blurred overlay box that works over the top of the anchor chart
- styles are still not perfect but work well enough for the mo
2022-05-10 17:39:36 +01:00
Simon Backx
c36a5bbaeb Fixed paidMembersByCadence always having keys
refs https://github.com/TryGhost/Team/issues/1601

When there is no data in the backend, no keys are added.
2022-05-10 18:06:24 +02:00
James Morris
917f17b7e6 Removed tick lines for All Time on totals chart and adjusted bar thickness depending on days selected for Paid Subscribers
refs: https://github.com/TryGhost/Team/issues/1531
2022-05-10 16:42:12 +01:00
Simon Backx
2b4e80b3dd Rounded MRR in dashboard
refs https://github.com/TryGhost/Team/issues/1602

- Added `cents` option to ghPriceAmount helper.
- Removed cents from MRR in dashboard.
2022-05-10 17:35:51 +02:00
Daniel Lockyer
53c93f7fd7 Hide system info when running in hosted environments
refs https://github.com/TryGhost/Toolbox/issues/326

- we want to simplify the What's New screen to hide the fields that are
  irrelevant for users in hosted environments
- this should still show the database warning for self-hosters
2022-05-10 14:11:23 +01:00
Simon Backx
d11cf9e1c7 Added newsletter name in post scheduled tooltip
refs https://github.com/TryGhost/Team/issues/1576

This change was required to avoid showing 'all members' or 'all paid members', when it was in fact 'all paid subscribers of newsletter X'. The newsletter name is only shown when multiple newsletters are activated on a site.
2022-05-10 15:00:30 +02:00
Kevin Ansfield
59e7b720a2 Added <GhPostBookmark> and displayed on publish flow complete step
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
2022-05-10 13:26:13 +01:00
Simon Backx
bf098cc730 Updated member counts for post newsletter
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)
2022-05-10 14:13:39 +02:00
Simon Backx
98e80cb6f8 Replaced newsletterId usage with newsletter
refs https://github.com/TryGhost/Team/issues/1569
refs https://github.com/TryGhost/Team/issues/1596
refs https://github.com/TryGhost/Team/issues/1576

- Removed some usages of post.newsletterId with post.newsletter
- Renamed newsletterId adapterOption from newsletterId to newsletter, in preparation of https://github.com/TryGhost/Team/issues/1596 (still sending newsletter_id)
- Removed newsletterId property of post model
2022-05-10 13:56:30 +02:00
Kevin Ansfield
a5fe1fa48c Updated publish complete step copy
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
2022-05-10 12:51:05 +01:00
Kevin Ansfield
a1d26a575c Fixed flash of copy change when confirming an email-sending publish
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
2022-05-10 11:58:59 +01:00
Sanne de Vries
2e18aaaf2c Updated scheduled and published modals
Refs https://github.com/TryGhost/Team/issues/1597
2022-05-10 11:53:10 +01:00
Kevin Ansfield
967249ff6a Fully fixed flash of "draft" text when reverting to draft
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
2022-05-10 11:51:55 +01:00
Kevin Ansfield
607378580b Fixed email-only publish flow
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
2022-05-10 11:43:20 +01:00
Kevin Ansfield
b0038d71b6 Fixed linting error
refs 713e2b5ecc
2022-05-10 11:33:17 +01:00
Kevin Ansfield
f8084f69dc Fixed flash of "Save" button after save has completed
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)
2022-05-10 11:32:06 +01:00
Kevin Ansfield
713e2b5ecc Fixed flash of "Draft" when reverting a post to a draft
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
2022-05-10 11:22:46 +01:00
Simon Backx
23c1939515 Fixed newsletter used from post in email preview 2022-05-10 12:21:05 +02:00
Simon Backx
651f498f0b Removed usage of newsletterId in scheduled publishmenu 2022-05-10 12:16:38 +02:00
Simon Backx
95fa290fa8 Fixed button type on div causing button appearance in Safari
no issue

In Safari, the second dropdown looked a bit weird when you select 'publish only' because of type=button being used on a div.
2022-05-10 12:12:27 +02:00
Kevin Ansfield
e12ab83bed Fixed "Revert to draft" button
refs 756f5094b4

- `saveTask` was renamed to `publishTask` then repurposed as a general `saveTask` but the `revertToDraftTask` wasn't updated to reflect the rename
2022-05-10 10:19:29 +01:00
Kevin Ansfield
756f5094b4 Added "Save" button to editor for scheduled and published posts
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
2022-05-10 10:04:21 +01:00
Simon Backx
8a303fe411 Fixed paid visible on dashboard when stripe is not connected
refs https://ghost.slack.com/archives/C02G9E68C/p1652090614031099
2022-05-09 17:56:05 +02:00
James Morris
9c02f6a792 Updated What's New copy to be shorter and so doesn't so easily go to two lines
refs: https://github.com/TryGhost/Team/issues/1531
2022-05-09 16:51:11 +01:00
Kevin Ansfield
e74b042d18 Fixed undefined member count for scheduled posts in publish update flow
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`
2022-05-09 14:11:17 +01:00
Kevin Ansfield
2768dc74ad Fixed emails not being sent when using new publish flow
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
2022-05-09 14:11:17 +01:00
Matt Hanley
cae5adc6ed Switched Admin client to use avatars returned by the member API (#2373)
- 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
2022-05-09 13:29:45 +01:00
Kevin Ansfield
26741b701a Reset linter warnings with longer decay times
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
2022-05-09 12:57:19 +01:00
Hannah Wolfe
51c1db079b Replaced white/black list terminology
refs 92986b77e3i

- found one more place where this has been missed
2022-05-09 12:23:20 +01:00
James Morris
0148f1deaa Added in the year to the date formats for anchor chart and tooltips for new Dashboard
refs: https://github.com/TryGhost/Team/issues/1531
2022-05-09 11:25:38 +01:00
James Morris
a972a3246b Fixed the Paid Mix alignement to be inline with Annual on new Dashboard
refs: https://github.com/TryGhost/Team/issues/1531
2022-05-09 11:00:39 +01:00
Sanne de Vries
4a16cf74bc Updated publishing flow datepicker
Refs https://github.com/TryGhost/Team/issues/1544
2022-05-09 10:53:44 +01:00
Kevin Ansfield
fc25bf5713 Added ability to set classes for parts of <GhDateTimePicker>
no issue

- adds additional class arguments:
  - `@datePickerTriggerClass`
  - `@datePickerClass`
  - `@timeInputClass`
2022-05-09 10:31:14 +01:00
Sanne de Vries
7356933d12 Made copy changes to publishing flow
Refs https://github.com/TryGhost/Team/issues/1544
2022-05-06 17:10:08 +01:00
Kevin Ansfield
f9ce41620a Updated confirm publish button text
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
2022-05-06 15:12:38 +01:00
Sanne de Vries
a4c1f2f7e0 Added animation to publish confirmation button
Refs https://github.com/TryGhost/Team/issues/1544
2022-05-06 14:56:11 +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
Simon Backx
dd901c6790 Fixed paid subscribers chart reloading when toggling fake data
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).
2022-05-06 14:35:13 +02:00
Simon Backx
089686132c Improved newsletter dragging
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
2022-05-06 14:09:43 +02:00
James Morris
9af743ff3f Fixed the spacing issue with Subscribe button on new Dashboard
refs: https://github.com/TryGhost/Team/issues/1531
2022-05-06 11:50:14 +01:00
Kevin Ansfield
b39fc7dba5 Changed recipient wording in publish flow to be more specific
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
2022-05-06 10:23:37 +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
Kevin Ansfield
bee7760815 Added default recipient settings handling to publishing flow
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
2022-05-05 18:18:54 +01:00
James Morris
32ce367ee1 Adjusted some of the footer hover links for new Dashboard
refs: https://github.com/TryGhost/Team/issues/1531
2022-05-05 18:17:07 +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
a103184c6a Updated newsletter recipientFilter to use slugs instead of instead
refs https://github.com/TryGhost/Team/issues/1576
refs https://ghost.slack.com/archives/C02G9E68C/p1651763933403669?thread_ts=1651763878.116549&cid=C02G9E68C
2022-05-05 17:37:34 +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
03ba0da1a7 Fixed email wording showing on update-flow incorrectly
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
2022-05-05 16:08:45 +01:00
Kevin Ansfield
c6fdfab454 Fixed post/page wording on "View published x on site" button 2022-05-05 16:05:20 +01:00
Kevin Ansfield
8fb0d6ebb2 Added scheduled and published states to new publish flow
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
2022-05-05 16:02:58 +01:00
James Morris
27cb5a9fec More responsive tweaks so new Dashboard works on mobile
refs: https://github.com/TryGhost/Team/issues/1531

- better resource breakpoints at mobile widths
- also fixed the active mobile button in mobile as it was white in dark mode
2022-05-05 15:53:49 +01:00
James Morris
0fda84d71e Added in a more responsive new Dashboard
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
2022-05-05 15:16:03 +01:00
Sanne de Vries
a01ae97801 Updated confirmation and completed pages of publishing flow
Refs https://github.com/TryGhost/Team/issues/1544
2022-05-05 14:26:06 +01:00
Simon Backx
19249bdae5 Renamed members-email-labs to newsletters and removed unused files
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.
2022-05-05 13:37:53 +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
Kevin Ansfield
7c4674507e Switched members-count-fetcher to use members-count-cache
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
2022-05-05 11:18:49 +01:00
James Morris
1fc436f3e2 Small hack fix to totals chart to keep responsiveness for new Dashboard
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
2022-05-05 11:11:55 +01:00
Simon Backx
93632349b9 Fixed newsletter includes when adding or editing (#2365)
refs https://github.com/TryGhost/Team/issues/1571

- When creating a new newsletter, the counts were not loaded
- When updating a newsletter, the counts were not updated
- Requires https://github.com/TryGhost/Ghost/pull/14696
2022-05-05 11:31:45 +02:00
Fabien 'egg' O'Carroll
fe4d2aeb9c Removed usage of hasActiveStripeSubscriptions API (#2364)
refs https://github.com/TryGhost/Team/issues/1147

This endpoint is deprecated
2022-05-04 17:24:56 +01:00
James Morris
983d37253a Changed new Dashboard to default to 30 days rather than 7
refs: https://github.com/TryGhost/Team/issues/1531
2022-05-04 17:02:08 +01:00
James Morris
d656258273 Fixed the dark mode border for What's New and changed text case for Staff Picks
refs: https://github.com/TryGhost/Team/issues/1531
2022-05-04 16:56:54 +01:00
James Morris
516a7c3701 Recent post and member activity table updates for new Dashboard
refs: https://github.com/TryGhost/Team/issues/1531

- added in published dates if newsletters not enabled
- also tried out a state to remove engagement if members not enabled
2022-05-04 16:45:42 +01:00
Kevin Ansfield
6a28de85b8 Fixed editor error handling
refs adeef741fb

- there's no local `error()` action, we need to use `this.send()` so the route-level error handler is triggered
2022-05-04 16:30:59 +01:00
Simon Backx
bb4b3a7eec Handled duplicate newsletter name errors correctly
refs https://github.com/TryGhost/Team/issues/1564

- Shows the error inline
- Depends on https://github.com/TryGhost/Ghost/pull/14694
2022-05-04 15:58:06 +02:00
James Morris
ae1010ea03 Adding in more hover states and cleaning up what's there
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
2022-05-04 14:04:49 +01:00
James Morris
692c7619ef Tweaks to recents box for new Dashboard based on feedback
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
2022-05-04 13:29:55 +01:00
Kevin Ansfield
adeef741fb Added first iteration of saving to new publish flow
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
2022-05-04 10:30:45 +01:00
Simon Backx
6adecb5db1 Removed newsletter name from activity feed if no multiple newsletters
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
2022-05-04 10:23:32 +02:00
Peter Zimon
300cd79d3e Updated Dashboard spacings 2022-05-03 17:08:30 +02:00
Peter Zimon
3996455aa1 Updated minicharts positions 2022-05-03 16:34:17 +02:00
Peter Zimon
d0a77a48ba Dashboard typography cleanup 2022-05-03 16:26:05 +02:00
Simon Backx
a3218b0a2b Improved newsletter activity feed copy
refs https://github.com/TryGhost/Team/issues/1570
refs https://ghost.slack.com/archives/C02G9E68C/p1651581277636729?thread_ts=1651569897.474819&cid=C02G9E68C

Activity feed now shows 'Subscribed to newsletter – Weekly newsletter" text
2022-05-03 14:37:45 +02:00
Simon Backx
5c6316f051 Fixed linting error 2022-05-03 14:25:50 +02:00
Simon Backx
da3b3850f5 Added the newsletter name to the activity feed
refs https://github.com/TryGhost/Team/issues/1563

- When a member (un)subscribes to a specific newsletter, we should add the name of the newsletter.
- Replaced CSS lowercase/first uppercase transform with a new HBS helper so we can maintain the caps in the newsletter names.
- Copy is still WIP, refs https://ghost.slack.com/archives/C02G9E68C/p1651569897474819
2022-05-03 14:24:18 +02:00
Fabien 'egg' O'Carroll
94ae33858d Fixed mergeDates zero and one item in list (#2360)
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]
2022-05-03 12:01:23 +01:00
Peter Zimon
c2102477a7 Updated Resources design on Dashboard 2022-05-03 12:21:30 +02:00
Simon Backx
21fd205073 Fixed newsletters limited to 15 items
refs https://github.com/TryGhost/Team/issues/1565

If you had more than 15 newsletters we hit default pagination in the API and Admin didn't show any more.
2022-05-03 09:01:41 +02:00
Simon Backx
7ad8f63b22 Fixed linting errors and removed debug log 2022-05-02 10:52:27 +02:00
Simon Backx
fdf425d95a Added dynamic filter for resources
refs https://github.com/TryGhost/Team/issues/1572

- Depending on the state of the site, other resources are shown.
- Also cleaned up error catching.
2022-05-02 10:45:15 +02:00
Simon Backx
625635c6ed Added tag filter to newsletter resources module
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.
2022-05-02 10:22:01 +02:00
Sanne de Vries
814f9043aa Updated publish settings page
Refs https://github.com/TryGhost/Team/issues/1544
2022-05-02 08:50:48 +01:00
James Morris
8c692b1d73 Fixed linting bugs and tweaked mini chart starting heights
refs: https://github.com/TryGhost/Team/issues/1531
2022-04-28 17:55:36 +01:00
James Morris
fcd11fe471 Fixed the resources section to pull the latest
refs: https://github.com/TryGhost/Team/issues/1531
2022-04-28 17:16:40 +01:00
Sanne de Vries
88e10f2305 Updated publish settings page
Refs https://github.com/TryGhost/Team/issues/1544
2022-04-28 16:46:58 +01:00
James Morris
059ad77939 Tons of tweaks based on feedback for new Dashboard
refs: https://github.com/TryGhost/Team/issues/1531
2022-04-28 16:40:27 +01:00
Peter Zimon
f81801549b Updated copy for Dashboard resources 2022-04-28 17:33:26 +02:00
Peter Zimon
5c71448575 Udpated resources section on dashboard 2022-04-28 17:18:17 +02:00
Peter Zimon
3b3140a002 Updated resources section 2022-04-28 16:48:22 +02:00
Kevin Ansfield
f28320abae Added confirmation step to new publish flow
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
2022-04-28 15:36:01 +01:00
Kevin Ansfield
357bbf56cf Fixed PublishOptions newsletter setup
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
2022-04-28 15:36:01 +01:00
Daniel Lockyer
7ea5bdcdf8 Fixed success button state for POST ../email_previews/..
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
2022-04-28 15:33:10 +01:00
Daniel Lockyer
e1f05ed126 Renamed reset_all_passwords Authentication API endpoint to /global_password_reset
refs https://github.com/TryGhost/Toolbox/issues/308

- our API has a pattern of using nouns and not verbs for the endpoint
  names, so this changes the endpoint for v5
2022-04-28 15:33:09 +01:00
Daniel Lockyer
1068070bd2 Renamed passwordreset body object to password_reset
refs https://github.com/TryGhost/Toolbox/issues/308

- I've just renamed the endpoint to `password_reset` but we might as
  well change the body object to make the change in v5 too
2022-04-28 15:33:09 +01:00
Daniel Lockyer
5aa5770791 Renamed /passwordreset authentication API endpoint to /password_reset
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
2022-04-28 15:33:09 +01:00
Daniel Lockyer
bc6ce7a2dd Renamed /email_preview endpoint to /email_previews
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
2022-04-28 15:33:09 +01:00
Daniel Lockyer
d0ce852ded v4.46.0 2022-04-28 15:29:17 +01:00
Sanne de Vries
b23dc541c5 Fixed tooltip overflowing in edit-newsletter modal 2022-04-28 14:47:47 +01:00
Peter Zimon
b825096213 Fixed Activity feed header 2022-04-28 15:28:56 +02:00
Sanne de Vries
d3ca3eb47c Hid subscriber and post count behind multiple-newsletter-UI flag 2022-04-28 13:44:44 +01:00
Sanne de Vries
699e977a34 Fixed email footer textarea overflowing in newsletter modal
No issue
2022-04-28 13:40:22 +01:00
Simon Backx
d25b94fb77 Fixed sender name and email in email preview link
refs https://github.com/TryGhost/Team/issues/1568

Sender name and email of newsletter was not used in the preview.
2022-04-28 12:01:25 +02:00
Simon Backx
2a5fe4b7db Fixed email preview sender name and email
refs https://github.com/TryGhost/Team/issues/1568

Email and sender name were not fetched from the default newsletter
2022-04-28 11:52:42 +02:00
Simon Backx
9b87b4c40a Added basic newsletter creation test
refs https://github.com/TryGhost/Team/issues/1477

- Very basic test only
- Includes some extra test attributes in the components
- Commented out a test that was not yet fininished
2022-04-28 10:50:27 +02:00
Peter Zimon
fb5f263ace Email settings design update (#2359)
Updated Email settings and Portal settings design to make it more scalable and more consistent with the rest of the Admin.
2022-04-28 10:24:12 +02:00
Kevin Ansfield
43d417858a Switched publish flow dropdowns to expanding blocks and added publish time options
refs https://github.com/TryGhost/Team/issues/1542

- moved publish-flow modal into `components/editor-labs/modals/publish-flow` as we have enough editor-related components to keep them in one place
- updated publish flow design to use expanding blocks in place of dropdowns
  - added `openSection` property in publish-flow modal and associated action for toggling sections
  - moved "publish at" option into a separate component to keep publish-flow modal cleaner (keeps option-specific actions out of the main modal component)
  - used `{{liquid-if}}` to animate the expanding blocks
- added schedule time properties to `PublishOptions`
  - kept "is scheduled" and "scheduled at" separate so it's possible to keep the selected schedule time across selecting/deselecting the option to schedule
  - ensures schedule date is kept to the minimum 5-minute in the future across option changes
  - updated publish-management to reset the scheduled option to "Right now" when the publish-flow modal is opened if a schedule time was previously set but is now in the past
2022-04-27 18:21:01 +01:00
James Morris
38a26e8760 Added in basic loading states for charts and some layout and copy tweaks
refs: https://github.com/TryGhost/Team/issues/1531

- charts now have basic working loading states, could be improved though
- trying out staff picks description and layout tweaks
- lots of small design tweaks based on feedback
2022-04-27 17:25:46 +01:00
James Morris
ef4321d707 Fixed the gradient for MRR for new Dashboard in light mode
refs: https://github.com/TryGhost/Team/issues/1531
2022-04-27 15:38:58 +01:00
Fabien 'egg' O'Carroll
b0a875f733 Wired up subscription stats api (#2350)
refs https://github.com/TryGhost/Team/issues/1512

Adds the new endpoint `/stats/subscriptions/` which provides data for
the paid mix and paid breakdown charts.

Made the filledMissingDates function more generic by passing in a
`copyData` function which is used to populate a date from the previous
days data, if the data for that date is missing.
2022-04-27 15:11:01 +01:00
James Morris
e5d5e359d7 Fixed layout bugs with new dashboard charts
refs: https://github.com/TryGhost/Team/issues/1531

- investigated how to make the layout not break on resize
- using a width 99% hack to make chartjs react properly
- redid the markup for the minicharts for more stable loading
- added in a subtle gradient for the mrr minichart
2022-04-27 14:40:44 +01:00
Sanne de Vries
ccd722a5f7 Updated disabled newsletter dropdown in scheduled state of publish menu 2022-04-27 11:16:39 +01:00
Peter Zimon
7392457fc5 Deleted newsletter confirmation modal 2022-04-27 11:56:30 +02:00
Kevin Ansfield
7099e9e0b6 re-organised newsletter modal components 2022-04-27 11:52:17 +02:00
Kevin Ansfield
c4ad61ac0f Added disabled newsletter dropdown to scheduled state of publish menu (#2357)
no issue

If you scheduled a post to a specific newsletter it was no longer visible in the scheduled state of the publish menu making it difficult to know the behaviour when coming back to a scheduled post.

- duplicated the newsletter dropdown from the draft to the scheduled state components and disabled it the same as the other recipient options
- added temporary workaround for missing newsletter embed for the posts endpoint in the API
  - adds `newsletterId` attribute to the post model
  - uses `post.newsletterId` to find the matching newsletter model from the available newsletters list
2022-04-27 10:49:55 +01:00
Kevin Ansfield
404d3c44cf Switched to a minimal form when creating a newsletter (#2356)
no issue

The full edit newsletter form with all the settings, design options, and preview felt quite overwhelming when the only piece of data that's required to create a newsletter is the name.

- re-organised the newsletter modal components by renaming `modals/edit-newlsetter` to `modals/newsletters` to better represent the full suite of modals that are used in newsletter management
- added a `modals/newsletters/new` component containing a minimal form with name/description/opt-in-existing fields
- switched the `new-newsletter` route to open the new modal rather than the previous dual-purpose edit modal
- moved message about newsletter creation into the create modal and dropped the separate create confirmation modal
- dropped unnecessary unsaved-changes confirmation
- removed the now-unused opt-in-existing behaviour from the edit newsletter modal

Co-authored-by: Peter Zimon <peter.zimon@gmail.com>
2022-04-27 10:36:43 +01:00
Sanne de Vries
76ec5bef46 Fixed linter error 2022-04-27 10:17:16 +01:00
Sanne de Vries
75a51d6a8f Updated publish settings page design
Refs https://github.com/TryGhost/Team/issues/1544
2022-04-27 10:08:40 +01:00
James Morris
a5de8c76d6 Working on custom tooltips for new Dashboard
refs: https://github.com/TryGhost/Team/issues/1534
2022-04-26 18:57:01 +01:00
Sanne de Vries
8fc797609d Updated newsletter dropdown in publish-menu
Refs https://www.notion.so/ghost/Pre-5-0-V1-multiple-newsletter-release-49fa1b62b8e840e29dca32d79ef201f5#952519fa03de408ca6f2ab9a4c754daa
2022-04-26 17:53:52 +01:00
James Morris
118aae2820 Bringing mini charts up to the right and other style tweaks
refs: https://github.com/TryGhost/Team/issues/1531
2022-04-26 14:52:55 +01:00
Peter Zimon
ac23f3cdae Email design screen cleanup 2022-04-26 13:10:16 +01:00
Rishabh
8dd371f1e8 Added post and subscriber count to newsletters
- updates newsletter management to show count of posts and members for a newsletter
2022-04-26 13:10:16 +01:00
Rishabh
c052ab1334 Added default newsletters for new member via Admin
refs https://github.com/TryGhost/Team/issues/1469

- default newsletters were set for new members added on members list except "add yourself" feature
- updates default newsletters for new member added via "Add yourself" button
2022-04-26 13:10:16 +01:00