Commit Graph

2063 Commits

Author SHA1 Message Date
Peter Zimon 86c08eaf88
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 75395a0eb2 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 cc8dc03485 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
Fabien 'egg' O'Carroll e46a30a8d5
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 8dd73e186c 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 f15bcfb76b Updated disabled newsletter dropdown in scheduled state of publish menu 2022-04-27 11:16:39 +01:00
Peter Zimon 592f9aef81 Deleted newsletter confirmation modal 2022-04-27 11:56:30 +02:00
Kevin Ansfield 15ffe34606 re-organised newsletter modal components 2022-04-27 11:52:17 +02:00
Kevin Ansfield 4011c8b73d
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 25f4694d06
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 26582592c7 Fixed linter error 2022-04-27 10:17:16 +01:00
Sanne de Vries 7697896c70 Updated publish settings page design
Refs https://github.com/TryGhost/Team/issues/1544
2022-04-27 10:08:40 +01:00
James Morris 18de96c940 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 5882daec3e 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 4806c196c2 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 379aee8ce3 Email design screen cleanup 2022-04-26 13:10:16 +01:00
Rishabh be4d3e82fe 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 e4468e74ad 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
Rishabh 9706a82dd2 Updated newsletter management heading
- without the multiple newsletter UI flag, a site can have only one newsletter
- updates the heading for newsletter management UI to singular in that case
2022-04-26 13:10:16 +01:00
Rishabh 9cfe11d112 Wired member newsletter subscription to existing toggle
refs https://github.com/TryGhost/Team/issues/1554

With multiple newsletters, the subscribed property on a member is replaced by newsletter(s) [] which defines member's subscription instead. This change -

- updates the existing subscription toggle for member on detail screen to work with new backend
- shows the new multiple newsletter subscription UI only if site has more than 1 newsletters
2022-04-26 13:10:16 +01:00
Simon Backx 31150672b8 Updated counts used in default recipients selection in settings
refs https://github.com/TryGhost/Team/issues/1538
2022-04-26 13:10:16 +01:00
Simon Backx c120b7cbe3 Updated recipient counts in scheduled post status at top of editor
refs https://github.com/TryGhost/Team/issues/1538
2022-04-26 13:10:16 +01:00
Simon Backx eb5d82c0ef Fixed tests partially for updated member counts
no issue

Also moves some reused test methods to the test helpers folder (wasn't able to move it to the fixtures because too many tests were failing):
- enableNewsletters helper
- enableStripe helper
- enableMailgun helper
2022-04-26 13:10:16 +01:00
Simon Backx 4fbeb6bd06 Removed unused memberCount property passed to GhPublishmenu
refs https://github.com/TryGhost/Team/issues/1538

The memberCount property was not used, so I removed all related code and fetch.
2022-04-26 13:10:16 +01:00
Simon Backx 19a35e8fb6 Updated subscribed member count in publish menu used for enabling/disabling email UI
refs https://github.com/TryGhost/Team/issues/1538
2022-04-26 13:10:16 +01:00
Simon Backx 6dc85a1c54 Updated recipient count in publish confirmation
refs https://github.com/TryGhost/Team/issues/1538
2022-04-26 13:10:16 +01:00
Simon Backx 618a732ba5 Updated free / paid members counts in recipient selection UI
refs https://github.com/TryGhost/Team/issues/1538

These counts now use the newsletter relation of members instead of the subscribed property.
2022-04-26 13:10:16 +01:00
Sanne de Vries 66ca97d4b0 Updated publish settings page
Refs https://github.com/TryGhost/Team/issues/1544
2022-04-26 12:07:46 +01:00
James Morris 3f4db36630 Implemented a more fleshed out resources section for new Dashboard
refs: https://github.com/TryGhost/Team/issues/1556

- working implementation of all the parts of the dashboard
- now includes the what's new section again
- has dynamic, yet basic, newsletters
2022-04-26 11:33:34 +01:00
Kevin Ansfield 00e0c25879 Added rough version of publish type dropdown
refs https://github.com/TryGhost/Team/issues/1542

- wired up a basic dropdown with radio buttons for publish type ready for initial behaviour and styling assessment
2022-04-25 11:22:50 +01:00
Kevin Ansfield a62e0d080b Added initial "publishOptions" setup
refs https://github.com/TryGhost/Team/issues/1542

- adds a `PublishOptions` class
  - an instance of this class provides everything the UI needs to display and set the publish options relevant to the current post object and overall system state
  - the `publish-flow` modal is passed a `PublishOptions` instance when it opens
  - as part of the constructor it triggers a background load of any additional data it requires to control available options such as member counts, email limits, and newsletters
- adds a `{{publish-options}}` resource
  - sets up and returns `PublishOptions` instance
  - passes through service dependencies which are not available directly in the `PublishOptions` class as it's a custom native class outside of Ember's DI management
  -  used to ensure we can get a clean `PublishOptions` instance any time the passed in `post` object is replaced meaning we don't have to rely on observers and manual teardown/setup
- updated `<PublishManagement>` component
  - sets up `publishOptions` property using `@use` and the `{{publish-options}}` resource so reactivity for changing post objects is handled automatically
  - uses the `publishOptions.isLoading` property to disable the publish flow trigger button until all of the data required to manage the flow is available
- updated `publish-flow` modal to use some of the initially available `publishOptions` data
2022-04-22 17:56:49 +01:00
James Morris 6899889123 Added in a rudimentary resources box with staff picks at bottom
refs: https://github.com/TryGhost/Team/issues/1531

- added in a multi resources box that spans whole width that includes dynamic staff picks
- various other tweaks to styles
2022-04-22 17:47:48 +01:00
James Morris 45572a2e52 Moved the anchor chart select for Total/Paid/Free to the title
refs: https://github.com/TryGhost/Team/issues/1548

- this moves from a secondary dropdown to it being the main title one
- includes a few style fixes including fixing resources box in dark mode
2022-04-22 16:27:27 +01:00
James Morris 76240659f0 Fixed bug with Engagement chart not show paid options
refs: https://github.com/TryGhost/Team/issues/1531
2022-04-22 15:46:53 +01:00
James Morris 009c6ba23c Removed the need for CSS Grid as the layout is now simpler
refs: https://github.com/TryGhost/Team/issues/1531

- css grid was good when the layout was more complex but it's less needed now
- tried out some subtle gradients for the resource box
- tidied and cleaned up some css that wasn't needed anymore
2022-04-22 15:27:49 +01:00
James Morris 0cfc67e318 Adjustments to tooltips for all charts in new dashboard so more visually pleasing
refs: https://github.com/TryGhost/Team/issues/1547

- added padding and margins to all charts so tooltips don't clip
2022-04-22 14:49:03 +01:00
James Morris 5d9a2a81f4 Fixed up linting issues with previous commit for Paid Mix
refs: https://github.com/TryGhost/Team/issues/1547
2022-04-22 14:13:33 +01:00
James Morris 911becc009 Converted the Paid Mix over to a stacked horizontal bar chart
refs: https://github.com/TryGhost/Team/issues/1547

- moved to horizontal bar chart
- made the tooltips work differently for this
- added in a simple legend for the cadence chart
- style issues remain but wanted to get functionality in there first
2022-04-22 14:04:58 +01:00
James Morris 7536f74d1a
Further layout tweaks for new Dashboard (#2345)
* Subtle tweaks to the recent posts

refs: https://github.com/TryGhost/Team/issues/1531

* Combining Recent Posts and Members Activity together and other layout tweaks

refs: https://github.com/TryGhost/Team/issues/1531

- attempting to combine recent posts and members activity together
- various layout tweaks to make this work better
- tons of tiny style tweaks
2022-04-22 11:42:51 +01:00
Sanne de Vries f0b9dddf32 Updated back button on publish settings page
Refs https://github.com/TryGhost/Team/issues/1544
2022-04-22 10:33:59 +01:00
Sanne de Vries 2b2447859a Fixed copy in newsletter creation confirmation modal
Refs https://github.com/TryGhost/Team/issues/1525
2022-04-22 09:06:06 +01:00
Sanne de Vries 7ac6247915 Updated newsletter creation confirmation copy
Refs https://github.com/TryGhost/Team/issues/1525
2022-04-22 08:51:21 +01:00
Rishabh ec3347f69b Added newsletter creation UI behind separate flag
Enables splitting of multiple newsletters backend and ability to add newsletters behind different flags. This allows release and testing of all the new backend behavior for multiple newsletters to work with the default newsletter, and later allow sites to create multiple newsletters.
2022-04-22 12:44:42 +05:30
Sanne de Vries 79f6be6699 Updated new publish settings page
Refs https://github.com/TryGhost/Team/issues/1544
2022-04-21 15:51:06 +01:00
Kevin Ansfield 4befac8e35 Fixed newsletter list sometimes showing no newsletters
no issue

- depending on when the newsletter settings route is accessed we would sometimes show an empty newsletter list
- the problem stems from the use of a non-reactive fixed list of displayed newsletters where we manually update the list when we know the list should change. On initial load we were using `await store.findAll('newsletter')` then updating the displayed list, however the default behaviour for `store.findAll()` is to immediately return a live array - this doesn't work for our use-case because we'd then potentially update our displayed list from incomplete data
- added the `{reload: true}` option to the `findAll()` call to force a wait for the API request to finish before updating the displayed list of newsletters
2022-04-21 11:33:52 +01:00
Kevin Ansfield 8c7fa624c2 Added Ctrl/Cmd+Shift+P shortcut for starting publish flow
refs https://github.com/TryGhost/Team/issues/1542

With the old publish menu flow the `Ctrl/Cmd+Shift+P` would immediately publish without showing any of the publish options which isn't ideal. For the redesign we'd like to try showing the publish flow modal instead.

- added key handler for the shortcut to the publish-flow triggering button
- added `ignoreBackdropClick` option to the publish flow modal and support for it in our modal backdrop click handler
  - the shortcut simulates a click on the button which when the modal is open equates to a backdrop click meaning repeated presses of the Cmd+Shift+P shortcut resulted in glitchy modal open/close behaviour
2022-04-21 11:33:52 +01:00
Sanne de Vries 62d6066426 Updated edit newsletter modal copy
Refs https://github.com/TryGhost/Team/issues/1525
2022-04-21 11:23:50 +01:00
Sanne de Vries 22e589aca6 Updated copy for archive and reactivate newsletter modals
Refs https://github.com/TryGhost/Team/issues/1525
2022-04-21 11:20:29 +01:00
Kevin Ansfield f28773e32f Added static mockup of basic publish flow
refs https://github.com/TryGhost/Team/issues/1542

- adds `<EditorLabs::PublishManagement>` component that displays the relevant button for triggering publishing flows and will eventually store publish options for the editing session duration and manage the saving flow
  - displays a "Publish" button that triggers the publish flow modal
- adds `editor-labs/publish-flow` full-screen modal containing a static mockup of the desired sentence-structure publish options design
2022-04-20 18:41:29 +01:00
Kevin Ansfield c08296c2d8 Added `showHeaderName` newsletter attr for controlling newsletter title/subtitle
refs https://github.com/TryGhost/Team/issues/1532

- added `showHeaderName` attribute to newsletter model
- added attribute toggle to the newsletter design settings form
- updated newsletter preview behaviour
  - if both title and name are on, show name as a subtitle
  - if title is off but name is on, show name as main title
  - adjusted higher-level "show header" and "show header title" conditionals to account for the new setting
2022-04-20 16:05:10 +01:00