Commit Graph

32877 Commits

Author SHA1 Message Date
Sam Lord
98f0b6c7ce Added ghost_subscription_id to members_stripe_customers_subscriptions table in data generator
no issue
2023-02-28 11:14:11 +00:00
Djordje Vlaisavljevic
0f925dde8c Fixed logic for displaying recent mentions dashboard widget
refs https://github.com/TryGhost/Team/issues/2481
2023-02-28 10:15:22 +00:00
Daniel Lockyer
acf2ab2d22 Added translation wrapper to public-facing strings in Portal
refs https://github.com/TryGhost/Ghost/issues/15502

- in order to use the translations, strings must be wrapped in the `t`
  function, which is passed through AppContext
- whilst I haven't instrumented all public strings, the vast majority
  are done here and the strings have been brought into the JSON locale files using `yarn translate:generate`
2023-02-28 10:03:04 +01:00
renovate[bot]
f007094d4b Update sentry-javascript monorepo to v7.39.0 2023-02-28 09:57:57 +01:00
Fabien "egg" O'Carroll
6fcc7364e0 Wired up enableAutomaticTax feature flag to Stripe API
The automatic_tax option is required to enable tax collection for
Stripe Checkout sessions. We've used getters here rather than an
explicit function, might wanna change that in future.
2023-02-28 14:09:52 +07:00
Fabien "egg" O'Carroll
6a093f4549 Added stripeAutomaticTax feature flag as private beta
This will be used to test the use of the Stripe Tax feature during
development. We want it behind a private beta flag so that we can
stick it in production without causing problems with payment systems
for existing sites.
2023-02-28 14:07:32 +07:00
Steve Larson
35c78fd718
fixed member import email setting import (#16269)
refs TryGhost/Team#2605
-updated unparse to look at both subscribed and subscribed_to_emails
-subscribed is for backwards compatibility
-may want to retire subscribed since we can't set from front-end
2023-02-27 15:25:20 -06:00
Steve Larson
a86737875c
enabled member filtering and export at all times (#16344)
refs TryGhost/Team#2392
-made filtering always available
-made export always available
-made searching always available
2023-02-27 15:23:29 -06:00
Steve Larson
fe7253da1e
removed before after card (#16341)
refs TryGhost/Team#2405
-removed koenig before after card
-removed labs setting
-will rebuild in lexical if we want it in the future
2023-02-27 14:18:48 -06:00
Daniel Lockyer
93e0898c12
Extracted version-match middleware to separate package
- this middlware is standalone and has 100% test coverage, therefore we
  can move it out to a separate package and remap the requires
  accordingly
2023-02-27 18:34:03 +01:00
Daniel Lockyer
025ebb7890
Cleaned up duplicate middleware
refs 621cfd9866

- this file was meant to be moved to a folder in the referenced commit,
  but that never happened
- this commit fixes that
2023-02-27 18:02:40 +01:00
Daniel Lockyer
1a04e75e8b
Set backup file encoding as utf8
- we write files in the default encoding (which is `utf8`) and this
  files a types issue with `JSON.parse` operating on a Buffer
2023-02-27 17:48:41 +01:00
Daniel Lockyer
268e72309f
Reduced code coverage limits temporarily
- I'm shifting some code around but the code coverage keeps flagging
- in order to not get sidetracked, I'm reducing the threshold by 1% and I'll
  increase it again once we're in a better state
2023-02-27 17:37:48 +01:00
Daniel Lockyer
51a25769eb
Moved Segment analytics file into service
- this file is already in our "init"-style, so this commit simply moves
  the file into a service and fixes the import paths
2023-02-27 17:27:28 +01:00
Daniel Lockyer
1ecf77db48 Inlined client database helpers
- these have been lingering around for a while but don't really get a
  lot of love
- I'm planning on moving the migration utils/schema commands into a
  separate package at some point, and these files are just cluttering
  things up
- to make life easier, I'm going to inline them for now
2023-02-27 17:27:22 +01:00
Daniel Lockyer
b1ff826a61 Removed Bluebird from DB backup file
refs https://github.com/TryGhost/Ghost/issues/14882

- we're slowly moving away from Bluebird and don't need it here to
  achieve what we need
2023-02-27 16:37:54 +01:00
Daniel Lockyer
42768937fd Disabled autoRefresh when adding an email recipient failure
- we don't need the updated model once we've saved it in the DB, so we
  can disable the auto refresh in Bookshelf to save a query
2023-02-27 15:45:25 +01:00
Daniel Lockyer
31bc57fbe1
Removed log line from AMP parsing
refs https://github.com/TryGhost/Ghost/pull/9097

- this was originally added to measure the AMP parsing time but AMP is
  becoming less and less important (it's disabled by default in Ghost
  now)
- this also causes a lot of noise when viewing logs, and I've never
  experienced an issue with AMP parsing time that we've needed to review
  these logs
- therefore, this commit deletes it
2023-02-27 15:03:51 +01:00
Daniel Lockyer
2e051fb271
Fixed typo 2023-02-27 15:00:18 +01:00
renovate[bot]
90f64bf212 Update dependency @playwright/test to v1.31.1 2023-02-27 14:45:10 +01:00
Daniel Lockyer
e630acdb88
Added i18n translate function to test context
refs https://github.com/TryGhost/Ghost/issues/15502

- this allows use of the `t` function whilst running tests
2023-02-27 13:35:11 +01:00
Daniel Lockyer
2804445d41
Fixed returning key when value is empty string
refs https://github.com/TryGhost/Ghost/issues/15502

- in the event the value is an empty string, we want to return the key
- this config option enables that
2023-02-27 13:18:55 +01:00
Naz
96a64b4982
Added error rethrow to update check run as a job
closes https://github.com/TryGhost/Toolbox/issues/525

- When the update check is run as an offloaded job (in a worker thread) the errors that are handled over "logger.error" do not get bubbled up to the job manager to be handled fully. With an optional "rethrowErrors" flag it's not possible to throw errors when the update check is run as a "job" and handle as usual when run in the main thread (through the admin route trigger)
2023-02-27 19:48:42 +08:00
Daniel Lockyer
17a48c76cd
Added jsdoc annotations for i18next-parser config type
- this helps with using the correct key/values when working on the
  config
2023-02-27 11:29:56 +01:00
Daniel Lockyer
9e5efff187
Added @tryghost/i18n to Portal
refs https://github.com/TryGhost/Ghost/issues/15502

- this adds the package to Portal and integrates it into the state we
  pass around
- note: I've currently left the detection of the language
  (`site.locale`) commented for now until we flesh more of the
  implementation out
2023-02-27 10:50:37 +01:00
Elena Baidakova
e45e98bfc4
Added error handling for image upload in lexical (#16335)
refs TryGhost/Team#2593
2023-02-27 12:49:49 +04:00
Naz
81f8abdbd6
🐛 Fixed failing update-check job
refs https://github.com/TryGhost/Toolbox/issues/525
refs https://github.com/TryGhost/Ghost/pull/16224

- The update check job has been failing due to uninitialized Members Service. Loading Tiers in the context of update check is not important because all we are looking for is the posts count.
- The products repository list service is also about to be replace by Tiers repository, so getting correctly initialized members service is not crucial.
2023-02-27 15:58:00 +08:00
Elena Baidakova
6afcf8eec8 Fixed copying text from editor after adding video card
refs TryGhost/Team#2600
- Copying text from editor after adding video card broke it due to error in video node renderer.
2023-02-27 10:28:39 +04:00
renovate[bot]
a260d5396b
Update Test & linting packages 2023-02-27 03:18:16 +00:00
renovate[bot]
9f3d8ec67d Update dependency mailgun.js to v8.1.0 2023-02-25 00:50:01 +00:00
renovate[bot]
bdea9c3205 Update dependency terser to v5.16.5 2023-02-24 20:38:59 +00:00
Ghost CI
9fa44f4d3f v5.36.0 2023-02-24 16:00:48 +00:00
Djordje Vlaisavljevic
5172d07238 Updated post analytics mentions empty state
refs https://github.com/TryGhost/Team/issues/2575
2023-02-23 15:44:35 +00:00
Djordje Vlaisavljevic
c33f30a3e0 Removed show all mentions link in empty state
refs https://github.com/TryGhost/Team/issues/2481
2023-02-23 15:44:35 +00:00
Djordje Vlaisavljevic
3a3f8c9532 Updated mentions feed design
refs https://github.com/TryGhost/Team/issues/2583
2023-02-23 15:44:35 +00:00
Aileen Nowak
d441fe2e2a Fixed tests 2023-02-23 17:21:20 +02:00
Aileen Nowak
61e7cd644b Added test to slack-notifications to check for correct reason when value too far from milestone 2023-02-23 17:21:20 +02:00
Aileen Nowak
086da740a2 Changed maxPercentageFromMilestone to 10% 2023-02-23 17:21:20 +02:00
Aileen Nowak
74a65f3b1c Simplyfied milestone event meta data
no issue

- Reduced the amount of diffeerent properties by not populating a `currentARR` and `currentMembers` fields, but use a `currentValue` instead.
- The type of milestone can still be determined by its `type` property, so we actually don't need two different props here
2023-02-23 17:21:20 +02:00
Aileen Nowak
d820b961b0 Avoid sending milestone email when actual value is too far from milestone
no issue

- Switches to used newly added config values throughout the services
- Updated the `shouldSendEmail` fn to check if actual value is too far from achieved milestone as determined by the percentage setting (e. g. 998 members should not accidentally receive an email for achieving 100 members)
2023-02-23 17:21:20 +02:00
Aileen Nowak
be84d227cd Added more configurable parameters to shared milstone config
no issue

- Instead of having those values hard coded, make them quickly configurable
- Those values are deciding if we send an email or not, the milestones will be created either way:
    - minDaysSinceImported: the amount of that days should've passed since the last member was imported
    - minDaysSinceLastEmail: minimum amount of days that need to pass
    - maxPercentageFromMilestone: the max percentage that the current value can be away from the achieved milestone (e. g. 999 members should not send and email for 100 members)
2023-02-23 17:21:20 +02:00
Simon Backx
89ababb71f
Updated email event fetching to stop when begin and end are the same (#16326)
no issue

Optimization that makes sure we stop fetching when it is no longer
needed.
2023-02-23 15:44:01 +01:00
Simon Backx
3ded0bbee8
Added outbound link tagging setting (#16324)
no issue

Enable or disable outbound link tagging in both web posts and
newsletters.
2023-02-23 14:37:23 +01:00
Aileen Nowak
ff3568293c Updated milestones e2e test to better check for last email sent safeguard
refs https://www.notion.so/ghost/Marketing-Milestone-email-campaigns-1d2c9dee3cfa4029863edb16092ad5c4?pvs=4

- Didn't check for the specific case before and fixed a bug that was allowiing the test to pass even though it should fail
2023-02-23 14:10:12 +02:00
Aileen Nowak
314b88cfb5 Fixed milestone query for imported members not using correct date
refs https://www.notion.so/ghost/Marketing-Milestone-email-campaigns-1d2c9dee3cfa4029863edb16092ad5c4?pvs=4

- I was passing in the days threshold of 7 to compare with the `created_at` value instead of creating an actual new data to compare
2023-02-23 14:10:12 +02:00
Sam Lord
9852c21ec5 Prevented random labels from being generated when base-data is present
no issue

Before, when base data included labels for members, the random generated labels would also be generated. This prevents that, and ensures that the base-data labels are applied correctly to members.
2023-02-23 11:04:58 +00:00
Simon Backx
f6bc3479f9
Added webmentions emails flag (#16321)
fixes https://github.com/TryGhost/Team/issues/2599

Disables sending webmentions notification emails, and hides it behind a new flag instead.
2023-02-23 11:42:14 +01:00
Simon Backx
c9fa1068a0
Updated outbound_link_tagging to match members_track_sources (#16322)
fixes https://github.com/TryGhost/Team/issues/2601

Sets the value of outbound_link_tagging to the same value of
members_track_sources, so that is disabled by default for privacy
sensitive sites.

Also makes sure the `outbound_link_tagging` setting is available in
admin (currently excluded because it is in the analytics group)
2023-02-23 11:33:23 +01:00
Aileen Booker
e0331bbfcf
Added MilestoneCreatedEvent to staff service notifications (#16307)
refs
https://www.notion.so/ghost/Marketing-Milestone-email-campaigns-1d2c9dee3cfa4029863edb16092ad5c4?pvs=4

- Added MilestoneCreatedEvent subscription to staff-service incl. first
handling
- Logs information for now instead of actually sending an email
2023-02-23 11:20:13 +02:00
Daniel Lockyer
fed2cb2675
Added missing dev dependency to event-aware-cache-wrapper package
- this is used in tests so it needs to be defined in the package.json
2023-02-23 08:48:01 +01:00