Commit Graph

15626 Commits

Author SHA1 Message Date
renovate[bot]
28ed23c13e Update dependency knex to v2.4.1 2023-01-18 07:43:07 +01:00
Naz
967dd7d244
Added deprecation notice to mockManager's sentEmailCount
refs https://github.com/TryGhost/Toolbox/issues/499

- The mockManager's sentEmailCount is left here to avoid breaking many tests that already depend on this method. With future improvements to email snapshot tests this method should not be used. Instead, emailMockReceiver's own sentEmailCount method should be used directly.
2023-01-18 12:55:45 +08:00
Simon Backx
87be76ebb3 Added externalAttribution feature flag
fixes https://github.com/TryGhost/Team/issues/2430
2023-01-17 15:15:32 +01:00
Djordje Vlaisavljevic
5a90975288 Fixed staff page bug when logged in as editor
no refs
2023-01-17 14:02:01 +00:00
Simon Backx
34d4e5c8d0
Added logging to webmention endpoint (#16137)
closes https://github.com/TryGhost/Team/issues/2424

Adds the new webmention endpoint, responds with the correct statuscode
and empty body at `https://site.ghost/webmentions/receive/`.

Also updates the head link tag to the new endpoint location. We don't
use /webmention because that could conflict with post slugs.
2023-01-17 14:26:43 +01:00
Daniel Lockyer
48dda23554
Reverted "Added version information to log lines"
refs https://github.com/TryGhost/Toolbox/issues/501

- this reverts commit f2116357b7
- something with Elasticsearch is causing high CPU usage, so this commit
  reverts that for now
2023-01-17 13:20:47 +01:00
Ronald Langeveld
57bc14e00f
Added Mentions endpoint to Admin (#16136)
ref https://github.com/TryGhost/Team/issues/2421

- added the Mentions API endpoint to Admin
- setup initial mention model in the Ember Store to be able to dev with the endpoint
- added basic routing to access the `/mentions` page that is currently behind feature flags
- Setup basic testing with a mirage mock endpoint.
2023-01-17 20:16:18 +08:00
Fabien "egg" O'Carroll
008d83ad08 Fixed the Mention mapper
This had some leftover code in that shouldn't have been merged.
2023-01-17 17:06:22 +07:00
Fabien "egg" O'Carroll
1babf6126a Added initial basic Mentions implementation
refs https://github.com/TryGhost/Team/issues/2416

This extends the mock API to use a more formal pattern of moving our
entity code into a separate package, and use the service/repository
patterns we've been work toward.

The repository is currently in memory, this allows us to start using
the API without having to make commitments to the database structure.

We've also injected a single fake webmention for testing. I'd expect
the Mention object to change a lot from this initial definition as we
gain more information about the type of data we expect to see.
2023-01-17 17:01:20 +07:00
renovate[bot]
3d79d10ddf Update dependency mysql2 to v3.0.1 2023-01-17 08:22:53 +01:00
Fabien 'egg' O'Carroll
a8a279d667
Wired up mock Mentions Admin API (#16134)
refs https://github.com/TryGhost/Team/issues/2416

This doesn't even return a Mention in the correct format at the moment,
but it's just to get an endpoint there, behind a flag and returning data
so that we can start playing with the API and having it hooked up the
the Admin.

The next step will be fleshing this out further and defining the
services and repository to back it, as well as updating the Admin so that
we can fetch mentions to display in the UI
2023-01-17 12:39:32 +07:00
Ronald Langeveld
e55405691a
Added webmentions package (#16133)
refs https://github.com/TryGhost/Team/issues/2408

- Added webmentions package 
- Setup basic folder structure, controllers, repositories & services to
get started.
- note package haven't been published yet
2023-01-17 13:18:16 +08:00
Naz
112ab23968
Removed direct use of @tryghost/jest-snapshot
refs https://github.com/TryGhost/Toolbox/issues/499
refs 6bcc47a0ad

- Using module directly caused issues with snapshots manager instance initialization (mocha hooks did not apply to a correct instance)
- See refed commit for more
2023-01-17 12:50:49 +08:00
Naz
1f6b2b4d5e
Added email content testing capabilities
refs https://github.com/TryGhost/Toolbox/issues/499

- Outgoing emails have been a weak point of Ghost's stability recently. The concept of "emailMockReceiver" similarly to "webhookMockReceiver", allows to test side-effects like outgoing emails.
- This is a first iteration which should lay groundwork for testing all outgoing emails in the future
- The change adds a new concept of "email mock receiver" which is very similar to how the "webhook mock receiver" works. The email mock receiver exposes two methods to record and verify snapshots:
- matchHTMLSnapshot - records and verifies only the HTML content of the outgoint email
- matchMetadataSnapshot - records and verifies all the non-HTML properties sent along an email content, e.g.: to address, plaintext, subject, etc.
- What's missing is matching content based on dynamic content like dates, links with JWT tokens, etc.
2023-01-17 12:50:49 +08:00
Steve Larson
9199547bfe add webmentions feature flag
refs #2406
Adding the alpha feature flag so we can begin testing.
2023-01-16 15:03:36 -06:00
renovate[bot]
e95cff2ef4 Update dependency glob to v8.1.0 2023-01-16 09:59:45 +01:00
renovate[bot]
15c6fbb12a Update dependency html-validate to v7.13.1 2023-01-16 09:57:58 +01:00
Ghost CI
460d2dc339 v5.30.1 2023-01-16 05:35:14 +00:00
Fabien 'egg' O'Carroll
a30bbd5c69
Added webmention endpoint discovery link to ghost_head (#16126)
We've wrapped both changes in a try/catch to make sure this has no
adverse affects. The endpoint currently doesn't exist - we're only
adding this to get an idea of how much traffic we'll expect to see.

Long term we'll want to read the endpoint from the webmention service.
2023-01-16 12:32:04 +07:00
renovate[bot]
9dda708305
Update dependency eslint to v8.32.0 2023-01-16 00:19:30 +00:00
Ghost CI
2884521195 v5.30.0 2023-01-13 16:00:44 +00:00
Rishabh
fea75365c7 Updated guard for site data in Portal
closes https://github.com/TryGhost/Team/issues/2276

Portal had died with an unintelligible error about portal plans/includes being undefined when there was missing site data in some extreme edge cases. This change catches any errors in site transformation and logs it to console instead of crashing portal unexpectedly
2023-01-13 21:01:58 +05:30
Daniel Lockyer
c4391567f3
Updated jsdoc for mailgun-client
- in the event the Mailgun config doesn't exist, we return `null` from
  this function
- this updates the jsdoc to correct the return type of `getInstance`
2023-01-13 16:10:32 +01:00
Rishabh Garg
7d060e5edb
Bumped email stability flag to beta (#16116)
- allows email stability to be turned on without developer experiments enabled
2023-01-13 20:30:15 +05:30
Rishabh
8d4bc97dbe Fixed admin utils test
refs 9fc9e4311d
2023-01-13 19:49:01 +05:30
Peter Zimon
1ccb2f08e7 Improved mobile popup for feedbacks
no refs.

Post feedback popups were not optimised for mobile usage at all. All the content was on top of the window which is really hard to reach using a single hand/thumb and it just looked like a scaled down version of a desktop modal.
2023-01-13 15:14:49 +01:00
renovate[bot]
a990769e31 Update dependency jwks-rsa to v3.0.1 2023-01-13 14:07:10 +01:00
Rishabh
9fc9e4311d Removed www prefix from newsletter link table
closes https://github.com/TryGhost/Team/issues/2206

- removes `www.` from the url shown on links table in post analytics
- we had previously removed http(s) protocol from it as well, and they are only shown while editing the url
2023-01-13 15:38:54 +05:30
Sanne de Vries
1645f551bc Fixed error message display bug in video card
No ref
2023-01-13 09:56:36 +01:00
Fabien 'egg' O'Carroll
14f282d640
Improved newsletter delivery rates and email suppression handling
This introduces the new suppressions feature which will automatically
unsubscribe members from newsletters when their email is added to the
suppression list in Mailgun, this is usually due to emails either
permanently bouncing to the address, or the member making a spam
complaint.

Both Members and Admins are able to see that the email has been added to
the list, and Members are be able to request their email be removed from
the list via Portal.

Overall this feature should improve delivery rates of newsletters and
improve the rating of the domain you're sending from.
2023-01-13 15:46:57 +07:00
Naz
c2b18f0c87
🔥 Removed support for {{lang}} helper
refs https://github.com/TryGhost/Toolbox/issues/497
refs https://github.com/TryGhost/Toolbox/issues/406

- Removes {{lang}} helper which has been completely deprecated since Ghost 5.0. When using the helper in themes with 5.x backend the output will be empty
2023-01-13 13:12:53 +07:00
Rishabh Garg
755e031017
Fixed hidden free tier in Portal settings (#16072)
closes https://github.com/TryGhost/Team/issues/2338

If a site has the Free tier hidden from the Portal, and subsequently the Stripe connection is disconnected, this produces a dead-end state where no new members can sign up and the Free tier cannot be reactivated again in Portal settings as its hidden. This change -

- enables free tier toggle to be always shown on site irrespective of Stripe connection
2023-01-12 19:29:17 +05:30
renovate[bot]
bb2ffee69d Update dependency @playwright/test to v1.29.2 2023-01-12 11:35:22 +01:00
Sam Lord
f2116357b7 Added version information to log lines
refs: https://github.com/TryGhost/Toolbox/issues/502

Updated to @tryghost/logging@2.4.0 to allow metadata to be logged
2023-01-12 10:34:23 +00:00
renovate[bot]
02e84bf62a Update sentry-javascript monorepo to v7.30.0 2023-01-12 11:32:44 +01:00
Daniel Lockyer
9b38bd9509
🐛 Fixed ECONNRESET error when connecting to Azure MySQL DB
fixes https://github.com/TryGhost/Ghost/issues/14990

- there was a bug in `mysql2` [1] when connecting to Azure DBs, but this was
  subsequently fixed, so this commit bumps the package in Ghost and
  `knex-migrator`, where this was also bumped
- of note, this release includes https://github.com/sidorares/node-mysql2/pull/1666 and
  https://github.com/sidorares/node-mysql2/pull/1751, which are very interesting

[1]: https://github.com/sidorares/node-mysql2/pull/1438
2023-01-12 10:46:09 +01:00
Rishabh
ee7474db45 Fixed portal failure on opening email prefs for logged out member
- opening email preferences page via portal link doesn't work if member is not logged in.
- opens the signin page now instead of silently crashing
2023-01-12 13:02:41 +05:30
Rishabh
28bea791dd Added playwright tests for portal links
refs https://github.com/TryGhost/Team/issues/2371
2023-01-12 13:02:41 +05:30
Ronald Langeveld
f0e98c8bcb Fixed TypeError in filter-value
no issue

- Fixes a `TypeError` that sometimes crops up when setting filters from
  the URL parameters.
2023-01-12 13:18:55 +08:00
renovate[bot]
0fc72f6bd7
Update dependency eslint-plugin-react to v7.32.0 2023-01-11 16:27:56 +00:00
Elena Baidakova
a7366249bc
Added data-test attr for e2e tests to Portal (#16104)
refs TryGhost/Team#2371
2023-01-11 19:39:29 +04:00
Simon Backx
d5a359f2db Removed possibility to use {uuid} replacements in email
fixes https://github.com/TryGhost/Team/issues/2383

A user could use `{uuid}` inside an email only content and it would work. This currently isn't supposed to be used outside internal features (link click tracking, feedback buttons). For now this is only fixed in the new email flow under the email stability flag.
2023-01-11 15:56:15 +01:00
Sanne de Vries
c616f56a2a Replaced copy that uses "See" to "View" across Admin
Refs https://www.notion.so/ghost/Member-activity-improvements-247080c54dac4ebf86d10b38508d2a19
2023-01-11 15:44:23 +01:00
Simon Backx
8a2303413d Restricted email-service package to 100% test coverage
fixes https://github.com/TryGhost/Team/issues/2339

The email service is now fully covered by tests, and this commit also forces the test coverage to remain 100% after future changes.
2023-01-11 13:54:26 +01:00
Simon Backx
ee36a0fce9 Added 100% test coverage to SendingService
refs https://github.com/TryGhost/Team/issues/2339
2023-01-11 13:39:25 +01:00
Ronald Langeveld
0e2d1b3afd
Added redeemed offers filtering for members (#16071)
closes https://github.com/TryGhost/Team/issues/2011

- Gives publishers the ability to filter members based on which offer they used (redeemed) when they subscribed for a paid membership.
- On the offers page, the redemption count number links to a the members page with the filter already applied making it easy to have insight on which members used the offer / coupon.
2023-01-11 20:13:09 +08:00
Elena Baidakova
1aae5ba2eb
Added e2e tests for default tier (#16103)
refs TryGhost/Team#2371
2023-01-11 15:44:34 +04:00
Sanne de Vries
48ea2a871b
Updated editor re-authentication modal (#16102) 2023-01-11 12:39:04 +01:00
Simon Backx
9650521376 Fixed variable date formatting in new email flow
refs https://github.com/TryGhost/Ghost/actions/runs/3892250013/jobs/6643448457

Depending on the environment the date formatting in a newsletter could change. Now it is always set to the DD MMM YYYY format (like the old flow).
2023-01-11 12:26:09 +01:00
Simon Backx
6a664d11b9 Added 100% test coverage to email renderer and fixed authors bug
refs https://github.com/TryGhost/Team/issues/2339

This fixed a bug in the new email flow that more than 2 authors were displayed as 'undefined & 2 others'.
2023-01-11 12:14:02 +01:00