Commit Graph

37202 Commits

Author SHA1 Message Date
Jono M
e8e0d84d50
Deleted old Ember settings pages (#18740)
refs https://github.com/TryGhost/Product/issues/4055

---

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

Removed unused components related to announcement settings, custom theme
settings, and file upload. These components were part of a deprecated
feature or a legacy UI.
2023-11-06 06:46:31 +00:00
Ghost CI
ad7efbe92e v5.72.0 2023-11-03 16:04:27 +00:00
Simon Backx
bf859c38ee
🐛 Fixed showing recommendations on custom welcome pages (#18864)
no issue

When a custom welcome page is set for a tier, the recommendations modal
didn't show. If recommendations were disabled, there was also no toast
to confirm the sign up.

To fix this, we'll need to set the success and action query parameters
on the welcome page, but only if it is not an external site.
2023-11-03 15:02:46 +00:00
Simon Backx
fee402a340
🐛 Fixed adding recommendation with URL redirect breaking one-click-subscribe (#18863)
fixes https://github.com/TryGhost/Product/issues/4102

E.g. you recommend myghostsite.com, while that site redirects all
traffic to [www.myghostsite.com](#):

The redirect causes CORS issues, which means we cannot detect
one-click-subscribe support.
- This is fixed by moving the whole detection to the backend, which has
the additional benefit that we can update it in the background without
the frontend, and update it on every recommendation change.
- This change also fixes existing recommendations by doing a check on
boot (we can move this to a background job in the future).
2023-11-03 15:02:45 +01:00
renovate[bot]
25d27f2589 Update dependency mysql2 to v3.6.3 2023-11-03 03:45:00 +00:00
Chris Raible
cbba26dccd
Disabled babel sourcemaps in admin build (#18858)
no issue

- Reverting
a96224a152
because it didn't help but made admin builds slower
2023-11-03 03:32:34 +00:00
Chris Raible
a96224a152
Enabled babel sourcemaps in admin build (#18857)
no issue

- Somewhere along the process of building the admin app, the sourcemaps
are getting corrupted
- This commit is to test the theory that babel is the source of the
corruption, because it isn't generating sourcemaps, so we are missing a
step in the process
2023-11-02 17:28:42 -07:00
Chris Raible
f987ce3523
Added sourcesContent key to admin sourcemaps (#18855)
no issue

- The sourcemaps currently generated by the admin build do not include
the `sourcesContent` key
- This commit is to experiment with this change, in particular to see if
it improves the stacktraces available in Sentry from errors in the admin
app
- Currently the stacktraces in admin show the minified code — hopefully
this change will make the stacktraces show the original source code to
make it easier to debug issues from within Sentry
- Might thoroughly break the sourcemaps, in which case I will revert this
2023-11-02 15:18:30 -07:00
Chris Raible
2db24c9282
Removed path tags from Sentry (#18853)
no issues

- The `path` tags added to Sentry events from admin aren't super useful, since they often include e.g. a
post id in the path, which isn't super useful for filtering/grouping
- We already have a `route` tag which can be used to filter to a
particular route, which renders the `path` tags unnecessary
2023-11-02 14:13:38 -07:00
Chris Raible
8a0a9c07fb
Removed assets/ from sources in admin sourcemaps (#18852)
no issue

- Follow up to
85fca5891f
- With the `sourceRoot` key added in the commit above, the sourcemaps
were still failing validation
(https://sourcemaps.io/report/1698954693695_https%3A%2F%2Fassets.ghostfoundation.org%2Fadmin%2F1603%2Fassets%2Fchunk.143.ab029856ba6d72733dfa.js)
- With the `sourceRoot` key, the maps were pointing to
'<CDN_URL>/assets/../assets/...' which is invalid
- This change simply strips the leading `assets/` from any sources in
the sourcemaps
2023-11-02 13:12:45 -07:00
Djordje Vlaisavljevic
cce3d12f45 Made expertise and comment body text wrap when necessary
refs https://github.com/TryGhost/Product/issues/4045
2023-11-02 20:02:34 +00:00
Steve Larson
1c710e2410
Enabled emoji picker in various admin-x fields (#18850)
closes TryGhost/Product#4097
- enabled in announcement bar
- enabled in signup (portal) description
- enabled in newsletter footer
2023-11-02 19:45:49 +00:00
Chris Raible
85fca5891f
Added sourceRoot key to sourcemaps before asset-delivery runs (#18849)
no issue

- Follow up to
a382cd8a91
and
fb34e285fc
- The `sourcemap-postprocess` addon was ineffective because the assets
were being copied to `/ghost/core/core/built` before the addon was run,
so the changes weren't being applied in staging/production
- This change makes the required modifications to the sourcemaps before
copying them
2023-11-02 18:46:56 +00:00
Kevin Ansfield
dffc547219
Fixed errors when leaving editor screen (#18847)
refs https://github.com/TryGhost/Ghost/pull/18816

When opening a new post in the editor and immediately leaving we would hang because we attempted to save a revision rather than just throwing the blank post away.

- added additional `hadDirtyAttributes` check to the forced-revision save when leaving
- added additional destroyed post checks to the save task to avoid saving a deleted post when leaving the editor
- removed unnecessary waits for save tasks that prevented leaving the editor when the title on a new post had been filled in but not saved (matches previous editor behaviour)
2023-11-02 17:55:53 +00:00
Sag
b3c8055efe
Fixed email_disabled field after member update in Admin (#18827)
closes https://github.com/TryGhost/Product/issues/4046
- when editing the member's email in Admin, the email_disabled field was
not recalculated, making it inconsistent with the suppression list
- now, if the new email is part of the suppression list, we set
email_disabled to true. Otherwise set it to false
2023-11-02 17:15:03 +00:00
FungY911
764b4692f7
Updated Slovak translations (#18823) 2023-11-02 18:02:25 +01:00
Steve Larson
41af35d402
Bumped editor packages (#18845)
no refs
2023-11-02 16:05:31 +00:00
Sag
6952966e46
Fixed title for incoming recommendations from private sites (#18846)
closes https://github.com/TryGhost/Product/issues/4098
- when a site is private, the metadata title is "My Site — Private Site
Access". When fetching the metadata via oembed, we get "Private Site
Access" as publisher, and "My Site — Private Site Access" as title
- this fix removes "- Private Site Access" from the metadata title when
a Ghost site is private
2023-11-02 16:02:04 +00:00
Kevin Ansfield
5b89cee450
Fixed emoji picker positioning and keyboard nav in captions (#18843)
refs https://github.com/TryGhost/Product/issues/4092
refs https://github.com/TryGhost/Product/issues/4094
refs https://github.com/TryGhost/Product/issues/4091

- fixes up/down arrows not working when selecting emojis inside of captions and other nested editors
- fixes picker positioning when used in different sized text
- fixes picker re-positioning when menu would be cut off screen
2023-11-02 11:55:21 +00:00
Andrei Vintila
c12a40989d
Updated Romanian translations (#18821) 2023-11-02 11:07:58 +01:00
renovate[bot]
8d324a6257 Update dependency @vitejs/plugin-react to v4.1.1 2023-11-02 09:51:00 +01:00
Ronald Langeveld
a81d803324
Added offers modal toggle functions (#18839)
refs https://github.com/TryGhost/Product/issues/4047

- Wired up Offers Modal hide / show toggling

---

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

This pull request enhances the offers feature in the admin settings by
adding cancel buttons and navigation options to the modal components. It
also refactors the `OffersModal` component to use the `AddOfferModal`
component for creating new offers.
2023-11-02 08:36:16 +00:00
Ghost CI
59817c3c9b Merged v5.71.2 into main 2023-11-02 08:27:00 +00:00
Ghost CI
3fd2571cb2 v5.71.2 2023-11-02 08:26:58 +00:00
Michael Barrett
213e54aa71
Fixed error caused by uploading empty redirects YAML file (#18820)
no refs

Fixed error caused by uploading empty redirects YAML file:

```
Cannot read properties of undefined (reading '302')
```

This error was occurring due to `yaml.load` returning `undefined` when
the provided yaml file was empty. I've made the check on the return
value of `yaml.load` stricter (i.e we only want an `object`) to prevent
this error from occurring.
2023-11-02 08:17:52 +00:00
Daniel Lockyer
388d1a8f2d
🐛 Fixed detection of {{recommendations}} and {{readable_url}} helpers
fixes https://github.com/TryGhost/Ghost/issues/18836
fixes https://github.com/TryGhost/Ghost/issues/18834

- this bumps GScan to a version which detects the helpers
2023-11-02 08:45:29 +01:00
Daniel Lockyer
defe0aeed7 Updated lockfile 2023-11-02 08:23:06 +01:00
renovate[bot]
c370f0c843 Update dependency ember-cli-deprecation-workflow to v2.2.0 2023-11-02 07:36:51 +01:00
renovate[bot]
e2bf61c03e Update dependency @types/react to v18.2.34 2023-11-02 07:35:38 +01:00
Sodbileg Gansukh
c1d52c3d23 Fixed theme action icon color in dark mode
no issues
2023-11-02 14:10:58 +08:00
Sodbileg Gansukh
11c5658a44 Added static design of the Offers edit screen in AdminX 2023-11-02 13:31:13 +08:00
Steve Larson
3f368d05d9
🐛 Fixed post feature image caption updates saving with every keystroke (#18833)
closes TryGhost/Product#4093
- added proper on blur handling to trigger autosave instead of each update to the caption text
2023-11-01 22:44:55 +00:00
Chris Raible
0c972d8276
Fixed EmailRenderer stripping inline width tags from images (#18587)
no issue

- product card outputs the original width/height of the image in emails
which results in overflown images in Outlook
- Combined with https://github.com/TryGhost/Koenig/pull/983/files, this
change fixes rendering for product card images in Outlook

---------

Co-authored-by: Sodbileg Gansukh <sodbileg.gansukh@gmail.com>
2023-11-01 15:05:39 -07:00
Chris Raible
fb34e285fc
Removed assets/ from sources in admin sourcemaps (#18832)
no issue

- Follow up to https://github.com/TryGhost/Ghost/pull/18825
- Adding the sourceRoot key didn't seem to work, so I'm just removing
the `assets/` prefix from all the sources to hopefully correct the issue
2023-11-01 22:02:56 +00:00
Chris Raible
4ae8fc91fa
Updated AJAX error context sent to Sentry from admin (#18831)
no issues

- Added isAjaxError tag to all errors sent from admin with a true/false
value
- Removed all Ajax context and tags if the error is not an Ajax error
- Updated names of Ajax tags to use camelcase instead of dot notation
2023-11-01 14:48:23 -07:00
Kevin Ansfield
75672a902b
Enabled emoji picker in feature image caption (#18824)
closes https://github.com/TryGhost/Koenig/pull/1038

- updated `<KoenigLexicalEditorInput>` to load `<EmojiPickerPlugin>` and compose it into the editor unless used with `<KoenigLexicalEditorInput @emojiPicker={{false}} />`
- bumped Koenig packages so `EmojiPickerPlugin` is available to import from `koenig-lexical`
2023-11-01 21:22:56 +00:00
Steve Larson
8b57bf7efc
Bumped lexical editor packages (#18828)
no refs
2023-11-01 21:05:44 +00:00
Chris Raible
c91527efc8
Improved Sentry logging for AJAX errors in admin (#18829)
no issue

- Currently AJAX errors that surface in Admin get logged to Sentry with
super generic messages like "Error"
- This commit adds more context to the information that's sent to sentry
and should make it easier to identify the error at a glance
2023-11-01 14:03:32 -07:00
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
Peter Zimon
9259d0cc01
Updated settings keywords (#18815)
refs. https://github.com/TryGhost/Product/issues/4060

- the title of setting groups were not included in the searchable
keywords so it wasn't possible to list only a single group's settings
2023-11-01 10:25:36 +00:00
Sodbileg Gansukh
7904d1c832
Added static version of Offers list and new screens to AdminX (#18812) 2023-11-01 18:19:14 +08: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