Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merge #1

Merged
merged 186 commits into from
Oct 24, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
186 commits
Select commit Hold shift + click to select a range
bd0f4b4
Added Tier price and currency data to products table (#15366)
allouis Oct 14, 2022
8afc677
🐛 Removed redirects from search engine indexing (#15617)
allouis Oct 14, 2022
370ded5
Stored price and currency data on Tiers when creating & editing
allouis Oct 14, 2022
60ce10b
Fixed up more like this and newsletter clicks table at narrower viewp…
moreofmorris Oct 14, 2022
e074676
Updated engagement bar metrics so when no link it doesn't hover
moreofmorris Oct 14, 2022
e831be6
Added the feedback buttons in the emails (#15619)
lenabaidakova Oct 14, 2022
4e3afad
v5.19.0
github-actions[bot] Oct 14, 2022
097b232
Fix newsletter links (#15621)
djordjevlais Oct 14, 2022
d381ff8
Added ability to handle feedback links from emails (#15622)
lenabaidakova Oct 14, 2022
46141ef
Updated test snapshot after bumping Portal (#15623)
lenabaidakova Oct 14, 2022
fdff881
Bumped portal package.json to latest version
rishabhgrg Oct 14, 2022
54c143a
Fixed optional syntax style for jsdoc
daniellockyer Oct 16, 2022
6b7088b
Bumped `kg-lexical-html-renderer` version
ronaldlangeveld Oct 17, 2022
fd94015
Fixed unnecessary requests with loading comment counts
daniellockyer Oct 17, 2022
7ac0fdb
Fixed unnecessary requests with loading comment counts
daniellockyer Oct 17, 2022
1dab16c
Added handling for unsuccessful comments API requests
daniellockyer Oct 17, 2022
eb30e46
Added handling for unsuccessful comments API requests
daniellockyer Oct 17, 2022
378a6f9
Fixed loading animation for Safari
peterzimon Oct 17, 2022
7a0c6de
Added imageUpload function to Lexical Editor (#15634)
ronaldlangeveld Oct 17, 2022
f63fef1
Update dependency util to v0.12.5
renovate[bot] Oct 17, 2022
e9587e0
Update dependency mocha to v10.1.0
renovate[bot] Oct 17, 2022
66c2d37
🐛 Fixed 404 collection links for new tags
naz Oct 17, 2022
9a2fcba
v5.19.1
github-actions[bot] Oct 17, 2022
b6d2d97
Merged v5.19.1 into main
daniellockyer Oct 17, 2022
22fe1c0
Added conversions count and separate analytics page (#15637)
SimonBackx Oct 17, 2022
f78f264
Fixed PromiseObject related errors thrown from members activity list …
kevinansfield Oct 17, 2022
0bb7538
Added feedback events to activity feed (#15639)
SimonBackx Oct 17, 2022
0ba3d6d
Added support for supplying the foreign key constraint name
daniellockyer Oct 14, 2022
c9d43b8
Allowed `constraintName` in schema column spec
daniellockyer Oct 18, 2022
2d324ea
Fixed various code nits with schema command utils
daniellockyer Oct 18, 2022
3858f25
Dropped nullable status on `subscriptions.tier_id`
daniellockyer Oct 18, 2022
18c52f2
Improved jsdoc for permission migration utils
daniellockyer Oct 18, 2022
d1e6870
🐛 Fixed large mailgun recipient data (#15638)
SimonBackx Oct 18, 2022
14a259b
v5.19.2
github-actions[bot] Oct 18, 2022
a014b58
Added design for success and error states for editing newsletter links
djordjevlais Oct 18, 2022
2dcc413
Merged v5.19.2 into main
daniellockyer Oct 18, 2022
95cfb48
Fixed broken `ember-svg-jar` asset viewer
kevinansfield Oct 18, 2022
2f43e71
Update dependency ember-template-lint to v4.16.0
renovate[bot] Oct 18, 2022
a01fb5f
Added post_id filter and total to activity feed API (#15650)
SimonBackx Oct 18, 2022
8ecf0a5
🐛 Fixed alpha feature visible in new newsletters
SimonBackx Oct 18, 2022
a822c5a
Added test to check if feedback buttons are hidden if alpha flag is d…
SimonBackx Oct 18, 2022
e1e5a7b
v5.19.3
github-actions[bot] Oct 18, 2022
9b8c334
Merged v5.19.3 into main
daniellockyer Oct 18, 2022
6eaeaad
Update dependency ember-template-lint to v4.16.1
renovate[bot] Oct 18, 2022
fbc23a6
Refactored Tiers logic into separate package
allouis Oct 18, 2022
4f54cbc
Supported payment URL in Portal
allouis Oct 19, 2022
6b46f3f
Made edit link button always visible
djordjevlais Oct 18, 2022
e3c03bb
Added newsletter links editing explanation text
djordjevlais Oct 18, 2022
d14dd3e
Fixed overflow for newsletter links
djordjevlais Oct 18, 2022
7a13899
Updated JSDoc and fixed typos
naz Oct 14, 2022
6c9cfe8
Fixed typo
naz Oct 17, 2022
f38950c
Fixed typo
naz Oct 13, 2022
bc70835
Increased test coverage
naz Oct 13, 2022
1c746c0
Added test coverage for 'subscribed' transform
naz Oct 13, 2022
971a562
Added JSDoc to members csv parser
naz Oct 13, 2022
4300f14
Removed hidden row mapping in csv parser
naz Oct 13, 2022
d165a00
Extracted MembersCSVImporter to a builder method
naz Oct 13, 2022
2175d64
Added future investigation note
naz Oct 13, 2022
812973d
Removed unused concept of "status" in importer job
naz Oct 13, 2022
8dc630b
Removed cleaned up use of "Job" object
naz Oct 13, 2022
c08d4f8
Added basic test coverage for perform method
naz Oct 13, 2022
f0b6884
Moved header mapping configuration to importer
naz Oct 13, 2022
f1e45f4
Cleaned up test case names
naz Oct 13, 2022
eca4b14
Cleaned up csv parse test suite
naz Oct 13, 2022
c0a415e
Added strict header mapping parsing
naz Oct 18, 2022
1317500
Migrated CSV parser tests to 'assert'
naz Oct 18, 2022
9389064
Removed unused error message
naz Oct 18, 2022
748ef87
Made running the import outside of job on test env
naz Oct 19, 2022
90768e9
Added strict field mapping to member CSV importer
naz Oct 19, 2022
b589a66
Fixed broken CSV importer tests
naz Oct 19, 2022
c65b980
Added tabs component (#15652)
lenabaidakova Oct 19, 2022
17cfdcd
Updated feedback buttons url (#15655)
lenabaidakova Oct 19, 2022
68955aa
Remove Grunt from `yarn setup` in Ghost core
sam-lord Oct 19, 2022
b310b3a
Added design for edited state of newsletter links
djordjevlais Oct 19, 2022
3db8fb5
Wired newsletter link success/error states
rishabhgrg Oct 19, 2022
6380b82
Added sentiment ordering and include for posts (#15657)
SimonBackx Oct 19, 2022
e6bde03
Fixed period filter not appearing on smaller screens on dashboard
djordjevlais Oct 19, 2022
ca28ba8
Added edited state for newsletter links
rishabhgrg Oct 19, 2022
88bda6e
Handled no empty sources for attribution table
rishabhgrg Oct 19, 2022
79142c0
Fixed up the more like this event icons as they were too large
moreofmorris Oct 19, 2022
93e999e
Update dependency mocha to v10.1.0
renovate[bot] Oct 19, 2022
60b10ad
Fixed permissions for links endpoint (#15656)
rishabhgrg Oct 20, 2022
eaf6c5d
Update dependency ember-svg-jar to v2.4.1
renovate[bot] Oct 20, 2022
14dfd61
Update peter-evans/create-or-update-comment digest to 7305482
renovate[bot] Oct 18, 2022
318a5a8
Added permissions for link edit endpoints (#15664)
rishabhgrg Oct 20, 2022
02c8690
Added `ghost_subscription_id` column to `members_stripe_customers_sub…
daniellockyer Oct 14, 2022
0978a80
Refactored TiersAPI to use core slug generation
allouis Oct 20, 2022
3811169
Fixed visibility property on Tiers
allouis Oct 20, 2022
b607bee
Updated Tier to use camelCase property names
allouis Oct 20, 2022
581164e
Updated Tier welcomePageURL to be a string rather than URL
allouis Oct 20, 2022
dfa8836
Fixed trialDays validation to default to 0
allouis Oct 20, 2022
93e392f
Added error messages for monthly & yearly price validation
allouis Oct 20, 2022
9e7b009
Fixed edit method to accept a string
allouis Oct 20, 2022
6614aa9
Fixed add method for TiersAPI
allouis Oct 20, 2022
03e0962
Removed garbage test
naz Oct 20, 2022
02698b4
Moved the resources to the new style
moreofmorris Oct 20, 2022
82ed104
Added 'getDefaultProduct' convenience method to product repo
naz Oct 20, 2022
5d5b77d
Fixed comped tier assignment
naz Oct 20, 2022
0e094b3
Reused getDefaultProduct where possible
naz Oct 20, 2022
d1d3c14
Added button for saving changes made to the link
djordjevlais Oct 20, 2022
5f92879
Added support for Tier events
allouis Oct 20, 2022
b14b743
Exported Tier events from tiers package
allouis Oct 20, 2022
0172fd3
Made default and editing states the same height
djordjevlais Oct 20, 2022
adf10f0
Added support for filtering email events by post_id (#15666)
SimonBackx Oct 20, 2022
40b8a83
Moving the post analytics layout closer to new design
moreofmorris Oct 20, 2022
d8bacf1
Added endpoint for fixing newsletter links
rishabhgrg Oct 18, 2022
6312b06
Added reset for link click count on edit
rishabhgrg Oct 18, 2022
ee145ed
Wired link update api on Admin
rishabhgrg Oct 20, 2022
d7b3721
Added edited property to links api
rishabhgrg Oct 20, 2022
71999a2
Updated success state for link update on Admin
rishabhgrg Oct 20, 2022
b4d16a7
Fixed first and last child padding in edit mode
djordjevlais Oct 20, 2022
ec126f0
Added missing dependencies for link tracking
rishabhgrg Oct 20, 2022
a0b5267
Improved responsiveness
djordjevlais Oct 20, 2022
bb18267
Deemphasized edited state
djordjevlais Oct 20, 2022
2325969
Fixed missing padding in post analytics header
djordjevlais Oct 20, 2022
e84e58f
Fixed unrelated elements sharing the same CSS class
djordjevlais Oct 20, 2022
dafdfc7
Vertically aligned icons
djordjevlais Oct 20, 2022
1435f0e
Fixed explanation text not showing when there's no pagination
djordjevlais Oct 20, 2022
3203714
Added retry button in error state
djordjevlais Oct 20, 2022
dcd607a
Fixed jumping of links on edit in analytics
rishabhgrg Oct 21, 2022
bbf6b95
Added filtered events tables to the analytics page (#15669)
lenabaidakova Oct 21, 2022
1e1a155
Updated edited state font weight for better contrast
djordjevlais Oct 21, 2022
9e3e3d7
Removed unnecessary padding
djordjevlais Oct 21, 2022
910d13f
Updated save button handling for links
rishabhgrg Oct 21, 2022
1d4e632
Fixed row hover effects in dark mode
djordjevlais Oct 21, 2022
06365b1
Changed explainer text color and icon to deemphasize it
djordjevlais Oct 21, 2022
25cbbff
Refined link edit flow on Admin
rishabhgrg Oct 21, 2022
ba6fe63
Fixed cached redirects for edited newsletter links
rishabhgrg Oct 21, 2022
50c9214
Fixed lint
rishabhgrg Oct 21, 2022
6c9f8ec
Improved URL syncing between Admin and Explore (#15640)
aileen Oct 21, 2022
6c2d057
Improved readability of unparse test
naz Oct 21, 2022
0d14791
Migrated unparse test suite to assert
naz Oct 21, 2022
77e8fdf
Removed test "utils" folder
naz Oct 21, 2022
850eb61
Added 100% unit test coverage to unparse
naz Oct 21, 2022
b552727
Changed members export to contain tiers
naz Oct 21, 2022
86a9695
Fixed date format for link bulk edit
rishabhgrg Oct 21, 2022
25f7664
Refined link edit cancellation on analytics page
rishabhgrg Oct 21, 2022
5b28393
Added e2e tests for `post.edited` webhook (#15625)
dshubhadeep Oct 21, 2022
4ba254b
Added e2e tests for `member.edited` webhook (#15620)
illiteratewriter Oct 21, 2022
092fb78
Added e2e tests for `page.edited` webhook (#15627)
shngt Oct 21, 2022
3d697fb
Updated explainer text design
djordjevlais Oct 21, 2022
f7738dc
Added e2e test for `post.unpublished` webhook (#15628)
Nekros1712 Oct 21, 2022
3d355ea
Fixed test snapshots
rishabhgrg Oct 21, 2022
8d13aa0
Quick tweak to max height when there are columns side-by-side
moreofmorris Oct 21, 2022
717a27c
Added e2e tests for `page.unpublished` webhook (#15613)
hthorhalls Oct 21, 2022
3ab1c41
Updated webhook test snapshots
ErisDS Oct 21, 2022
11bea8d
Better matching the pagination styles across modules for post analytics
moreofmorris Oct 21, 2022
a701f21
Added importer for custom theme settings (#15596)
illiteratewriter Oct 21, 2022
b4a178b
Moved the newsletter settings option for audience feedback based on f…
moreofmorris Oct 21, 2022
0533031
✨ Allowed fixing newsletter links (#15672)
rishabhgrg Oct 21, 2022
67c7426
v5.20.0
github-actions[bot] Oct 21, 2022
c2e43a0
Changing the metric to positive feedback rather than more like this
moreofmorris Oct 21, 2022
7d6cfc9
Making avatar initials smaller in the engagement bar
moreofmorris Oct 21, 2022
7c82455
Added new members filters and refactored filters (#15667)
SimonBackx Oct 21, 2022
5ef0753
Improved post activity feed table
SimonBackx Oct 21, 2022
a79c48e
Add in dummy rows and empty states to the engagement bar
moreofmorris Oct 21, 2022
39e246a
Removed bluebird from fixture-manager.js (#15629)
hthorhalls Oct 21, 2022
9720459
Added pie chart for activity feed (#15673)
lenabaidakova Oct 21, 2022
dbad621
Removed bluebird from `fixture-utils.js` (#15626)
hthorhalls Oct 21, 2022
b88a54f
🐛 Fixed redirect to signin modal not shown when logged out (#15522)
h2akim Oct 21, 2022
48b033f
🐛 Fixed missing unsaved changes modal for member newsletters (#15564)
h2akim Oct 21, 2022
ed12634
Lock file maintenance
renovate[bot] Oct 24, 2022
3021a7d
Update dependency eslint to v8.26.0
renovate[bot] Oct 24, 2022
66f92e6
Update dependency ember-auto-import to v2.4.3
renovate[bot] Oct 24, 2022
44f54fa
Update dependency inquirer to v8.2.5
renovate[bot] Oct 24, 2022
c8c89a9
Update dependency concurrently to v7.5.0
renovate[bot] Oct 24, 2022
9b2e4eb
Update dependency @babel/plugin-proposal-decorators to v7.19.6
renovate[bot] Oct 24, 2022
5f08c1b
Update dependency ember-svg-jar to v2.4.2
renovate[bot] Oct 24, 2022
603c787
Updated @tryghost dependencies (#15631)
renovate[bot] Oct 24, 2022
bbd6c47
Update dependency html-validate to v7.7.0
renovate[bot] Oct 24, 2022
0f03b5e
Released Portal v2.16.0
allouis Oct 24, 2022
a650ae2
Fixed default feedback enabled when flag is disabled (#15660)
SimonBackx Oct 24, 2022
fd91f7e
Added email sent events (#15682)
SimonBackx Oct 24, 2022
fda12d1
Added dark mode styles to the post analytics table
moreofmorris Oct 21, 2022
53e20f3
Rearranged the markup so the empty state shows ok without pie chart
moreofmorris Oct 24, 2022
840deaf
Restricted members importer to ignore "products" column
naz Oct 24, 2022
59209a0
Cleaned up leftover "product" variable naming
naz Oct 24, 2022
627b35a
Improved the error modals for audience feedback and newsletter unsubs…
moreofmorris Oct 24, 2022
4f934ac
Released Portal v2.17.0
moreofmorris Oct 24, 2022
7b0bf81
Released Portal v2.18.0
moreofmorris Oct 24, 2022
30ecaef
Update the portal version number
moreofmorris Oct 24, 2022
1f13889
Fixed snapshot tests
SimonBackx Oct 24, 2022
8c2f832
Added e2e tests for `post.unscheduled` webhook (#15675)
dom96 Oct 24, 2022
26d0499
Added e2e tests for `post.published.edited` webhook (#15642)
kritikash18 Oct 24, 2022
9f7a8a6
Renamed the member links to be something simpler on Post Analytics page
moreofmorris Oct 24, 2022
d260a7c
Updated webhook test snapshots
ErisDS Oct 24, 2022
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/migration-review.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ jobs:
if: github.repository_owner == 'TryGhost'
name: Create checklist comment
steps:
- uses: peter-evans/create-or-update-comment@6fcd282399b3c9ad0bd9bd8025b8fb2c18b085dd
- uses: peter-evans/create-or-update-comment@73054821735f5750dfe2ed26313889fde739e425
with:
issue-number: ${{ github.event.pull_request.number }}
body: |
Expand Down
2 changes: 1 addition & 1 deletion ghost/adapter-manager/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
],
"devDependencies": {
"c8": "7.12.0",
"mocha": "10.0.0",
"mocha": "10.1.0",
"should": "13.2.3",
"sinon": "14.0.1"
},
Expand Down
2 changes: 1 addition & 1 deletion ghost/admin/app/components/gh-explore-iframe.js
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,6 @@ export default class GhExploreIframe extends Component {
}

_handleSiteDataUpdate(data) {
this.explore.siteData = data.siteData;
this.explore.siteData = data?.siteData ?? {};
}
}
25 changes: 15 additions & 10 deletions ghost/admin/app/components/gh-resource-select.hbs
Original file line number Diff line number Diff line change
@@ -1,14 +1,19 @@
<GhTokenInput
<PowerSelect
@searchEnabled={{true}}
@options={{this.options}}
@selected={{this.selectedOptions}}
@disabled={{or @disabled this.fetchOptionsTask.isRunning}}
@optionsComponent={{component "power-select/options"}}
@allowCreation={{false}}
@renderInPlace={{this.renderInPlace}}
@selected={{this.selectedOption}}
@onChange={{this.onChange}}
@class="select-members"
@triggerClass="gh-resource-select-trigger"
@dropdownClass="gh-resource-select-dropdown"
@placeholder={{this.placeholderText}}
as |resource|
@renderInPlace={{this.renderInPlace}}
@disabled={{or @disabled this.fetchOptionsTask.isRunning}}
@optionsComponent={{component "power-select/options"}}
@search={{this.searchAndSuggest}}
@searchField={{this.searchField}}
@searchMessage={{@searchMessage}}
@searchPlaceholder={{this.searchPlaceholderText}}
as |resource|
>
{{resource.name}}
</GhTokenInput>
{{resource.title}}
</PowerSelect>
71 changes: 61 additions & 10 deletions ghost/admin/app/components/gh-resource-select.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
import Component from '@glimmer/component';
import {action} from '@ember/object';
import {A} from '@ember/array';
import {action, get} from '@ember/object';
import {
defaultMatcher,
filterOptions
} from 'ember-power-select/utils/group-utils';
import {inject as service} from '@ember/service';
import {task} from 'ember-concurrency';
import {tracked} from '@glimmer/tracking';
Expand All @@ -13,6 +18,45 @@ export default class GhResourceSelect extends Component {
return this.args.renderInPlace === undefined ? false : this.args.renderInPlace;
}

get searchField() {
return this.args.searchField === undefined ? 'name' : this.args.searchField;
}

@action
searchAndSuggest(term, select) {
return this.searchAndSuggestTask.perform(term, select);
}

@task
*searchAndSuggestTask(term) {
let newOptions = this.flatOptions.toArray();

if (term.length === 0) {
return newOptions;
}

// todo: we can do actual filtering on posts here (allow searching when we have lots and lots of posts)
yield undefined;

newOptions = this._filter(A(newOptions), term);

return newOptions;
}

get matcher() {
return this.args.matcher || defaultMatcher;
}

_filter(options, searchText) {
let matcher;
if (this.searchField) {
matcher = (option, text) => this.matcher(get(option, this.searchField), text);
} else {
matcher = (option, text) => this.matcher(option, text);
}
return filterOptions(options || [], searchText, matcher);
}

constructor() {
super(...arguments);
this.fetchOptionsTask.perform();
Expand All @@ -38,9 +82,12 @@ export default class GhResourceSelect extends Component {
return options;
}

get selectedOptions() {
const resources = this.args.resources || [];
return this.flatOptions.filter(option => resources.find(resource => resource.id === option.id));
get selectedOption() {
if (this.args.resource.title) {
return this.args.resource;
}
const resource = this.args.resource ?? {};
return this.flatOptions.find(option => resource.id === option.id);
}

@action
Expand All @@ -55,16 +102,20 @@ export default class GhResourceSelect extends Component {
return 'Select a page/post';
}

get searchPlaceholderText() {
if (this.args.type === 'email') {
return 'Search emails';
}
return 'Search posts/pages';
}

@task
*fetchOptionsTask() {
const options = yield [];

if (this.args.type === 'email') {
const posts = yield this.store.query('post', {filter: '(status:published,status:sent)+newsletter_id:-null', limit: 'all'});
options.push({
groupName: 'Emails',
options: posts.map(mapResource)
});
options.push(...posts.map(mapResource));
this._options = options;
return;
}
Expand All @@ -74,8 +125,8 @@ export default class GhResourceSelect extends Component {

function mapResource(resource) {
return {
name: resource.title,
id: resource.id
id: resource.id,
title: resource.title
};
}

Expand Down
36 changes: 35 additions & 1 deletion ghost/admin/app/components/koenig-lexical-editor.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import * as Sentry from '@sentry/ember';
import Component from '@glimmer/component';
import React, {Suspense} from 'react';
import ghostPaths from 'ghost-admin/utils/ghost-paths';
import {action} from '@ember/object';
import {inject as service} from '@ember/service';

Expand Down Expand Up @@ -108,11 +109,44 @@ export default class KoenigLexicalEditor extends Component {
}

ReactComponent = () => {
const [uploadProgressPercentage] = React.useState(0); // not in use right now, but will need to decide how to handle the percentage state and pass to the Image Cards

// const uploadProgress = (event) => {
// const percentComplete = (event.loaded / event.total) * 100;
// setUploadProgressPercentage(percentComplete);
// };

async function imageUploader(files) {
function uploadToUrl(formData, url) {
return new Promise((resolve, reject) => {
const xhr = new XMLHttpRequest();
xhr.open('POST', url);
// xhr.upload.onprogress = (event) => {
// uploadProgress(event);
// };
xhr.onload = () => resolve(xhr.response);
xhr.onerror = () => reject(xhr.statusText);
xhr.send(formData);
});
}
const formData = new FormData();
formData.append('file', files[0]);
const url = `${ghostPaths().apiRoot}/images/upload/`;
const response = await uploadToUrl(formData, url);
const dataset = JSON.parse(response);
const imageUrl = dataset?.images?.[0].url;
return {
src: imageUrl
};
}
return (
<div className={['koenig-react-editor', this.args.className].filter(Boolean).join(' ')}>
<ErrorHandler>
<Suspense fallback={<p className="koenig-react-editor-loading">Loading editor...</p>}>
<KoenigComposer initialEditorState={this.args.lexical} onError={this.onError}>
<KoenigComposer
initialEditorState={this.args.lexical}
onError={this.onError}
imageUploadFunction={{imageUploader, uploadProgressPercentage}} >
<KoenigEditor onChange={this.args.onChange} />
</KoenigComposer>
</Suspense>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ export default class SourceAttributionTable extends Component {
return null;
}

if (this.sortedSources.length === 5 && !this.unavailableSource.length) {
if (this.sortedSources.length === 5 && !this.unavailableSource?.length) {
return null;
}

Expand Down
2 changes: 1 addition & 1 deletion ghost/admin/app/components/member/activity-feed.hbs
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
</div>
</div>
{{else}}
{{#let (members-event-fetcher filter=(members-event-filter [email protected]) pageSize=5) as |eventsFetcher|}}
{{#let (members-event-fetcher filter=(members-event-filter [email protected] excludedEvents=this.excludedEventTypes) pageSize=5) as |eventsFetcher|}}
<div class="gh-main-section-content grey {{if eventsFetcher.data "" "mt8"}}">
<div class="gh-member-feed {{if eventsFetcher.data "" "gh-member-feed-no-data"}}" ...attributes>
<div class="flex-auto flex flex-column items-stretch {{if eventsFetcher.data "justify-between" "h-100 justify-center"}}">
Expand Down
3 changes: 2 additions & 1 deletion ghost/admin/app/components/member/activity-feed.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ import {action} from '@ember/object';

export default class ActivityFeed extends Component {
linkScrollerTimeout = null; // needs to be global so can be cleared when needed across functions
excludedEventTypes = ['email_sent_event'];

@action
enterLinkURL(event) {
Expand All @@ -29,4 +30,4 @@ export default class ActivityFeed extends Component {
child.style.transform = 'translateX(0)';
parent.classList.remove('scroller');
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,12 @@ export default class MembersActivityEventTypeFilter extends Component {
if (this.settings.commentsEnabled !== 'off') {
extended.push({event: 'comment_event', icon: 'event-comment', name: 'Comments'});
}
if (this.settings.emailTrackClicks) {
extended.push({event: 'click_event', icon: 'event-click', name: 'Clicked link'});
}
if (this.feature.audienceFeedback) {
extended.push({event: 'feedback_event', icon: 'event-more-like-this', name: 'Feedback'});
}

if (this.args.hiddenEvents?.length) {
return extended.filter(t => !this.args.hiddenEvents.includes(t.event));
Expand Down
75 changes: 8 additions & 67 deletions ghost/admin/app/components/members/filter-value.hbs
Original file line number Diff line number Diff line change
Expand Up @@ -47,47 +47,15 @@
<GhResourceSelect
@onChange={{fn this.setResourceFilterValue @filter}}
@type={{this.resourceFilterType}}
@resources={{this.resourceFilterValue}}
@resource={{this.resourceFilterValue}}
/>
</div>

{{else if (eq @filter.type 'subscribed')}}
{{else if (eq @filter.valueType 'options')}}
<span class="gh-select">
<OneWaySelect
@value={{@filter.value}}
@options={{this.availableFilterOptions.subscribed}}
@optionValuePath="name"
@optionLabelPath="label"
@optionTargetPath="name"
@update={{fn @setFilterValue @filter}}
data-test-select="members-filter-value"
/>
{{svg-jar "arrow-down-small"}}
</span>

{{else if (eq @filter.type 'last_seen_at')}}
<GhDatePicker
@value={{@filter.value}}
@maxDate={{now}}
@maxDateError="Must be in the past"
@onChange={{fn @setFilterValue @filter}}
data-test-input="members-filter-value"
/>

{{else if (eq @filter.type 'created_at')}}
<GhDatePicker
@value={{@filter.value}}
@maxDate={{now}}
@maxDateError="Must be in the past"
@onChange={{fn @setFilterValue @filter}}
data-test-input="members-filter-value"
/>

{{else if (eq @filter.type 'status')}}
<span class="gh-select">
<OneWaySelect
@value={{@filter.value}}
@options={{this.availableFilterOptions.status}}
@options={{@filter.options}}
@optionValuePath="name"
@optionLabelPath="label"
@optionTargetPath="name"
Expand Down Expand Up @@ -132,46 +100,19 @@
{{on "input" (fn this.setInputFilterValue @filter)}}
{{on "blur" (fn this.updateInputFilterValue @filter)}}
{{on "keypress" (fn this.updateInputFilterValueOnEnter @filter)}}
data-test-input="members-filter-value"
data-test-input="members-filter-value"
/>
</div>

{{else if (eq @filter.type 'subscriptions.plan_interval')}}
<span class="gh-select">
<OneWaySelect
@value={{@filter.value}}
@options={{this.availableFilterOptions.subscriptionPriceInterval}}
@optionValuePath="name"
@optionLabelPath="label"
@optionTargetPath="name"
@update={{fn @setFilterValue @filter}}
data-test-select="members-filter-value"
/>
{{svg-jar "arrow-down-small"}}
</span>

{{else if (eq @filter.type 'subscriptions.status')}}
<span class="gh-select">
<OneWaySelect
@value={{@filter.value}}
@options={{this.availableFilterOptions.subscriptionStripeStatus}}
@optionValuePath="name"
@optionLabelPath="label"
@optionTargetPath="name"
@update={{fn @setFilterValue @filter}}
data-test-select="members-filter-value"
/>
{{svg-jar "arrow-down-small"}}
</span>

{{else if (eq @filter.type 'subscriptions.start_date')}}
{{else if (or (eq @filter.type 'last_seen_at') (eq @filter.type 'created_at'))}}
<GhDatePicker
@value={{@filter.value}}
@maxDate={{now}}
@maxDateError="Must be in the past"
@onChange={{fn @setFilterValue @filter}}
data-test-input="members-filter-value"
/>

{{else if (eq @filter.type 'subscriptions.current_period_end')}}
{{else if (eq @filter.valueType 'date')}}
<GhDatePicker
@value={{@filter.value}}
@onChange={{fn @setFilterValue @filter}}
Expand Down
Loading