Commit Graph

75 Commits

Author SHA1 Message Date
Kevin Ansfield
fc501add94 Fixed editor not loading in Admin acceptance tests
closes https://linear.app/tryghost/issue/PLG-176

The editor files were previously stubbed for testing because we didn't have a way to load the externally-hosted files. This made testing slow and difficult because the only way to test the Admin integration was via Ghost's e2e browser tests.

- unstubbed the editor globals so `fetchKoenigLexical()` actually tries to import the external assets
- updated `ember-cli-build` to copy the Koenig UMD file over to the assets directory in development/test builds
- updated `environment.js` to set the required filename for the default asset import to successfully hit the test environment hosted files
- updated lexical editor acceptance tests to demonstrate the editor loads successfully for new and existing posts
2024-08-21 11:49:05 +01:00
Kevin Ansfield
3b87c9be53
Cleaned up websockets experiment (#20547)
no issue

- we're no longer making use of the websockets experiment so it's just bloat
- this is the whole feature in a single commit in case we need to revive it at some point
2024-07-04 16:08:06 +00:00
Daniel Lockyer
639be25f1d Updated Koenig-Lexical bundling
refs https://github.com/TryGhost/DevOps/issues/83

- this will now continue use the dev server assets if we tell it to,
  or copy the dependency package files to the built folder otherwise
- removes `editor` from config API because it's no longer needed
- removes dependency on `editor.url` in tests, as this no longer exists
- edits dev script to pass dev server URL as env var
- adds `@tryghost/koenig-lexical` dependency to Admin
2023-10-04 12:50:21 +02:00
Daniel Lockyer
e87c994bba Configured Admin to use CDN URLs for lazy-loaded assets
refs https://github.com/TryGhost/DevOps/issues/47

- this allows Ghost to use a different URL for lazy-loaded assets, so it
  can be loaded from a CDN
2023-07-17 10:57:42 +02:00
Chris Raible
3236891b80
Fixed admin coverage reporting (#16512)
no issue

- Renovate merged in a breaking change to ember-cli-code-coverage which
broke our coverage reporting for the admin app
- This commit fixes the issue by pinning the version of
ember-cli-code-coverage to the last working version and telling renovate
to ignore it in the future
- It also adds html coverage reporting to make it easier to run locally
and see your coverage before pushing
2023-03-28 11:07:28 -07:00
Steve Larson
034a230365 Added alpha feature to demonstrate websockets
refs https://github.com/TryGhost/Team/issues/2561

- added simple socket-io implementation to Ghost server
- added alpha flag for websockets
- added route in admin to test websockets using a simple counter stored in server local memory (refreshes on reboot)
2023-02-17 11:55:15 +01:00
Kevin Ansfield
fa84808048 Dropped ember-cli-moment-shim dependency
no issue

Since `ember-moment@10.0` it's not been necessary to use the `ember-cli-moment-shim` package, with `moment` instead being usable directly via `ember-auto-import`. Getting rid of the shim package is necessary for compatibility with `embroider`, Ember's new build tooling.

- dropped `ember-cli-moment-shim` dependency
- added `moment-timezone` dependency and updated all imports to reflect the different package
- worked around `ember-power-calendar` having `ember-cli-moment-shim` as a sub-dependency
  - added empty in-repo-addon `ember-power-calendar-moment` to avoid `ember-power-calendar` complaining about a missing package
  - added `ember-power-calendar-utils` in-repo-addon that is a copy of `ember-power-calendar-moment` but without the build-time renaming of the tree for better compatibility with embroider
2022-09-24 13:28:23 +02:00
Gabriel Csapo
ddfeb90fc6 Updated ember-auto-import@1 -> ember-auto-import@2 (#2252)
requires https://github.com/TryGhost/Ghost/pull/15128
refs https://github.com/TryGhost/Admin/pull/2252

- bumped `ember-auto-import` dependency
  - updated `autoImport` config to match new format
  - added dependencies for node packages that no longer have built-in polyfills in webpack@5
- updated `asset-delivery` to work with `ember-auto-import@2`
  - reverted to standard ember `index.html` to let `ember-auto-import` handle it's insertion of multiple JS chunk files
  - updated the `asset-delivery` addon to copy the the `index.html` and `/assets` to `core/built/admin/{development|production}/` directory rather than splitting the `index.html` file apart from the assets inside Ghost's directory structure
- switched to relative root URL in development/production
  - required because assets are served from the same directory the index file is served from in Ghost rather than from the root
  - Admin uses `/#/` URLs so it can be served from any subdirectory without requiring prior knowledge of that directory at build time

Co-authored-by: Kevin Ansfield <kevin@lookingsideways.co.uk>
2022-08-02 13:43:28 +01:00
Kevin Ansfield
54d201c230 Removed deprecated ember-keyboard options
refs c909e6babc

- the options are deprecated and were throwing warnings during build
2022-01-17 17:38:24 +00:00
Kevin Ansfield
b81f5fa340 Fixed ember-keyboard propagation deprecation notice
no issue

- enabled the new propagation behavior
  - https://github.com/adopted-ember-addons/ember-keyboard/issues/63
  - https://github.com/adopted-ember-addons/ember-keyboard/issues/164
2022-01-04 09:31:40 +00:00
Daniel Lockyer
f28769014c Added codecov.io coverage uploader to CI
refs https://linear.app/tryghost/issue/CORE-74/improve-the-test-situation

- this commit:
  - adds the `ember-cli-code-coverage` dependency to collect
    coverage from ember tests
  - enables the `COVERAGE` env variable in CI
  - merges coverage data because tests are run in parallel
  - adds the codecov GitHub Action into CI so we can upload
    coverage reports
2021-10-21 10:37:03 +02:00
Kevin Ansfield
5b2194d5e8 Added Sentry error tracking for unhandled exceptions and API errors
refs https://github.com/TryGhost/Team/issues/723

- if the `/site/` API returns a `sentry_dsn` then we configure Sentry for error reporting as soon as we've loaded the initial unauthenticated data
- once we're authenticated and we have the full Ghost version available, override the Sentry event processor to use the full release
- updated `notifications.showAlert()` which is our fallback for API errors that shows the red banner at the top - these are the errors we're most interested in getting visibility for and reducing
2021-05-26 17:01:32 +01:00
Kevin Ansfield
7f7d2cafc6 Added share/send preview footers to post preview modal
refs https://github.com/TryGhost/Team/issues/451

- disabled email tab when previewing a page (pages can't be emailed)
- added share preview url footer to browser tab
- added send preview footer to email tab
- added first pass at social tab contents
2021-02-02 16:08:05 +00:00
Kevin Ansfield
11c16b8b4b Disabled mocked snippets API in development 2020-10-16 19:22:09 +01:00
Kevin Ansfield
b590ce1b95 Implemented first iteration of content snippets
closes https://github.com/TryGhost/Team/issues/411

- adds "Create snippet" icon to the editor toolbar
- uses the same link input component design for specifying snippet titles
- snippets are loaded in the background when the editor is accessed
- snippets are listed at the bottom of the card menus of the + and / menus
- clicking a snippet inserts the snippet's contents in place of the current blank section
2020-10-15 18:03:35 +01:00
Kevin Ansfield
08698ed1c9 Adjusted browser support to include Safari 12
no issue

- Safari 12 support was automatically dropped when Safari 14 was released this September. This created quite a step-change in level of JS that is left as native in the build output causing problems for users who haven't upgraded or are stuck on browser versions ~1yr old
- adjusted the browser support to include last 3 versions of Safari, giving another year (most likely based on Apple's historic release schedule) of older browser support
2020-09-30 09:48:47 +01:00
Kevin Ansfield
1f3028d3ac Enabled Ember's template-only-gimmer-components feature
no issue

- template-only components (eg, `<GhMembersListItem>`) will now use a glimmer class rather than regular component class for their automatically-created backing classes
2020-05-28 12:33:49 +01:00
Kevin Ansfield
68fc08cce2 Disabled mirage in development
no issue

- Ghost's API now provides the live members stats endpoint
2020-05-26 12:26:04 +01:00
Kevin Ansfield
8c19ea9cf9 Updated <GhMembersChart> to fetch stats from the API
no issue

- added mocked API for `/admin/members/stats/` that generates random data for the chart
- re-architected `<GhMembersChart>` to fetch data from the API rather than calculating stats from all members loaded in memory
- enabled mirage in development so that the chart can be tested before the live API is ready
2020-05-22 17:58:45 +01:00
renovate[bot]
29a388ad27 Update dependency ember-infinity to v2.1.1 (#1484)
no issue

- fixed template reference
- updated template to match upstream's use of render-modifiers
- removed silencing of `isVisible` deprecation

Co-authored-by: Renovate Bot <bot@renovateapp.com>
2020-05-12 09:05:17 +01:00
Kevin Ansfield
210eb6ef2e Silenced Component#sendAction deprecation
no issue

- `ember-drag-drop` still triggers this and spams the console when re-ordering tags in the tags input
2020-01-14 15:39:48 +00:00
Kevin Ansfield
4d5c43305b Removed deprecated usage of this.$() in components
no issue

- converted remaining uses of `this.$()` that I could find over to native DOM
- deprecation is still silenced for now because both `liquid-fire` and `liquid-wormhole` trigger it
2020-01-10 15:12:39 +00:00
Kevin Ansfield
a862cb6b6a Unsilenced deprecations that are no longer triggered
no issue

- cleaned up the `deprecation-workflow.js` file by removing deprecations that are no longer being triggered by our test suite or general app usage (if they are still triggered in untested areas it will be useful to see the logs)
- updated usages of `{{gh-text-field}}` to use it's `shouldFocus` attribute rather than directly overriding it's `autofocus` computed property
2020-01-09 17:20:13 +00:00
Kevin Ansfield
571784ba3f Silenced "isVisible" deprecation
no issue

- it's being caused by the `ember-infinity` addon and was making test output rather noisy
- revert once `ember-inifinity` has a release removing `isVisible` and we've upgraded
2020-01-07 11:25:24 +00:00
Kevin Ansfield
6ac1480ffc Removed and disabled use of Ember.js function prototype extensions
no issue

- Function prototype extensions are being deprecated in Ember 3.11
2019-07-01 15:53:58 +01:00
Kevin Ansfield
e6d03e9904 Fixed deprecated computed().volatile() usage
no issue

- https://deprecations.emberjs.com/v3.x/#toc_computed-property-volatile
2019-05-07 14:54:41 +01:00
Kevin Ansfield
d0c2caec9e Fixed transition-state deprecation on Integration screen
no issue

- https://deprecations.emberjs.com/v3.x/#toc_transition-state
2019-05-07 14:04:16 +01:00
Kevin Ansfield
b7b51bbb0f Fixed deprecated usage of new EmberObject in <GhUploader>
no issue

- https://deprecations.emberjs.com/v3.x/#toc_object-new-constructor
- `UploadTracker` is extended from `EmberObject` so we should use the `.create` method
2019-05-07 13:26:32 +01:00
renovate[bot]
a9b33338c4 Update ember core to v3.9.0 (minor) (#1147)
* Update ember core to v3.9.0
2019-04-09 14:21:48 +01:00
Kevin Ansfield
af4ed3bab0 Added ember-cli-deprecation-workflow
no issue
- silences current deprecations so that Travis doesn't fail due to test logs being too long
2019-04-02 10:53:20 +01:00
Kevin Ansfield
30d009ea84 Used ember-exam to split tests and run in parallel on Travis (#1112)
no issue
- improves test run times by splitting the tests into multiple groups and running each in their own browser instance
  - settled on 2 browser instances as that seems to best fit within Travis' memory and CPU constraints
- updated ember-cli-code-coverage config to work with parallel builds
2019-03-11 18:16:01 +00:00
Kevin Ansfield
db7c40b327 Disabled mirage in development
- features that were using mirage are out of the mocking stage so the extra step and logging of each request is just noise
2019-03-06 16:49:53 +00:00
Kevin Ansfield
76a1a98b48 Re-enable mirage in development with config to allow asset passthrough 2019-01-23 14:24:29 +00:00
Kevin Ansfield
337b0614ed Disabled mirage in development
closes https://github.com/TryGhost/Ghost/issues/10414
- mirage's `passthrough()` was not allowing `/ghost/assets/simplemde/simplemde.js` to hit the backend server which was breaking markdown cards
2019-01-23 09:37:56 +00:00
Kevin Ansfield
1680508a0a Added initial members model and associated mirage setup
no issue
- mirage is now enabled by default in development with logging (can be turned off once we're no longer relying on mocked members endpoints)
2019-01-22 17:18:44 +00:00
Kevin Ansfield
042aecb7f6 Switch from embor-browserify to ember-auto-import
no issue
- minor reduction in build size. Before/after:
  - `vendor.min.js 3.32 MB (710.66 KB gzipped)`
  - `vendor.min.js 3.29 MB (706 KB gzipped)`
2019-01-22 13:09:38 +00:00
Kevin Ansfield
73daa80b7f Migrate to latest ember, ember-mocha and modern ember testing (#1044)
no issue
- upgrade to latest `ember-source` and related dependencies including `ember-cli`
- upgrade to latest `ember-mocha` and modern ember testing setup
    - https://github.com/emberjs/rfcs/blob/master/text/0268-acceptance-testing-refactor.md
    - switch from using global acceptance test helpers and `native-dom-helpers` to using the new `ember-test-helpers` methods
    - use [`chai-dom`](https://github.com/nathanboktae/chai-dom) assertions where in some places (still a lot of places in the tests that could use these)
- pin `ember-in-viewport` to 3.0.x to work around incompatibilities between different versions used in `ember-light-table`, `ember-infinity`, and `ember-sticky-element`
    - incompatibilities manifested as "Invalid value used as weak map key" errors thrown when using `ember-light-table` (subscribers screen)
- pin `ember-power-datepicker` to unreleased version that contains a move from global acceptance test helpers to modern test helpers
2019-01-02 09:58:55 +00:00
Kevin Ansfield
34fcf34e7c Dropped IE11 browser target for transpilation 2018-08-14 17:49:50 +01:00
Kevin Ansfield
c3f450cc5a Remove ember application template wrapper
no issue
- Ember will not output the application template wrapper div in the future but it's possible to optionally enable that feature now
- fixes test harness render so that all elements are constrained to the application wrapper rather than breaking out with `position: fixed` and covering the test results
2018-05-01 10:57:20 +01:00
Kevin Ansfield
468fb7b354 Fix tests when run via http://localhost:4200/tests
no issue
- browserify test dependencies need to be included with dev builds too
2018-03-19 10:51:40 +00:00
Austin Burdine
b9991c117b Replace jquery-deparam with deparam dependency (#973) 2018-03-19 10:29:01 +00:00
Austin Burdine
5abc4e0d9b Bump ember-cli-mirage to 0.4.2 (#969)
closes TryGhost/Ghost#9433
- remove unnecessary bower deps
- update mirage usage
- fix tests
2018-03-19 09:53:17 +00:00
Kevin Ansfield
be05ad6dc7 Only transpile for IE11 target in CI & production builds
no issue
- makes debugging during development easier because there's a lot less indirection added to work around missing ES6 support in IE11
2018-02-28 16:47:04 +00:00
Kevin Ansfield
03c45a445e Removed defunct Ghost OAuth code (#848)
refs https://github.com/TryGhost/Ghost/issues/8958

- Ghost OAuth isn't coming back, time for the code to disappear and simply all the things
- fixes the `Usage of router is deprecated` notices that flood the console/test logs when testing
2017-09-04 21:17:04 +02:00
Kevin Ansfield
5ae78fb9c5 bump dependencies (#673)
no issue
- autoprefixer@7.0.1
- broccoli-funnel@1.2.0
- codemirror@5.25.2
- coveralls@2.13.1
- ember-cli@2.13.1
- ember-cli-babel@6.1.0
- ember-cli-chai@0.4.0
- ember-cli-code-coverage@0.3.12
- ember-cli-dependency-checker@1.4.0
- ember-cli-eslint@3.1.0
- ember-cli-htmlbars@1.3.2
- ember-cli-htmlbars-inline-precompile@0.4.2
- ember-cli-mocha@0.14.3
- ember-cli-test-loader@2.1.0
- ember-composable-helpers@2.0.1
- ember-data@2.13.1
- ember-light-table@1.8.6
- ember-native-dom-helpers@0.4.0
- ember-power-datepicker@0.3.0
- ember-power-select@1.8.2
- ember-route-action-helper@2.0.3
- ember-simple-auth@1.3.0
- ember-source@2.13.0
- ember-test-selectors@0.3.3
- fs-extra@3.0.1
- liquid-fire@0.27.3
- liquid-wormhole@2.0.5
- loader.js@4.4.0
- fix async issue in editor title placeholder test
- adds `targets.js` so that babel will only polyfill for the lowest common denominator
2017-05-09 18:15:04 -05:00
Kevin Ansfield
9487ff9bae switch to ember-cli-moment-shim (#622)
no issue

- preparation for using `ember-pikaday` that utilizes `ember-cli-moment-shim`
- removes usage of `moment` global
- removes custom imports of `moment` and `moment-timezone` libraries
2017-04-05 19:45:35 +02:00
Kevin Ansfield
054fa71202 deps: ember-cli@2.12.1 (#604)
no issue
- https://emberjs.com/blog/2017/03/19/ember-2-12-released.html#toc_changes-in-ember-cli-2-12
2017-03-28 11:29:18 +01:00
Kevin Ansfield
4de244974e 🎨 remove usage of ghost's {{asset}} helper in index.html (#574)
refs #8140

🎨 remove usage of ghost's {{asset}} helper in built index.html files

requires https://github.com/TryGhost/Ghost/pull/8142
- switch to hash-location rather than history-location
- remove usage of Ghost's `{{asset}}` helper in index.html
- add `content-for` helpers to `asset-delivery` addon that switch asset urls in index.html to `.min` files in production
- update the `asset-delivery` addon to copy the production `index.min.html` to `default-prod.hbs` so Ghost can serve production assets when in production mode
- change template output path to `core/server/admin/views/`
- enable asset fingerprinting
- remove `ember-cli-sri` dependency - we weren't using it but now that ember is handling assets it was used automatically and could potentially create issues if users have proxy servers that attempt to compress or otherwise modify asset files

 redirect to setup if server says setup isn't finished

refs https://github.com/TryGhost/Ghost/issues/8140
- now we're using hash-location the server no longer knows if we're hitting the /setup route so it's not able to redirect for us
- extends the default ESA `UnauthenticatedRouteMixin` to add a check against the `/authentication/setup` API endpoint and redirects to `/#/setup/one` if setup isn't complete - this works for all routes because the default behaviour when hitting an authenticated route without the right credentials is to force a logout and redirect to `/#/signin` which utilises the `UnauthenticatedRouteMixin`

deps: ember-cli-inject-live-reload@1.6.1
2017-03-14 17:04:46 +01:00
Austin Burdine
253a0fb2cf various test deprecation cleanup
no issue
- cleans up a lot of the deprecation noise in tests
- remove ember-cli-deprecation-workflow dependency
2017-03-08 18:56:30 +00:00
Kevin Ansfield
fbc99e6fa7 deps: ember-simple-auth@1.2.0 2017-02-06 16:39:42 +00:00