Commit Graph

8989 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