Ghost/ghost
Steve Larson 59b304dfca
🐛 Fixed editor 'are you sure?' modal displaying when no user changes occurred (#20370)
ref https://linear.app/tryghost/issue/ENG-661
- added a dirty check to ignore the `direction` field from the lexical
object; this is set dynamically and shouldn't be serialized, see
facebook/lexical/issues/4998
- fixed a bug where the modal wouldn't display on leaving the editor if
the post had no revisions (e.g. import); this could result in content
being saved over published content with no user action
- added Sentry logging for the modal

We would sometimes see the "Are you sure?" modal pop up when opening a
post in the editor and attempting to navigate away immediately, without
any changes to the post. This appears to be an issue with the serialized
Lexical data, which would change after loading into the editor,
resulting in the scratch and model's lexical values to differ, making
Admin think the user changed the content.

Ideally we'll see a fix upstream (or fix it ourselves). We may need to
revisit this if we experience other such situations. It's awfully
difficult to be able to set a flag saying 'the editor is done loading',
so this seems to be the best path for the moment.

Testing is difficult because we don't actually load the new Lexical editor into e2e/acceptance tests. I've added a unit test that can at least simulate the editor state changing on editor load.
2024-06-13 11:07:56 -05:00
..
adapter-cache-memory-ttl
adapter-cache-redis Added an optional timeout parameter to AdapterCacheRedis (#20131) 2024-05-02 20:39:23 -07:00
adapter-manager Update TryGhost packages 2024-05-01 17:01:41 +02:00
admin 🐛 Fixed editor 'are you sure?' modal displaying when no user changes occurred (#20370) 2024-06-13 11:07:56 -05:00
announcement-bar-settings
api-framework Update TryGhost packages 2024-05-27 16:58:32 +02:00
api-version-compatibility-service Fixed handling requests with mismatching version and missing key 2024-05-02 13:03:26 +02:00
audience-feedback Update TryGhost packages 2024-05-27 16:58:32 +02:00
bookshelf-repository Update TryGhost packages 2024-05-27 16:58:32 +02:00
bootstrap-socket Update TryGhost packages 2024-05-27 16:58:32 +02:00
collections Update TryGhost packages 2024-05-27 16:58:32 +02:00
constants
core 🐛 Fixed internal link search sometimes showing latest posts after pasting URL (#20374) 2024-06-12 13:01:21 +00:00
custom-theme-settings-service Update TryGhost packages 2024-05-27 16:58:32 +02:00
data-generator Fixed data generator not setting posts.plaintext value 2024-06-13 16:20:53 +01:00
domain-events Update TryGhost packages 2024-05-27 16:58:32 +02:00
donations Update dependency typescript to v5.4.5 2024-04-16 09:08:58 +02:00
dynamic-routing-events Configured all unit tests to use dot reporter 2023-10-05 12:24:24 +02:00
email-addresses Pinned dependencies (#20257) 2024-05-27 15:29:32 +00:00
email-analytics-provider-mailgun
email-analytics-service Update TryGhost packages 2024-05-27 16:58:32 +02:00
email-content-generator Update dependency fs-extra to v11.2.0 2023-11-28 11:54:44 +01:00
email-events
email-service Update dependency html-validate to v8.20.1 2024-06-12 13:08:05 +02:00
email-suppression-list
express-dynamic-redirects
external-media-inliner Add Lexical support to the external-media-inliner (#19149) 2023-11-29 17:56:03 +00:00
extract-api-key
ghost Update dependency @types/node to v20.14.2 2024-06-12 16:09:26 +02:00
html-to-plaintext
i18n Added Greek locale for comments, portal, signup-form, ghost. (#20361) 2024-06-11 16:49:01 -04:00
importer-handler-content-files
importer-revue Update TryGhost packages 2024-05-27 16:58:32 +02:00
in-memory-repository Improved performance for filter strings with multiple neq statements (#20198) 2024-05-13 10:35:27 -05:00
job-manager Update TryGhost packages 2024-05-27 16:58:32 +02:00
link-redirects Updated documentation for LinkRedirects (#20378) 2024-06-12 23:27:15 +00:00
link-replacer Pinned dependencies (#20257) 2024-05-27 15:29:32 +00:00
link-tracking Update TryGhost packages 2024-05-27 16:58:32 +02:00
magic-link Update TryGhost packages 2024-05-27 16:58:32 +02:00
mail-events Update TryGhost packages 2024-05-27 16:58:32 +02:00
mailgun-client Update TryGhost packages 2024-05-27 16:58:32 +02:00
member-attribution Fixed extra arguments being supplied to function calls 2024-05-07 11:44:07 +02:00
member-events
members-api Added logging to track offer redemption (#20329) 2024-06-05 17:48:43 +01:00
members-csv 🔒 Added escaping to member export CSV fields 2024-04-03 10:21:02 +02:00
members-events-service Update TryGhost packages 2024-05-27 16:58:32 +02:00
members-importer Update TryGhost packages 2024-05-27 16:58:32 +02:00
members-ssr Removed members caching cookies when no member is logged in (#20349) 2024-06-06 16:28:36 -07:00
mentions-email-report
milestones Update TryGhost packages 2024-05-01 17:01:41 +02:00
minifier Update dependency terser to v5.31.1 2024-06-06 15:59:09 +00:00
model-to-domain-event-interceptor
mw-api-version-mismatch Fixed extra arguments being supplied to function calls 2024-05-07 11:44:07 +02:00
mw-cache-control
mw-error-handler Update TryGhost packages 2024-05-27 16:58:32 +02:00
mw-session-from-token Added function names to more middleware 2024-05-06 17:51:39 +02:00
mw-update-user-last-seen
mw-version-match Update TryGhost packages 2024-05-27 16:58:32 +02:00
mw-vhost
nql-filter-expansions
oembed-service Update TryGhost packages 2024-05-27 16:58:32 +02:00
offers Update TryGhost packages 2024-05-27 16:58:32 +02:00
package-json Update TryGhost packages 2024-05-27 16:58:32 +02:00
payments Update TryGhost packages 2024-05-01 17:01:41 +02:00
post-events
post-revisions Added custom excerpt to post revisions (#20323) 2024-06-05 14:47:33 +01:00
posts-service Update TryGhost packages 2024-05-27 16:58:32 +02:00
recommendations Update dependency @types/node to v20.14.2 2024-06-12 16:09:26 +02:00
referrers
security Update TryGhost packages 2024-05-01 08:49:04 +02:00
session-service Added function names to more middleware 2024-05-06 17:51:39 +02:00
settings-path-manager Update TryGhost packages 2024-05-27 16:58:32 +02:00
slack-notifications Update TryGhost packages 2024-05-27 16:58:32 +02:00
staff-service Added email address alignment protections (#19094) 2023-11-23 10:25:30 +01:00
stats-service Update Types packages 2024-04-30 22:00:55 +02:00
stripe Update TryGhost packages 2024-05-27 16:58:32 +02:00
tiers Update TryGhost packages 2024-05-27 16:58:32 +02:00
update-check-service Update TryGhost packages 2024-05-27 16:58:32 +02:00
verification-trigger Update TryGhost packages 2024-05-01 17:01:41 +02:00
version-notifications-data-service Fixed handling requests with mismatching version and missing key 2024-05-02 13:03:26 +02:00
webmentions Update TryGhost packages 2024-05-27 16:58:32 +02:00
tsconfig.json