Commit Graph

9901 Commits

Author SHA1 Message Date
Daniel Lockyer
1a955dceb4
Fixed showing default image for staff users
refs https://github.com/TryGhost/Toolbox/issues/356

- without this, users who have an account but no profile image will just
  show an empty background
2022-09-01 16:58:07 +01:00
Daniel Lockyer
df99e1aec3
Merged v5.12.3 into main
v5.12.3
2022-09-01 15:36:46 +01:00
Ghost CI
7650ecafeb v5.12.3 2022-09-01 15:36:17 +01:00
James Morris
245229e7b8 Little fix to stop weird positioning when showing help on members
no issue
2022-09-01 14:53:08 +01:00
James Morris
4f8526fd77 Improving the members page on mobile
no issue
2022-09-01 13:09:23 +01:00
Peter Zimon
8b831a68e8 Improved Audit log filter dropdown design
refs. https://github.com/TryGhost/Toolbox/issues/356

- the event filter list was a bit harder to parse without icons
2022-09-01 13:56:54 +02:00
Kevin Ansfield
04c3de8ffc Fixed tests that compared .textContent instead of .innerText with inline SVGs
refs 038600c350

- SVGs have titles now and title text content will be included in `element.textContent`
- updated tests that failed to use `.innerText` instead
  - via chai-dom's `.rendered.text()`
  - via direct access `find('.elem').innerText).to...`
2022-09-01 10:01:30 +01:00
renovate[bot]
d0103a6b31 Update sentry-javascript monorepo to v7.12.0 2022-09-01 08:48:54 +01:00
Kevin Ansfield
41313f6993 Replaced emberx-file-input addon with in-app implementation
refs https://github.com/TryGhost/Team/issues/1734

- resolves some deprecations raised by the addon which has fallen out of regular maintenance
- we were largely overriding much of the addon so the additional code was minimal, most of the changes were from updating to modern patterns
2022-08-31 22:21:31 +01:00
Daniel Lockyer
b376b0c4c9 Removed icon files from packaged tarball
refs 6290fd6deb

- following the referenced commit, all SVG icons should only be used
  with svg-jar and not externally loaded
- this means we are now shipping all the icon files in the packaged tarball, but
  they're unused once Admin is built
- this commit prevents the icons from being copied and bundled
2022-08-31 18:06:42 +01:00
Sanne de Vries
989c3ddd77 Fixed linting error 2022-08-31 16:57:13 +01:00
Sanne de Vries
6290fd6deb Cleaned up non-inlined usage of svg icons
No issue
2022-08-31 16:49:11 +01:00
Sanne de Vries
bef49576ba Fixed svg titles appearing in tests
Refs 038600c350

- In the reference commit I update config so that svg titles are only removed in production. This causes them to show in tests which causes tests to fail. Config has now been updated to only include svg titles in development.
2022-08-31 16:10:23 +01:00
James Morris
2a198c367e Reverting back some changes to try and fix failed tests
no issue
2022-08-31 16:07:12 +01:00
Kevin Ansfield
5985316b01 Only show failed tests in Admin CI output 2022-08-31 15:53:27 +01:00
Sanne de Vries
e7c25f84df Deleted unused image files
No issue
2022-08-31 15:48:17 +01:00
James Morris
ae28cdffbb Fixed the test for new member page based on changes
no issue
2022-08-31 15:16:32 +01:00
Sanne de Vries
038600c350 Prettified markup and added titles to all SVGs 2022-08-31 15:02:12 +01:00
Daniel Lockyer
874c696893
Fixed showing actor icons for deleted actors
refs https://github.com/TryGhost/Toolbox/issues/356

- if an actor has been deleted, their icon would just be blank
- we want to show the default user icon
- to accommodate this, and to improve some code along the way, I've also
  added `include=actor` to the API request so we get the actor inline in
  the response instead of sending off another request
- I should really switch to using models + the store at some point to
  cleanup parsing all the API responses manually
2022-08-31 14:57:41 +01:00
James Morris
d5bf2027dc Improved the members table on mobile
no issue
2022-08-31 14:48:06 +01:00
Peter Zimon
6483a068d4 Fixed responsive bug for What's new page
refs. https://github.com/TryGhost/Toolbox/issues/356

- The updated What's new page contained unnecessary buttons with external links on smaller size screens
2022-08-31 11:58:29 +02:00
Daniel Lockyer
d7500e0ad1
Merged v5.12.2 into main
v5.12.2
2022-08-30 16:58:46 +01:00
Ghost CI
a2edc7ea1b v5.12.2 2022-08-30 16:58:26 +01:00
Kevin Ansfield
80400fd303 Fixed linter error
no issue

- removal of unused import was missed after removing it's usage
2022-08-30 16:48:37 +01:00
Kevin Ansfield
bc185665a4 Removed use of ember-route-action-helper
refs https://github.com/TryGhost/Ghost/issues/14101
refs https://github.com/TryGhost/Team/issues/1734

- use of the helper was generating deprecation warnings when building Admin
- removed the single usage in favor of using `{{perform}}` directly on a controller task property as there was no need to go via the route
- changed naming of task properties to include a `...Task` suffix so it's clear when dealing with a task object
2022-08-30 16:44:50 +01:00
Kevin Ansfield
5bd66fd8b7 Migrated users.index controller to Octane patterns
refs https://github.com/TryGhost/Ghost/issues/14101

- dropped use of `{{action}}`
- dropped use of computed properties in favor of getters
2022-08-30 16:44:50 +01:00
Kevin Ansfield
5eec9c8ce2 Migrated <GhUserInvited> to Glimmer component
refs https://github.com/TryGhost/Ghost/issues/14101
2022-08-30 16:44:50 +01:00
Sanne de Vries
dbfcc5a733 Deleted all unused svg icons 2022-08-30 15:36:46 +01:00
Daniel Lockyer
0b0401d593 v5.12.1 2022-08-30 11:56:45 +01:00
Daniel Lockyer
fcd6360869
Cleaned up asset-delivery env config
- this is no longer needed because we don't do env-specific builds
2022-08-30 08:24:48 +01:00
renovate[bot]
ced7f41112
Update Test & linting packages 2022-08-29 15:21:11 +00:00
renovate[bot]
df2a97032d Update dependency testem to v3.9.0 2022-08-29 16:19:01 +01:00
Peter Zimon
16dc2be3cf Fixed post status UI bug
no refs.

- due to a regression the padding on the left of the post status indicator was set to zero
2022-08-29 10:59:56 +02:00
Daniel Lockyer
d986059a50 v5.12.0 2022-08-26 16:00:32 +01:00
Rishabh
5e2613b6ed Fixed lint
refs 594ef34871
2022-08-26 15:31:10 +05:30
Rishabh
74f94e85a4 Fixed lint for staff user test 2022-08-26 15:29:06 +05:30
Rishabh
76419f8ed4 Removed email alerts UI for non admin staff
refs https://github.com/TryGhost/Team/issues/1825
2022-08-26 15:24:28 +05:30
Rishabh Garg
594ef34871
Enabled member email alerts (#15321)
closes https://github.com/TryGhost/Team/issues/1825
closes https://github.com/TryGhost/Team/issues/1826

- allows site owners/admins to receive email notifications when somebody signs up, becomes paid, or cancels subscription
- owners/admins can set their email preference from staff settings
2022-08-26 09:38:12 +05:30
Simon Backx
977aba928c Updated admin lint todo 2022-08-25 18:13:48 +02:00
Simon Backx
da48f70267 Fixed empty member attribution filter loading state
refs https://ghost.slack.com/archives/C02G9E68C/p1661442387532489?thread_ts=1661419289.348579&cid=C02G9E68C

When filtering on attribution, the filter was already applied when the array was empty, causing an invalid NQL filter.
2022-08-25 18:03:32 +02:00
Simon Backx
d04276ab4d Fixed width flicking on full width for pages and posts
fixes https://github.com/TryGhost/Team/issues/1838

- The loading template was setting a different class
- That class is not used any longer
- Removed that part of the code
2022-08-25 17:26:50 +02:00
James Morris
50f027cccf Reordered the filtering in the dropdown for the member attribution
refs https://github.com/TryGhost/Team/issues/1854
2022-08-25 16:17:22 +01:00
Simon Backx
2bc79cd94f Updated attribution counts linking to editor if zero
refs https://github.com/TryGhost/Team/issues/1843

- Also fixes that attribution counts are hidden for contributors
2022-08-25 17:09:22 +02:00
James Morris
913ea4e54f Updated the activity page to now be called member activity
- This changes the page title
- This also changes the links to see more

refs https://github.com/TryGhost/Team/issues/1853
2022-08-25 16:07:22 +01:00
James Morris
22b0586667 Tweaks to column sizes for events and a way to show new event icons for feature flag
- Has better column widths and fixed a bug with the time one
- Now allows to show alternative icons for feature flag

refs https://github.com/TryGhost/Team/issues/1851
2022-08-25 16:01:53 +01:00
James Morris
b01a56e057 Adjustments to the event look in the table
- More adjustments to make the event stronger and the link lighter and less messy
- Checking in the icons but need to wire them up

refs https://github.com/TryGhost/Team/issues/1851
2022-08-25 16:01:53 +01:00
Simon Backx
38ce6ee66e Fixed blank line linting issue 2022-08-25 16:47:52 +02:00
Simon Backx
6e2579ec9d Moved parse-member-event helper to class syntax
no issue

- Added feature service in it
2022-08-25 16:42:19 +02:00
Peter Zimon
5f157efcd9 Added avatars to Audit log
refs. https://github.com/TryGhost/Toolbox/issues/356

- the list needed avatars and action icons to be able to easily scan who's doing a lot of actions and what actions have been done at the same time
2022-08-25 15:42:44 +02:00
James Morris
42dfa4c552 Fixed bug where MRR was coming after link in events
refs https://github.com/TryGhost/Team/issues/1851
2022-08-25 14:27:14 +01:00
James Morris
86a0f103e9 Going for a simpler design for events
- The extra column made sense logically but was causing too many issues
- Going to try the single setence again but change visual style to be easier to parse
- Making sure this works around the feature flag

refs https://github.com/TryGhost/Team/issues/1851
2022-08-25 14:20:01 +01:00
Simon Backx
59e796d321 Removed signup and conversion columns on members table
fixes https://github.com/TryGhost/Team/issues/1850

When member attribution is enabled, the signup or conversion columns are shown when filtering on them. This data is not yet available via the API when browsing members. So these columns are now hidden.
2022-08-25 14:20:00 +02:00
Simon Backx
9dbb2785bb Fixed members table filters and URL handling in admin
fixes https://github.com/TryGhost/Team/issues/1344
fixes https://github.com/TryGhost/Team/issues/1127

This fixes a couple of bugs with the filter menu on the members page in admin:

- When opening the members page, the filters property was passed back from the filter component to the members controller. This caused a bug that the filter columns where not visible on reload.
- Fixed handling invalid filter parameters
- When updating the URL, the members page now properly reloads
- Fixed a bug that 'falsy' values in the NQL filter were removed on reload:
    - Filtering on unsubscribed members was gone after a page reload
    - Filtering on 0 emails was gone after a page reload
    - This is fixed by converting numbers and booleans to strings after parsing the NQL-filter
- Fixed a bug where boolean values didn't match any value in the select menu, causing the default option to be visible
    - Filtering members by 'unsubscribed' -> parsed as false (boolean) -> select menu opened -> false value (boolean) didn't match 'false' (string) so the first option was shown instead (subscribed).
    - This is also fixed by converting numbers and booleans to strings after parsing the NQL-filter

The way this is currently handled is not great. The parsing happens in the filter component, but should happen on a different layer, maybe in a different helper.
This is tracked here: https://github.com/TryGhost/Team/issues/1849
2022-08-25 14:10:18 +02:00
James Morris
403d24a01b Locked the status column so it works better at larger screen sizes
refs https://github.com/TryGhost/Team/issues/1848
2022-08-25 12:30:39 +01:00
Peter Zimon
2819dfd2ba Re-aligned post status
no refs.

- the post status was too much floating in the post list, especially on large screens
2022-08-25 13:29:50 +02:00
Peter Zimon
a94e9b2e74 Updated Audit log table view
refs. https://github.com/TryGhost/Toolbox/issues/356

- the readability of the Audit log table wasn't great as the very repetitive "actor" was the primary info
- the link to the actor (staff user) was missing
2022-08-25 13:09:38 +02:00
Rishabh Garg
da62355e18
Wired email alert settings for staff users on admin (#15313)
refs TryGhost/Team#1826

- allows staff users to manage their email alert settings behind the flag
- only owner and admin users are able to toggle their email alerts
2022-08-25 15:47:14 +05:30
James Morris
b51d81843b Move back away from membership to subscription wording for events
refs https://github.com/TryGhost/Team/issues/1847
2022-08-25 10:58:58 +01:00
James Morris
258192e47c Moved from attribution to better copy
refs https://github.com/TryGhost/Team/issues/1845
2022-08-25 10:47:11 +01:00
Simon Backx
2099d1b3ee Added link to filtered members page on attribution counts
refs https://github.com/TryGhost/Team/issues/1843

- Added link to filtered members list when clicking the signup or conversion member counts in the posts and pages table
- Temporary hover style added
2022-08-25 11:37:45 +02:00
Simon Backx
7d2f49a0a8 Cleaned up admin posts list item template for contributors
no issue

Contained some template code that would never be used and fixed email icon.
2022-08-25 11:04:53 +02:00
Rishabh
7182ee0e85 Added feature flag for email alerts
refs https://github.com/TryGhost/Team/issues/1826

- adds alpha flag for setting up email alerts for staff users
2022-08-25 13:03:13 +05:30
renovate[bot]
966d324e7f
Update dependency eslint-plugin-react to v7.31.0 2022-08-25 01:35:14 +00:00
James Morris
0142b4535a Update the event output to be less verbose
- Some events take up quite a bit of space and so want to be less verbose
- Playing with where to add joins in the interface
- Remove references of subscription unless it's for email

refs https://github.com/TryGhost/Team/issues/1840
2022-08-24 17:06:14 +01:00
James Morris
9f4ad3d8d4 A few tweaks to the member detail page attribution data
- Changed how the links looked in both areas
- Made sure the layout didn't break with longer titles

refs https://github.com/TryGhost/Team/issues/1817
2022-08-24 16:53:46 +01:00
James Morris
e9813150eb Adding in sticky headers to posts and pages behind a feature flag
- Adding sticky headers so columns are easier to read and parse
- These are working only behind the feature flag
- Checked against narrower viewports and dark mode

refs https://github.com/TryGhost/Team/issues/1837
2022-08-24 16:53:46 +01:00
Simon Backx
f124d142c9 Added member attributions to activity feed (#15283)
refs https://github.com/TryGhost/Team/issues/1833
refs https://github.com/TryGhost/Team/issues/1834

We've added the attribution property to subscription and signup events when the
flag is enabled. The attributions resource is fetched by creating multiple relations
on the model, rather than polymorphic as we ran into issues with that as they can't
be nullable/optional.

The parse-member-event structure has been updated to make it easier to work with,
specifically `getObject` is only used when the event is clickable, and there is now a 
join property which makes it easier to join the action and the object.
2022-08-24 11:17:28 -04:00
Daniel Lockyer
05e32b3ea5
Improved Audit log filtering UI
refs https://github.com/TryGhost/Toolbox/issues/356

- the existing structure of 1 checkbox per resource was becoming unsustainable
  as we added events for more resources
- instead, we're going to group resources together into categories so
  they can be disabled/enabled together
- this implements that, and also enables showing Tier and Offer events
  now we have something that works nicely
2022-08-24 17:03:12 +02:00
Daniel Lockyer
663204d308
Cleaned up unused icon definitions
- these were leftover from when I copied the Member's Activity Feed
  code, but they were also unused there too
2022-08-24 17:03:12 +02:00
Fabien "egg" O'Carroll
3c431bd8da Revert "Added member attributions to activity feed (#15283)"
This reverts commit e986b78458.

The tests were not passing for the PR and it was erroneously
merged into main
2022-08-24 11:01:47 -04:00
Simon Backx
e986b78458
Added member attributions to activity feed (#15283)
refs https://github.com/TryGhost/Team/issues/1833
refs https://github.com/TryGhost/Team/issues/1834

We've added the attribution property to subscription and signup events when the
flag is enabled. The attributions resource is fetched by creating multiple relations
on the model, rather than polymorphic as we ran into issues with that as they can't
be nullable/optional.

The parse-member-event structure has been updated to make it easier to work with,
specifically `getObject` is only used when the event is clickable, and there is now a 
join property which makes it easier to join the action and the object.
2022-08-24 10:11:25 -04:00
Daniel Lockyer
ab8952dd46 v5.11.0 2022-08-24 15:04:56 +01:00
Rishabh
968380132b Allowed setting expiry for complimentary subscriptions
closes https://github.com/TryGhost/Team/issues/1727

- allows site owners to give cardless free trials to members by setting expiry on complimentary subscriptions
- also allows complimentary members to upgrade as paid member
2022-08-24 19:24:31 +05:30
Rishabh
326bb97d2c Enabled free trials via tiers and offers
refs https://github.com/TryGhost/Team/issues/1724
refs https://github.com/TryGhost/Team/issues/1726

- allows site owners to add a default free trial period to their tiers
- allows site owners to create custom offers that allow free trials on tiers
2022-08-24 19:24:31 +05:30
Peter Zimon
3231863dc2 Added link on UI for Editors to staff page
refs. https://github.com/TryGhost/Team/issues/1839

- there was no way for an Editor through the Admin UI to be able to invite staff users
2022-08-24 14:23:51 +02:00
Peter Zimon
ba5899d147 Audit log list typography updates 2022-08-24 13:49:06 +02:00
James Morris
2724bc0feb Fixed up feature flag and narrow width issues with new post and page table designs
- Made sure feature flag works for new design with table
- Made adjustments to the narrow width look of the table
- Tested across browers and dark mode
2022-08-24 12:34:29 +01:00
Daniel Lockyer
9bdba0250a
Collected Offer CRUD actions
refs https://github.com/TryGhost/Toolbox/issues/356

- this allows collection of CRUD events for Offers but we currently don't
  show them in the UI until it's overhauled to avoid being monotonously
  long
2022-08-24 13:24:13 +02:00
Daniel Lockyer
74e6b4bcf7
Collected Tier CRUD actions
refs https://github.com/TryGhost/Toolbox/issues/356

- this allows collection of CRUD events for Tiers but we currently don't
  show them in the UI until it's overhauled to avoid being monotonously
  long
2022-08-24 12:54:56 +02:00
Peter Zimon
de8f2389cc Rearranged post list table to accomodate stats
- the balance of data vs. status and post title needed adjustment on the post list page
2022-08-24 12:15:33 +02:00
Daniel Lockyer
989c1b7fb4
Removed unused matchdep dependency
- this was only needed when we used Grunt in the Admin package, which I
  removed several releases ago
2022-08-24 11:00:26 +02:00
Daniel Lockyer
ff74f04600
Removed @tryghost/members-csv external import
- this package now lives in the Ghost monorepo so we should just use that
2022-08-24 10:57:48 +02:00
Peter Zimon
04161d2f7d Refined radio buttons on Offer screen
- radio button checkbox and colors were a bit off on Offer screen
2022-08-24 08:32:27 +02:00
James Morris
a3d4c4b3a9 Made some adjustments to fix the feature flag for posts and pages
- There was some spillage from the feature flag
- This has some better handling of various styles

refs https://github.com/TryGhost/Team/issues/1818
2022-08-23 18:42:09 +01:00
James Morris
0596986138 Added in the feature flag for showing status or not
- It's a small thing but it's to hide status in columns for stylistic purposes

refs https://github.com/TryGhost/Team/issues/1818
2022-08-23 18:32:16 +01:00
James Morris
5a9a7accc0 More tweaks to the post table for attribution
refs https://github.com/TryGhost/Team/issues/1818
2022-08-23 18:27:23 +01:00
James Morris
fc0be31c3f Tidied up the styles for the member filtering
- Created a new tag type with max width
- Made sure tags didn't get to large for the box
- Double checked page or post title length

refs https://github.com/TryGhost/Team/issues/1832
2022-08-23 17:44:46 +01:00
Daniel Lockyer
46cca8364d
Added integration resource linking
refs https://github.com/TryGhost/Toolbox/issues/356

- now we have an easy way to do it, linking the integration resource in
  is trivial
2022-08-23 18:06:12 +02:00
Daniel Lockyer
7f0996d986
Implemented resource linking in Audit Log
refs https://github.com/TryGhost/Toolbox/issues/356

- we have a very crude version of this before but it just wasn't
  maintainable
- one of the first things I did here was to add `include=resource` on
  the API call, so it returns the fields we need without extra API
  requests
- after we have the id/slug, I could build a route and model array
  dynamically, or return null if we can't redirect to the object (it
  doesn't exist)
2022-08-23 17:48:11 +02:00
Peter Zimon
35ff83afa9 Updated Audit log code block style 2022-08-23 17:38:08 +02:00
Fabien "egg" O'Carroll
0fc0bf40f1 Added ability to filter members by attribution to Admin
refs https://github.com/TryGhost/Team/issues/1832
2022-08-23 11:36:56 -04:00
Georg Grauberger
36d9ae36ae
Added secret handling for webhooks (#13980)
closes: https://github.com/TryGhost/Team/issues/1203
refs: https://github.com/TryGhost/Ghost/issues/9942

- Ensures that the webhook secret is validated and saved in Ghost admin
- Then makes use of this value by optionally adding an X-Ghost-Signature header that effectively signs the webhooks
- This allows for verifying the source of a webhook coming from Ghost is truly Ghost.
- Uses the same pattern as GitHub uses: https://docs.github.com/en/developers/webhooks-and-events/webhooks/securing-your-webhooks

Co-authored-by: Hannah Wolfe <github.erisds@gmail.com>
2022-08-23 16:34:32 +01:00
James Morris
c3fb0ef578 More work on the posts table for attribution
- Added in the open rate progress bar
- Columns in place with feature flag
- Moved open rate to tooltip for exact data

refs https://github.com/TryGhost/Team/issues/1818
2022-08-23 15:54:28 +01:00
Daniel Lockyer
9effa119c6 Implemented context on Actions events
refs https://github.com/TryGhost/Toolbox/issues/356

- in order to show data that we might not necessarily still have around
  (ie. when you delete a post, you might want the title), we're going to
  start utilizing the `context` column
- right now, we store the `primary_name` for deleted events, and we also
  store the `setting` `key` and `group` so we can reference it in the
  audit log
2022-08-23 14:58:41 +02:00
James Morris
7f6aa78c01 Tweaking styles for post and pages to work better with more data
refs https://github.com/TryGhost/Team/issues/1818
2022-08-23 13:39:22 +01:00
Simon Backx
934e61aa4c Updated activity feed to use full width
no issue

- Activity feed page now has `gh-main-fullwidth` class
- Page `<title>` is now 'Activity - Ghost' instead of just 'Ghost'
2022-08-23 14:36:48 +02:00
Peter Zimon
d5197fe196 Updated mobile styles for Audit log
refs. https://github.com/TryGhost/Toolbox/issues/356
2022-08-23 13:22:31 +02:00
Kevin Ansfield
3fd32ce3cf
Lexical-powered editor experiment (#15278)
no issue

We're spending a bit of time playing with an alternative to mobiledoc-kit to test it's feasibility as a base for future editor improvements.

- add `editor.lexicalUrl` config that points at the unpkg release by default
- set up a route on `/ghost/#/lexical-editor/post/` for the test playground which renders `<KoenigLexicialEditor>` as the editor
- adds `<KoenigLexicalEditor>` component that lazy loads the external react component
2022-08-23 11:45:50 +01:00
Djordje Vlaisavljevic
df4c838443 Fixed bug with free membership price card
refs https://github.com/TryGhost/Team/issues/1806
2022-08-23 12:37:30 +02:00
Peter Zimon
8a2bb1f24e Fixed linting error in Admin 2022-08-23 12:26:51 +02:00