Commit Graph

9037 Commits

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