Ghost/ghost/admin/app/utils
Kevin Ansfield 459a2c553e Added full-page refresh when new post route is in a bad state
ref https://linear.app/tryghost/issue/ONC-323

When the store gets into a bad state for new posts that causes saves to fail we can detect that by looking at the `model.isNew` property. Currently our best approach to fix this state is to restart the app.

- added a `didTransition()` hook to our `lexical-edit.new` route
  - detects the bad state, logs the error, and triggers a browser refresh
  - logs with a `recreatedPostIsGood` property that will let us know if we could instead just try recreating the post and avoiding a full refresh (so far we have no reproduction case so we need to learn what we can)
- added `sinon-chai` dependency for better assertions on spies/stubs
- added `sentry-testkit` dependency so we can test our Sentry integration calls
  - we can't use sinon for these calls because of the way Sentry's es6 imports work
- extracted our full Sentry config object generation to a util function so it can be re-used in unit tests
  - updated our integrations list to disable the default `dedupe` integration because it can cause very unexpected/difficult to debug test failures when you're asserting using `sentry-testkit`
2024-09-23 22:38:34 +01:00
..
analytics.js Added Posthog event sending to trackEvent function (#19716) 2024-02-20 14:32:56 -08:00
bound-one-way.js Switched from ember-cli-shims to new module imports (#779) 2017-08-22 14:53:26 +07:00
caja-sanitizers.js Fixed multiple no-shadow linting errors 2020-06-17 09:35:46 +01:00
copy-text-to-clipboard.js 🐛 Fixed copy-to-clipboard buttons in Chrome + Firefox 2021-10-05 15:32:23 +01:00
ctrl-or-cmd.js Standardize on var-less export default across ember app 2015-10-06 10:59:50 +01:00
currency.js Fixed typos (#18648) 2023-10-31 15:21:44 +00:00
fetch-koenig-lexical.js Implemented cachebuster for Admin-X Settings and Koenig-Lexical files 2023-10-06 10:41:37 +02:00
flatten-grouped-options.js Brought checkboxes back to publish menu recipient selection (#1972) 2021-05-21 18:22:01 +01:00
get-scroll-parent.js Updated About/What's new? page (#1872) 2021-09-08 14:00:24 +02:00
ghost-paths.js Updated Admin-X bundling process 2023-09-19 11:31:55 +02:00
isNumber.js Update code to match eslint rules 2016-11-14 13:26:00 +00:00
link-component.js Refactored usage of .get('property') with es5 getters 2019-03-06 13:54:14 +00:00
member-event-types.js Added one-time payments under "payments" for filtering (#20807) 2024-08-22 10:26:46 +00:00
merge-stats-by-date.js Optimized stats aggregation code for Admin dashboard 2024-06-26 15:46:39 +02:00
password-generator.js Fix linting errors 2019-07-22 11:21:24 +01:00
publish-options.js Reduced amount of member count queries when opening the editor (#19474) 2024-01-13 19:13:49 +01:00
route.js Fixed hosting management screen not loading after sign-in process (#15763) 2022-11-03 11:14:36 +00:00
sentry.js Added full-page refresh when new post route is in a bad state 2024-09-23 22:38:34 +01:00
shortcuts.js 🐛 Fixed pasting into the post tags input not working (#1739) 2022-08-03 11:14:12 +01:00
slug-url.js [chore] runs native classes codemod for app/adapters (#2239) 2022-02-02 16:57:22 +00:00
stats.js Refined ui details for Stats page (#20977) 2024-09-11 14:14:05 +00:00
subscription-data.js 🐛 Fixed member subscription details in Admin (#20619) 2024-07-18 12:14:38 +02:00
window-proxy.js Added full-page refresh when new post route is in a bad state 2024-09-23 22:38:34 +01:00