Commit Graph

19350 Commits

Author SHA1 Message Date
Chris Raible
9a8c703e34
Improved error handling for SQL errors (#18797)
refs TryGhost/Product#4083

- In the vast majority of cases, we shouldn't have SQL errors in our
code. Due to some limitations with validating e.g. nql filters passed to
the API, sometimes we don't catch these errors and they bubble up to the
user.
- In these rare cases, Ghost was returning the raw SQL error from mysql
which is not very user friendly and also exposes information about the
database, which generally is not a good practice.
- To make things worse, Sentry was treating every instance of these
errors as a unique issue, even when it was exactly the same query
failing over and over.
- This change improves the error message returned from the API, and also
makes sure that Sentry will group all these errors together, so we can
easily see how many times they are happening and where.
- It also adds more specific context to the event that is sent to
Sentry, including the mysql error number, code, and the SQL query
itself.
2023-11-01 13:47:41 -07:00
Chris Raible
a382cd8a91
Added sourceRoot key to admin sourcemaps (#18825)
no issue

- The sourcemaps generated for the admin app use relative links to the
source code files e.g. `assets/ghost.js`
- Since the sourcemaps themselves are hosted at `/assets` already, this
was leading to issues with sourcemaps in Sentry and in the browser
looking for the sources at `/assets/assets/ghost.js`
- This commit adds a `sourceRoot` key to the sourcemaps, which should
allow Sentry and the Browser to find the source code files at
`../assets/ghost.js` instead of `assets/ghost.js`
- We may need to iterate on this — not 100% sure if this is the best way
to do this without trying it in staging. If the `../` doesn't work in
all environments, we can try including the CDN url directly
2023-11-01 18:42:09 +00:00
Ghost CI
2c9d42f599 Merged v5.71.1 into main 2023-11-01 16:53:42 +00:00
Ghost CI
a56c39fbd1 v5.71.1 2023-11-01 16:53:39 +00:00
Kevin Ansfield
281fbc973e
🐛 Fixed mobiledoc and lexical content being available via Content API
refs https://github.com/TryGhost/Product/issues/4088

The Content API should not expose the lexical/mobiledoc source content because it's not membership-gated and although not used at the present time may in future contain additional internal metadata. We were handling this for the more-typical `?formats` param but it was still possible to access this data using the `?fields` param.

- updated post mapper used in our API output serializers to strip the `mobiledoc` and `lexical` fields ready for API output
- credits to Prathap Puthran for reporting
2023-11-01 16:10:41 +01:00
Sanne de Vries
a38461a00d
Fixed email paywall styling bug on mobile (#18818)
Closes https://github.com/TryGhost/Product/issues/4089
2023-11-01 14:13:51 +00:00
Kevin Ansfield
541a1fae5e
Fixed potential unexpected unpublish and infinite loop when leaving editor (#18816)
closes https://github.com/TryGhost/Product/issues/4059

- modified `saveTask` so when it has the `leavingEditor` option it doesn't attempt to set a new post status
- save when leaving the editor is never a publish/unpublish-related event, rather it's a convenience autosave and a forced revision creation so modifying the post status should never happen for those saves
- updated the `willTransition` handling to avoid repeated saves
- sets a property on the controller whenever we attempt a save+transition retry on leaving the editor then skips any further attempted saves on transitions
- although it would be preferable we can't use `try/catch` on these saves because our save task always catches and doesn't re-throw, adjusting that would be a much larger change than we want to make for this fix
2023-11-01 11:59:29 +00:00
Kevin Ansfield
b9c2989325
Cleaned up unused Post.statusScratch property (#18817)
no issue

- remnant from earlier code that is no longer needed/used
2023-11-01 11:53:29 +00:00
renovate[bot]
62ecb1ebd8 Update sentry-javascript monorepo to v7.77.0 2023-11-01 09:14:38 +01:00
renovate[bot]
2675f36f5e Update dependency broccoli-terser-sourcemap to v4.1.1 2023-11-01 07:59:05 +01:00
renovate[bot]
057d9599f5 Update TryGhost packages 2023-10-31 20:54:17 +01:00
kazanec18
47358b2357
Updated Russian translations (#18768) 2023-10-31 20:41:16 +01:00
Alexey Pargachev
e9bd383797
Updated Russian translations (#18447) 2023-10-31 16:46:03 +01:00
Simon Backx
d1b8551715
Swapped List-Unsubscribe order to prioritise https over mailto (#18808)
refs https://github.com/TryGhost/Product/issues/4053
2023-10-31 15:39:35 +00:00
Runske
4d727c9667
Updated Norwegian translations (#18744)
Co-authored-by: Daniel Lockyer <daniellockyer@fastmail.com>
2023-10-31 15:35:52 +00:00
Susheel Thapa
2e5fdffe32
Fixed typos (#18648)
Co-authored-by: Daniel Lockyer <daniellockyer@fastmail.com>
2023-10-31 15:21:44 +00:00
Simon Backx
97d0cddb50
Added indexes to members_created_events and members_subscription_created_events (#18805)
fixes https://github.com/TryGhost/Product/issues/4085

Increases the performance for the post analytics export by adding new
indexes. These indexes are used when counting the amount of (paid)
subscribers that were attributed to a given post. With the indexes, the
time required to export 700 posts with 300k members decreases from 40s
to 0.6s.

Tests show that adding these indexes should be very fast (< 1 s) if the
tables contain up to 300k rows.
2023-10-31 15:11:24 +00:00
Hannah Wolfe
0049b74a2d Added well-known assetlinks.json to allowed files
refs: https://github.com/google/digitalassetlinks/blob/master/well-known/specification.md
refs: https://github.com/google/digitalassetlinks/blob/master/well-known/details.md

- allow themes to include assetlinks.json files to comply with the Google digital asset links spec
2023-10-31 15:10:58 +00:00
EchoBilisim
b8069c60e9
Updated Turkish translation (#18732) 2023-10-31 15:10:39 +01:00
renovate[bot]
e8fec41822 Update dependency terser to v5.24.0 2023-10-31 14:02:31 +00:00
Daiki K
3f97fbc58a
Updated Japanese translation (#18716) 2023-10-31 14:59:14 +01:00
Joe Grigg
520d8df7a1 Added extra redis cache adapter configuration options
no refs

- This enables supplying a username to connect to redis with when connection to an individual node rather than a cluster.
- It also allows for extra options to be given to the ioredis store used in the background.
2023-10-31 13:58:22 +00:00
Michael Barrett
bb17ef2b02
Handled unhandled ember ajax errors (#18803)
no refs

Handled unhandled ember ajax errors (i.e `406`) so that a friendly error
message can be displayed to the user.
2023-10-31 13:56:34 +00:00
renovate[bot]
df8eeb2249 Update Types packages 2023-10-31 14:40:32 +01:00
Gary Lai
43c27d514c
Updated Traditional Chinese translations (#18798)
Co-authored-by: Gary Lai <garylai@amazon.com>
2023-10-31 14:29:08 +01:00
Peter Gonda
a2eb8e960a
Added Slovak translations (#18401) 2023-10-31 14:23:18 +01:00
Simon Backx
398b98b5f6
Cleaned up some email helpers (#18806)
no issue
2023-10-31 12:25:05 +00:00
Michael Barrett
6074b1d04f
Fixed admin-x not reporting to Sentry (#18774)
no refs
2023-10-31 09:12:54 +00:00
Jono M
3711260f9d
Added feature flag for AdminX Offers (#18801)
closes https://github.com/TryGhost/Product/issues/4084

---

### <samp>🤖 Generated by Copilot at 9380e1f</samp>

This pull request adds a new UI for creating and managing offers for
members in the admin settings, which is controlled by an alpha feature
flag. It introduces new modal components for the offers UI, a new
sidebar item, new routes, and a new setting group. It also updates the
`labs.js` file to include the `adminXOffers` flag.
2023-10-31 08:41:35 +00:00
renovate[bot]
ab57071901 Update dependency newrelic to v11.5.0 2023-10-31 07:59:49 +00:00
Michael Barrett
766374a44a
Prevented handled errors from being sent to Sentry (#18790)
no refs

As part of the reduce Sentry noise work we decided to temporarily
prevent the submission of "handled" errors to Sentry. This is a
temporary measure to reduce noise while we work on improving the quality
of the error reporting / alerting
2023-10-30 16:42:06 +00:00
renovate[bot]
0916d2c4bc Update dependency terser to v5.23.0 2023-10-30 16:26:36 +00:00
Sanne de Vries
9ea1a508df
Hid emojipicker shortcut behind feature flag (#18793)
Refs https://github.com/TryGhost/Product/issues/4081
2023-10-30 12:13:32 +00:00
Sanne de Vries
224ec5146b
Added emoji shortcut to post settings menu (#18791)
Closes https://github.com/TryGhost/Product/issues/4081
2023-10-30 11:49:55 +00:00
Ɗʊƴ
2c72c93331
Updated Vietnamese translations (#18186)
Co-authored-by: Daniel Lockyer <hi@daniellockyer.com>
2023-10-30 09:19:53 +01:00
Ɗʊƴ
5dc5be3aed
Updated Vietnamese translations (#18786)
- Add "{{amount}} more"
2023-10-30 08:13:08 +01:00
Ghost CI
7cda0b2250 v5.71.0 2023-10-27 15:03:15 +00:00
Ghost CI
90660d0516 🎨 Updated Source to v1.1.0 2023-10-27 15:03:15 +00:00
Chris Raible
32d1cd525d
Added route and path tags to Sentry admin events (#18781)
no issue

- All events sent from Admin should now be tagged with the current route
(e.g. `lexical-editor.edit`) and the path (e.g.
`editor/post/65388d98734d6ecc7bbafb87?test`)
- This will allow us to filter events by route and path in Sentry and
improve our alerting logic
2023-10-26 23:38:11 -07:00
Chris Raible
d2ca5daf9d
Enabled Sentry Debug integration for Admin when in development mode (#18780)
no issue

- This change enables the Debug integration in Sentry when the app is
running in development mode (and Sentry is configured with a valid DSN).
- Whenever an event is sent to Sentry, the event & hint are passed to
the beforeSend() function will be logged to the browser console so you
can quickly see a) when events are sent to Sentry and b) exactly what
data & tags are sent with integration
2023-10-26 20:44:39 -07:00
Chris Raible
3a88027611
Removed RewriteFrames integration from Sentry (#18779)
no issue

- Unfortunately the RewriteFrames plugin was not successful in fixing
the duplicated `/assets/assets` in the Sentry stacktraces for admin
- This commit removes the RewriteFrames plugin and reverts the changes
so there will at least be some kind of source code reaching Sentry
2023-10-26 22:04:48 +00:00
Chris Raible
42ac31a270
Fixed duplicate /assets in Sentry stacktrace filenames (#18777)
no issue

- For whatever reason, our Sentry stack traces are adding an extra
`/assets` to the filenames in stacktraces from admin
- Attempted to fix this
[here](3e9ee16ffb)
but it didn't work because at this point the duplication hasn't occurred
yet
- This change strips the `/assets` segment from the filenames, so when
Sentry adds it back in, it doesn't duplicate anything. Would be good to
get to the bottom of why this is happening, but this should hopefully
improve our stacktraces in Sentry in the meantime.
2023-10-26 13:45:11 -07:00
Chris Raible
f82a3e0245
Added console logs to debug Sentry stack traces in Admin (#18776)
no issue

- Our stack traces in Sentry are pointing to the wrong location for source code files. We attempted to fix this [here](https://github.com/TryGhost/Ghost/pull/18773) but this didn't work as expected in staging for some reason
- This commit just adds a few console logs to help with debugging in staging so we can figure out what's going wrong
2023-10-26 12:11:45 -07:00
Daniel Lockyer
3e9ee16ffb Fixed duplicate assets/ in Sentry stacktrace filenames
fixes https://github.com/TryGhost/DevOps/issues/94

- we've seen in production that some filepaths contain a duplicate
  assets folder, but we're not sure why
- instead of spending too much time trying to figure that out, we can
  just fix that in preprocessing by using the RewriteFrames integration
  in Sentry
- this should remove the duplicate folder from the stacktrace frame, if it exists
2023-10-26 11:55:22 +02:00
Alexandre "Lekler" Rodrigues
7dc2744837
Updated Brazilian Portuguese translations (#18764) 2023-10-26 11:53:48 +02:00
renovate[bot]
7af870c022 Update dependency newrelic to v11.4.0 2023-10-25 22:32:28 +00:00
Sag
6db0deb58e
Fixed missing favicon layout in the Recommendations template (#18766)
refs https://github.com/TryGhost/Product/issues/3940
- when a favicon url is null, don't render the img element at all
- when a favicon fails to load, hide the img element from the DOM
2023-10-25 19:13:37 +00:00
Kevin Ansfield
75302ee184
Fixed emoji picker labs flag not being passed through to editor (#18763)
no issue

- fixed `editor`/`lexical` typo in the feature flag name inside Admin
2023-10-25 16:07:24 +00:00
Daniel Lockyer
96b7ba4755 Fixed minor Node deprecation warning
- resolves `DeprecationWarning: In future versions of Node.js, fs.rmdir(path, { recursive: true }) will be removed. Use fs.rm(path, { recursive: true }) instead` in tests
2023-10-25 18:06:44 +02:00
Daniel Lockyer
32bdbf7efd 🔥 Dropped support for Node 16
refs https://github.com/TryGhost/DevOps/issues/75

- this drops support for Node 16 as it has gone past the EOL date
2023-10-25 17:50:56 +02:00
Marcelo Velasquez
a01b50ce12
Updated Spanish translations (#18189)
Co-authored-by: Daniel Lockyer <hi@daniellockyer.com>
2023-10-25 16:37:00 +02:00
Simon Backx
6cc19e1851
Added List-Unsubscribe https endpoint (#18758)
refs TryGhost/Product#4052
2023-10-25 16:16:31 +02:00
Simon Backx
9cad62d826
Fixed loading Portal when Stripe is enabled, members disabled and don… (#18757)
…ations flag disabled

refs https://ghost.slack.com/archives/C02G9E68C/p1698230240376929
2023-10-25 13:18:50 +02:00
Sanne de Vries
8aaa853f2c
Fixed feature image caption color in dark mode (#18756)
No ref
2023-10-25 10:19:16 +00:00
Daniel Lockyer
8726076875 Updated translations
- syncs translations with keys in other packages
2023-10-25 12:06:00 +02:00
Daniel Lockyer
389ced9c4f Reverted i18next-parser to v8.8.0
refs https://github.com/i18next/i18next-parser/issues/939

- a bug in the parser means that files outside of the package are not
  being parsed
2023-10-25 12:06:00 +02:00
Daniel Lockyer
c5c6f84c7d Added CI check to ensure i18n translations are in sync
fixes https://github.com/TryGhost/DevOps/issues/91

- this adds a CI job that will run i18n tests if any of the packages
  that use it have changed
- this helps prevent translations from going out of sync
2023-10-25 12:06:00 +02:00
Simon Backx
a20e269a0b
Added chicagomag.com to ref blocklist (#18750) 2023-10-25 08:16:27 +00:00
Chris Raible
97bcaf1183
Fixed reporting a user's role to Sentry from Admin (#18747)
refs TryGhost/Product#4064

- In Sentry we were seeing the error "Discarded unknown attribute 'user.role'" for most events sent from admin
- This small change removes this error in Sentry and restores the user.role tag for error events in admin
2023-10-24 20:32:05 -07:00
Sag
1b82efe5d2
Added Recommendations feature (#18743)
refs https://github.com/TryGhost/Product/issues/3744


Co-authored-by: Simon Backx <simon@ghost.org>
Co-authored-by: Djordje Vlaisavljevic <dzvlais@gmail.com>
2023-10-24 11:00:11 -03:00
Simon Backx
d0d0453833
Added mailto to list-unsubscribe test header (#18742)
refs https://github.com/TryGhost/Product/issues/4053

Testing changes
2023-10-24 13:34:52 +00:00
Kevin Ansfield
125b09324c
Added editorEmojiPicker labs flag (#18739)
closes https://github.com/TryGhost/Product/issues/4056

- adds new flag with UI and passes it through to the editor so it can conditionally enable the relevant plugins
2023-10-24 12:44:29 +00:00
Simon Backx
c8f71e8504
Added list-unsubscribe feature flag and header (#18736)
refs https://github.com/TryGhost/Product/issues/4053

This adds the feature flag. If enabled, the list-unsubscribe header
should be set. The value currently is only for testing purposes and
probably won't work yet.
2023-10-24 10:35:47 +00:00
Bobvaneck
88d42f204c
Updated ghost.json i18n NL lang (#18735)
Quick typo fix line 4, "aanmedling" -> "aanmelding"

Got some code for us? Awesome 🎊!

Please include a description of your change & check your PR against this
list, thanks!

- [ ] There's a clear use-case for this code change, explained below
- [ ] Commit message has a short title & references relevant issues
- [ ] The build will pass (run `yarn test:all` and `yarn lint`)

We appreciate your contribution!

---

<!-- Leave the line below if you'd like GitHub Copilot to generate a
summary from your commit -->
<!--
copilot:summary
-->
### <samp>🤖 Generated by Copilot at 280cadb</samp>

Fixed a typo in the Dutch translation of a sign up message in
`ghost/i18n/locales/nl/ghost.json`.
2023-10-24 11:08:57 +01:00
Ghost CI
d20ad046db Merged v5.70.2 into main 2023-10-24 08:04:00 +00:00
Ghost CI
27f3f86d23 v5.70.2 2023-10-24 08:03:58 +00:00
renovate[bot]
c543193d86 Update dependency ember-svg-jar to v2.4.7 2023-10-24 07:57:01 +02:00
renovate[bot]
effafd4ab1 Update dependency human-number to v2.0.4 2023-10-23 19:23:55 +00:00
renovate[bot]
09f866227d Update dependency terser to v5.22.0 2023-10-23 18:32:43 +00:00
renovate[bot]
da7271d261 Update dependency newrelic to v11.3.0 2023-10-23 18:29:32 +00:00
Kevin Ansfield
9b1f79f601
Cleaned up lexicalEditor labs flag, switched Post model to lexical-by-default (#18607)
no issue

- flag is no longer used in Admin so we can clean it up in Core too
- updated Post model to set blank document to `lexical` field rather than `mobiledoc` as a default value
- switched over to returning `mobiledoc,lexical` as default formats in Admin API
2023-10-23 17:51:34 +01:00
renovate[bot]
aabeb64a38 Update dependency html-validate to v8.7.0 2023-10-23 11:14:51 +02:00
renovate[bot]
30f168b86b Update dependency nconf to v0.12.1 2023-10-23 11:14:45 +02:00
renovate[bot]
24849d8787
🐛 Fixed indent behaviour for paragraphs (#18724)
no issue

- updates `@tryghost/koenig-lexical` with indent improvements
  - prevents indents on paragraphs/headings etc which are not supported when rendering for front-end display
  - improves indent behaviour for lists so <kbd>Tab</kbd> can be pressed anywhere in a list item to indent rather than only at the beginning of the list
2023-10-23 08:43:25 +00:00
Ghost CI
ed885bd6b3 v5.70.1 2023-10-20 17:48:28 +00:00
renovate[bot]
975b122886
🐛 Fixed errors from using <br> in some situations when creating posts with ?source=html (#18714)
closes https://github.com/TryGhost/Product/issues/4037

- bumps `@tryghost/kg-html-to-lexical` that includes better node normalization to handle `<br>` in top-level text nodes and after a nested block-level element
  - also includes fix for button hrefs having `about:blank` prefixed to hash URLs
2023-10-20 17:09:55 +00:00
Ghost CI
ea42122a1f v5.70.0 2023-10-20 15:03:26 +00:00
Ghost CI
6611f76723 🎨 Updated Source to v1.0.2 2023-10-20 15:03:26 +00:00
Ghost CI
16c5e6e2f9 Merged v5.69.4 into main 2023-10-20 11:41:03 +00:00
Ghost CI
9e24ade17d v5.69.4 2023-10-20 11:41:01 +00:00
Michael Barrett
b4d2dd0282
Handled ServerError to show a custom error message in the admin (#18709)
refs https://github.com/TryGhost/Product/issues/4040

Handled `ServerError` to show a custom error message in the admin when
an unhandled server error occurs (i.e 504). Supersedes
https://github.com/TryGhost/Ghost/pull/18703
2023-10-20 12:02:51 +01:00
Princi Vershwal
3324009381
Added fix for browser test (#18710) 2023-10-20 16:06:50 +05:30
Jono M
caae0edf19
Fixed and restored new AdminX E2E tests (#18606)
refs https://github.com/TryGhost/Product/issues/3831

---

### <samp>🤖 Generated by Copilot at 539c2d3</samp>

This pull request updates and adds some test cases for the date picker
and newsletter features in the Ghost admin panel. It introduces a test
helper function for the date picker in `editor-test.js`, and removes a
redundant test case from `publish-flow-test.js`. It also adds two new
test cases in `publishing.spec.js` using the Playwright framework to
verify the timezone and recipient settings for publishing posts.
2023-10-20 10:00:35 +01:00
Michael Barrett
88e49b4f0e
Added 504 error handling in the admin (#18703)
refs https://github.com/TryGhost/Product/issues/4040

Added error handling for 504 errors to improve the message shown to the
user when a 504 occurs
2023-10-20 08:53:54 +01:00
Michael Barrett
094ea1d2b0
🐛 Fixed plan upgrade not cancelling trial (#18699)
closes https://github.com/TryGhost/Product/issues/4036

Fixed a bug where a member on a trial plan would not have their trial
cancelled when they upgraded to a paid plan
2023-10-20 08:52:08 +01:00
renovate[bot]
93382df314
🐛 Fixed various editor issues (#18645)
closes https://github.com/TryGhost/Ghost/issues/18448

- improved slash menu positioning when opening at the bottom of a post
- fixed backspace sometimes deleting a preceding card (e.g. backspace at end of link inside a paragraph preceded by a card)
- fixed `?source=html` issues
  - images not rendering in front-end output after import
  - images wrapped in links losing their link after import
- fixed inline styles in HTML card content not displaying in the editor
- fixed broken help link in the email card
2023-10-19 19:17:23 +01:00
Paul Davis
489fae98eb
Improve external media inliner URL handling (#18428) 2023-10-19 11:58:41 +01:00
Chris Raible
5a5a756415
Updated theme fixtures for casper and source (#18677)
no issue

- Casper and Source theme files were out of date — this commit updates the theme fixtures, and fixes up a few tests to pass with the updated themes
2023-10-18 14:51:35 -07:00
Siniša Perović
5b8743dd07
Added missing and updated some strings for HR lang (#18024)
Now complete (comments.json, ghost.json, portal.json, and
signup-form.json) Croatian language translation.

Co-authored-by: Daniel Lockyer <hi@daniellockyer.com>
Co-authored-by: Ryan Feigenbaum <48868107+royalfig@users.noreply.github.com>
2023-10-18 13:56:16 -04:00
Sag
5c43945b94
Revert "Added Recommendations feature (#18664)" (#18694)
refs https://github.com/TryGhost/Product/issues/3744

- this reverts GA commit 4e338114de, as
launch has been postponed by a week
2023-10-18 17:03:35 +00:00
renovate[bot]
2d4959d972 Update dependency i18next to v23.6.0 2023-10-18 16:45:25 +00:00
Ghost CI
099db95278 Merged v5.69.3 into main 2023-10-18 09:42:15 +00:00
Ghost CI
cf06037b81 v5.69.3 2023-10-18 09:42:13 +00:00
Steve Larson
a521c23cd3
🐛 Prevented subsequent lexical conversion wiping out content (#18672)
closes TryGhost/Product#4032
- the api flag ?convert_to_lexical converts a mobiledoc string to
lexical
- if run on a post/page with lexical content, would null it out
2023-10-17 20:38:51 +00:00
Sag
9ba1d47b04
Updated copy in the Recommendation email notification (#18671)
closes https://github.com/TryGhost/Product/issues/4031
2023-10-17 17:03:24 +00:00
Sag
22618aad65
Fixed broken link in Recommendations email notification (#18666)
no issue

- paths in the new settings are not using /settings-x/... anymore
2023-10-17 10:44:28 -03:00
Daniel Lockyer
6c2d70f26a Optimized fetching settings from cache adapter
- this optimizes the number of `get` calls we need to do to the adapter
  for settings cache
- for example, this prevents ~187 calls to the adapter during boot
- right now we use the in-memory adapter for settings, so there's probably
  not much benefit, but if we ever switch to the Redis adapter, this will
  help prevent a lot of extra Redis calls
2023-10-17 15:10:02 +02:00
Sag
4e338114de
Added Recommendations feature (#18664)
refs https://github.com/TryGhost/Product/issues/3744

Co-authored-by: Simon Backx <simon@ghost.org>
Co-authored-by: Djordje Vlaisavljevic <dzvlais@gmail.com>
2023-10-17 13:04:35 +00:00
Sodbileg Gansukh
73aa6bc22e Added back the global box-sizing rule 2023-10-17 17:36:44 +08:00
Sam Lord
7f67e98e28 Memoized the getStripeAccountId function
no issue

Some flaky tests found, and it seems as though they're being caused by an invalid Stripe account id.

It's possible that by re-using the worker after a test which calls `setupStripe` could cause some Stripe functionality to not work.
2023-10-16 22:14:10 +01:00
Djordje Vlaisavljevic
08f81dbf90
Updated recommendations design (#18614)
refs https://github.com/TryGhost/Product/issues/4024, https://github.com/TryGhost/Product/issues/3938

- Improved email notification template
- Added `for you` next to the click/subscribe stats

---------

Co-authored-by: Sag <guptazy@gmail.com>
2023-10-16 18:04:15 +01:00
Ghost CI
af29aef5c5 Merged v5.69.2 into main 2023-10-16 16:16:28 +00:00
Ghost CI
75aadb1a92 v5.69.2 2023-10-16 16:16:26 +00:00
Daniel Lockyer
3a564237a5 Temporarily increased timeout for saving Offer in tests
- if Stripe is slow, this might take longer than we expect to finish
- this helps prevent flaky tests in CI
2023-10-16 17:37:42 +02:00
Kevin Ansfield
fac4d774a0
🐛 Fixed styles in HTML card content interfering with editor display (#18647)
closes https://github.com/TryGhost/Product/issues/4027

- bumps `@tryghost/koenig-lexical` to version that includes removal of `<style>` elements and `style` attributes when rendering HTML cards inside the editor
2023-10-16 16:35:55 +01:00
Kevin Ansfield
fc1728c695
🐛 Fixed potential invalid nesting of elements within heading nodes in editor (#18646)
refs https://github.com/TryGhost/Product/issues/3538

- bumps `@tryghost/koenig-lexical` with version that extends our de-nesting transforms to include non-Paragraph element nodes
2023-10-16 16:35:44 +01:00
Kevin Ansfield
f1236a07b4
🐛 Fixed card following paragraph being deleted when pressing Delete at beginning of some formatted text
closes https://github.com/TryGhost/Ghost/issues/18632

- bumps `@tryghost/koenig-lexical` to version containing the delete behaviour fix
2023-10-16 16:34:29 +01:00
Sam Lord
ccbcba0969
Switched to a shared page for each playwright worker
refs: https://github.com/TryGhost/DevOps/issues/78

This speeds up the tests by another 30 seconds on my local machine, and
hopefully takes some time off in CI too
2023-10-16 15:32:13 +00:00
Jae Li
0dbfafede0
Updated simplified Chinese translations (#18552) 2023-10-16 15:14:18 +00:00
Kevin Ansfield
70c2d98fba
🐛 Fixed styles in HTML card content interfering with editor display (#18647)
closes https://github.com/TryGhost/Product/issues/4027

- bumps `@tryghost/koenig-lexical` to version that includes removal of `<style>` elements and `style` attributes when rendering HTML cards inside the editor
2023-10-16 13:52:58 +00:00
Kevin Ansfield
4da6912d4b
🐛 Fixed potential invalid nesting of elements within heading nodes in editor (#18646)
refs https://github.com/TryGhost/Product/issues/3538

- bumps `@tryghost/koenig-lexical` with version that extends our de-nesting transforms to include non-Paragraph element nodes
2023-10-16 13:27:16 +00:00
Kevin Ansfield
8e422163b0
🐛 Fixed card following paragraph being deleted when pressing Delete at beginning of some formatted text (#18644)
closes https://github.com/TryGhost/Ghost/issues/18632

- bumps `@tryghost/koenig-lexical` to version containing the delete behaviour fix
2023-10-16 12:18:23 +00:00
Emilien Bidet
57fe5e7ca6
Added DOCTYPE HTML tag to admin-auth iframe (#18634) 2023-10-16 13:51:10 +02:00
joe-blocher
f303eee8a4
Fixed private mode cookie for local development (#17938)
fixes #17514

- good explanation in https://github.com/TryGhost/Ghost/pull/17938#discussion_r1328157348
- fixes setting the private mode cookie in stricter browsers for local development
2023-10-16 11:09:08 +02:00
syb343
42973397a4
Updated Korean translations (#18625)
no issue

- Updated Korean translations for the comments app.

---

<!-- Leave the line below if you'd like GitHub Copilot to generate a
summary from your commit -->
<!--
copilot:summary
-->
### <samp>🤖 Generated by Copilot at 8eefb72</samp>

This change adds Korean translations for the comments feature of Ghost
in the file `ghost/i18n/locales/ko/comments.json`. This enables Korean
users and readers to interact with Ghost-powered sites using their
native language.
2023-10-16 16:01:07 +07:00
renovate[bot]
a26accd123 Update dependency i18next-parser to v8.9.0 2023-10-16 08:02:41 +02:00
renovate[bot]
6af69a8bcd Update dependency html-validate to v8.6.0 2023-10-16 08:02:03 +02:00
renovate[bot]
29ca414d33 Update dependency mysql2 to v3.6.2 2023-10-16 01:09:26 +00:00
renovate[bot]
68378e84c1 Update dependency webpack to v5.89.0 2023-10-16 01:06:09 +00:00
renovate[bot]
da25e86f41 Update dependency jose to v4.15.4 2023-10-16 01:05:29 +00:00
Ghost CI
d1e03f42fe v5.69.1 2023-10-13 15:03:10 +00:00
renovate[bot]
39c3337113 Update dependency lib0 to v0.2.87 2023-10-13 15:51:32 +02:00
Kevin Ansfield
b6216586c4
Fixed "Cannot read properties of null (reading 'off')" noise in tests (#18610)
no issue

- the lexical multiplayer experiment was causing noise in e2e tests because it tried to use `ghostServer.httpServer` which doesn't exist
2023-10-13 11:46:24 +00:00
Sam Lord
4815aa6e7f
Parallelise browser tests
refs: https://github.com/TryGhost/DevOps/issues/78

Re-introduce parallel browser tests

These were adding in a previous PR, but the difference between local
running tests and using CI introduced failures.

Added additional fixes to ensure the Stripe API key is used in the CLI when running in CI.
2023-10-13 11:42:39 +00:00
Jono M
b75a6d0e7f
Revert "Updated old admin acceptance tests to E2E with AdminX" (#18604)
Reverts TryGhost/Ghost#18599

There seems to be a timezone issue with one of the tests
2023-10-13 10:16:28 +01:00
Kevin Ansfield
b00388eb34
Cleaned up old re-auth code in editor route/template (#18605)
no issue

- brings the lexical editor in line with the previous editor
2023-10-13 09:13:52 +00:00
Bastien Perez
c0a9c435df
Added French translations for comments (#18501) 2023-10-13 07:53:37 +00:00
Daniel Lockyer
85d41d0562 Aligned dependencies with resolution values
- this commit brings all dependencies up-to-date with the version set as
  a resolution
2023-10-13 08:37:36 +02:00
renovate[bot]
64fd510711 Update babel monorepo 2023-10-13 08:12:20 +02:00
Uvindu Rajapakshe
8fe1867b1c
Updated Sinhalese translations (#18398) 2023-10-13 07:51:16 +02:00
Uvindu Rajapakshe
5a70447b5f Updated sinhala translations 2023-10-13 07:49:44 +02:00
Ɗʊƴ
8ef98a693a
Updated Vietnamese translations (#18182)
For smoother translation.
2023-10-13 07:47:53 +02:00
EchoBilisim
06714af91f
Updated Turkish translations (#18565) 2023-10-13 07:45:24 +02:00
Chris Raible
cd4ca3c933
🐛 Fixed member search ignoring filters (#18600)
fixes TryGhost/Product#3792

- Previously, if you had a filter set in the members list (e.g. `status=paid`), then you searched for a member by email address, the original filter would be ignored, and any members matching the search would be returned, regardless of whether they matched the filters. Effectively, the logic was `member matches filters OR member matches search`. To make this worse, the UI still showed both the filters and the search query, leading to confusing results.
- This small change to the backend logic changes the behavior to only return members that match the filter AND the search query, so if you search for a member that does not meet the current filters, they will not be returned.
2023-10-12 16:47:02 -07:00
Jono M
f0efbb7fbb
Updated old admin acceptance tests to E2E with AdminX (#18599)
refs https://github.com/TryGhost/Product/issues/3831

---

<!-- Leave the line below if you'd like GitHub Copilot to generate a
summary from your commit -->
<!--
copilot:summary
-->
### <samp>🤖 Generated by Copilot at 5af23a9</samp>

This pull request updates and adds some test cases for the editor and
the publishing flow in Ghost. It uses a helper function to test the date
picker component in the editor, and removes a redundant test case from
the `publish-flow-test.js` file. It also adds two test cases to the
`publishing.spec.js` file, using the Playwright framework, to check the
publish time and the newsletter settings of a post.
2023-10-12 20:27:16 +01:00
Kevin Ansfield
daa36a91b1
Fixed infinite save loop due to missing post_revisions include on saves (#18597)
refs edcd6caf2b
refs 56f2832754

- although we added an include for `post_revisions` when fetching a post for editing we didn't have the same `include` param added to saves meaning our revisions list was wiped from the store on each update
- on leaving the editor we check the last post revision to see if anything has changed and we need to save again, but with it being wiped and not being re-populated on save it meant the check always failed leading to an infinite loop of saves
- updated the posts and pages adapters to use the full includes param on create/update requests so we don't lose what we're trying to compare against
2023-10-12 19:16:45 +00:00
renovate[bot]
06b95c3bbc Update dependency newrelic to v11.2.1 2023-10-12 16:42:58 +00:00
Sam Lord
0e47ae03e1
Revert "Enable parallel running of browser tests" (#18594)
Reverts TryGhost/Ghost#18544
2023-10-12 14:55:39 +00:00
Sam Lord
661acdee95 Made portal tests run fully parallelised
refs: https://github.com/TryGhost/DevOps/issues/78
2023-10-12 14:33:20 +01:00
Sam Lord
30448a13cd Added event listeners to the webhook server
no issue

Whilst debugging I discovered that the webhooks weren't being received by some tests, causing them to fail. I added log lines for the output from the webhook server to see if I could fix it, and the bug vanished. I narrowed it down to event listeners on the webhook server fixing it.

I'm not sure exactly how this fixes it, I'm guessing the extra events in the event queue have something to do with it.
2023-10-12 14:33:20 +01:00
Sam Lord
09a77f4939 Fixed Ghost Admin browser tests
refs: https://github.com/TryGhost/DevOps/issues/78

Some tests needed to disconnect Stripe + reconnect, so the code had to be changed to match the new Stripe Connect method.

Some tests in publishing.spec have been modified to work out-of-order, which will enable us to use fullyParallel in future (a change which brings test runs down from 85~ seconds to 50~ seconds).
2023-10-12 14:33:20 +01:00
Sam Lord
27b69f083c Use a separate Stripe Connect account for each worker
refs: https://github.com/TryGhost/DevOps/issues/78

This still has problems with parallel tests causing issues for each other, but is so close to a full pass test run
2023-10-12 14:33:20 +01:00
Sam Lord
bf815adc5a More test improvements
no issue
2023-10-12 14:33:20 +01:00
Sam Lord
a497d2ed85 Make sure page.goto is always awaited
no issue
2023-10-12 14:33:20 +01:00
Sam Lord
7aa7447db9 Mocked GhostMailer in browser e2e tests
refs: https://github.com/TryGhost/DevOps/issues/78
2023-10-12 14:33:20 +01:00
Sam Lord
cb38a2d997 Enable parallel running of browser tests
refs: https://github.com/TryGhost/DevOps/issues/78

Instead of running a single instance of Ghost, we now run an instance of Ghost for each test worker.

This has the unfortunate effect that a test failing will close and restart a new instance of Ghost, but in general will be multiple times faster than sequential execution of tests.
2023-10-12 14:33:20 +01:00
Kevin Ansfield
fa0b1c607b
Deleted all Admin code relating to the old editor (#18580)
no issue

- removed labs flag
- removed main editor component and all associated components
- switched usage of `<KoenigBasicHtmlInput>` and `<KoenigBasicHtmlTextarea>` over to use plain `textarea`, the only uses were in settings modals that have been replaced in AdminX
- cleaned up unused editor CSS
2023-10-12 13:17:39 +01:00
renovate[bot]
a6314ff2b2
🐛 Fixed broken rendering and copy/paste when callout card has a bad bg color value (#18547)
closes https://github.com/TryGhost/Product/issues/4008

- bumps all Koenig packages
  - `kg-default-nodes` contains a rendering fix that avoids creating invalid class attributes from bad `backgroundColor` values
  - `kg-converters` contains an update to avoid copying over bad `backgroundColor` values when converting from mobiledoc to lexical
2023-10-12 11:14:07 +00:00
Fabien "egg" O'Carroll
edcd6caf2b Removed post_revisions default include
Having this as a default means that API responses are HUGE!

Co-authored-by: Daniel Lockyer <hi@daniellockyer.com>
2023-10-12 13:10:05 +02:00
Fabien "egg" O'Carroll
56f2832754 Explicitly set include for posts/pages in editor
We want to remove the post_revisions default include from the API but it's
required for the post history feature in the editor. Because the default include
is only applied when no include is sent, we have to set the entire string,
rather than just the missing post_revision related fields
2023-10-12 13:10:05 +02:00
renovate[bot]
534435a634 Update dependency jose to v4.15.3 2023-10-12 08:51:30 +00:00
Chris Raible
de16c13852
Removed 10 minute Post-Revision autosave (#18586)
fixes TryGhost/Product#3480

- Removed this feature because it provides a surface area for bugs and
issues, and isn't really needed
2023-10-11 15:15:00 -07:00
Kevin Ansfield
e213a5ca3a
Fixed Admin sending all post revisions along with each post save request (#18582)
no issue

- deleted `post_revisions` from the serialized JSON string for posts
2023-10-11 17:37:50 +00:00
renovate[bot]
b87edaba72 Update dependency newrelic to v11.2.0 2023-10-11 15:38:59 +00:00
Ryan Feigenbaum
64658424fc
Add missing context descriptions to i18n (#18576)
Added 12 missing descriptions in `context.json`

Ref: https://forum.ghost.org/t/help-translate-ghost-beta/37461/74
2023-10-11 10:34:00 -04:00
Sag
5bcc7f9a7a
Updated recommendations helper template (#18574)
refs https://github.com/TryGhost/Product/issues/3940
2023-10-11 12:33:46 +00:00
Princi Vershwal
3e8efcca90
Bug fix: referral_source should not become duplicated based on different case
Fixes https://github.com/TryGhost/Product/issues/3928
2023-10-11 16:39:51 +05:30
Chris Raible
909c8b53a8
🐛 Fixed bug causing sites with many snippets to be rate limited (#18568)
refs TryGhost/Product#4022

- This block of code converts any snippets that are only in mobiledoc to lexical locally in the editor, then sends a PUT request for each snippet to update it on the server
- For sites with > 50 snippets, these PUT requests were triggering rate limits on Pro of 50 req/s
- This change is a temp fix to add a 100ms sleep between these requests to stay under the 50 req/s limit
- Longer term, we may introduce a migration that will convert all snippets, or modify the editor to somehow lazily convert the snippets when needed, but this temp fix should resolve the rate limiting issue for the time being
2023-10-11 12:06:03 +01:00
renovate[bot]
e10144c3a6 Update dependency @types/nodemailer to v6.4.11 2023-10-11 12:04:05 +02:00
Ghost CI
1965599672 v5.69.0 2023-10-11 09:51:28 +00:00
Ghost CI
143c2ba606 🎨 Updated Source to v1.0.1 2023-10-11 09:51:27 +00:00
Peter Zimon
586efd1f60
Added "about" modal to AdminX
refs. https://github.com/TryGhost/Product/issues/3949

Added an about modal to the new admin x settings.
---------

Co-authored-by: Ronald Langeveld <hi@ronaldlangeveld.com>
2023-10-11 16:09:56 +07:00
Kevin Ansfield
95528d25df
🐛 Fixed URL paste over selected text removing text rather than converting to link in Firefox (#18573)
closes https://github.com/TryGhost/Ghost/issues/18569

- bumps Koenig including...
  - fix for Firefox link pasting
  - addition of `Ctrl/Cmd+Alt+H` for toggling highlight formatting
2023-10-11 09:08:09 +00:00
renovate[bot]
fbb64b6939 Update dependency @types/express to v4.17.19 2023-10-11 11:05:50 +02:00
Fabien "egg" O'Carroll
6de0a2bfff Fixed #bulkDestroy from calling bulkDestroy
Rather than calling itself with the newly created transaction, it would call
the "parent" method, which meant that two events were dispatched. TBH I think
we can get rid of the check for a transaction here, and so the parent method
too, but not 100% sure.
2023-10-11 11:05:16 +02:00
Jesús
5cb914b609
Updated Catalan translations (#18516) 2023-10-11 11:03:20 +02:00
EchoBilisim
d3a5070bdd
Updated Turkish translations (#18460) 2023-10-11 10:58:08 +02:00
Sanne de Vries
1a8ba0693c
Added shortcuts for highlighting and pasting without formatting (#18556)
No ref
2023-10-11 09:34:42 +02:00
renovate[bot]
7764a73e11 Update dependency ember-cli-babel to v8.2.0 2023-10-11 08:36:43 +02:00
Sag
3cc60bc7ea
Added {{readable_url}} helper (#18564)
refs https://github.com/TryGhost/Product/issues/4021

- used in the recommendations template to display urls in a short
readable way, e.g. google.com instead of
https://www.google.com?query=1#section
2023-10-10 18:56:59 +00:00
Kevin Ansfield
0ffe4dd144 Swapped feature image caption input from mobiledoc to lexical
closes https://github.com/TryGhost/Product/issues/4015

Swapped `<KoenigBasicHtmlInput>` for `<KoenigLexicalEditorInput>`

- added support for passing `class` through to the container `<div>`
- updated caption handler to clean HTML and strip/add surrounding `<p>` as necessary
- added passthrough for `onFocus` prop
- updated styles to force font style inheritance within Koeing's `.kg-prose` class
2023-10-10 18:45:51 +01:00
Jono M
839b1e1b43
Fixed tiers resetting in Ember when created in AdminX (#18554)
refs https://github.com/TryGhost/Product/issues/3832

---

<!-- Leave the line below if you'd like GitHub Copilot to generate a
summary from your commit -->
<!--
copilot:summary
-->
### <samp>🤖 Generated by Copilot at 3fbb5c5</samp>

Reload members data when tiers settings change. This ensures that the UI
shows the correct counts and labels of the tiers after updating them in
the settings component.
2023-10-10 15:37:17 +01:00
Kevin Ansfield
3567ae6764 🐛 Fixed editor sometimes getting into a state that resulted in unexpected render output
closes https://github.com/TryGhost/Product/issues/4006

- bumps `koenig-lexical` which includes a fix to prevent non-inline nodes ending up inside paragraph nodes
2023-10-10 14:58:27 +01:00
EchoBilisim
811f8d461c
Updated Turkish translations (#18400) 2023-10-10 11:54:51 +02:00
Raka Afp
b27208cb8e
Updated Bahasa Indonesia translations for Portal (#18512) 2023-10-10 11:54:03 +02:00
Michael Barrett
9a18d43ea6
Refactored theme demo selector functionality (#18541)
refs https://github.com/TryGhost/Product/issues/3999

Refactored the theme demo functionality to remove the hard-coded
reference to the source theme and enable the functionality for any
theme.
2023-10-10 09:19:08 +01:00
Jono M
81d2fa09da
Redesigned Admin settings (#18545)
refs https://github.com/TryGhost/Product/issues/3832

Last piece of cleanup, removing the old feature flag. See
https://github.com/TryGhost/Ghost/pull/18360 for the commit that
actually switched over the routes.
2023-10-10 07:37:01 +01:00
Jono M
4b07de885a
Restored newsletter email verification flow (#18548)
refs https://github.com/TryGhost/Product/issues/3832

---

<!-- Leave the line below if you'd like GitHub Copilot to generate a
summary from your commit -->
<!--
copilot:summary
-->
### <samp>🤖 Generated by Copilot at 8a40cbc</samp>

This pull request adds a feature to verify the sender email address for
a newsletter in the admin settings app. It implements a UI component, a
custom hook, and a server-side service to handle the verification
process. It also fixes a minor typo and a navigation issue in the
newsletters module.
2023-10-10 07:34:48 +01:00
Steve Larson
dcb9bfa7fc
Support twitter embeds using x as host (#18550)
closes TryGhost/Product#4017
- fixed users reporting x.com not creating twitter embed
2023-10-09 15:55:26 -05:00
Kevin Ansfield
f4acbb581b 🐛 Fixed copy/paste from Word missing headings and text formats
closes https://github.com/TryGhost/Product/issues/4007

- bumps Koenig packages containing extended TextNode and HeadingNode with extra DOM parsing support for the non-semantic HTML generated by Word when copy/pasting
2023-10-09 20:21:41 +01:00
Sag
ff70f850b9
Fixed MySQL database tests (#18542)
no issue

- updated snapshots for MySQL database tests
2023-10-09 15:43:16 +00:00
Simon Backx
9abd466397
Renamed reason to description in recommendations table (#18527)
fixes https://github.com/TryGhost/Product/issues/4005

We no longer use the 'reason' of a recommendation, but allow a flexible
description instead. Because this is a breaking change in the API, we do
this before making this feature GA.
- Added new database utils for renaming a column
- Added new migration to rename the column
- Updated all references in code
2023-10-09 11:19:44 -03:00
renovate[bot]
222a23fdef
🐛 Fixed double-insert when pasting plain text in Firefox (#18537)
closes https://github.com/TryGhost/Product/issues/3500

- update dependency @tryghost/koenig-lexical to v0.4.23
  - includes fix for double-insert when pasting plain text in Firefox
2023-10-09 10:19:27 +00:00
Ronald Langeveld
c3ab2d322f
Removed Admin X labs flags in email service (#18536)
no issue

- Removed redundant Admin X flags from the email service since we are preparing for release.
- updated snapshots

---

<!-- Leave the line below if you'd like GitHub Copilot to generate a
summary from your commit -->
<!--
copilot:summary
-->
### <samp>🤖 Generated by Copilot at fb0df07</samp>

Simplified staff URL generation for emails by removing unused feature
flag and code. This affects the `StaffServiceEmails.js` file and the
`adminXSettings` flag.
2023-10-09 17:05:10 +07:00
Michael Barrett
bc3ad1a798
Refactored theme demo functionality (#18525)
refs https://github.com/TryGhost/Product/issues/3998

Refactored the theme demo functionality to remove the hard-coded
reference to the source theme and enable the functionality for any
theme. This also ensures the demo images are correctly referenced in
pro.
2023-10-09 09:05:43 +01:00
Peter Zimon
e68db848dc
AdminX: reroute settings-x to settings (#18360)
refs. https://github.com/TryGhost/Product/issues/3949

---------

Co-authored-by: Jono Mingard <reason.koan@gmail.com>
Co-authored-by: Daniel Lockyer <hi@daniellockyer.com>
2023-10-09 08:12:46 +01:00
Ghost CI
fc1a13ad5d v5.68.0 2023-10-06 15:33:07 +00:00
Ghost CI
0267221111 v5.67.1 2023-10-06 15:27:44 +00:00
renovate[bot]
07cc90a5d0 Update dependency @tryghost/koenig-lexical to v0.4.22 2023-10-06 17:17:02 +02:00
Steve Larson
40d3cc634a
Bumped Koenig packages (#18529)
no refs
- contains some improvements for html imports
- improved drag n drop support with images
- fixed /card [url] entry/shortcuts
2023-10-06 10:02:57 -05:00
Djordje Vlaisavljevic
2574546f2e
Updated recommendation email design (#18521)
refs https://github.com/TryGhost/Product/issues/3939

- Fixed Outlook and iOS Mail issues
- Fixed inconsistent button color
2023-10-06 13:04:59 +00:00
Daniel Lockyer
49dc6f8cdc Removed static conditional
- I actually wanted this to be a production-only check but forgot to
  change it before pushing
2023-10-06 13:46:17 +02:00
Daniel Lockyer
7a7d64b764 Removed unused variable 2023-10-06 13:46:17 +02:00
Daniel Lockyer
07e603a5cd Reverted "Update sentry-javascript monorepo to v7.73.0"
- this reverts commit ec5e2cef20
2023-10-06 13:46:17 +02:00
renovate[bot]
394c09be49 Update Koenig packages 2023-10-06 12:40:19 +01:00
Sanne de Vries
dc11270954
Fixed post preview icons in dark mode (#18517)
No ref
2023-10-06 11:03:58 +00:00
renovate[bot]
991f815a51
Update Koenig packages (#18477)
[![Mend
Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com)

This PR contains the following updates:

| Package | Change | Age | Adoption | Passing | Confidence |
|---|---|---|---|---|---|
|
[@tryghost/kg-card-factory](https://togithub.com/TryGhost/Koenig/tree/master#readme)
([source](https://togithub.com/TryGhost/Koenig)) | [`4.0.10` ->
`4.0.11`](https://renovatebot.com/diffs/npm/@tryghost%2fkg-card-factory/4.0.10/4.0.11)
|
[![age](https://developer.mend.io/api/mc/badges/age/npm/@tryghost%2fkg-card-factory/4.0.11?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![adoption](https://developer.mend.io/api/mc/badges/adoption/npm/@tryghost%2fkg-card-factory/4.0.11?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![passing](https://developer.mend.io/api/mc/badges/compatibility/npm/@tryghost%2fkg-card-factory/4.0.10/4.0.11?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![confidence](https://developer.mend.io/api/mc/badges/confidence/npm/@tryghost%2fkg-card-factory/4.0.10/4.0.11?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
|
[@tryghost/kg-default-cards](https://togithub.com/TryGhost/Koenig/tree/master#readme)
([source](https://togithub.com/TryGhost/Koenig)) | [`9.1.4` ->
`9.1.5`](https://renovatebot.com/diffs/npm/@tryghost%2fkg-default-cards/9.1.4/9.1.5)
|
[![age](https://developer.mend.io/api/mc/badges/age/npm/@tryghost%2fkg-default-cards/9.1.5?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![adoption](https://developer.mend.io/api/mc/badges/adoption/npm/@tryghost%2fkg-default-cards/9.1.5?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![passing](https://developer.mend.io/api/mc/badges/compatibility/npm/@tryghost%2fkg-default-cards/9.1.4/9.1.5?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![confidence](https://developer.mend.io/api/mc/badges/confidence/npm/@tryghost%2fkg-default-cards/9.1.4/9.1.5?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|

---

### Release Notes

<details>
<summary>TryGhost/Koenig (@&#8203;tryghost/kg-card-factory)</summary>

###
[`v4.0.11`](https://togithub.com/TryGhost/Koenig/compare/@tryghost/kg-card-factory@4.0.10...@tryghost/kg-card-factory@4.0.11)

[Compare
Source](https://togithub.com/TryGhost/Koenig/compare/@tryghost/kg-card-factory@4.0.10...@tryghost/kg-card-factory@4.0.11)

</details>

---

### Configuration

📅 **Schedule**: Branch creation - "every weekday" (UTC), Automerge - At
any time (no schedule defined).

🚦 **Automerge**: Disabled by config. Please merge this manually once you
are satisfied.

♻ **Rebasing**: Never, or you tick the rebase/retry checkbox.

👻 **Immortal**: This PR will be recreated if closed unmerged. Get
[config help](https://togithub.com/renovatebot/renovate/discussions) if
that's undesired.

---

- [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check
this box

---

This PR has been generated by [Mend
Renovate](https://www.mend.io/free-developer-tools/renovate/). View
repository job log
[here](https://developer.mend.io/github/TryGhost/Ghost).

<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzNy4wLjMiLCJ1cGRhdGVkSW5WZXIiOiIzNy4wLjMiLCJ0YXJnZXRCcmFuY2giOiJtYWluIn0=-->

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-10-06 10:53:31 +01:00
renovate[bot]
ec5e2cef20 Update sentry-javascript monorepo to v7.73.0 2023-10-06 11:12:32 +02:00
Shaun Roselt
3f5a2370c2
Updated Afrikaans Translations (#18399) 2023-10-06 10:58:35 +02:00
Jonathan Browne
e8840510fc
Fixed post items getting cut off on iOS (#17189)
- This PR is a fixed version of #16765. I took a different approach for this to work around some of the issues that were found after that one got merged. In that PR's description, I mentioned that there were multiple scroll areas for the post editor that were somehow displaying at different sizes. The reason appears to be that the CSS vh unit includes some areas that are obscured by Safari's toolbars, since those toolbars may disappear if the <body> element is scrolled. However, since Ghost's admin area uses <div> elements for all scrolling, those toolbars never disappear, and so the space becomes unused. We can work around this by changing to the CSS dvh unit, which always represents the current size of the viewport.
- Most pages have enough padding that the vh unit doesn't cause any problems. In this PR, I've changed it for two places that do break, the post editor and the post settings menu (which can get the "Delete" button cut off). I also included the sidebar width fix from the previous PR.
- Video of the fixed behavior (compare with the old behavior video linked in #16765): https://github.com/TryGhost/Ghost/assets/12983479/eceda43a-23c3-4cf6-9de2-8eda54a98100
2023-10-06 10:58:08 +02:00
renovate[bot]
d07161a077 Update dependency tracked-built-ins to v3.3.0 2023-10-06 10:42:18 +02:00
Daniel Lockyer
3e42d4b1be Implemented cachebuster for Admin-X Settings and Koenig-Lexical files
fixes https://github.com/TryGhost/DevOps/issues/86

- this will now hash the files and append a cachebuster, so we never
  serve stale files again
2023-10-06 10:41:37 +02:00
Ugurcan Yildirim
bf9bf9f210
Fixed typo in Turkish translations (#18485) 2023-10-06 10:39:40 +02:00
Alexandre "Lekler" Rodrigues
cab29e1604
Updated Brazilian Portuguese translations (#18510)
refs https://github.com/TryGhost/Team/issues/2795
2023-10-06 10:35:10 +02:00
renovate[bot]
ba6830453a Update dependency jwks-rsa to v3.1.0 2023-10-06 07:54:57 +02:00
Chris Raible
70304d92d4
🐛 Fixed bug preventing changes to tier benefit capitalization (#18406)
fixes TryGhost/Product#3970

- When saving a tier, it is impossible to change the capitalization of a
benefit
- The logic when saving a tier matches benefits by `name.toLowercase()`
and then overwrites the incoming change with the name from the previous
version of the benefit
- This changes the logic to match benefits the same way using
`name.toLowercase()`, but use the _incoming_ benefit's capitalization
rather than the old benefit's, to allow users to e.g. change 'TEst
benefit' to 'Test benefit'
2023-10-05 19:04:11 -07:00
Kevin Ansfield
d812781888
Prevented Escape from closing the image editor (#18505)
no issue

`Escape` can often be hit when attempting to cancel or undo an action
through muscle memory despite it not doing anything in Pintura except
closing the modal and losing all changes

- added `willClose` option to the Pintura modal settings which only
returns `true` when we've detected a click on the close button
2023-10-05 17:30:56 +01:00
Djordje Vlaisavljevic
1775591472 Fixed Stripe thumbnail src
no refs
2023-10-05 15:10:34 +01:00
Nick Moreton
8122f02f17
Added resize option to Pintura (#18504)
Got some code for us? Awesome 🎊!

Please include a description of your change & check your PR against this
list, thanks!

- [ ] There's a clear use-case for this code change, explained below
- [ ] Commit message has a short title & references relevant issues
- [ ] The build will pass (run `yarn test:all` and `yarn lint`)

We appreciate your contribution!

---

<!-- Leave the line below if you'd like GitHub Copilot to generate a
summary from your commit -->
copilot:summary
2023-10-05 13:08:23 +00:00
Sam Lord
45f704ce86 Add a metric when shutting down in-flight requests takes more than 15 seconds
refs: https://github.com/TryGhost/DevOps/issues/64
2023-10-05 12:31:02 +01:00
Daniel Lockyer
85098e07d4 Configured all unit tests to use dot reporter
refs https://ghost.slack.com/archives/C02G9E68C/p1696490748701419

- this configures mocha to use the dot reporter because the default is
  way too verbose in CI
2023-10-05 12:24:24 +02:00
Simon Backx
1882b7048d
Added click tracking for recommendations helper (#18496)
fixes https://github.com/TryGhost/Product/issues/4001
2023-10-05 11:37:02 +02:00
Nick Moreton
d454f18ad2
Removed sticker option from Pintura (#18497)
Removed the sticker feature from the image editor component in both the
new and the legacy admin apps. This simplifies the UI and the code of
the `usePinturaEditor.ts` and `koenig-image-editor.js` files.
2023-10-05 10:32:13 +01:00
Kevin Ansfield
1b5359dce1
Removed old/unused posts list item component (#18495)
no issue

- cleanup of unused files
2023-10-05 10:01:12 +01:00
Sag
0c8218b8f6
Removed wrapper in the Recommendation helper template (#18488)
no issue
2023-10-04 22:11:25 +00:00
Sag
380f3b5ca2
Added missing unit tests to the Recommendations package (#18489)
refs https://github.com/TryGhost/Product/issues/3954
2023-10-04 21:52:22 +00:00
Sag
2391ccc3db
Added more options to "order", in the Recommendations API (#18487)
closes https://github.com/TryGhost/Product/issues/4000
2023-10-04 19:32:03 +00:00
Kevin Ansfield
08e4593093 Added pre-emptive fetch of editor module after logging in to Admin
no issue

Reduces likelihood of seeing the "Loading editor..." state when accessing the editor by fetching the editor module in the background after login.

- added `koenig` service
  - `.resource` getter for returning a React suspense resource object to reduce duplication across main editor and HTML input components
  - `.fetch()` method that fetches the Koenig module, avoids concurrent or repeated fetches by utilising an internal `._fetchTask` ember-concurrency task
- updated Koenig components to use the `koenig` service and associated resource for fetching the module
  - required setting up `editorResource` inside the component's class and passing it in as a prop to the suspense-aware components as we need access to Ember's dependency injection available in the class
- added `koenig.fetch()` call to our post-login code in the `session` service so the fetch is started before the editor is accessed
2023-10-04 17:45:42 +01:00
Sag
15adb254f0
Added an option to recommend back in Admin Settings (#18478)
refs https://github.com/TryGhost/Product/issues/3978

- added "GET /incoming_recommendations/" browse endpoint to the Admin
API - we store incoming recommendations as mentions in the database. The
new endpoint reuses the Mentions API underneath to fetch verified
mentions of type recommendation - recommendation-specific attributes are
returned by the new endpoint, including calculated fields such as the
"RecommendingBack" boolean
- show "Recommend back" option for sites recommending me, only if I
haven't recommended the site already
2023-10-04 15:22:04 +00:00
Michael Barrett
e06a5825dc
🐛 Fixed cache key generation not taking into account array value (#18476)
`generateOptionsData` was not taking into account the query params
`include`, `fields` and `format` could also be an array if included in
the request query like: `?fields[]=title&fields[]=slug` or
`?fields=title&fields=slug`
2023-10-04 15:54:59 +01:00
Kevin Ansfield
c56bfd51de Fixed posts list hrefs showing "mobiledoc-editor" and added "editor-beta" redirects
no issue

- switched posts list over to using the `lexical-editor.edit` route so it uses the `/editor/` href rather than `/mobiledoc-editor/`
- added redirect handling for the `/editor-beta/*` urls to our generic 404 route so anyone upgrading with the beta URLs still open in tabs or saved won't hit a 404
2023-10-04 14:37:12 +01:00
Simon Backx
bed3e05eee Added full unit test coverage to recommendations package
fixes https://github.com/TryGhost/Product/issues/3954
2023-10-04 15:31:59 +02:00
Simon Backx
9f9f028e82 Added 100% test coverage for Recommendation class
refs https://github.com/TryGhost/Product/issues/3954
2023-10-04 15:31:59 +02:00
renovate[bot]
76a5b9861a Update dependency jose to v4.15.2 2023-10-04 12:46:19 +00:00
Kevin Ansfield
259321a1a9 Fixed focus sometimes being lost when clicking on cards at bottom of editor
refs https://github.com/TryGhost/Koenig/pull/964

- editor behaviour has changed to select cards on mousedown, this has the effect of the following click/mouseup event potentially occuring off of the editor canvas if a previously selected card collapses when leaving edit mode
- updated the focus-on-click-below behaviour to skip if the previous mousedown event occurred on a card to avoid unexpected re-focus and card deselection
2023-10-04 13:31:30 +01:00
Sag
506488df11
Fixed typo in the {{recommendations}} helper (#18468)
refs https://github.com/TryGhost/Product/issues/3940
2023-10-04 12:25:27 +00:00
Kevin Ansfield
89a3774983 Fixed e2e-browser publishing tests
refs https://github.com/TryGhost/Ghost/pull/18422

- now that we're using the externally-loaded editor we need to wait for it to load and be ready before moving focus to it and starting to type
2023-10-04 13:20:05 +01:00
Steve Larson
8bc653802d
Released new editor (#18422)
Promoted our beta editor to the default editor. Keep an eye on (or subscribe to) https://ghost.org/changelog/ for release announcements with full details.

- moved the beta editor (Lexical-based editor) to the default editor; all pages and posts will now use it
- all mobiledoc (previous editor) posts will remain mobiledoc until opened in the editor at which point will be converted to Lexical on the fly and open in the new editor
2023-10-04 12:22:54 +01:00
Daniel Lockyer
639be25f1d Updated Koenig-Lexical bundling
refs https://github.com/TryGhost/DevOps/issues/83

- this will now continue use the dev server assets if we tell it to,
  or copy the dependency package files to the built folder otherwise
- removes `editor` from config API because it's no longer needed
- removes dependency on `editor.url` in tests, as this no longer exists
- edits dev script to pass dev server URL as env var
- adds `@tryghost/koenig-lexical` dependency to Admin
2023-10-04 12:50:21 +02:00
Ghost CI
81a6f0a00f v5.67.0 2023-10-04 08:36:13 +00:00
Chris Raible
5bdad1b945
Updated minimum CLI version to 1.25.0 (#18462)
no issue

- Updated minimum ghost-cli version to 1.25.0 to accommodate shipping
multiple builtin themes
2023-10-04 03:39:32 +00:00
Chris Raible
f9edbc22f0
Updated browser tests to use class names from Source theme (#18459)
no issue

- After updating the default theme to be Source instead of Casper, the
browser tests broke because they depended on the class names in Casper,
which have changed
- This fixes that by updating the classes to be compatible with the
Source theme
2023-10-03 20:03:57 +00:00
Steve Larson
be209cdcf7
Bumped Koenig packages (#18455)
no refs
- various fixes and improvements, see Koenig repo for more info
2023-10-03 16:36:59 +00:00
Simon Backx
22484d6f96
Added more unit test coverage for recommendations package (#18450)
refs https://github.com/TryGhost/Product/issues/3954
2023-10-03 15:11:47 +00:00
Chris Raible
80a6fe17d0 Added Source as the new default theme
refs TryGhost/Product#3510

- Added `TryGhost/Source` as a submodule in `ghost/core/content/themes` so `Source` will ship with Ghost (along with Casper)
- With this change, new installs will use `Source` as the default theme. Existing sites will have `Source` installed, but not activated, as this is a large change and we don't want to drastically change existing sites without warning. Users can upgrade to use `Source` simply by clicking 'Activate' in design settings.
- Updated protections to prevent users from uploading their own conflicting version of `Source`
2023-10-03 14:02:08 +02:00
renovate[bot]
add7f1283b Update dependency terser to v5.21.0 2023-10-03 11:54:38 +00:00
Daniel Lockyer
34ac0cccb6 🎨 Increased maximum number of custom theme settings to 20
refs https://github.com/TryGhost/Product/issues/3969

- this now allows themes to have up to 20 custom theme settings
- also bumps `@tryghost/zip` to try and ensure it uses the version
  without fs-extra
2023-10-03 13:39:55 +02:00
Simon Backx
1f97c9eb97
Added 100% unit test coverage for UnsafeData (#18443)
refs https://github.com/TryGhost/Product/issues/3954
2023-10-03 11:01:29 +00:00
Sanne de Vries
dd84a42b43
Updated styles for editor loading and error states (#18441)
No ref
2023-10-03 09:55:43 +00:00
Princi Vershwal
3442fdfee6
🐛 Show specific tier posts under 'Paid-member only' filter in admin panel (#17043)
fixes https://github.com/TryGhost/Ghost/issues/16988
2023-10-03 14:43:11 +05:30
Daniel Lockyer
2d1eddcb51 Removed relative path link
- this helps maintainability in the future because Admin doesn't need to
  care where Core is, as we just resolve to the path where the `ghost`
  package is
2023-10-02 21:36:33 +02:00
Sag
7cdf7ce82e
Moved initiatialisation of the Recommendation services behind a feature flag (#18429)
no issue
2023-10-02 19:00:30 +00:00
Sag
8ed0c19a1c
Updated logic for whether a site is recommending you back (#18426)
refs https://github.com/TryGhost/Product/issues/3958

- `url:~a.com` matches a.com, sub.a.com and a.com/path
- added a stricter check based on hostname and pathname, but that
ignores www, protocol, query parameters and hash fragments
2023-10-02 12:14:59 -03:00
Simon Backx
b5fc527f8d
Added order option to recommendations API with sorting on counts (#18417)
refs https://github.com/TryGhost/Product/issues/3957

This changes how we fetch recommendations:
- Relations can be included in one query instead of extra queries
- Sorting is now possible by click or subscriber counts
2023-10-02 14:51:03 +00:00
renovate[bot]
1f251f63ac Update dependency jose to v4.15.1 2023-10-02 13:53:47 +00:00
Sag
b1e4ead01c
Fixed uniqueness validation of Recommendation URL (#18383)
refs https://github.com/TryGhost/Product/issues/3818

- added a check to compare hostname and pathnames of URLs. Different
subdomain or different pathname = different URLs, but protocol, www,
query parameters and hash fragments are ignored.
2023-10-02 10:34:59 -03:00
Sanne de Vries
c95da6b2d9
Swapped control symbol for text on Windows (#18420)
Refs https://github.com/TryGhost/Product/issues/3973
2023-10-02 13:03:58 +00:00
Sanne de Vries
6acf93c0d2
Updated Twitter wording and logos (#18419)
No ref
2023-10-02 12:48:34 +00:00
Sanne de Vries
76c9f04013
Added keyboard shortcut section to post settings menu (#18409)
Refs https://github.com/TryGhost/Product/issues/3725

---------

Co-authored-by: Kevin Ansfield <kevin@lookingsideways.co.uk>
2023-10-02 14:24:54 +02:00
Ghost CI
991beb4d70 Merged v5.66.1 into main 2023-10-02 12:19:57 +00:00
Ghost CI
ae3cd0edc1 v5.66.1 2023-10-02 12:19:55 +00:00
Sodbileg Gansukh
fa99608150
Fixed post edit button URL
no issues

- the edit button in the post list wasn't doing anything with an empty link
- now it has same URL as the post list item and it directs to its edit screen
2023-10-02 13:46:39 +02:00
Sanne de Vries
f70dcd6861
Replaced Twitter with X in editor and tags (#18415)
No ref
2023-10-02 11:16:07 +00:00
Sodbileg Gansukh
01646580e4 Fixed post edit button URL
no issues

- the edit button in the post list wasn't doing anything with an empty link
- now it has same URL as the post list item and it directs to its edit screen
2023-10-02 17:50:06 +08:00
Jono M
bb0dff3571
Updated to highlight searched keywords in AdminX settings (#18112)
refs https://github.com/TryGhost/Product/issues/3832

---

<!-- Leave the line below if you'd like GitHub Copilot to generate a
summary from your commit -->
<!--
copilot:summary
-->
### <samp>🤖 Generated by Copilot at 1347a85</samp>

Added search functionality to the settings page using a custom hook and
a service. The `useSearch` hook uses the `useSearchService` function to
create a search service object that provides the filter and highlight
logic. The `highlightKeywords` function from the search service is
passed to the `SettingsGroupHeader` component to render the settings
with the matching keywords.
2023-10-02 09:33:24 +01:00
renovate[bot]
f87e3317f2 Update dependency ember-cli-babel to v8.1.0 2023-10-02 08:52:09 +02:00
renovate[bot]
de3a222231 Update dependency postcss to v8.4.31 2023-10-02 08:51:53 +02:00
renovate[bot]
708ff0564d Update dependency @embroider/macros to v1.13.2 2023-10-02 08:51:39 +02:00
renovate[bot]
be022b9e58 Update dependency i18next-parser to v8.8.0 2023-10-02 08:51:28 +02:00
renovate[bot]
b06ec3929d Update dependency html-validate to v8.5.0 2023-10-02 08:51:10 +02:00
Ghost CI
edba377657 v5.66.0 2023-09-29 15:03:04 +00:00
Kevin Ansfield
d541991046 Fixed collection cards not re-rendering when posts were bulk-edited
no issue

- bulk edit actions bypass the Bookshelf model hooks which meant our page reset behaviour in `onSaving` and `onDestroyed` was not being hit
- added overrides to `bulkEdit` and `bulkDestroy` to add the same page-reset behaviour any time we have a bulk edit or destroy
2023-09-28 18:05:01 +01:00
Daniel Lockyer
6e46e8b5ba
Refactored loading of Koenig-Lexical package (#18392)
refs https://ghost.slack.com/archives/C02G9E68C/p1695901801049219?thread_ts=1695035790.122589&cid=C02G9E68C

- DRY up all the fetching of Koenig-Lexical so we only do it from one place
- this will help when we switch to loading Koenig-Lexical from local assets

Co-authored-by: Jono Mingard <reason.koan@gmail.com>
2023-09-28 17:43:12 +02:00
Djordje Vlaisavljevic
e4f518868e
Updated Recommendations design (#18390)
refs https://github.com/TryGhost/Product/issues/3938

- Updated "Recommendation received" email design
- Slightly improved how dark favicons show in dark mode
- Added TabView with counter variant to Storybook
2023-09-28 15:22:00 +01:00
Daniel Lockyer
35d7e50027 Deleted Lexical sandbox page
refs https://ghost.slack.com/archives/C02G9E68C/p1695900212734549?thread_ts=1695035790.122589&cid=C02G9E68C

- this is no longer needed as we have Storybook to demo the components
2023-09-28 14:13:07 +02:00
Simon Backx
05215734af
Added recommend back URL (#18382)
refs https://github.com/TryGhost/Product/issues/3958

- Disabled automatic network retries for external site lookups (=> timed
out to 5s in every situation because it returned 404 when a site doesn't
implement the Ghost api)
- Disabled representing a modal when it is already present on hash
changes
- Added support for search params in modals
- Handle `?url` search param in the addRecommendationModal
2023-09-28 10:54:16 +00:00
Sag
3d91c37d5b
Added Enter as shortcut to go next, when adding a recommendation (#18381)
closes https://github.com/TryGhost/Product/issues/3953
2023-09-27 17:03:36 +02:00
Sanne de Vries
5e85d2f58f
Fixed feature image caption dark mode (#18379)
No ref
2023-09-27 10:49:35 +00:00
Sag
8b62ebd40a
Fixed recommendation add/delete in AdminX (#18378)
no issue
2023-09-27 09:54:19 +00:00
Ghost CI
390ba70c88 Merged v5.65.1 into main 2023-09-27 08:20:40 +00:00
Ghost CI
bddbf19a76 v5.65.1 2023-09-27 08:20:39 +00:00
Daniel Lockyer
aee6458b4e
Fixed listing all themes when a theme path is invalid
- in the event one of the theme paths is invalid (a symlink that goes to
  a non-existent path), Ghost currently bails out of listing all themes
  because `fs.stat` throws an error
- in that case, we should just ignore the theme and continue
- this helps us prepare new symlinks whilst their source is not valid
- this commit wraps the code with try-catch to protect against that
- also adds a test
2023-09-27 09:57:31 +02:00
renovate[bot]
aa8fa94b20 Update dependency ember-cli-babel to v8.0.1 2023-09-27 09:36:15 +02:00
renovate[bot]
8857dd4125 Update dependency markdown-it to v13.0.2 2023-09-27 09:35:56 +02:00
Michael Barrett
497f3b40dd
🐛 Fixed issue with settings being marked as dirty when visibility is changed (#18370)
refs https://github.com/TryGhost/Product/issues/3924

Settings were being marked as dirty when visibility was changed causing
the confirm dialog to show when navigating away from the settings page.
This change manually computes the dirtiness of the setting to ensure the
visibility change is ignored
2023-09-27 08:18:21 +01:00
Ronald Langeveld
29f98104df
Fixed icon not updating on Ember from AdminX (#18374)
refs
https://www.notion.so/ghost/df5bdea8f7ea4aca9d25eceb6a1bf34c?v=be2f15b6b58b4c27a0e11374282bead0&p=bafc80a9ad644fb18fe338f89500ff36&pm=s

- we now reload ember's settings data when settings data updated, to
keep certain data synced, such as the icon in the sidebar.

---

<!-- Leave the line below if you'd like GitHub Copilot to generate a
summary from your commit -->
<!--
copilot:summary
-->
### <samp>🤖 Generated by Copilot at 572a569</samp>

Refactor settings component to use Ember Octane and reload settings
model after saving. This improves the UI and code quality of the
`admin-x` component.
2023-09-27 09:36:45 +07:00
Simon Backx
b51e12d90f
Added emails for recommendations (#18361)
fixes https://github.com/TryGhost/Product/issues/3938
2023-09-26 15:29:17 +00:00
Sag
d24c7c5fa6
Added {{recommendations}} theme helper (#18340)
refs https://github.com/TryGhost/Product/issues/3940

- the {{recommendation}} helper fetches recommendations from the Content
API and renders a HTML template with pre-defined CSS classes
- the HTML template can be overridden in themes, by uploading a file
under partials/recommendations.hbs
- the CSS classes are not pre-defined, they need to be defined in
individual themes
- if there are no recommendations, nothing is rendered
- the {{recommendations}} helper currently accepts "page", "limit",
"filter", and "order" as options
2023-09-26 17:15:17 +02:00
Simon Backx
3a5c233122
🐛 Fixed staff emails eventually having invalid styles (#18363)
fixes https://github.com/TryGhost/Ghost/issues/17937

- We used a global Handlebars instance, which means it was reused across
Ghost
- Partials are different between parts of Ghost, that means the partials
were overwritten every time a normal Mailgun email was send
- All staff emails send after a normal newsletter would have invalid
styles because the partials for styles were overwritten
2023-09-26 16:25:03 +02:00
Jono M
fb435cc115
Fixed minor issues with AdminX Ember sync (#18359)
refs https://github.com/TryGhost/Product/issues/3832
2023-09-26 12:23:52 +00:00
Sam Lord
5836685d29 Updated snapshots to include got 13 support for brotli
no issue
2023-09-26 12:45:14 +01:00
Sam Lord
fd7ead6ce6 Upgraded to latest version of @tryghost/request
refs: https://github.com/TryGhost/Product/issues/3782

Latest version of request avoids using the OS-level name resolution system. This prevents long shutdowns from occuring where the OS is blocking the process from exiting cleanly.

The new version uses `got` 13, which has many breaking changes. Some of these are resolved within @tryghost/request (like response errors), but input parameters need to be changed.
2023-09-26 12:45:14 +01:00
Daniel Lockyer
8e83836de9 Fixed listing all themes when a theme path is invalid
- in the event one of the theme paths is invalid (a symlink that goes to
  a non-existent path), Ghost currently bails out of listing all themes
  because `fs.stat` throws an error
- in that case, we should just ignore the theme and continue
- this helps us prepare new symlinks whilst their source is not valid
- this commit wraps the code with try-catch to protect against that
- also adds a test
2023-09-26 13:33:39 +02:00
Daniel Lockyer
ec9b668e02 Updated translations with latest changes 2023-09-26 13:33:39 +02:00
Kevin Ansfield
f296761577 Fixed snapshot errors for changing dates in collection card tests
no issue

- including a body snapshot for the pages API collection card tests causes issues because the generated HTML is dynamic and contains post creation times meaning the snapshot was unstable
- removed the body snapshot for the tests concerned for now as they are mostly there to catch saving issues rather than rendering issues
2023-09-26 12:23:33 +01:00
Jono M
ea64107f9d
Fixed syncing tiers status between Ember and AdminX (#18353)
refs https://github.com/TryGhost/Product/issues/3832

---

<!-- Leave the line below if you'd like GitHub Copilot to generate a
summary from your commit -->
<!--
copilot:summary
-->
### <samp>🤖 Generated by Copilot at 0ddea75</samp>

Added `membersUtils` service to `AdminXSettings` component to support
tiers feature. Reloaded service after saving settings with
`TiersResponseType`.
2023-09-26 12:13:09 +01:00
Jono M
1f2dbc95f9
Updated links to old settings to link to AdminX (#18352)
refs https://github.com/TryGhost/Product/issues/3832

---

<!-- Leave the line below if you'd like GitHub Copilot to generate a
summary from your commit -->
copilot:summary
2023-09-26 10:33:00 +00:00
Jono M
d51322c95b
Updated AdminX API error handling to report to Sentry (#18300)
refs https://github.com/TryGhost/Product/issues/3832

---

<!-- Leave the line below if you'd like GitHub Copilot to generate a
summary from your commit -->
<!--
copilot:summary
-->
### <samp>🤖 Generated by Copilot at d434b20</samp>

This pull request refactors the error handling logic in various
components of the admin-x-settings app to use a custom hook called
`useHandleError`. This hook wraps the Sentry integration and provides a
consistent and reliable way of reporting and logging errors. This
improves the code quality, readability, and maintainability of the app.
The pull request also improves the Sentry initialization by passing the
DSN and the environment to the `ServicesProvider` component.
2023-09-26 11:09:42 +01:00
Jono M
84ae5f58d2
Fixed site title syncing from AdminX to Ember (#18349)
refs https://github.com/TryGhost/Product/issues/3832
2023-09-26 10:51:43 +01:00
Ronald Langeveld
ac7abb9edd
Added custom theme type to emberdatatypemapping (#18348)
no issue

- added a missing emberDataTypeMapping needed for theme uploads to be
handled correctly

---

<!-- Leave the line below if you'd like GitHub Copilot to generate a
summary from your commit -->
<!--
copilot:summary
-->
### <samp>🤖 Generated by Copilot at 40647c6</samp>

Added support for custom theme settings API in Ember Data. Updated
`settings.js` to map the new `CustomThemeSettingsResponseType` to the
store.
2023-09-26 08:55:45 +00:00
Jono M
328a785065
Updated AdminX to sync data changes to Ember (#18327)
refs https://github.com/TryGhost/Product/issues/3832

---

### <samp>🤖 Generated by Copilot at 7a91ba3</samp>

This pull request enables data synchronization between the Ember app and
the React app for the settings module. It passes `onUpdate` and
`onInvalidate` functions as props from the Ember app to the React app
through the `ReactApp` component and the `ServicesContext`. It also
removes unused code and adds some debugging logs in the `setting`
serializer and the `settings` service.
2023-09-25 17:29:09 +01:00
Princi Vershwal
3f04c93e21
Renamed Kyiv to Kiev till we pass the moment library update (#18263)
Renamed Kyiv to Kiev till we pass the moment library update
2023-09-25 21:58:55 +05:30
Peter Zimon
731f0c2a5e
AdminX settings GA design refinements (#18332)
refs. https://github.com/TryGhost/Product/issues/3949

- some minor copy had to be updated
- we had a little bug in the small version of dropdowns
- the crash page was just a plain text without any way out (e.g. allowing navigating to dashboard)
2023-09-25 17:49:12 +02:00
Steve Larson
498c375240
Added placeholder for beta editor (#18339)
closes TryGhost/Product#3906
- show placeholder 'post' for posts and 'page' for pages
2023-09-25 15:39:54 +00:00
Kevin Ansfield
562e8af26a Fixed saving collection card with 'latest' collection on sqlite
no issue

- added passthrough of `transaction` property when fetching post IDs otherwise SQLite will error with ` "Knex: Timeout acquiring a connection. The pool is probably full. Are you missing a .transacting(trx) call?"`
2023-09-25 15:11:05 +01:00
Kevin Ansfield
6480cfb161 Added e2e tests for creating+saving pages containing collection cards
no issue

- act as regression tests for internal collection code changes
- useful to test as we've hit missing transaction passthrough for sqlite a couple of times that wasn't caught
2023-09-25 15:11:05 +01:00
Aileen Booker
907796d857 Fixed ForceUpgrade state not working with Explore
no issue

- When a user is in forced upgrade state, clicking on `Explore` would keep them trapped inside of the Explore frame rather than redirecting to Ghost(Pro)
2023-09-25 12:56:04 +01:00
Allan Stromfeldt Christensen
6757d984af
Add line-height for descenders getting cut off in Post settings Tag names (#17836) 2023-09-25 17:37:11 +08:00
Daniel Lockyer
49d36fc1a1 Allowed config to override labs flags
fixes https://github.com/TryGhost/DevOps/issues/72

- in order to have greater control of labs flags outside of Ghost, this
  commit allows Ghost to respect the value of `labs: { flagName: boolean }`
- this means we can hardcode a value to true or false, irrespective of
  the value in the DB or GA flags array
- also adds tests to check functionality
2023-09-25 11:24:32 +02:00
Daniel Lockyer
1432c6f311 Rewritten labs unit test to use assert over should
refs https://github.com/TryGhost/DevOps/issues/72

- assert is the way we're going with assertion libraries and makes the
  code a little clearer
2023-09-25 11:24:32 +02:00