Commit Graph

3209 Commits

Author SHA1 Message Date
Sag
1d19021606
Bumped Lexical packages (#16626)
no issue
2023-04-13 10:47:22 +02:00
Kevin Ansfield
b286faf011
Initial setup for Lexical multiplayer websockets service (#16611)
no issue

Rough prototype only, current limitations:
- **No persistence**. Docs are in-memory only, YJS state will be lost on server restart although it could be re-populated by clients if they reconnect without closing their local doc (needs testing/investigation)
- **No tie-in with saved lexical state**. Lexical state is updated in the post model via normal API requests from Admin which can mean the multiplayer doc and the saved lexical state become out of sync but there's no detection/indication of that state at present. Will also trigger the "someone else is editing" errors because multiplayer doesn't yet override the default post update collision detection
- **New posts don't start in multiplayer**. New posts don't have an ID and so can't have a respective YJS doc, after initial save we don't transition to multiplayer because the React component in Ember doesn't re-render on prop changes yet
- **No tests**. Experimental code just to get something working and help answer questions for what's next

Changes:
- added `lexicalMultiplayer` labs flag
- updated `<KoenigLexicalEditor>` to pass through the required `<KoenigComposer>` props for multiplayer when enabled
- added `lexical-multiplayer` service
  - `init()` called during boot, used to set up the `enable()` and `disable()` methods so the flag can be toggled without restarts
  - when enabled it adds `upgrade` request handling to the base Ghost server
    - returns 404 if the URL doesn't match `/ghost/api/admin/posts/multiplayer/*`
    - returns 401 if a valid session cookie is not present
    - if everything is good, hands off to code in `y-websocket.js` that handles YJS doc creation, awareness, keepalive, etc
    - uses doc names in the format `${post.id}/${docId}` where `docId` is `main` for the primary document and a GUID for any sub-documents like captions and nested editors in cards
- updated `SettingsBREADService` to check if the `labs` setting is changed, and enables/disables the `lexical-multiplayer` service as needed so the websockets server can be started and shutdown when toggling without requiring a restart
2023-04-12 20:24:02 +01:00
Jonathan Noack
dd5fd20cf9
Renamed Kiev to Kyiv in site timezone select (#16619)
closes https://github.com/TryGhost/Ghost/issues/16603

- Updates the timezone data used by Ghost to the latest version, which fixes the spelling of Kyiv in the timezone select.
2023-04-12 17:54:13 +02:00
Elena Baidakova
100b4880ee Bump Koenig packages
no issue
2023-04-11 18:08:30 +04:00
renovate[bot]
ee216038e9 Update dependency @tryghost/email-mock-receiver to v0.3.1 2023-04-11 11:47:08 +02:00
renovate[bot]
4b8f631563 Update dependency @playwright/test to v1.32.3 2023-04-11 11:14:38 +02:00
renovate[bot]
88e1f2c50f Update dependency semver to v7.4.0 2023-04-11 11:01:01 +02:00
Sag
ed28bba94d
Upgraded Lexical packages (#16600)
no issue
2023-04-10 10:39:15 +02:00
renovate[bot]
3b8eea2c01 Update dependency html-validate to v7.15.1 2023-04-10 10:25:09 +02:00
renovate[bot]
11aacc0e6b Update dependency copy-webpack-plugin to v11 2023-04-07 13:47:46 +02:00
renovate[bot]
07545541a8 Update @tryghost 2023-04-07 13:47:12 +02:00
renovate[bot]
9e888aeb15 Update dependency @babel/eslint-parser to v7.21.3 2023-04-07 13:43:07 +02:00
Naz
3f78e959b3
Bumped email-mock-receiver
refs https://github.com/TryGhost/Team/issues/2691

- This bump changes the "sentEmailCount" method to a more descriptive "assertSentEmailCount" and adds chaining to this method.
2023-04-06 22:13:17 +02:00
naz
70ae3efd5c
Update email mock receive (#16578)
refs TryGhost/Team#2691

- The bump adds possibility to make email's html/text snapshots with dynamic content. The breaking change here is with separate "matchPlaintextSnapshot" method extracted out of "matchMetadataSnapshot" to handle dynamic content in "text" part of the sent email.
2023-04-06 17:24:23 +02:00
renovate[bot]
95308573fd Update dependency cssnano to v6 2023-04-05 18:24:03 +02:00
renovate[bot]
21516bfe11 Update sentry-javascript monorepo to v7.47.0 2023-04-05 18:23:06 +02:00
Sanne de Vries
92663ea731
Fixed email width and dark mode images in email template (#16566)
Refs https://github.com/TryGhost/Team/issues/2845

---------

Co-authored-by: Fabien "egg" O'Carroll <fabien@allou.is>
Co-authored-by: Simon Backx <simon@ghost.org>
2023-04-05 15:53:51 +02:00
renovate[bot]
3d5da1b091 Update dependency webpack to v5.77.0 2023-04-05 15:16:30 +02:00
renovate[bot]
83373e1751 Update Test & linting packages 2023-04-05 15:16:08 +02:00
Sag
8f6c3c12e2
Upgraded Lexical packages (#16564)
no issue
2023-04-05 15:00:26 +02:00
renovate[bot]
254533ad92 Update dependency @playwright/test to v1.32.2 2023-04-05 14:49:19 +02:00
renovate[bot]
bcd9e2196b Update vitest monorepo to v0.29.8 2023-04-05 14:10:08 +02:00
Daniel Lockyer
19445c13f2
Updated lockfile 2023-04-05 13:47:14 +02:00
Daniel Lockyer
b64d32cc26 Removed heavy dependency within @tryghost/errors
- we previously used `@stdlib/utils` instead of the child package
  `@stdlib/copy`, which is a lot smaller and contains our only use of
  the parent
- this saves 140+MB of dependencies
2023-04-05 13:46:15 +02:00
renovate[bot]
e5084a23e6 Update dependency html-validate to v7.14.0 2023-04-05 13:33:05 +02:00
renovate[bot]
1a1286b150 Update metascraper to v5.34.2 2023-04-05 13:25:45 +02:00
renovate[bot]
aaf2ee96c0 Update dependency lerna to v6.6.1 2023-04-05 12:03:30 +02:00
renovate[bot]
101fd6f885 Update dependency terser to v5.16.8 2023-04-05 12:01:27 +02:00
renovate[bot]
5b7df1a7d0 Update dependency i18next to v22.4.14 2023-04-05 11:48:26 +02:00
renovate[bot]
24df14a3dc Update dependency tailwindcss to v3.3.1 2023-04-05 11:21:22 +02:00
renovate[bot]
871379d872 Update dependency concurrently to v8 2023-04-05 11:20:47 +02:00
renovate[bot]
c975e9af00 Update sentry-javascript monorepo to v7.46.0 2023-04-05 10:32:46 +02:00
Daniel Lockyer
7ec2656495 Added yarn resolution for @tryghost/errors
- we keep ending up with multiple versions of the depedency in our tree,
  and it's causing problems when comparing instances
- the workaround I'm implementing for now is to bump the package
  everywhere and set a resolution so we only have 1 shared instance
- hopefully we can come up with a better method down the line
2023-04-05 09:34:50 +02:00
Sanne de Vries
57fcfe76d8
Updated images in email template to be work with light/dark mode
refs https://github.com/TryGhost/Team/issues/2845

We needed to update the html out of the cards to include images for light
and dark mode, and then we've used CSS to show/hide them 

Co-authored-by: Fabien "egg" O'Carroll <fabien@allou.is>
2023-04-04 00:32:08 +07:00
Sag
3393d3910c
Upgraded Koenig packages
no issue
2023-04-03 11:33:43 +02:00
Sagar Gupta
0c8f75686b Fixed Public Preview Card in Lexical 2023-04-03 10:04:37 +02:00
Daniel Lockyer
97fc422835
Updated lockfile 2023-03-30 18:16:55 +02:00
Paul Davis
86027fdb6f
Add Migrate app (#16458)
Adds the UI for self-serve migrations
2023-03-30 15:40:06 +01:00
Fabien 'egg' O'Carroll
0f72816951
Newsletter email template customisation (#16523)
Refs https://github.com/TryGhost/Team/issues/2845

Co-authored-by: Sanne de Vries <sannedv@protonmail.com>
2023-03-30 15:33:46 +02:00
Chris Raible
3236891b80
Fixed admin coverage reporting (#16512)
no issue

- Renovate merged in a breaking change to ember-cli-code-coverage which
broke our coverage reporting for the admin app
- This commit fixes the issue by pinning the version of
ember-cli-code-coverage to the last working version and telling renovate
to ignore it in the future
- It also adds html coverage reporting to make it easier to run locally
and see your coverage before pushing
2023-03-28 11:07:28 -07:00
Rishabh Garg
2e2b3c7c0f
Fixed LinkReplacer bug causing broken links on published post/page (#16514)
refs TryGhost/Team#2840

- moves the `entities.decode()` step to the `LinkReplacer` class so that
it's applied to all links, not just the ones that are replaced in the
email service
- adds a test case to `LinkReplacer` to ensure that the
`entities.decode()` step is applied to all links correctly, decoding any
URLs with HTML entities in them

---------

Co-authored-by: Chris Raible <chris@ghost.org>
2023-03-28 15:59:15 +05:30
Ronald Langeveld
fe31898dcd Bumped koenig lexical packages
no issue

- Bumped kg-default-nodes to make compatible with the latest cards
2023-03-28 15:47:46 +08:00
Chris Raible
64c9e66b56
🐛 Fixed broken link tracking in newsletters (#16473)
refs https://github.com/TryGhost/Team/issues/2805

When we render mobiledoc to HTML, it automatically escapes HTML entities in the process, so a button or directly pasted link with href="https://example.com?code=test" will be rendered as href="https://example.com?code&#x3Dtest" as the url is encoded in the rendered HTML. Our link tracking was using the encoded URL as the redirect URL in newsletters, causing certain links to break.

This change updates the link tracking to decode the URL with `entities.decode(url)` so we store the correct redirect URL in our DB and ensure link tracking redirects to the correct url from newsletters.

---------

Co-authored-by: Rishabh <zrishabhgarg@gmail.com>
2023-03-24 18:44:55 +05:30
Sagar Gupta
5bd558ddf1 Added Toggle Card (first version) 2023-03-24 12:42:58 +01:00
Daniel Lockyer
045e1ee33d Disabled got retries in testing environment
- by default, got retries failed requests, which is causing issues in
  tests because we've disabled the network with `nock`
- this is causing huge idle time because got pauses before retrying
- this change disables the retries if we're running tests, so things are
  more stable
2023-03-24 11:55:57 +01:00
renovate[bot]
eb1d63eac0
Update dependency @isaacs/ttlcache to v1.2.2 2023-03-23 20:20:25 +00:00
Daniel Lockyer
56b407f1f4
Added pre-push hook to run unit tests on changed packages
fixes https://github.com/TryGhost/Toolbox/issues/532

- we should protect against failures entering `main` which could be
  avoided by running a quick unit test beforehand
- this reintroduces Lerna as it supports parallelisation and `--since`,
  to run linting and unit tests on packages that have changed since
  upstream
2023-03-23 11:27:43 +01:00
Ronald Langeveld
e313423d2e Bumped packages
no issue
2023-03-23 17:23:12 +08:00
renovate[bot]
8f6533e1a3
Update dependency webpack to v5.76.3 2023-03-22 19:31:12 +00:00
Daniel Lockyer
6207766ce7
Migrated from nodemon to native Node --watch
fixes https://github.com/TryGhost/Toolbox/issues/493

- `nodemon` doesn't properly wait for graceful shutdown if there's a job
  running in Ghost when it tries to reload, so it ends up producing
  errors because two versions of Ghost are started
- Node 18 added a `--watch` flag, which reloads if any required file is
  changed
- switching from nodemon to this native feature should keep the
  core functionality the same but fix this edge case that disrupts the
  development flow
2023-03-21 15:57:41 +01:00