Commit Graph

9039 Commits

Author SHA1 Message Date
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
Daniel Lockyer
6341b00389 Dropped support for Node 12
refs https://github.com/TryGhost/Toolbox/issues/267

- Node 12 is EOL as of April 30th so we're going to be dropping support
  for it in Ghost too
- the only change in Admin is to update the Node engines range
2022-04-19 15:51:02 +01: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
renovate[bot]
788339124b Update dependency @tryghost/helpers to v1.1.64 (#2340)
Co-authored-by: Renovate Bot <bot@renovateapp.com>
2022-04-18 10:28:13 +01:00
renovate[bot]
e37e7b5bdb Update dependency glob to v8 (#2333)
Co-authored-by: Renovate Bot <bot@renovateapp.com>
2022-04-18 10:28:01 +01:00
renovate[bot]
c8a26aad68 Update dependency @ember/test-helpers to v2.7.0 (#2326)
Co-authored-by: Renovate Bot <bot@renovateapp.com>
2022-04-18 10:27:45 +01:00
renovate[bot]
9959e4301e Update dependency @tryghost/nql-lang to v0.3.1 (#2325)
Co-authored-by: Renovate Bot <bot@renovateapp.com>
2022-04-18 10:27:23 +01:00
renovate[bot]
d7d1197a04 Update dependency @tryghost/kg-parser-plugins to v2.11.6 (#2321)
Co-authored-by: Renovate Bot <bot@renovateapp.com>
2022-04-18 10:27:11 +01:00
renovate[bot]
31616e9fd8 Update dependency @tryghost/timezone-data to v0.2.63 (#2341)
Co-authored-by: Renovate Bot <bot@renovateapp.com>
2022-04-18 09:50:29 +01:00
renovate[bot]
a706800df2 Update dependency @tryghost/color-utils to v0.1.13 (#2339)
Co-authored-by: Renovate Bot <bot@renovateapp.com>
2022-04-18 09:49:51 +01:00
renovate[bot]
36d10183c7 Update dependency fs-extra to v10.1.0 (#2338)
Co-authored-by: Renovate Bot <bot@renovateapp.com>
2022-04-18 09:49:17 +01:00
renovate[bot]
4c1eb871dc Update dependency ember-simple-auth to v4.2.2 (#2334)
Co-authored-by: Renovate Bot <bot@renovateapp.com>
2022-04-18 09:48:50 +01:00
renovate[bot]
2d18c5cdcb Update dependency @tryghost/nql to v0.9.1 (#2324)
Co-authored-by: Renovate Bot <bot@renovateapp.com>
2022-04-18 09:48:02 +01:00
renovate[bot]
a4d3d74730 Update dependency @tryghost/kg-clean-basic-html to v2.2.10 (#2320)
Co-authored-by: Renovate Bot <bot@renovateapp.com>
2022-04-18 09:47:30 +01:00
renovate[bot]
8c270b2826 Update dependency grunt to v1.5.2 (#2331)
Co-authored-by: Renovate Bot <bot@renovateapp.com>
2022-04-18 09:47:16 +01:00
renovate[bot]
02002c08bb Update dependency ember-cli-dependency-checker to v3.3.1 (#2330)
Co-authored-by: Renovate Bot <bot@renovateapp.com>
2022-04-18 09:46:54 +01:00
renovate[bot]
59a484638d Update dependency @glimmer/component to v1.1.2 (#2322)
Co-authored-by: Renovate Bot <bot@renovateapp.com>
2022-04-18 09:27:00 +01:00
renovate[bot]
0bc75f7030 Update dependency @tryghost/timezone-data to v0.2.62 (#2316)
Co-authored-by: Renovate Bot <bot@renovateapp.com>
2022-04-18 09:21:35 +01:00
renovate[bot]
5f811d5ef2 Update dependency @tryghost/helpers to v1.1.63 (#2315)
Co-authored-by: Renovate Bot <bot@renovateapp.com>
2022-04-18 09:21:25 +01:00
renovate[bot]
c28ad8d068 Update dependency @tryghost/members-csv to v1.2.10 (#2314)
Co-authored-by: Renovate Bot <bot@renovateapp.com>
2022-04-18 09:21:16 +01:00
renovate[bot]
b5e0e0f708 Update dependency @babel/plugin-proposal-decorators to v7.17.9 (#2310)
Co-authored-by: Renovate Bot <bot@renovateapp.com>
2022-04-18 09:21:02 +01:00
Daniel Lockyer
7b527f6e37 v4.44.0 2022-04-15 16:00:39 +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
Rishabh Garg
0bfc402090 Added newsletter management for member (#2336)
refs https://github.com/TryGhost/Team/issues/1492

Allows site owners to manage member's newsletter preference directly in Admin.

- also adds `visibility` property for newsletter model
- updates members test model to include `visibility`
2022-04-14 20:10:04 +05:30
James Morris
d3d0a6509d Moved around the delta sub graph to MRR to hopefully make sense contextually
refs: https://github.com/TryGhost/Team/issues/1462

- moved the delta graph into the revenue graph of the main combined graph
- made the secondary dropdown work again
- updated some chart titles
- tidied up the code and styles to make it work well
2022-04-14 15:28:55 +01:00
Kevin Ansfield
4c5144cb61 🐛 Fixed close button on "unsaved changes" modal not always behaving like "Stay" button
no issue

The close button in the unsaved changes modal used the `@close` action directly compared to the "Stay" button which used `(fn @close false)`. The close button version without explicit arguments resulted in the first argument being a `PointerEvent` instance which if checked as a modal return value as `if (shouldClose)` would evaluate as truthy therefore matching the "Leave" behaviour instead of the "Stay" behaviour.

- changed modal to explicitly call `(fn @close false)` when the close button is clicked
- updated design settings route to have an explicit `shouldLeave === true` check so default behaviour is always "Stay"
2022-04-14 12:39:10 +01:00
Kevin Ansfield
179d58aa08 Cleaned up call of a removed function - fixes tests (#2335)
refs e398557a75

- `resetEmailAddresses()` was called when saving the labs version of members-email settings screen but the function no longer exists, this was throwing an error which broke all following tests in CI
2022-04-14 11:01:09 +01:00
Kevin Ansfield
e398557a75 Added sender email verification flow for newsletters
refs https://github.com/TryGhost/Team/issues/584
refs https://github.com/TryGhost/Team/issues/1498

- updated newsletter save routine in `edit-newsletter` modal to open an email confirmation modal if the API indicates one was sent
  - modal indicates that the previously set or default email will continue to be used until verified
  - response from API when saving looks like `{newsletters: [{...}], meta: {sent_email_verification: ['sender_name]}}`
  - added custom newsletter serializer and updated model so that the `meta` property returned in the response when saving posts is exposed
    - Ember Data only exposes meta on array-response find/query methods
    - https://github.com/emberjs/data/issues/2905
- added `/settings/members-email-labs/?verifyEmail=xyz` query param handling
  - opens email verification modal if param is set and instantly clears the query param to avoid problems with sticky params
  - when the modal opens it makes a `PUT /newsletters/verify-email/` request with the token in the body params, on the API side this works the same as a newsletter update request returning the fully updated newsletter record which is then pushed into the store
- removed unused from/reply address code from `<Settings::MembersEmailLabs>` component and controller
  - setting the values now handled per-newsletter in the edit-newsletter modal
  - verifying email change is handled in the members-email-labs controller
- fixed mirage not outputting pluralized root for "singular" endpoints such as POST/PUT requests to better match our API behaviour
2022-04-13 19:34:58 +01:00
James Morris
cc6c0acf55 Tiny fix to add transparent border on big metrics so they don't move on selection for new dashboard
refs: https://github.com/TryGhost/Team/issues/1462
2022-04-13 15:30:32 +01:00
James Morris
df30298651 More layout and chart adjustments to better improve the design
refs: https://github.com/TryGhost/Team/issues/1462

- added back in the main title to the top chart
- brought back the main metric background and centered buttons
- adjusted lots of spacing
- made the chart ticks for main graph dynamic
- improved the look of the breakdown graph
2022-04-13 15:27:42 +01:00
Simon Backx
3167679b03 Cleaned up email chart 2022-04-13 15:36:12 +02:00
Simon Backx
960536dcda Improved anchor chart and reloading of charts
refs https://github.com/TryGhost/Team/issues/1510

- Fixes site status not loading (https://github.com/TryGhost/Team/issues/1510) for mocked data because of tasks were already pending (reloadAll now cancels them first)
- Reload no longer required when switching anchor chart type
- Removed paidOptionSelected (fixes bug when swiching)
- Moved did-insert of anchor chart to topmost element
- Renamed chartDisplay values
2022-04-13 14:56:34 +02:00
Fabien 'egg' O'Carroll
2072209d4d Updated subscription event handling (#2332)
refs https://github.com/TryGhost/Team/issues/1302

* Tweaked the getIcon() function to better support the new event data variable for cancelled
* Added back in info for events across all activity lists

Co-authored-by: James Morris <moreofmorris@users.noreply.github.com>
2022-04-13 10:28:13 +01:00
Kevin Ansfield
e193ff15a5 Added unsaved changes confirmation modals to new/edit newsletter routes
closes https://github.com/TryGhost/Team/issues/1475

- updated new+edit newsletter routes to open a confirmation modal if the form modal is closed or the route is exited
- added z-index to modal background so the layering behaves as expected when modals are stacked
2022-04-12 21:32:27 +01:00
James Morris
356a1ead2a Added in dark mode grid lines for charts and futher style tweaks to the new dashboard
refs: https://github.com/TryGhost/Team/issues/1462

- added in dynamic dark mode grid lines for the charts
- added in some subtle other dark mode tweaks for borders
- limited the recent posts to 3 instead of 5
2022-04-12 17:56:55 +01:00
James Morris
e4891e3462 Moved the new dashboard over to a CSS Grid layout and cleaned up a ton of the code
refs: https://github.com/TryGhost/Team/issues/1507

- changed the layout over to use css grids instead of the random flex and divs
- cleaned up the based dashboard-v5 file so its rendering much cleaner components
- refactored and took out a ton of old css that wasn't needed anymore
- moved the dashboard-v5 css into it's own css file to keep things cleaner
- includes a few stylistic changes along the way
2022-04-12 16:04:20 +01:00
James Morris
1b89416064 Moved all the section and boxes to their respective Ember components to massively tidy up the new Dashboard layout
refs: https://github.com/TryGhost/Team/issues/1507
2022-04-12 16:04:20 +01:00
Kevin Ansfield
4565882941 Updated newsletter model and form for latest schema
refs https://github.com/TryGhost/Team/issues/1500

- `senderEmail` is now nullable with a fallback to `noreply@{site domain}`
- `senderName` is not nullable and has no fallback
  - updated preview and input placeholder to match real-world behaviour
  - inserted site title as the default value when creating a new newsletter to avoid friction with the sender name needing to be filled in when saving
- switched `senderReplyTo` input field to a select with "newsletter" and "support" options
  - added basic `<Inputs::Select>` component as `<OneWaySelect>` had re-rendering issues causing loss of selected value when the label of the newsletter email changed to reflect a custom newsletter email value
2022-04-12 14:01:41 +01:00
James Morris
103be11b7c Moved all the new Dashboard files into folders to help with organisation a bit more
refs: https://github.com/TryGhost/Team/issues/1506
2022-04-12 13:09:00 +01:00
James Morris
84c316bde9 Moving back the metrics to under the main graph and adding paid breakdown graph to dropdown based on feedback
refs: https://github.com/TryGhost/Team/issues/1462
2022-04-12 11:53:51 +01:00
James Morris
f046e5e118 More layout tweaks to new dashboard
refs: https://github.com/TryGhost/Team/issues/1462
2022-04-12 11:53:51 +01:00
James Morris
7e499573e5 Moving the new dashboard layout forward with more ideas
refs: https://github.com/TryGhost/Team/issues/1462
2022-04-12 11:53:51 +01:00
Daniel Lockyer
f84d3b30f2 v4.43.1 2022-04-11 12:16:37 +01:00
Daniel Lockyer
ee03d45bbc v4.43.0 2022-04-08 16:00:32 +01:00
Simon Backx
ed18d63450 Improved mocked state generator for dashboard 5.0
refs https://github.com/TryGhost/Team/issues/1489

- Apart from newer sites (state with days < 30) the MRR will start to deviate from the paid members graph. This will normally also be the case for real sites.
- All graphs will be zeroed out if state 'no data' is selected.
- The generator is a bit too complex to make this happen. It was some trial and error, but doesn't matter that much since we'll nuke this code once 5.0 is out.
2022-04-08 11:26:59 +02:00
Simon Backx
7b12785c30 Synced the start date of members and MRR 'all time' charts (dashboard 5.0)
no issue

- When using 'all time' in the past, the start date of the total members/paid members chart would differ from the MRR chart. They are now synced.
- The start date is always the earliest date we have data for (MRR or member counts)
- The all time chart is minimum 90 days long
2022-04-08 10:04:42 +02:00
Simon Backx
b3bb12a4ce Fixed swapped paid members and MRR chart in anchor chart
no issue

When selecting 'paid members', the MRR chart was shown and vice versa.
2022-04-08 09:54:29 +02:00
Simon Backx
0d7ada66b3 Replaced usage of older MRR stats endpoint with new endpoint
refs https://github.com/TryGhost/Team/issues/1470

- Correctly uses the highest value currency in the MRR graph
2022-04-08 09:51:30 +02:00
Kevin Ansfield
738dbba82a Fixed moving border when hovering default newsletter
no issue

- when displaying only the default newsletter there's no option to drag/re-order but the border was still moving on hover as it does when displaying the drag handle
- updated the class name to take `displayingDefault` into account when adding the draggable class
2022-04-07 17:04:08 +01:00
Kevin Ansfield
e433f8b9cf Added drag-and-drop sorting of newsletters
closes https://github.com/TryGhost/Team/issues/1483

- updated newsletters list to use `<SortableObjects>` and `<DraggableObject>`
- swapped the `filteredNewsletters` reactive getter for a tracked property because `<SortableObjects>` replaces the value with a new array when re-ordering which isn't compatible with a getter
  - required explicit update of the list any time the list should change through filter swap, archive, unarchive
  - required explicit update of the list via router event when leaving the "new newsletter" route so any newly added newsletter can be displayed
- added action for handling update of `sort_order` properties when a re-order occurs
  - updates every newsletter setting `sort_order` of the active newsletters first based on the new order, followed by all archived newsletters following their existing order
- disabled sorting of newsletters in the archived newsletters list
  - hides the grab handle and disables the resize on hover
  - allowing re-order of archived newsletters would complicate the re-order+save algorithm and re-ordering archived newsletters doesn't have a use-case
2022-04-07 16:42:50 +01:00
Simon Backx
43679ae4b7 Added staff picks component to dashboard 5.0
refs https://github.com/TryGhost/Team/issues/1487

- Fetches the staff picks from the RSS feed
- Shows the first 5 staff picks (amount is adjustable)
- Adds utm_source=ghost to external links
- Includes a temporary CSS class to keep it a bit orderly
2022-04-07 15:24:50 +02:00
Kevin Ansfield
670a10d8ed Updated newsletter model - removed default and added slug
refs https://github.com/TryGhost/Ghost/pull/14428
refs https://github.com/TryGhost/Ghost/pull/14436

- `default` is now represented by the first newsletter when ordered by `sort_order`
- `slug` has been added to match pattern for all resources used in filter queries to have a slug
  - no current use-case so it's not exposed in the UI
2022-04-07 13:50:16 +01:00
Simon Backx
7833da8365 Added latest newsletters to dashboard 5.0
refs https://github.com/TryGhost/Team/issues/1488

- Includes a new component that fetches the latest X newsletters.
- Displays these newsletters using design from old dashboard.
- Currently shows 10 newsletters, but we'll want to change that later.
- Temporary CSS class added.
2022-04-07 13:02:58 +02:00
Simon Backx
811aa92394 Fixed loading of paid mix chart
no issue

Moved did-insert to native DOM element.
2022-04-07 10:34:21 +02:00
Kevin Ansfield
6c1bf5ccdb Reset warning threshold dates on linter errors
refs https://github.com/TryGhost/Ghost/issues/14101

- the Octane-related codemods have not been fully completed yet meaning the linter error list is still too large to effectively manage piecemeal
- reset the `.lint-todo` file to add another 30 days before the warnings show up when running `yarn lint:hbs`
2022-04-06 19:41:12 +01:00
James Morris
560d862d91 The big cleanup (#2328)
* Trying out a tooltip alternative for combined graph in new dashboard

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

* Trying out a different type of interaction with the combined graph for the new dashboard that includes different style

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

* Working through the interface and code to majorly clean up for the new Dashboard

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

- lots of moving around css
- trying out some different layouts
- refactoring lots of code
- known bug: paid graphs don't work
- known bug: without newsletters, layout breaks

* Finishing up the basic styling of the new dashboard to be more presentable

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

- add an animation between the top metrics on combined graph
- ensure all graphs are responsive to parent container
- refactor many of the components and tidy up the styles
- tighten up spacing, headers, chart heights and more
- make the tooltip hovers a little more presentable
- balance the colors to be more muted, for the moment
- a million other tiny tweaks
2022-04-06 18:11:46 +01:00
Simon Backx
9b8875c4be Added Whats New component to Dashboard 5.0
refs https://github.com/TryGhost/Team/issues/1486

Includes a new component that correctly fetches the changelog and displays them in the old format (still requires some design changes).
2022-04-06 15:43:41 +02:00
Kevin Ansfield
e3de4ee704 Wired up active/archived newsletter filter
closes https://github.com/TryGhost/Team/issues/1476

- added dropdown for switching between active and archived newsletters
- modified the "default" newsletter display so it's only activated when a single active newsletter is shown
- added ability to un-archive a newsletter with a switch between "archive" and "un-archive" actions based on newsletter status
  - if all archived newsletters are un-archived, automatically switches to "active" filter so you're not left with an empty list
2022-04-06 13:18:07 +01:00
Kevin Ansfield
e5c26aac89 Added newsletter dropdown to publish menu
closes https://github.com/TryGhost/Team/issues/1479

- updated post adapter to append `?newsletter_id=xyz` when passed a `newsletterId` adapterOption
- updated editor save task to pass `options.newsletterId` through as `adapterOptions.newsletterId`
- set up `post.newsletter` relationship ready for handling embedded newsletter association from the API
  - explicitly deleted when serializing back to the API as it doesn't yet ignore the attribute
- updated `<GhPublishmenu>` for newsletter support
  - fetches newsletters on first render so they are available in the dropdown
  - sets "default" (first in the ordered list) newsletter as the initially selected newsletter
  - adds newsletter dropdown to draft publish menu
  - passes `newsletterId` option to editor save task when it's set

This is a minimal implementation for testing. Not included:
- correct free/paid member counts based on selected newsletter
- correct member count in confirmation modal
- indication of selected newsletter for scheduled post
2022-04-06 10:22:06 +01:00
Naz
114b359ab7 Reverted Accept-Version header usage in Admin API communication
closes https://github.com/TryGhost/Toolbox/issues/222
refs https://github.com/TryGhost/Toolbox/issues/227
refs 74735ab59c
refs e23ae31e8f

- The usecases for the Accept-Version header have shown we should not be exposing the users of the clients we control to unnecessary notification about client-API incompatibility. Ghost-Admin is one of those clients that is always expected to be up to date with the version of Ghost it ships with, so the Accept-Version header should not be used here
2022-04-06 10:12:09 +08:00
Daniel Lockyer
94115ac3be Added 5.0 branch to CI trigger
refs https://github.com/TryGhost/Toolbox/issues/273

- ahead of v5, we need to branch off and run CI on the development
  branch
2022-04-05 09:28:12 +01:00
Kevin Ansfield
6e0be9e175 Wired up newsletter management with real newsletter model and API
refs https://github.com/TryGhost/Team/issues/1441

- switched "leave settings" confirmation modal on members email settings screen over to modern modal pattern
- removed unused `showEmailDesignSettings` property and `closeEmailDesignSettings()` action on `<Settings::MembersEmailLabs>` component
  - the used property and action live on the controller, looks like it was a copy/paste hangover when functionality was moved to a component
- added newsletter model
  - includes design-related attributes which are not yet supported by the API but are due to be added
  - includes `default` attribute but there is no setting for it, due to be removed from the API but it's needed for save not to error for now
  - set up basic mirage model and endpoints
  - added validation for main settings to match API validation
- added `EditNewsletter` modal
  - separate tabs for general newsletter settings and design-related settings
  - used for both creating and editing newsletters
- added `/settings/members-email/newsletters/new` and `/settings/members-email/newsletters/:id` routes
  - both display the `EditNewsletter` modal on top of the members-email settings screen with the appropriate newsletter model
- updated `<Settings::MembersEmailLabs::NewsletterManagement>` component to work with real newsletter model instances and the new add/edit routes
- removed now-unused `newsletter` service that was providing mocked data for earlier design iteration
2022-04-04 19:30:52 +01:00
Daniel Lockyer
4be3c3b53f Merged v4.42.1 into main
v4.42.1
2022-04-04 10:40:22 +01:00
Daniel Lockyer
0880b3dd85 v4.42.1 2022-04-04 10:39:50 +01:00
Kevin Ansfield
7e915fa675 🐛 Fixed incorrect modal heights
closes https://github.com/TryGhost/Ghost/issues/14416
refs 1357390ac5

- after switching to a proper package version of our `ember-promise-modals` fork the addon's CSS was injected into the vendor file causing conflicts with our own modal styling
- added `align-items: unset` style override on `.epm-modal-container` so we're not fighting the addon's default `align-items: center;` style
2022-04-04 10:27:40 +01:00
Kevin Ansfield
4c4591894e 🐛 Fixed incorrect modal and theme preview positioning
closes https://github.com/TryGhost/Ghost/issues/14415

- after switching to a proper package version of our `ember-promise-modals` fork the addon's CSS was injected into the vendor file causing conflicts with our own modal styling
- added `transform: none` style override on `.epm-modal` so we're not fighting the addon's default `translate(0, -30vh) scale(1.1);` transform
2022-04-04 10:27:30 +01:00
Kevin Ansfield
9ab2f5dd3e 🐛 Fixed incorrect modal heights
closes https://github.com/TryGhost/Ghost/issues/14416
refs 1357390ac5

- after switching to a proper package version of our `ember-promise-modals` fork the addon's CSS was injected into the vendor file causing conflicts with our own modal styling
- added `align-items: unset` style override on `.epm-modal-container` so we're not fighting the addon's default `align-items: center;` style
2022-04-04 09:55:33 +01:00
Kevin Ansfield
1357390ac5 🐛 Fixed incorrect modal and theme preview positioning
closes https://github.com/TryGhost/Ghost/issues/14415

- after switching to a proper package version of our `ember-promise-modals` fork the addon's CSS was injected into the vendor file causing conflicts with our own modal styling
- added `transform: none` style override on `.epm-modal` so we're not fighting the addon's default `translate(0, -30vh) scale(1.1);` transform
2022-04-04 09:43:54 +01:00
Kevin Ansfield
86598fbd76 Extracted newsletter management section into separate component
refs https://github.com/TryGhost/Team/issues/1441

- pulls newsletter-related functionality into one place to keep higher-level components from knowing about too many concepts and becoming bloated
- updated temporary newsletters service to have fully tracked objects so the `active/archivedNewsletters` properties can be closer to how they will work with full models
2022-04-03 22:14:07 +01:00
Kevin Ansfield
ec5a080d56 Converted <Settings::MembersEmailLabs> to Glimmer component
refs https://github.com/TryGhost/Team/issues/1441

- bringing code up to more modern style ready for further development
2022-04-03 22:14:07 +01:00
James Morris
93f30eadb7 Added little copy tweak to engagement charts to be clearer
refs: https://github.com/TryGhost/Team/issues/1462
2022-04-01 17:09:17 +01:00
James Morris
298e9b4d04 Further tweaks to the new dashboard to make it feel a little nicer
refs: https://github.com/TryGhost/Team/issues/1462
2022-04-01 17:04:39 +01:00
Daniel Lockyer
e4364eaa91 v4.42.0 2022-04-01 16:00:40 +01:00
James Morris
8fe18d7e30 Dashboard consolidated graph (#2323)
* Basic work to combine the three line graphs for the new dashboard

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

- combined three line graphs into one main one at the top
- still working on this, so some code is a little rough

* Tidying up a few bits of consolidated graph in new dashboard

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

* Updated chart anchor component for removed member counts

no issue

* Updated chart paid members to not reload on days change

no refs

* Moved did-insert to top element in chart-anchor

* Fixed chart anchor to use filled member data

* Replaced chart anchor divs with buttons

* Tweaking up the paid graphs below anchor to improve visuals

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

* Fixed missing type attributes on buttons in chart anchor

* Updated MMR to MRR for the new consolidated graph

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

* Added real MRR to chart anchor

* Added open rate percentage data to chart email

Co-authored-by: Simon Backx <simon@ghost.org>
2022-04-01 14:53:55 +01:00
Kevin Ansfield
da972bfe58 🐛 Fixed non-functioning "Leave" button on unsaved-changes confirmation modals
no issue

- bumped version of our `ember-promise-modals` fork containing a workaround for modal promises missing their return values
  - upstream issue: https://github.com/simplabs/ember-promise-modals/issues/565
- switched from a GitHub ref to a proper published package to avoid issues with yarn not bumping versions of the fork for developers who installed an earlier version
2022-04-01 12:47:08 +01:00
Peter Zimon
626634246f Updated Portal mock for offers (#2319)
Updated the preview block of offer creation screen to match the new style of Portal.
2022-04-01 13:22:41 +02:00
Simon Backx
0023695a29 Implemented loadSiteStatus in dashboard 5.0 stats service
refs https://github.com/TryGhost/Team/issues/1468

- Implemented loadSiteStatus with real data
- Replaced unused stripeEnabled with hasMultipleTiers
- hasMultipleTiers=false hides the tiers paid mix chart
- Improved loading and updating fake state
- Removed deprecated loadMembersCounts method in dashboard stats service
2022-04-01 10:51:15 +02:00
Kevin Ansfield
623825f8f0 🐛 Fixed scheduled send-only post switching to publish+send when rescheduling
closes https://github.com/TryGhost/Ghost/issues/14354

When setting/cleaning up the publish menu state we were incorrectly reverting to the default "publish & send" state when a post was already set to be email-only. This resulted in an unexpected and non-obvious switch to "publish & send" when re-scheduling a scheduled email-only post.

- updated the publish menu setup and cleanup routines to account for scheduled, email-only posts
- fixed the header in the publish menu to say "sent" rather than "published" when an email-only post is scheduled
2022-03-31 17:11:06 +01:00
Simon Backx
37ee53bb4a Renamed stats endpoint member again
refs 759e362a30
2022-03-31 17:11:36 +02:00
Simon Backx
09f4d9b373 Changed member count stats endpoint URL
refs https://ghost.slack.com/archives/C02G9E68C/p1648737467414789?thread_ts=1648644801.253699&cid=C02G9E68C
2022-03-31 17:06:48 +02:00
Simon Backx
01b411de85 Added paid mix chart implementation for dashboard 5.0
refs https://github.com/TryGhost/Team/issues/1443

- Includes support for 'all' data in member count charts
- Fixed reloading of MRR data when switching between days
- Loading data now always returns a 'promise' instead of just dropping it
- Tiers and cadence paid mix chart added
- Defaults to mocked data = off (required to prevent loading paid mix tiers on page load)
- Note that there is still some discussion about the correctness of the tiers paid mix data, refs Slack https://ghost.slack.com/archives/C02G9E68C/p1648717224956659
2022-03-31 16:22:49 +02:00
Simon Backx
4cae27f5e2 Replaced custom member counting queries with MembersCountCacheService
no issue

- Replaced custom member counting queries with the MembersCountCacheService
- Results are reused if they were already fetched less then 60 seconds ago
- Fixed logic in MembersCountCacheService to only return old results (> 60) instead of new results (<= 60)
2022-03-31 16:09:41 +02:00
Simon Backx
5b120d5574 Updated member count charts to use the new Stats API
refs https://github.com/TryGhost/Team/issues/1443
refs https://github.com/TryGhost/Team/issues/1458
refs https://github.com/TryGhost/Team/issues/1459

- Includes the new paid members chart (deltas)
- Reused the counts from the stats endpoint, instead of doing separate calls to the members api browse endpoint.
2022-03-31 16:09:41 +02:00
Kevin Ansfield
78e08af003 Fixed newsletter settings tests
refs a4ca693871

- label's "for" was removed to enable more direct use of the checkbox enabling keyboard usage but the test was not updated to reflect the change
2022-03-31 11:37:38 +01:00