Commit Graph

39 Commits

Author SHA1 Message Date
Kevin Ansfield 5606b9c068 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 b0e5342190 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 332cb72e25 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
Kevin Ansfield eb731db4d2 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
renovate[bot] 3659572a21 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 0417d68c9a 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 fde684f350 Re-enable mirage in development with config to allow asset passthrough 2019-01-23 14:24:29 +00:00
Kevin Ansfield 9320ed966d 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 8e734d3c79 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 37a23122c2 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 079c8ccc2c
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 0ed3a0ea28 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 2ea1a354d9 Replace jquery-deparam with deparam dependency (#973) 2018-03-19 10:29:01 +00:00
Austin Burdine c6ddf3eb80 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 6cb04e4c41 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 5e9e3cd027 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 3b27fe5d15 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 e1f5ee8fcd 🎨 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
Kevin Ansfield 6f637e1726 deps: ember-simple-auth@1.2.0 2017-02-06 16:39:42 +00:00
Kevin Ansfield 4a604ce64f Update code to match eslint rules
no issue
- switch `jscs` and `jshint` inline config to `eslint` config
- fix eslint errors, predominantly in tests where the config now the main app config more closely
2016-11-14 13:26:00 +00:00
Kevin Ansfield 0a163d7333 Ghost.org OAuth support (#278)
issue TryGhost/Ghost#7452, requires TryGhost/Ghost#7451
- use a `ghostOAuth` config flag to switch between the old-style per-install auth and centralized OAuth auth based on config provided by the server
- add OAuth flows for:
  - setup
  - sign-in
  - sign-up
  - re-authenticate
- add custom `oauth-ghost` authenticator to support our custom data structure
- add test helpers to stub successful/failed oauth authentication
- hide change password form if using OAuth (temporary - a way to change password via oauth provider will be added later)
2016-09-30 13:43:40 +02:00
Greenkeeper 51af60af93 Update ember-cli to version 2.7.0 🚀 (#148)
* chore(package): update ember-cli to version 2.7.0

https://greenkeeper.io/

* update app from ember-cli blueprint

* deps: ember-cli-test-loader@1.1.0
2016-07-31 20:47:19 +01:00
Kevin Ansfield 604fda4348 Update package.json details, rename module to `ghost-admin`
no issue
- updates `package.json` details to better reflect the separation from the `Ghost` package
- update ember config and all import statements to reflect the new `ghost-admin` module name in `package.json`
2016-06-03 16:12:54 +01:00
Kevin Ansfield fd25213b37 Minor version header fixes
refs #38
- use same version regex as `safeVersion` does on the server
- remove errant `console.log` from store service test
2016-06-03 14:47:47 +01:00
Kevin Ansfield c559bbe572 Add version header to API requests
no issue
- modifies the version info included in `env.APP.version` to only include the `major.minor` version numbers
- update base adapter to include `X-Ghost-Version` header
- update `ajax` service to include `X-Ghost-Version` header
2016-06-03 11:53:29 +01:00
Kevin Ansfield f105d077bb Enable ability to mock endpoints in development mode
no issue
- moves existing mirage config into the `testConfig()` function to retain full mocks during testing
- configure mirage to passthrough all requests when in development mode
2016-04-14 15:26:39 +01:00
Kevin Ansfield 7ce3726589 Use es6 across client and add ember-suave to enforce rules
no issue
- add ember-suave dependency
- upgrade grunt-jscs dependency
- add a new .jscsrc for the client's tests directory that extends from client's base .jscsrc
- separate client tests in Gruntfile jscs task so they pick up the test's .jscsrc
- standardize es6 usage across client
2015-11-30 10:41:01 +00:00
Matthew Beale 4d98363c7c Unify mobile state in JS, drop resize
In `gh-content-view-container` the visibility of another DOM node was
being used to detect if a given view was mobile or not. This means the
UI needed to have layout forced (and DOM rendered) before the content
view container would render a second time. This is slow interaction with
the DOM (forcing layout) and slow for Ember's renderer (it needs to
render the container once with a default, then again when the value
changes).

Additionally there were two ways resize was being observed. The
`Window.matchMedia` API was used for some styles and the `ember-resize`
addon used to detect other changes. Here I've unified around just the
`Window.matcheMedia` API but abstracted it behind a service.

Sizes are exposed as properties that can be bound to or used directly in
templates.
2015-11-25 11:54:08 -05:00
Kevin Ansfield d98ad41008 Set up ember-cli-mirage and update existing acceptance tests
refs #6039
- adds ember-cli-mirage dependency
- sets up mirage to match our API endpoints and responses
- adds fixture data for settings that are always present for all blogs
- converts existing acceptance tests to use mirage
2015-11-03 15:35:58 +00:00
Austin Burdine 031a129f0b deps: ember-simple-auth@1.0.0
closes #5951
- update to esa 1.0
2015-10-18 13:17:02 -05:00
Kevin Ansfield 04d4c2bbad Fix unsaved nav settings persisting across transitions
closes #5852
- resets navigation settings controller's model when transitioning away
- fixes `locationType` config setting so acceptance tests don't mess with the URL
- configure the ephemeral session store for ember-simple-auth during tests
- adds dummy env-config meta fields so acceptance tests don't fail
- adds `ember-cli-simple-auth-testing` dependency for auth testing helpers
- adds Pretender dependency to mock API requests for acceptance tests
2015-10-07 15:57:14 +01:00
Kevin Ansfield 447a2d16e3 Fix broken content mgmt -> editor links on mobile
refs #5652
- add `ember-resize` addon that registers a single resize event handler and exposes it as a service and mixin
- add a component that wraps the posts list and content preview and exposes a `previewIsHidden` property
- use the `previewIsHidden` property in `gh-posts-list-item` to switch the item's link between the editor and the preview
- add `display: none` to the preview pane when in mobile so that we can test it's visibility
2015-08-28 11:52:38 +01:00
Robert Jackson 6967ce63cb Move myth configuration into `Brocfile.js`. 2015-08-21 14:37:50 -04:00
Jason Williams 1e3e2e853a Update to simple-auth 0.8
No issue
- ember-simple-auth@0.8.0-beta.2.
- Switch from SimpleAuth global to ember-cli-simple-auth and
  ES6 imports.
- Refactor controllers to handle changes in 0.8.
- Introduces a new initializer to override some configuration
  items that are set in environment.js but need to be set with
  information that's only (easily) available at runtime.
2015-05-22 15:21:46 -05:00
John O'Nolan 057aee408d Convert Sass to Myth 2015-05-22 19:05:09 +01:00
Matt Enlow 3c927411fa Serve files to core/built/assets/
- see core/client/lib/assets-delivery/index.js for how this is done
- Turn off ember-cli fingerprinting
- ember-cli 0.2.0; Update .npmignore
- Fallback to old version of ember-cli-sass due to lib-sass errors
- Keep ember-data at beta-14.1 until we find the dep that's breaking on snapshot.attr
- Fix release task to ignore blank lines in .npmignore
2015-03-12 15:59:02 -06:00
Jason Williams 793831ffdf Fix up ember-cli generated files and misc jscs/jshint errors 2015-03-11 12:37:42 -06:00
Matt Enlow 46a953062b Build assets with ember, and serve with ghost 2015-03-11 12:37:41 -06:00
Matt Enlow 55472b143f Ember init, bower deps, es6 modules 2015-03-11 12:37:41 -06:00