Commit Graph

11831 Commits

Author SHA1 Message Date
Kevin Ansfield
4394580c1a
🐛 Fixed and improved various editor issues
closes https://github.com/TryGhost/Product/issues/4146
closes https://github.com/TryGhost/Ghost/issues/17753
closes https://github.com/TryGhost/Product/issues/4127
closes https://github.com/TryGhost/Ghost/issues/18903

- 🐛 Fixed blank render output in some cases when using line breaks
- 🐛 Fixed backspace at end of link sometimes deleting whole link in Firefox
- 🐛 Fixed plain black generated video thumbnails in Safari
- 🎨 Added `srcset` and `loading="lazy"` to header card images
- 🎨 Improved accessibility of buttons in render output by adding `aria-role` attributes
- 🎨 Removed Ctrl/Cmd+H shortcut as it clashed with expected OS shortcut
2023-11-14 21:59:45 +00:00
Ghost CI
590505ca17 v5.73.1 2023-11-13 08:19:25 +00:00
Ghost CI
f46ba34c54 v5.73.0 2023-11-10 16:04:09 +00:00
Ghost CI
44791446a2 Merged v5.72.2 into main 2023-11-10 01:45:16 +00:00
Ghost CI
a333820324 v5.72.2 2023-11-10 01:45:14 +00:00
Sanne de Vries
532dc2165f
Removed padding on feature image alt field (#18937)
Refs https://github.com/TryGhost/Product/issues/4130
2023-11-09 16:41:29 +00:00
Kevin Ansfield
30a66da4e3
🐛 Fixed various editor issues (#18934)
refs https://github.com/tryghost/ghost/issues/18752, https://github.com/TryGhost/Product/issues/3897, https://github.com/TryGhost/Product/issues/4112,https://github.com/TryGhost/Product/issues/3802, https://github.com/TryGhost/Product/issues/4104, https://github.com/TryGhost/Ghost/issues/18866, https://github.com/TryGhost/Ghost/issues/18753, https://github.com/TryGhost/Product/issues/4116, https://github.com/TryGhost/Ghost/issues/18888, https://github.com/TryGhost/Ghost/issues/18844

- 🐛 Fixed browser focus on editor when clicking card ([Koenig/#1051](https://github.com/TryGhost/Koenig/pull/1051))
- 🐛 Fixed signup card styles with image background ([Koenig/#1052](https://github.com/TryGhost/Koenig/pull/1052))
- 🐛 Fixed slash menu having fixed position when scrolling ([Koenig/#1054](https://github.com/TryGhost/Koenig/pull/1054))
- 🐛 Fixed signup card text color with transparent background ([Koenig/#1053](https://github.com/TryGhost/Koenig/pull/1053))
- 🐛 Fixed text formats being lost when copy/pasting from Google Docs ([Koenig/#1055](https://github.com/TryGhost/Koenig/pull/1055))
- 🐛 Fixed pasting link behaviour in single line nested editors ([Koenig/#1056](https://github.com/TryGhost/Koenig/pull/1056))
- 🐛 Fixed backspace behaviour at start of aside/quote ([Koenig/#1057](https://github.com/TryGhost/Koenig/pull/1057))
- 🐛 Fixed text having unexpected formats when rendering ([Koenig/#1058](https://github.com/TryGhost/Koenig/pull/1058))
- 🐛 Fixed placeholder descenders being cut off in nested editor ([Koenig/#1059](https://github.com/TryGhost/Koenig/pull/1059))
- 🐛 Fixed HTML->Lexical conversion not handling paragraphs inside blockquotes ([Koenig/#1061](https://github.com/TryGhost/Koenig/pull/1061))
2023-11-09 16:26:22 +00:00
Michael Barrett
bcfb8e1291
Misc Sentry tweaks (#18900)
no refs

- Removed redundant duplicated `save_revision` tag when capturing slow
saves
- Standardised Sentry tags casing (`snake_case`)
- Renamed tag `adminX settings component-` to
`adminx_settings_component`
2023-11-09 14:10:53 +00:00
Princi Vershwal
1e8176f596
Wired up Offer update Page 2023-11-09 05:54:29 +00:00
Chris Raible
78b1d130a9
Fixed admin sourcemap fingerprinting for chunk files (#18920)
no issue

- The fingerprinting on chunk files was happening twice (once by ember
and once by webpack), resulting in the .js file and the .map file not
matching
- This change prevents ember from fingerprinting the chunk.*.map files,
so the resulting .map and .js files will have the same basename
- No real functional difference here, just a bit easier to find the
corresponding .map file for a given .js file
2023-11-08 23:15:11 +00:00
Chris Raible
b90d3632df
Reverted ember-cli-terser to 4.0.1 (#18917)
no issue

- ember-cli-terser 4.0.2 apparently has a regression that breaks the
sourcemap generation for the admin ember app
- this reverts the package to 4.0.1, which fixes the sourcemaps and
should generate much more readable stack traces in Sentry
- Validating the sourcemaps locally succeeded, but will need to test
this on staging to confirm everything is working properly in CI and with
the CDN.
2023-11-08 20:35:45 +00:00
renovate[bot]
85979df33d Update sentry-javascript monorepo to v7.78.0 2023-11-08 14:06:32 +01:00
Ghost CI
82af2a12f9 Merged v5.72.1 into main 2023-11-07 02:07:18 +00:00
Ghost CI
63e603f2f6 v5.72.1 2023-11-07 02:07:16 +00:00
Kevin Ansfield
c93bc708bd
Removed block styling for <i> elements in Admin (#18882)
no issue

- we don't use `<i>` elements anywhere in our own code and this styling was causing odd in-editor previews of HTML cards when their content contained `<i>`
2023-11-06 16:18:59 +00:00
Sanne de Vries
7f6a252721
Removed feature image indicator and improved visibility of feature im… (#18877)
…age button

No ref
2023-11-06 14:56:24 +01:00
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
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
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
Steve Larson
41af35d402
Bumped editor packages (#18845)
no refs
2023-11-02 16:05:31 +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
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
renovate[bot]
c370f0c843 Update dependency ember-cli-deprecation-workflow to v2.2.0 2023-11-02 07:36:51 +01: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
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
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
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
Susheel Thapa
2e5fdffe32
Fixed typos (#18648)
Co-authored-by: Daniel Lockyer <daniellockyer@fastmail.com>
2023-10-31 15:21:44 +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
Michael Barrett
6074b1d04f
Fixed admin-x not reporting to Sentry (#18774)
no refs
2023-10-31 09:12:54 +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
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