Commit Graph

2102 Commits

Author SHA1 Message Date
Ghost CI
18a0e173fb v5.52.2 2023-06-21 03:32:56 +00:00
Chris Raible
2568c5898a
🐛 Fixed post scheduling for sites with transferred ownership (#17075)
refs TryGhost/Ghost#3494

- By default, the post scheduler runs as user_id = 1, which is the
original owner of the site
- If ownership has been transferred to a different user, it's possible
that there is no user with id = 1
- In this case, the scheduler would fail to publish a post, because
updating the post using user_id = 1 failed a foreign key constraint in
the post_revisions table
- This commit fixes the issue by checking if the contextUser exists, and
if not, replacing it with the current owner of the site
2023-06-20 19:51:13 -07:00
renovate[bot]
b1bcc2cb2d Update dependency luxon to v3 2023-06-20 15:22:54 +02:00
renovate[bot]
6623572c5b Update dependency socket.io to v4.6.2 2023-06-20 14:40:10 +02:00
Simon Backx
fd2ef61b3c 🎨 Improved copy on too many login attempts
fixes https://github.com/TryGhost/Team/issues/2391
2023-06-20 14:32:04 +02:00
renovate[bot]
d919a9024f Update dependency @extractus/oembed-extractor to v3.1.10 2023-06-20 12:18:09 +00:00
renovate[bot]
e81070762d Update dependency gscan to v4.37.0 2023-06-20 14:04:43 +02:00
Ghost CI
69fddf8abe v5.52.1 2023-06-20 06:54:10 +00:00
Fabien 'egg' O'Carroll
41cbc40353
Moved collections initialisation behind labs flag (#17057)
We ran into an issue where the large `published:true` query was
affecting the boot time of large sites which had knock-on effects with
availability.
2023-06-19 16:40:15 +02:00
Kevin Ansfield
3070e505f5
🐛 Fixed beta editor causing left-aligned images in some themes
closes https://github.com/TryGhost/Team/issues/3499

- bumps `@tryghost/kg-default-nodes` and `@tryghost/kg-lexical-html-renderer` to fix missing `kg-image` class on the `<img>` element of rendered image cards
2023-06-19 14:20:40 +01:00
Kevin Ansfield
5d9dd893b3
🐛 Fixed beta editor HTML cards auto-closing tags when rendering
closes https://github.com/TryGhost/Team/issues/3462
refs a49f296c08

- bumps `@tryghost/kg-default-nodes` and `@tryghost/kg-lexical-html-renderer` with support for "raw" html values in rendered card output
2023-06-19 14:39:51 +02:00
Ghost CI
5b2ba79cef v5.52.0 2023-06-16 15:02:41 +00:00
Ghost CI
6a3af5b406 🎨 Updated Casper to v5.4.11 2023-06-16 15:02:41 +00:00
Sag
dfd69f9cf7 Bumped Lexical dependencies
no issue
2023-06-16 15:23:20 +02:00
Fabien 'egg' O'Carroll
a1dae99245
Enabled errors for our error rules in eslint (#17041)
Yo dawg, I heard you like errors?

This fixes the last issues we had with incorrect error usage and updates
eslint to longer allow them through!
2023-06-16 14:50:06 +02:00
Daniel Lockyer
99aeb73ecc Optimized DB reset during tests
refs https://github.com/TryGhost/Toolbox/issues/592

- it turns out that `TRUNCATE` in CI takes ~300ms for all tables, but
  `DELETE FROM` takes ~30ms
- whilst truncating is generally known to be faster, I believe it's only
  faster on large tables
- this saves 90% of the time it takes to reset the DB in MySQL
2023-06-16 13:15:17 +02:00
Naz
09264261b7 Added ability to fetch posts by collection
closes https://github.com/TryGhost/Team/issues/3423

- For convenience we need a way to fetch posts that belong to a certain collection. This change adds support for `collection` query parameter: `/?collection=` which can be either an id or slug of the collections we are trying to fetch.
- When posts are fetched by collection we ignore any filters passed along in query parameters as collection is a "filter" by it's very nature.
2023-06-16 17:28:12 +07:00
renovate[bot]
c1d90df181 Update dependency @playwright/test to v1.35.1 2023-06-16 10:03:32 +02:00
renovate[bot]
d6664b70fd Update dependency semver to v7.5.2 2023-06-16 09:56:57 +02:00
Naz
1d214361ad
Refactored posts browsing to posts service
refs https://github.com/TryGhost/Team/issues/3423

- This refactor allow for smaller and cleaner change that's coming up when dealing with `?collection=` query parameter
2023-06-16 14:52:55 +07:00
Ronald Langeveld
cfbc97b033
🐛 Fixed revisions relation not linked to Posts api (#17037)
no issue

This was a bit of an oversight from our feature built at the retreat. We
didn't take revisions into account for pages at all, but luckily it made
revisions without issues regardless.
It just wasn't accessible and users weren't able to restore via ADMIN
because the API didn't serve them at all.

This wires up the revisions relation to be served by the API so we can
retrieve it in Admin.
2023-06-16 09:49:12 +02:00
Daniel Lockyer
02eadc32d3
Switched to only enabling retries in CI
refs https://ghost.slack.com/archives/C02G9E68C/p1686841987067309?thread_ts=1686761234.035659&cid=C02G9E68C

- enabling retries has helped reduce the number of flaky tests we see,
  but it means it's causing issues with local development and snapshots
- this moves the retry config to the CI specific commands so we don't
  have retries enabled locally
- also deduped test:base and test:single
2023-06-16 09:47:03 +02:00
Fabien "egg" O'Carroll
0d7f98f4d1 Supported adding/removing post to collection via Posts API
We've got some fairly simple diffing logic here to update the collections which
a post is in, the bulk of the changes here are to support the return of a DTO
rather than Bookshelf Model. This also helps improve the architecture because
we are step closer to removing infrastructure concerns (HTTP Response Headers)
from the business logic layer.

For now there is a crappy EventString which can be passed back to the
controller which can then handle any HTTP related concerns, although long term
these should be actual events like PostPublished or PostUpdated.
2023-06-16 09:28:19 +02:00
Fabien "egg" O'Carroll
f3f9e5a2f3 Moved serialisation of formats into the serialiser-layer
This prepares us to return a DTO rather than BookshelfModel to the serialiser
layer. When passing a BookshelfModel, the serialisation layer uses the model to
read from when building computed properties. By stripping values out in the
toJSON method it means that the DTO will be missing them and the computed
properties won't be able to be calculated. Instead we return ALL values to the
serialisation layer, and then strip out the ones that weren't requested in the
"clean" step.

This also inadvertently fixes the issue with `reading_time` requiring the
`html` field to be requested, we can now request just `reading_time`, as well
as have it included by default.
2023-06-16 09:17:47 +02:00
Fabien "egg" O'Carroll
41716a06ae Fixed mutation of shared state for matcher
This can cause bugs due to the matcher constraints changing in each test
2023-06-16 09:17:47 +02:00
Fabien "egg" O'Carroll
53eea00d21 Fixed check for god_mode param
Rather than require the string 'true', we allow any value to be passed, this
works with any parsing of params into booleans.
2023-06-16 09:17:47 +02:00
Fabien "egg" O'Carroll
229875d67d Bumbed @tryghost/admin-api-schema to latest version
This includes the changes necessary to allow the `collection` property to be
passed on posts
2023-06-16 09:17:47 +02:00
Daniel Lockyer
4b6cfa8f28
Added yarn archive to produce a build tarball
fixes https://github.com/TryGhost/Ghost/issues/16835

- this reimplements a command to product a tarball with Ghost after we
  took over `yarn build` for package-specific build steps
2023-06-15 15:42:39 +02:00
Naz
6335033466
Added full post data when returning collection's posts
refs https://github.com/TryGhost/Team/issues/3423

- When querying for posts that belong to a collection we should be returning full post information just like we do for Posts API.
2023-06-15 18:35:58 +07:00
Elena Baidakova
26abeb0ad2 Hide announcement bar script if visibility wasn't chosen
no issue
2023-06-15 15:03:04 +04:00
Ghost CI
a22317305e Merged v5.51.2 into main 2023-06-15 08:11:45 +00:00
Ghost CI
ab119ec96e v5.51.2 2023-06-15 08:11:43 +00:00
Daniel Lockyer
ecc28c5acd
Revert "Update dependency expect to v29.5.0"
This reverts commit 155c08bc61.
2023-06-14 14:56:03 +02:00
renovate[bot]
155c08bc61 Update dependency expect to v29.5.0 2023-06-14 14:43:08 +02:00
Aileen Booker
00131de0b6 Simplify logic when to call stripeService.connect() 2023-06-14 08:18:19 -04:00
Aileen Booker
10859b9b01 Fixed e2e tests 2023-06-14 08:18:19 -04:00
Aileen Booker
d27bb8f075 Added new Stripe events to DomainEventsAnalytics
no issue

- We need to send information about Stripe being enabled or disabled in live mode to analytics
- This hooks up the Domain events listeners in the analytics service and processes this information accordingly
2023-06-14 08:18:19 -04:00
Aileen Booker
48f9e85e09 Expose Stripe events in package 2023-06-14 08:18:19 -04:00
Aileen Booker
98fd6a7dbf Hooked up Stripe service connect method on Stripe public key update
no issue

- Withing the `SettingsBREADService` we want to call the `connect` method of the Stripe Service, which then dispatches the `DomainEvent`
- In order to ensure that the Stripe service is connected in 'live' mode, we compare the public key and make sure no live key was set before so to avoid multiple triggers of this call.
2023-06-14 08:18:19 -04:00
Simon Backx
dbf6ccf29e Added missing cover style for signup card in frontend 2023-06-14 10:18:32 +02:00
Naz
34f7b77190
Fixed collections snapshot
no issue

- The snapshot has save a wrong amount of "pages" for collections and was falsely passing after a retry. The correct amount should be 6.
2023-06-14 14:17:23 +07:00
renovate[bot]
52af10fef5 Update dependency lib0 to v0.2.78 2023-06-14 08:55:45 +02:00
Daniel Lockyer
01e90dfb65 Extracted regression tests to a separate workflow
refs https://github.com/TryGhost/Toolbox/issues/592

- this commit extracts the regression tests into a separate workflow
- this means they run in parallel and reduce the time we have to wait
  for DB tests in general
- also fixes a test that was reliant on being run after the E2E
  tests (!)
2023-06-13 16:47:19 +02:00
Daniel Lockyer
082ab6dc3e Refactored truncateAll util to async-await
refs https://github.com/TryGhost/Toolbox/issues/592

- async-await makes the code easier to read
- also performs a small optimization to only load the foreign_keys
  pragma once for SQLite
2023-06-13 14:46:57 +02:00
Daniel Lockyer
264773ccd1 Reset URL service between test boots
refs https://github.com/TryGhost/Toolbox/issues/592

- we should reset the URL service to avoid event listeners piling up and
  slowing down CI due to the number of events it has to process
2023-06-13 12:52:03 +02:00
Daniel Lockyer
cedfb14924 Fixed random timeouts with mysql2 library during tests
refs https://github.com/TryGhost/Toolbox/issues/592

- heads up, I'm not really sure about this fix
- when we're wrapping `setTimeout`, time stops and mysql2 starts doing
  weird things because we then shift time and it hits timeouts
- apparently `shouldAdvanceTime` should fix this by automatically
  incrementing time along with the system clock
- given the problem is quite difficult to hit, I could just be seeing a
  lack of this due to some other factor
- also removed unnecessary sinon sandbox creation as this is superfluous
2023-06-13 12:52:03 +02:00
Naz
7717021331 Added GET /collections/:id/posts endpoint
refs https://github.com/TryGhost/Team/issues/3423

- The Admin API endpoint allows to browse collection posts and paginate over them
2023-06-13 17:23:09 +07:00
Jono Mingard
731858e9e0 Added tier and label selection in default recipients
refs https://github.com/TryGhost/Team/issues/3151
2023-06-13 18:48:45 +12:00
Ghost CI
6c25f4cb08 Merged v5.51.1 into main 2023-06-13 05:52:58 +00:00
Ghost CI
e990bf5a94 v5.51.1 2023-06-13 05:52:56 +00:00
Steve Larson
d857e0ef15 Upgraded koenig lexical dependencies
no refs
2023-06-12 16:49:21 -05:00
Steve Larson
e742283ec8 Bumped koenig lexical dependencies
no refs
-added a couple more fixes: callout card rendering, code editor wrapping
2023-06-12 16:48:18 -05:00
Steve Larson
fd7b30fac0 Updated koenig lexical dependencies
no refs
-various fixes, including renderer for embed cards
2023-06-12 12:17:46 -05:00
Steve Larson
1345afdd71 Updated koenig lexical dependencies
no refs
-updated to fix embed card rendering
2023-06-12 12:08:19 -05:00
Daniel Lockyer
af8c0dc7a5 Prevented registering multiple Slack event listeners
refs https://github.com/TryGhost/Toolbox/issues/592

- in tests, we boot Ghost over and over
- this inits all the services each time
- it turns out that the Slack event listener is registered 80+ times
- to prevent this, we can check if it has already been registered, like
  we do with webhooks: 4639396c3a/ghost/core/core/server/services/webhooks/listen.js (L67-L69)
- not sure about this pattern in general, but it's something we can
  review in coming weeks
2023-06-12 15:04:11 +02:00
Daniel Lockyer
4639396c3a
Collected Ghost boot timing in test framework
refs https://github.com/TryGhost/Toolbox/issues/592

- this should help us track and calculate how much time is being spent
  in the boot/DB reset process during tests
2023-06-12 12:07:04 +02:00
Daniel Lockyer
3ac28c7a95
Fixed snapshot for settings
- this deviated somewhere, which I am investigating
2023-06-12 10:04:50 +02:00
Naz
bb4e2fcadb
Added "index" built in collection
closes https://github.com/TryGhost/Team/issues/3425

- Index collection is needed to support one of the usecases we have in the near future where we'd hold all posts that would be displayed on the "index" page.
2023-06-12 12:57:52 +07:00
Naz
6421e202e5
Removed API endpoints adding posts to collections
closes https://github.com/TryGhost/Team/issues/3431

- We don't currently have a clear usecase to use the new pattern of updating posts as nested resource (of a collection). To simplify the API we are sticking with the approach of controlling where the post belongs to only through the Posts Admin API.
2023-06-12 12:08:37 +07:00
Steve Larson
d1b5bf0a80 Updated koenig lexical dependencies
no refs
2023-06-09 12:22:01 -05:00
Steve Larson
88c3412cd4 Updated koenig lexical dependencies
no refs
2023-06-09 12:11:37 -05:00
Ghost CI
2744d9a58b v5.51.0 2023-06-09 15:03:06 +00:00
Naz
f7e2f82089 Enabled collections permissions in controller
refs https://github.com/TryGhost/Team/issues/3220

- With permissions in place in the database, they can be enabled on controller level.
2023-06-09 21:13:06 +07:00
Naz
05bb82cf1a Added collections CRUD permissions
refs https://github.com/TryGhost/Team/issues/3220

- Added permissions for collection resources
2023-06-09 21:13:06 +07:00
Simon Backx
2a263c1024 Updated Signup Form to v0.1
no issue
2023-06-09 14:32:17 +02:00
Simon Backx
5e7edb9da5 Added embeddable signup form
refs https://github.com/TryGhost/Team/issues/3274

Co-authored-by: Sanne de Vries <sannedv@protonmail.com>
Co-authored-by: Ronald Langeveld <hi@ronaldlangeveld.com>
Co-authored-by: Jono Mingard <reason.koan@gmail.com>
Co-authored-by: Sag <guptazy@gmail.com>
2023-06-09 11:30:03 +02:00
Fabien "egg" O'Carroll
643fbbbb1f Removed collections from stable list in Admin API
We had to add these so that they could be played with programatically
but now we have a god_mode flag, we can remove them.
2023-06-09 09:31:44 +02:00
Fabien "egg" O'Carroll
29a403cc68 Supported a god_mode param in the Admin API
This currently skips the not-implemented middleware and can be used to
access experimental endpoints whilst in development.
2023-06-09 09:31:44 +02:00
renovate[bot]
58f48d2e0a Update dependency @playwright/test to v1.35.0 2023-06-09 08:25:51 +02:00
Ghost CI
a173a31736 Merged v5.50.4 into main 2023-06-07 18:43:27 +00:00
Ghost CI
e7eba9f4d7 v5.50.4 2023-06-07 18:43:25 +00:00
Ghost CI
e1b1af38e9 Merged v5.50.3 into main 2023-06-07 16:01:00 +00:00
Ghost CI
887155938a v5.50.3 2023-06-07 16:00:59 +00:00
Michael Barrett
9da246ac84
Enforce explicit cacheInvalidate header (#16826)
refs https://github.com/TryGhost/Team/issues/3005
2023-06-07 15:13:45 +01:00
Fabien "egg" O'Carroll
e0da095c76 Allowed integrations to use Collections API 2023-06-07 15:40:24 +02:00
Fabien 'egg' O'Carroll
92172aca8e
Wired up collections to posts endpoint (#16945)
- Added support for `include=collections` to the Posts Admin API behind a flag
- Refactored some of the collections work to support it
2023-06-07 15:06:15 +02:00
Daniel Lockyer
d127b975af
Disabled autoRefresh when inserting fixtures
refs https://github.com/TryGhost/Toolbox/issues/592

- we don't need to receive the refreshed model back afterwards so we can
  save an SQL select per insert by disabling auto-refresh
- this saves about 18000 DB queries for the MySQL tests, which should
  help reduce test time due to the overhead
2023-06-07 15:03:12 +02:00
Aileen Booker
9372124d61 Decouple sentry from analytics events handlers by expecting general exception handler
no issue

- The class should not rely on being passed a specific dependency, but rather needs to communicate with types what structure and method it needs to function correctly.
- Replaced the specific dependency to `sentry` with a generic definition of what is expected.
2023-06-07 09:00:49 -04:00
Aileen Booker
5db1950090 Added tests ModelEventsAnalytics
no issue

- Added full unit tests for `ModelEventsAnalytics` class
2023-06-07 09:00:49 -04:00
Aileen Booker
6efc1cce82 Added JSDoc types and inject more deps for DomainEventsAnalytics
no issue
2023-06-07 09:00:49 -04:00
Aileen Booker
591ca2c9bf Added first test structure for ModelEventsAnalytics
no issue

- The added `ModelEventsAnalytics` class didn't have tests before the refactor. Added unit tests to verify functionality.
2023-06-07 09:00:49 -04:00
Aileen Booker
9b27804276 Added tests for DomainEventsAnalytics
no issue

- Added unit tests for newly added `DomainEventsAnalytics` class to verify intended functionality
2023-06-07 09:00:49 -04:00
Aileen Booker
2c4d9e2776 First pass on adding domainevents to segment service
no issue

- In order to listen to `DomainEvents` for `MilestoneCreatedEvents` we need to add a `DomainEvents` listener and handler to the Segment analytics service.
- For better readability and to be more consistent with how code is currently written in Ghost, I refactored the service index file and split the two types of event listener into separate classes which is much cleaner and easier to test.
2023-06-07 09:00:49 -04:00
Sanne de Vries
6b444dabdc Added max width to signup card form in split layout
Refs https://www.notion.so/ghost/Sign-up-card-feedback-doc-6b9aa746ed654a1a87b759dc5f5bb031?pvs=4#693bad1f085a430aa6da2a9659ac3f27
2023-06-07 13:00:18 +02:00
Fabien "egg" O'Carroll
7667d6d589 Removed coverage checks from regression tests
Regression tests are not written to ensure coverage of code, in fact they are
barely written at all anymore, instead we write unit and e2e tests. Because of
this the coverage is constantly dropping as the codebase grows. This causes
significant pain and suffering for developers and slows down development.
2023-06-07 12:46:39 +02:00
Ghost CI
80ed948bb9 Merged v5.50.2 into main 2023-06-06 19:05:20 +00:00
Ghost CI
924d73e02e v5.50.2 2023-06-06 19:05:19 +00:00
Naz
fab5b1845c
Made builtin collections un-deletable
closes https://github.com/TryGhost/Team/issues/3376

- It should not be possible to delete a built-in collection.
2023-06-06 22:04:16 +07:00
Ghost CI
c8b713a679 Merged v5.50.1 into main 2023-06-06 14:40:58 +00:00
Ghost CI
6a07d63f38 v5.50.1 2023-06-06 14:40:57 +00:00
Michael Barrett
a1b08f15b2
Fixed flaky frontend members test (#16947)
closes https://github.com/TryGhost/Team/issues/3325

Awaited `DomainEvents.allSettled()` to ensure domain event is fully
processed before asserting member was successfully updated
2023-06-06 14:57:46 +01:00
Rishabh Garg
5c209abdc0
Updated default value for image editor integration setting (#16897)
refs https://github.com/TryGhost/Team/issues/3145

Updates pintura integration to be switched on by default for all sites by adding a migration to update the default value for the setting.
2023-06-06 18:15:01 +05:30
Simon Backx
f0518bc76a Increased signup form embed icon resolution to 192px
no issue

Optimal resolution for @3x devices
2023-06-06 09:42:42 +02:00
Naz
5a8eec402f
Restricted built-in collection init to run once
refs https://github.com/TryGhost/Team/issues/3376
fixes b4a97d084f

- The in-memory stores are not cleaned up when the Ghost instance is "shallow restarted" between test suite runs, causing the initialization of built-in collections to run multiple times. The initialization should ever add the collections once.
2023-06-06 13:35:06 +07:00
Naz
b4a97d084f
Fixed snapshot for failing collections test
refs bdbd9327d9

- The "build" command was not run for the @tryghost/collecitons package and caused outdated response
2023-06-06 12:50:55 +07:00
Naz
bdbd9327d9
Added built-in automatic featured collection
refs https://github.com/TryGhost/Team/issues/3376

- When the Ghost instance is initialized it has to have a set of built-in collections. With these changes Ghost starts with a "featured posts" collection - available to be used right away.
2023-06-06 12:41:37 +07:00
Simon Backx
1e7b658148 Updated sign up form to use resized version of icon
fixes https://github.com/TryGhost/Team/issues/3345

The icon is now served as a 128x128px version
2023-06-05 17:59:18 +02:00
Naz
2390afc6f1
Added automatic collection recalculation
closes https://github.com/TryGhost/Team/issues/3170

- When resources that are related to automatic collection filter are updated the posts in collections should be updated as well.
- This change adds a super-basic way to track changes in post/tag/author resources and updated all automatic collections when any of those resources change. In the future we can optimize the update process to be more performant, but it's good enough for current needs
2023-06-05 18:33:39 +07:00
Naz
c86859d0a7
Added test coverage to automatic collections
refs https://github.com/TryGhost/Team/issues/3170

- The test confirms relational filters like `tag:kitchen-sink` filtering works for automatic collections
2023-06-05 16:37:17 +07:00
Ghost CI
67fdff479b Merged v5.50.0 into main 2023-06-05 08:58:32 +00:00
Ghost CI
7170b2489e v5.50.0 2023-06-05 08:58:31 +00:00
Kevin Ansfield
bbd511b752
Added beta of the new Ghost editor (#16923)
no issue

Keep an eye on Ghost's changelog (https://ghost.org/changelog/) for the full feature announcement.
2023-06-05 09:46:31 +01:00
Kevin Ansfield
8167e7dc5e
Fixed lexical rendering bugs
closes https://github.com/TryGhost/Team/issues/3373
closes https://github.com/TryGhost/Team/issues/3374

- fixes rendering of contiguous linebreaks
- fixes rendering of multiple nested formats when using latest jsdom release
2023-06-05 10:42:15 +02:00
Naz
1968296410
Added type:post enforcement when fetching posts for collections
refs https://github.com/TryGhost/Team/issues/3148

- Collections should never ever operate on pages, so limiting them at the fetch stage is the bes possible place, so they don't enter the system when an automatic collection is created.
2023-06-05 15:04:57 +07:00
Naz
260ca0548a
Added test coverage to automatic collections
refs https://github.com/TryGhost/Team/issues/3170

- The test confirms `published_at` filtering works for automatic collections
2023-06-05 14:59:49 +07:00
Naz
bfefcfd4df
Added automatic collection creation based on filter
refs https://github.com/TryGhost/Team/issues/3170

- This implementation allows to create an automatic collection with a filter defining automatically populated posts that belong to a collection
- To populate collection using a filter the API client can send a `filter` property along with a collection request
- Filter values are compatible with the filters used in Content API (https://ghost.org/docs/content-api/#filter)
2023-06-05 13:39:52 +07:00
Naz
f64276b26e
Added basic test an automatic collection
refs https://github.com/TryGhost/Team/issues/3170

- This test confirms we can create a collection with "automatic" type and assign a "filter" value to it
2023-06-05 13:39:49 +07:00
Kevin Ansfield
2fb68ada83
Fixed lexical rendering bugs
closes https://github.com/TryGhost/Team/issues/3373
closes https://github.com/TryGhost/Team/issues/3374

- fixes rendering of contiguous linebreaks
- fixes rendering of multiple nested formats when using latest jsdom release
2023-06-02 16:33:14 +01:00
Ghost CI
6ac848195c v5.49.3 2023-06-02 15:02:42 +00:00
Elena Baidakova
af2e069cbe Bumped @tryghost/kg-lexical-html-renderer
no issue
2023-06-02 17:59:55 +04:00
Elena Baidakova
97c3434c3d Bumped @tryghost/kg-lexical-html-renderer
no issue
2023-06-02 17:06:08 +04:00
Daniel Lockyer
cca81daa30
Updated Portal to v2.33
refs https://github.com/TryGhost/Team/issues/2795

- includes new locales and wrapping of more public-facing strings
2023-06-02 13:24:51 +02:00
Michael Barrett
108c7c38f6
Removed imageEditor flag (#16921)
refs https://github.com/TryGhost/Team/issues/3337

Removed `imageEditor` flag and moved gated logic to be behind the
`lexicalEditor` flag as part of the labs clean up
2023-06-02 12:07:31 +01:00
Kevin Ansfield
e9ed7dfb64
Bumped @tryghost/kg-lexical-html-renderer
refs https://github.com/TryGhost/Team/issues/3269

- fixes continuation of list sequence when a non-list-node separates list nodes bringing rendered output in line with editor depiction
2023-06-02 09:54:12 +01:00
Daniel Lockyer
f908a03fff
Enabled and tracked retries in CI tests (#16909) 2023-06-02 09:36:28 +02:00
renovate[bot]
7959f76f44 Update sentry-javascript monorepo to v7.54.0 2023-06-02 09:06:32 +02:00
Kevin Ansfield
9a1b78ae4f
Bumped Koenig packages
no issue
2023-06-01 17:48:34 +01:00
Michael Barrett
ef92028b22
Removed post diffing from post history feature (#16904)
refs https://github.com/TryGhost/Team/issues/3337

Removed post diffing from post history feature as this functionality is
likely to be reworked in a future cycle
2023-06-01 13:22:51 +01:00
Michael Barrett
83847bf22c
Added emailCustomization flag and removed makeItRain flag (#16903)
refs https://github.com/TryGhost/Team/issues/3337

Moved current email customization functionality that is behind the
`makeItRain` to its own flag (`emailCustomization`) and removed the now
redundant `makeItRain` flag
2023-06-01 12:32:37 +01:00
Michael Barrett
09ded37d91
Removed emailErrors flag (#16900)
refs https://github.com/TryGhost/Team/issues/3337

Removed emailErrors flag as it is no longer needed
2023-06-01 12:11:01 +01:00
Simon Backx
92ca75eb5d Decreased required functions coverage for integration CI tests to 47%
no issue

Previous commits dropped coverage to below 48% on Node 16.
2023-06-01 10:45:21 +02:00
Simon Backx
7e27d3f3e8
Added signup form attribution (#16899)
fixes https://github.com/TryGhost/Team/issues/3331

This adds attribution tracking to the signup form. It sends a newly
created url history when sending the signup API call, this url history
will get translated to a proper attribution and saved on the backend. We
send a history with only a single item that contains the referrer
source, medium and path of the Embed form.

This also makes some changes to the E2E tests so that the tests run
in an https environment instead of about:blank.
2023-06-01 10:18:11 +02:00
Naz
e8220b1387
Added DEL /collections/:id/posts/:post_id to Admin API
refs https://github.com/TryGhost/Team/issues/3260

- We need a way to remove posts form collections without fetching the whole collection's content. This API method allows to remove posts from manual collections by collection id and post id.
- As a response it returns up to date collection state without the removed post.
2023-06-01 14:59:05 +07:00
Fabien "egg" O'Carroll
93bad82a24 Wired up adding post to collections to API 2023-06-01 14:25:49 +07:00
Naz
bf5becfb22 Added POST /collections/:id/posts to Admin API
refs https://github.com/TryGhost/Team/issues/3260

- We need a way to append posts to collections without sending over all of the posts that are already in the collection
- The API would receive post_id and collection_id as required fields and will optionally take in sort_order to control the ordering in the manual collection
2023-06-01 14:25:49 +07:00
Chris Raible
c0b3aab4f2
Removed postHistory flag and updated post history logic (#16908)
no issue

- Removed the postHistory flag from labs
- Post History will be saved and displayed for all lexical posts,
regardless of whether the lexicalEditor flag is currently set
- Post History will still not be displayed for any mobiledoc posts
- With this change, the logic is simplified as we don't have to worry
about flags, but only the content in the given post (mobiledoc vs
lexical)
- If someone toggles the lexicalEditor flag on, creates a new post, then
toggles the lexicalEditor off, we still want Post History to work for
the existing lexical post
2023-05-31 23:45:29 -07:00
Sodbileg Gansukh
e4415e9109 Fixed product card image stretching issue
refs https://github.com/TryGhost/Team/issues/3329

- product card images have explicit width and height attributes in the markup now, and the image needs auto height for that reason
- without it, the images will lose its original aspect ratio for themes without the auto height images
2023-06-01 12:10:13 +08:00
Naz
87df8754ee Moved bookshelf posts repository to core
refs https://github.com/TryGhost/Team/issues/3260

- Moved the posts bookshelf repository into core codebase where it should belong.
2023-05-31 22:55:35 +07:00
Naz
4fe9e5fac0 Added posts editing to collections in Admin API
refs https://github.com/TryGhost/Team/issues/3260

- Allows to manually manage posts assigned to collections through Collections Admin API
2023-05-31 22:55:35 +07:00
Naz
c7954fa695 Refactored basic edit test case
refs https://github.com/TryGhost/Team/issues/3260

- We need to have a reusable collection to edit throughout the describe, so we don't do repeatable work over and over
2023-05-31 22:55:35 +07:00
Naz
988f7e69c2 Grouped edit collection test cases
refs https://github.com/TryGhost/Team/issues/3260

- Cleanup before adding more test cases to the suite
2023-05-31 22:55:35 +07:00
Ghost CI
7e04828d45 Merged v5.49.2 into main 2023-05-30 14:57:20 +00:00
Ghost CI
e19f434781 v5.49.2 2023-05-30 14:57:17 +00:00
Naz
1605198a1a
Added debug data dump to email service
closes https://github.com/TryGhost/Team/issues/3324

- When the recipients batch size is larger than the limit in addition to logging the error we need extra data to figure out what exactly is inside those `2000` or `3000` records causing faulty behavior.
- This change grabs all available models and dumps them into a file inside of the `content/data` folder. The code is temporary and should be removed once the problem is narrowed down
2023-05-30 21:32:01 +07:00
renovate[bot]
dabd0181bb Update dependency @extractus/oembed-extractor to v3.1.9 2023-05-30 12:28:56 +02:00
renovate[bot]
cb6825f1a3 Update sentry-javascript monorepo to v7.53.1 2023-05-30 10:51:52 +02:00
Ronald Langeveld
393055dd6c Bumped koenig related packages
no issue
2023-05-30 08:00:42 +02:00
Sanne de Vries
e55bb20140 Refined frontend styles for signup card
Refs https://github.com/TryGhost/Team/issues/3246
2023-05-29 20:21:51 +02:00
Ronald Langeveld
5445e1d1b4 Bumped Koenig packages
no issue
2023-05-29 18:27:26 +02:00
Sanne de Vries
7f3f86a987 Updated signup card frontend styles
Refs https://github.com/TryGhost/Team/issues/3256
2023-05-29 16:44:29 +02:00
Sanne de Vries
08fc96a077 Refined signup card frontend styles
Refs https://github.com/TryGhost/Team/issues/3246
2023-05-29 12:28:27 +02:00
renovate[bot]
1ee9c5f805 Update dependency jsdom to v22.1.0 2023-05-29 11:18:45 +02:00
renovate[bot]
610ba33513 Update dependency postcss to v8.4.24 2023-05-29 07:52:39 +02:00
Jono Mingard
1ed556f4ab Fixed both text and loading indicator showing on the subscribe button 2023-05-29 16:56:57 +12:00
Ghost CI
a589fcd9e4 v5.49.1 2023-05-26 15:02:32 +00:00
Michael Barrett
88f3161903
Fixed flaky legacy posts api test (#16871)
refs https://github.com/TryGhost/Team/issues/2808

Updated the test to ensure that the date assertions do not unexpectedly
fail if the dates used are computed precisely at the start of a second
(no milliseconds `.000Z`)
2023-05-25 15:40:17 +01:00
Michael Barrett
8fc4e0fdcc
Add e2e test for update check script (#16840)
refs https://github.com/TryGhost/Team/issues/3234

Added an e2e for the update check script to detect potential breakages
in the script due to uninitialised dependencies in the isolated
execution environment
2023-05-25 14:36:36 +01:00
Simon Backx
488aa983d0 Added signup form code generation to admin
fixes https://github.com/TryGhost/Team/issues/3296

Adds a new `signupForm` feature flag, that will enable/disable the new embeddable signup form code generation.

Since the new flag shares its name with a new config value (that contains the script location), this also fixes the feature helper to only use a config with the same name if it is a boolean.
2023-05-25 15:18:40 +02:00
Daniel Lockyer
f2277ded40
Updated member email strings to use i18n function
refs https://github.com/TryGhost/Ghost/issues/16628

- this wraps nearly all of the public strings in member signup/signin
  emails, so they are ready for translating
2023-05-25 12:25:01 +02:00
Sanne de Vries
fca78b2bae Updated frontend styles for signup card
Refs https://github.com/TryGhost/Team/issues/3246
2023-05-25 12:21:41 +02:00