59b304dfca
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. |
||
---|---|---|
.. | ||
adapter-cache-memory-ttl | ||
adapter-cache-redis | ||
adapter-manager | ||
admin | ||
announcement-bar-settings | ||
api-framework | ||
api-version-compatibility-service | ||
audience-feedback | ||
bookshelf-repository | ||
bootstrap-socket | ||
collections | ||
constants | ||
core | ||
custom-theme-settings-service | ||
data-generator | ||
domain-events | ||
donations | ||
dynamic-routing-events | ||
email-addresses | ||
email-analytics-provider-mailgun | ||
email-analytics-service | ||
email-content-generator | ||
email-events | ||
email-service | ||
email-suppression-list | ||
express-dynamic-redirects | ||
external-media-inliner | ||
extract-api-key | ||
ghost | ||
html-to-plaintext | ||
i18n | ||
importer-handler-content-files | ||
importer-revue | ||
in-memory-repository | ||
job-manager | ||
link-redirects | ||
link-replacer | ||
link-tracking | ||
magic-link | ||
mail-events | ||
mailgun-client | ||
member-attribution | ||
member-events | ||
members-api | ||
members-csv | ||
members-events-service | ||
members-importer | ||
members-ssr | ||
mentions-email-report | ||
milestones | ||
minifier | ||
model-to-domain-event-interceptor | ||
mw-api-version-mismatch | ||
mw-cache-control | ||
mw-error-handler | ||
mw-session-from-token | ||
mw-update-user-last-seen | ||
mw-version-match | ||
mw-vhost | ||
nql-filter-expansions | ||
oembed-service | ||
offers | ||
package-json | ||
payments | ||
post-events | ||
post-revisions | ||
posts-service | ||
recommendations | ||
referrers | ||
security | ||
session-service | ||
settings-path-manager | ||
slack-notifications | ||
staff-service | ||
stats-service | ||
stripe | ||
tiers | ||
update-check-service | ||
verification-trigger | ||
version-notifications-data-service | ||
webmentions | ||
tsconfig.json |