Commit Graph

2033 Commits

Author SHA1 Message Date
Kevin Ansfield
2be1673106 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
bfb02d4458 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
3cb7d657b5 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
84873964b1 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
2f0a0faba4 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
53a393f3e1 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
fe02e77bd6 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
39efe84738 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
58daafdef4 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
1b2bcbb0fa 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
407c7649f1 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
e749918427 Updated newsletter creation confirmation copy
Refs https://github.com/TryGhost/Team/issues/1525
2022-04-22 08:51:21 +01:00
Rishabh
1b1a52dbea 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
2464675e4b Updated new publish settings page
Refs https://github.com/TryGhost/Team/issues/1544
2022-04-21 15:51:06 +01:00
Kevin Ansfield
2f849c431f 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
5d839a4725 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
b5dd98b62f Updated edit newsletter modal copy
Refs https://github.com/TryGhost/Team/issues/1525
2022-04-21 11:23:50 +01:00
Sanne de Vries
3764882e5a 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
8ca2c6935a 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
c94b80dd4b 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
Simon Backx
46fd0e4a27 Added open rate and charts to recent posts
refs https://github.com/TryGhost/Team/issues/1535

Also made some temporary changes in CSS to get the percentage bar in.
2022-04-20 15:31:12 +02:00
Kevin Ansfield
da1621d818 Fixed newsletter header image not showing in design form
closes https://github.com/TryGhost/Team/issues/1541

- copy/pasta from migrating old email design settings to newsletter design form
2022-04-20 14:09:30 +01:00
James Morris
a06003e7b5 Introduced new layout to bring new Dashboard closer to release (#2342)
refs: https://github.com/TryGhost/Team/issues/1531

- broke apart the combined chart
- added back in the paid mix chart
- separated out the mini charts into separate components
- made top chart work with total, paid and free
- added in an overview section back at the top for total, paid, free
- made metric labels and values larger and easier to parse

Co-authored-by: Simon Backx <simon@ghost.org>
2022-04-20 14:43:11 +02:00
Kevin Ansfield
79eea318a9 Updated existing subscriber count in newsletter create confirmation
refs 50c762e222

- the count should only include members that are subscribed to active newsletters
  - the filter change was accidentally included in a previous commit (50c762e222)
- removed the unnecessary `{{concat}}` usage
2022-04-20 13:20:03 +01:00
Kevin Ansfield
50c762e222 Added confirmation dialog when unarchiving a newsletter
closes https://github.com/TryGhost/Team/issues/1540
refs 58290a6134

- follows same pattern as archiving
2022-04-20 13:15:45 +01:00
Kevin Ansfield
e7ddf8aaef Fixed create newsletter confirmation showing when editing existing newsletter
closes https://github.com/TryGhost/Team/issues/1537

- added conditional around the create confirmation modal display so it's only shown when attempting to save a new newsletter record
2022-04-20 12:52:20 +01:00
Kevin Ansfield
58290a6134 Added confirmation dialog when archiving newsletter
closes https://github.com/TryGhost/Team/issues/1530

- added confirmation modal that uses passed in archive task when confirming to provide feedback on progress
- switched archive link from immediately triggering the archive task to an action that launches the confirm modal
2022-04-20 11:08:57 +01:00
Sanne de Vries
1c34e41ea3 Fixed horizontal position of dropdown menus in newsletter settings
Refs https://github.com/TryGhost/Team/issues/1525
2022-04-20 11:06:05 +01:00
Kevin Ansfield
b349317a9d Fixed interfering actions menus in newsletter management
no issue

When multiple newsletters existed, the actions dropdown menus were all rendered on top of each other but hidden with CSS. This resulted in clicks that you expected to open an actions menu immediately triggering actions on a newsletter higher up in the list.

- switched from `<GhDropdown>` to `<GhBasicDropdown>` which adds/removes the dropdown content elements rather than rendering everything and hiding with CSS
- updated styling to match previous implementation
- added `.anim-fade-in-scale` classes for use with `{{css-transition}}` so we can keep the open/close animation
  - `ember-basic-dropdown` does have support for transitioning in/out CSS classes but they are only triggered on the first open/close for each menu which resulted in oddly inconsistent behaviour with multiple menus in a list
  - close animation doesn't actually work because the outer elements are removed by `ember-basic-dropdown` preventing `css-transitions` from performing it's animation
2022-04-20 10:50:11 +01:00
Sanne de Vries
029cfca415 Added section headings to newsletter modal
Refs https://github.com/TryGhost/Team/issues/1525
2022-04-20 10:40:58 +01:00
Sanne de Vries
64bd016950 Updated edit newsletter modal
Refs https://github.com/TryGhost/Team/issues/1525
2022-04-20 09:34:29 +01:00
Sanne de Vries
b61f45d544 Updated newsletter settings copy
Refs https://github.com/TryGhost/Team/issues/1525
2022-04-20 09:14:17 +01:00
Kevin Ansfield
baf75c39cf Added auto-subscribe newsletter count when confirming newsletter creation
refs https://github.com/TryGhost/Team/issues/1528

- used the already-loaded newsletters list to pass the slugs of active newsletters to the confirm modal, this allows use of the `{{members-count-fetcher}}` resource with the query `/members/?filter=newsletters:[...slugs]` to fetch a member and full count metadata
- added inclusion of `{{join}}` helper from `ember-composable-helpers` addon
2022-04-19 21:56:13 +01:00
Kevin Ansfield
f6c9ffcf60 Fixed conflicting test selector in <GhTaskButton>
refs 8e120a74d6

- we use `data-test-state` inside of some modals which also use `<GhTaskButton>` which caused unrelated tests to start failing due to a change in matching element counts
2022-04-19 20:42:47 +01:00
Kevin Ansfield
8e120a74d6 Fixed <GhTaskButton> behaviour
refs 502fcaba3c

- the conditional for `isFailure` was wrong meaning we were showing the idle state unintentionally
- fixed the conditional so it checks for the return value rather than a `null` error
- updated the template with test selectors so it's easier to determine state where class names are not sufficient to differentiate
2022-04-19 20:25:27 +01:00
Kevin Ansfield
502fcaba3c Added "Opt-in existing subscribers" option to newsletter creation
refs https://github.com/TryGhost/Team/issues/1528

- adds "opt-in existing" toggle to newsletter modal that's only shown when creating a newsletter
  - defaults to true
- updated newsletter save flow to show confirmation before creation
  - alters message to reflect auto-subscribe selection
  - count of existing subscribed members is not implemented as it's not yet supported by the API
- updated newsletter adapter and save flow to use auto opt-in selection
  - when option is checked the save URL is changed to `POST /members/?opt_in_existing=true`
- modified task button component to ignore a task return value of `canceled` so when it's received the buttons returns to the idle state instead of showing a saved or failed state
  - used by save routine when the "Back to edit" button is clicked in the create confirmation modal
2022-04-19 20:01:08 +01:00
Kevin Ansfield
5437063d4b Fixed newsletter subscription toggles on member details screen
no issue

- member records are not re-fetched when navigating from the members list to the member details screen, instead the already loaded member object is passed through to the route directly to provide a faster navigation experience
- however, the objects used in the member list are proxy objects in order to support the lazy-loading infinite scroll. Proxy objects require the use of `get()` so errors were thrown when the newsletter subscription toggles were used
2022-04-19 19:34:59 +01:00
Kevin Ansfield
86a69ece65 Updated newsletter email verification endpoint
refs https://github.com/TryGhost/Ghost/pull/14491

- API endpoint used when completing verification of a newsletter email change has moved to `PUT /newsletters/verifications/` to follow our API patterns
2022-04-19 19:34:59 +01:00
Djordje Vlaisavljevic
0ca9f32d36 Updated design for newsletter preferences
refs https://github.com/TryGhost/Team/issues/1492
2022-04-19 17:04:22 +02:00
Sanne de Vries
09467a0bb7 Updated newsletter modal
Refs https://github.com/TryGhost/Team/issues/1525
2022-04-19 12:31:16 +01:00
Sanne de Vries
9271fa581b Updated newsletter modal sidebar layout
https://github.com/TryGhost/Team/issues/1525
2022-04-18 17:10:11 +01:00
Sanne de Vries
ef1411ae29 Fixed archived description in Email newsletter settings
Refs https://github.com/TryGhost/Team/issues/1525
2022-04-18 11:11:51 +01:00
Sanne de Vries
55752d44b7 Added active and archived newsletter descriptions
Refs https://github.com/TryGhost/Team/issues/1525
2022-04-18 10:57:23 +01:00
James Morris
685fa19d36 Moved back the breakdown graph to be back with the total paid
refs: https://github.com/TryGhost/Team/issues/1462
2022-04-15 12:18:46 +01:00
Kevin Ansfield
d10da5a02b Updated newsletter management for switch to nullable sender_name
refs https://github.com/TryGhost/Team/issues/1513

- `sender_name` is now nullable with a fallback to the site title
- updated new-newsletter route
  - removed default setting of site title in `senderName` of the new newsletter instance
  - removed extra checks when showing unsaved changes modal as we no longer need to compare the `senderName` attribute against the site title
- updated newsletter preview so the sender name falls back to the site title
- updated sender name input placeholder to show the site title
- removed not-empty validation
- fixed the switch to "multiple newsletter" state in the background of the new-newsletter modal
  - problem was `displayingDefault` getter was looking at all active newsletters rather than just the filtered ones so it was counting the new-but-unsaved newsletter even though it wasn't displayed in the list
  - fixes layout glitch when the new-newsletter modal animates out after cancelling creation
2022-04-15 09:43:22 +01:00
James Morris
4be9538750 Tiny tweaks to the dashboard
refs: https://github.com/TryGhost/Team/issues/1462
2022-04-14 17:17:17 +01:00
James Morris
25db233351 Added back in the Total Paid Members graph 2022-04-14 16:48:49 +01:00
Rishabh
bfd36cd3c8 Removed member generic subscribe button for multiple newsletters
refs https://github.com/TryGhost/Team/issues/1492

We have a dedicated newsletter preference section with multiple newsletters in member detail screen, so the generic subscribed toggle can be removed.
2022-04-14 20:44:09 +05:30
Simon Backx
fdaf9c5614 Fixes price formatting in MRR tooltip + added support for currencies
refs https://github.com/TryGhost/Team/issues/1521

- Formatted the number correctly in the tooltip
- Correctly get the currency that is used in the MRR stats and show that symbol instead of a hardcoded $
2022-04-14 17:05:01 +02:00
Simon Backx
2cbe7b763e Added net line to paid breakdown graph
refs https://github.com/TryGhost/Team/issues/1522
2022-04-14 16:52:22 +02:00