Skip to content
This repository has been archived by the owner on Nov 28, 2022. It is now read-only.

Member details activity feed #1796

Merged
merged 13 commits into from
Dec 10, 2020
Merged

Conversation

sanne-san
Copy link
Member

No-ref

  • Rearranged Stripe info to display on the right
  • Added toggle buttons for Stripe subscription/customer info
  • Added activity feed to display received/opened emails

kevinansfield added a commit to TryGhost/SDK that referenced this pull request Dec 9, 2020
refs TryGhost/Admin#1796

- we've added some additional email related fields to the members API output which can't be set via the API, this causes errors when the client sends the same object back unless we explicitly strip the properties in the API schema
kevinansfield added a commit to kevinansfield/Ghost that referenced this pull request Dec 9, 2020
refs TryGhost/Admin#1796

We want to be able to display an email activity timeline in Ghost-Admin for each member. The quickest way to achieve that right now is to provide access to the `email_recipient` data for the member when fetching, this will allow clients to build up a timeline based on the event timestamps included with each email_recipient/email pair.

- sets up `email_recipients` relationship in `Member` model
- updates members API read endpoint to accept an `email_recipients` include parameter
  - appends `email_recipients.email` to the `withRelated` array when `email_recipients` is included so that we have data available for email subject and html/plaintext for previews
- updates members API output serializer to include the email_recipients object in the output
kevinansfield added a commit to TryGhost/Ghost that referenced this pull request Dec 10, 2020
…12471)

refs TryGhost/Admin#1796

We want to be able to display an email activity timeline in Ghost-Admin for each member. The quickest way to achieve that right now is to provide access to the `email_recipient` data for the member when fetching, this will allow clients to build up a timeline based on the event timestamps included with each email_recipient/email pair.

- sets up `email_recipients` relationship in `Member` model
- updates members API read endpoint to accept an `email_recipients` include parameter
  - appends `email_recipients.email` to the `withRelated` array when `email_recipients` is included so that we have data available for email subject and html/plaintext for previews
- updates members API output serializer to include the email_recipients object in the output
sanne-san and others added 13 commits December 10, 2020 11:31
No-ref

- Rearranged Stripe info to display on the right
- Added toggle buttons for Stripe subscription and customer info
- Added box to display activity feed for received and opened emails
requires TryGhost/Ghost#12471

- added `queryRecord()` to member adapter so `queryRecord('member', {id: x})` will hit `/members/:id/?query` instead of `/members/?id=x&query`
- updated member route to query member with `?include=email_recipients`
- added `EmailRecipient` model for access to event timestamps and email relationship setup
- added `<GhMemberActivityFeed>` component that accepts an EmailRecipients array and converts that into an activity list
- added support for `@model=emailInstance` to the email preview modal
- fixed a timing issue with email preview that could result in it showing blank content until the mobile/desktop toggle is used
@kevinansfield kevinansfield merged commit 36baf94 into master Dec 10, 2020
@kevinansfield kevinansfield deleted the member-details-activity-feed branch December 10, 2020 11:38
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
2 participants