Commit Graph

9477 Commits

Author SHA1 Message Date
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