1
0
Fork 0
mirror of https://github.com/TryGhost/Ghost-Admin.git synced 2023-12-14 02:33:04 +01:00
Commit graph

525 commits

Author SHA1 Message Date
Kevin Ansfield
5bad7aef05 Refactored deprecated usage of setupTest* methods
no issue

- https://github.com/emberjs/ember-mocha/blob/master/docs/migration.md#upgrading-to-the-new-testing-apis
- deleted tests files which had no specific tests
- migrated unskipped component unit tests to integration tests
2019-05-13 15:31:32 +01:00
Kevin Ansfield
772310c4b9 Updated test-helper.js to use explicit start() call
no issue

- this was a breaking change introduced in ember-mocha@0.15.0 https://github.com/emberjs/ember-mocha/blob/master/CHANGELOG.md#v0150-2019-05-11
2019-05-13 15:31:32 +01:00
Kevin Ansfield
b86b365382 Bumped waitFor timeouts in gh-uploader tests
no issue

- Travis was randomly failing here
2019-05-13 09:59:05 +01:00
Kevin Ansfield
fa8a08e40b
Removed usage of ember-light-table in subscribers screen (#1191)
no issue

`ember-light-table` is falling behind Ember.js and other addon development and is increasingly causing issues with Ember deprecations and addon incompatibility.

- swaps `ember-light-table` usage for a straightforward table using `vertical-collection` for occlusion
- uses the same loading mechanism as the members screen with a slight optimisation where the initial load will fetch subscribers in batches of 200 until they are all loaded
- removes now-unused pagination mixin
- fixes duplicate subscriber validation handling
2019-05-07 12:39:56 +01:00
Kevin Ansfield
2c69970ff2 Fixed random failure of gh-uploader test 2019-05-01 16:09:28 +01:00
Kevin Ansfield
5cb4bcb0cd Increased timeout for gh-task-button disabled assertion 2019-04-30 17:29:28 +02:00
Kevin Ansfield
e50f4819ca Increase timeout for gh-uploader progress bar assertion
no issue
- hopeful fix for randomly failing Travis
2019-04-29 16:56:19 +02:00
Kevin Ansfield
371639f497 🐛 Fixed missing errors and confusing button text in theme upload modal
no issue
- fixed "Active with errors" button successful theme upload with no warnings/errors
- fixed fatal errors not showing due to change in API error response
- fixed "Retry" button not showing when there were fatal errors
- fixed "Upload successful!" message after clicking "Retry" on a failed upload
2019-04-15 22:43:29 +01:00
Kevin Ansfield
55ed3322c8 🐛 Fixed missing error details when activating a theme with fatal errors
no issue
- the API response for theme activation when a fatal validation error occurred has changed but the client wasn't updated resulting in a modal containing an "Activation failed" header but no details
- updates the error details extraction path and adjusts the tests to match the real API response
2019-04-11 11:00:40 +01:00
Kevin Ansfield
f0ad9dcdc4 🐛 Fixed missing error notification when attempting to activate an invalid theme
no issue
- updates error handling to work with new v2 error response formats
  - `.errorType` -> `.error`
  - `.errorDetails` -> `.details`
2019-03-25 11:32:29 +00:00
Zimo
5ace095332 Fixed tests for tags case changes
refs. 5dcf5b9651
2019-03-25 10:19:51 +01:00
Zimo
5dcf5b9651 Fixed button and title cases for Tags screen
no refs.
Set "New tag" button and "Tag settings" to sentence case to be consistent with the rest of the UI. (Previously they were title case.)
2019-03-25 09:37:44 +01:00
John O'Nolan
584eeb8cf1 View site inside Ghost Admin
no refs.
- added "View site" as the first and default menu item in navigation bar to be able to browse the site without leaving the Admin
- rearranged left sidebar items according to new structure (moved Labs down to bottom)
- removed "View site" from publication main menu because it's become redundant
- added Night shift toggle in line with Labs menu to be able quickly access it
2019-03-21 10:33:14 +01:00
Kevin Ansfield
c91cd8b330 Fixed custom integrations acceptance test 2019-03-19 12:07:41 +00:00
Kevin Ansfield
7c9f8abab7 Fixed linting 2019-03-18 19:18:02 +00:00
Kevin Ansfield
989fc18ce5 Fixed random failures in uploader component tests
refs https://github.com/TryGhost/Ghost/issues/10308
- removed reliance on `run.later` (`setTimeout`) in tests, instead favouring explicit ember-test-helper methods which wait for DOM changes
2019-03-18 19:14:24 +00:00
Kevin Ansfield
4546674d59 Removed reliance on run.later in gh-task-button tests
refs https://github.com/TryGhost/Ghost/issues/10308
- switch to using the `waitFor` helper to wait for changes in DOM rather than relying on unreliable timeouts
2019-03-14 17:26:22 +00:00
Kevin Ansfield
685fe565e4 Improved duplication checking in notifications service
closes https://github.com/TryGhost/Ghost/issues/10514
- deduplicates alerts based on message content as well as key
2019-03-12 17:50:45 +00:00
Kevin Ansfield
226c4c45c2 Updated editor error handler to work better with new API error messages
no issue
- pass a received API error directly through to the notifications service rather than adding an unnecessary prefix to the error message
2019-03-12 17:49:15 +00:00
Kevin Ansfield
69571b171f Added ability to override the canonical URL of posts/pages
closes https://github.com/TryGhost/Ghost/issues/10593
- adds a "Canonical URL" field to the Meta Data section of the Post Settings Menu
- adds validation for canonical url being a valid absolute or relative URL
2019-03-12 10:40:07 +00:00
Kevin Ansfield
0218638ab3
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
Rish
e04ac4b719 Fixed member tests
no issue

- Fixes test for members option in sidebar to use value from settings
2019-03-11 13:13:55 +05:30
Kevin Ansfield
917c8da59c Added error context to API error alert messages 2019-03-06 11:45:47 +00:00
Kevin Ansfield
2a505f0263 Resolved "Use defineProperty to define computed properties" deprecations
refs https://github.com/TryGhost/Ghost/issues/10310
- https://www.emberjs.com/deprecations/v3.x/#toc_ember-meta-descriptor-on-object
- required to allow upgrading to Ember > 3.5
2019-03-05 18:13:47 +00:00
Kevin Ansfield
6351c85b25
Bumped dependencies (#1108)
Bumped all non-ember-core dependencies that do not require significant work or that contain unresolvable inter-dependencies.

Skipped:
- `ember-drag-drop` - our usage needs re-working for closure actions
- `ember-infinity`, `ember-in-viewport` - one depends on the other and `ember-light-table` depends on a particular version of `ember-in-viewport` in a way that breaks if they are upgraded

Removed/bumped:
- removed ember-cli-es6-transform
- removed ember-cli-cjs-transform
- removed current-device
- removed ember-responsive
- bumped yarn.lock sub-dependencies
- bumped @ember/jquery
- bumped @tryghost/mobiledoc-kit
- bumped autoprefixer
- bumped broccoli-funnel
- bumped coveralls
- bumped ember-auto-import
- bumped ember-moment
- bumped ember-power-select
- bumped ember-simple-auth
- bumped broccoli-uglify-sourcemap
- bumped ember-cli-eslint and eslint-plugin-ghost with fixes for new rules
- bumped ember-cli-mirage
- bumped ember-cli-pretender
- bumped ember-power-calendar-moment
- bumped ember-power-datepicker
- bumped ember-composable-helpers
- bumped ember-concurrency
- bumped ember-load
- bumped eslint
- bumped walk-sync
- bumped ember-useragent
- bumped fs-extra
- bumped ember-resolver
- bumped @html-next/vertical-collection
- bumped ember-cli-babel
2019-03-05 17:34:00 +00:00
Kevin Ansfield
850d56e60e
Renamed ghostHead/Foot settings to codeinjectionHead/Foot (#1107)
closes https://github.com/TryGhost/Ghost/issues/10560
- match changes in the API
2019-03-05 10:40:19 +00:00
Kevin Ansfield
05a92defae Fixed custom integrations acceptance test 2019-02-26 15:22:04 +07:00
Kevin Ansfield
a5c69cc86d Removed usage of /configuration/timezones/ endpoint
no issue
- replaced timezones endpoint with `@tryghost/timezone-data` module
2019-02-26 12:37:50 +07:00
Kevin Ansfield
425331dc3a Removed empty (and failing) config service unit test 2019-02-26 12:24:53 +07:00
Kevin Ansfield
b2c1a4ac28 Updated gh-image-uploader to work with new /images/upload/ endpoint 2019-02-26 09:39:04 +07:00
Kevin Ansfield
d2a112723b Fixed general settings acceptance test 2019-02-26 09:15:19 +07:00
Kevin Ansfield
e3d5689fe1 Updated gh-uploader to work with new /images/upload/ endpoint 2019-02-25 23:01:49 +07:00
Kevin Ansfield
b34269b66c Updated config service to use new /site/ and /config/ endpoints 2019-02-25 21:47:17 +07:00
Kevin Ansfield
50c20c1526 Fixed custom integration test in Travis 2019-02-23 18:20:24 +07:00
Kevin Ansfield
20c63cc14a Fixed integration acceptance test 2019-02-23 17:57:17 +07:00
Kevin Ansfield
ffa8fbe6a3 Removed unused component test 2019-02-23 10:26:27 +07:00
Kevin Ansfield
75753b17cb Implemented first pass of member details screen 2019-02-22 18:32:09 +07:00
Nazar Gargol
df5134deba Updated /images* response structure
refs #10438
2019-02-22 18:16:25 +07:00
Nazar Gargol
8f03ac3611 Renamed /uploads* endpoints to /images*
refs #10438
2019-02-22 18:16:25 +07:00
Peter Zimon
b63f5f59d0
Left navigation menu update (#1102)
refs. [f8b03f5](f8b03f50b6)

- added icons for members and pages
- improved view site link visibility
- added view site to logo dropdown
- updated all navigation and logo menu icons
- rename 'team' to 'staff'
- lots of design refinement and update (colors, shadows)
2019-02-22 16:43:35 +07:00
Kevin Ansfield
06ce68f1c2 Fixed linting 2019-02-22 12:16:56 +07:00
Kevin Ansfield
78db412e72 Fixed gh-cm-editor component test 2019-02-22 11:54:53 +07:00
Kevin Ansfield
f8b03f50b6
🎨 Separated post and page list screens (#1101)
no issue
- added `page` model
- removed `page` param from Post model
- added pages screen with associated links
- added `:type` param to editor screens to work with the right models
- removed post<->page toggle and associated tour item
2019-02-22 10:17:33 +07:00
Kevin Ansfield
fefc8358cb 🐛 Fixed Code Injection input fields not being clickable
no issue
- lazy loaded scripts such as the CodeMirror asset used on the Code Injection screen could throw errors such as `TypeError: Cannot set property 'modeOption' of undefined`
- this was caused by "loading" promise returned from the `lazyLoader` service returning as soon as the network request finished which can be before the loaded script has been parsed and run meaning any processing occurring after the promise returns could be depending on unloaded code
- switched the lazyLoader service's loading mechanism from an ajax fetch to insertion of a `<script>` tag which can have `load` event attached which _will_ return after parsing/loading has completed
2019-02-11 21:08:15 +00:00
Kevin Ansfield
78573e0fa8 Fixed signup acceptance tests sometimes failing 2019-02-11 13:52:51 +00:00
Kevin Ansfield
fd973f60ab Fixed signup acceptance tests 2019-02-11 12:35:47 +00:00
Kevin Ansfield
29d8755a1d Skipped tests that randomly fail on Travis
closes https://github.com/TryGhost/Ghost/issues/10308
2019-02-11 11:43:23 +00:00
Kevin Ansfield
9fae7b0989 Registered test waiter for ember-raf-scheduler
no issue
- recommended as per `vertical-collection` docs: https://github.com/html-next/vertical-collection#testing
- ensures Ember's `wait` helper is aware of any raf-scheduler loops
2019-01-31 12:41:57 +00:00
Kevin Ansfield
ce53a0131e Removed errant pauseTest() 2019-01-31 11:07:48 +00:00
Kevin Ansfield
b7a6886d22 🐛 Fixed incorrect username being saved by Safari when signing up via invitation
refs https://github.com/TryGhost/Ghost/issues/9868
- ensure signup task is always initiated via form submit
  - adds `defaultClick` option to `<GhTaskButton>` that allows the click event to bubble
- adds `autocomplete` values to signup form fields that match up to the spec
  - "name/display-name": `name`
  - "email": `username email`
  - "password": `new-password` / `current-password` depending on context
- 🔥 no-longer-relevant hacks for Chrome autocomplete
  - this still doesn't fix Chrome remembering the incorrect username unfortunately. Chrome will always select the input previous to the password that has had actual user input as the "username"
- 🔥 unused `authenticate` task in signup controller
2019-01-31 10:27:40 +00:00
Kevin Ansfield
3b3544db57 Renamed <MemberAvatar/> to <GhMemberAvatar/> for naming consistency 2019-01-25 13:51:18 +00:00
Kevin Ansfield
179186e4b3 Updated Members acceptance test to match new routing structure 2019-01-25 13:41:53 +00:00
Kevin Ansfield
84f2708aa5 Removed unnecessary div in <MemberAvatar>, fixed component test 2019-01-24 19:50:23 +00:00
Kevin Ansfield
775793f824 First pass at members list
no issue
- don't nest details route as it's not nested UI
- implement styled list of members
- add `<MemberAvatar>` component that generates random background colour and initials based on member name
- fixed generation of fake member details in mirage
2019-01-24 19:34:32 +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
21d811bdcb Updated gh-user-can-admin unit test
no issue
- helper now calls `.get('isOwnerOrAdmin')` rather than `.get('admin')` or `.get('owner')`
2019-01-22 16:44:49 +00:00
Kevin Ansfield
337d929c27 Added empty member management routes 2019-01-22 16:23:26 +00:00
Kevin Ansfield
126be42557 Deleted empty route unit tests 2019-01-22 15:05:14 +00:00
Kevin Ansfield
7d85737d61 Skipped tests that frequently fail on Travis 2019-01-22 14:16:15 +00:00
Kevin Ansfield
509b16f6dc Fixed invalid selectors in Slack tests that were failing in Safari 2019-01-22 13:53:34 +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
Greg Hart
fb4794c3b5 Added ability to configure Slack integration's username (#1084)
closes https://github.com/TryGhost/Ghost/issues/9735
- add "Username" form to Slack integration
2019-01-21 12:26:21 +00:00
Moritz Schramm
e261b80c22 🎨 Added post title to document title for easier location with multiple editor tabs (#1072)
closes https://github.com/tryghost/ghost/issues/10088
* added `updateDocumentTitle` action to base route and replace usage of `.send('collectTitleTokens, [])`
* added `.titleToken()` method to editor route to add post title to document title
* called `.send('updateDocumentTitle')` after saving post title in editor controller to keep document title in sync
* updated editor controller test for latest ember-mocha and ember-test-helpers
2019-01-21 11:44:30 +00:00
Hannah Wolfe
bcd8f485ad
Updated docs links to best equivalents (#1097)
- Our documentation has been overhauled, this updates the all the old links sprinkled through Ghost-Admin
2019-01-16 16:03:33 +00:00
Kevin Ansfield
ffbfb06e41
Bump dependencies (#1092)
refs https://github.com/TryGhost/Ghost/issues/10310
- bump liquid-fire (cleans up multiple deprecations)
- bump ember-sinon
- bump ember-optional-features
- bump ember-assign-helper
- bump ember-cli-dependency-checker
- bump ember-cli-mirage
- bump ember-cli-pretender
- bump ember-cli-es6-transform

Partial dependency bump. Keeping groups smaller so that any issues are easier to pin down if needed.
2019-01-08 14:39:37 +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
Sumedh Nimkarde
7cc74c3634 Removed outdated Ghost-Desktop client check (#1047)
closes https://github.com/TryGhost/Ghost/issues/9895
2018-11-26 08:28:48 +00:00
Kevin Ansfield
29453bae8e Fixed webhook modal title showing "New webhook" when editing a webhook
refs https://github.com/TryGhost/Ghost/issues/10137
- adjust modal title depending on `webhook.isNew` state
- add acceptance tests for modal creation
- add missing mirage webhook factory
- mock integrations/api-keys/webhooks in test env rather than development
2018-11-12 16:31:47 +00:00
Kevin Ansfield
4795658554
🎨 Changed tags list, filter dropdown, and select input to sort alphabetically (#1066)
no issue
- switch tags sorting from ID based to alphabetical
- pre-requisite to nested tags sorting
2018-11-07 15:06:28 +00:00
Kevin Ansfield
d7facd5c61 Cleaned up class and :contains based test selectors
no issue
- nav menu had many unused CSS classes that were sometimes used for test selectors
- `:contains` is not a native CSS selector so will cause issues when we switch to native test helpers
2018-10-23 18:11:48 +01:00
Kevin Ansfield
519b736015
Added initial custom integrations UI (#1051)
refs https://github.com/TryGhost/Ghost/issues/9865, https://github.com/TryGhost/Ghost/issues/9942

- `integration`, `api-key`, and `webhook` models and respective mirage mocks
- moves integration routes around to match ember's concept of nested routes (nested routes reflect nested UI not nested URLs)
- adds custom integrations list to integrations screen
- adds custom integration screen
  - allow editing of integration details
  - show list of webhooks
  - webhook creation modal

NB: the `enableDeveloperExperiments` flag needs to be enabled in the `config.development.json` file for the custom integrations UI to be displayed until it's out of development.
2018-10-18 00:18:29 +01:00
Kevin Ansfield
0b5dc4e6be Fixed linting 2018-10-08 09:55:05 +01:00
Fabien O'Carroll
42912cf39b Use Admin API v2 with session auth (#1046)
refs #9865
- removed all `oauth2` and token-based ESA auth
- added new `cookie` authenticator which handles session creation
- updated the session store to extend from the `ephemeral` in-memory store and to restore by fetching the currently logged in user and using the success/failure state to indicate authentication state
  - ESA automatically calls this `.restore()` method on app boot
  - the `session` service caches the current-user query so there's no unnecessary requests being made for the "logged in" state
- removed the now-unnecessary token refresh and logout routines from the `application` route
- removed the now-unnecessary token refresh routines from the `ajax` service
- removed `access_token` query param from iframe file downloaders
- changed Ember Data adapters and `ghost-paths` to use the `/ghost/api/v2/admin/` namespace
2018-10-05 19:46:33 +01:00
Kevin Ansfield
d878d2e31f Fixed non-admin redirects on integration routes
no issue
- after un-nesting the built-in integration routes they no longer had the automatic redirect for non-admins
- added our non-admin redirect behaviour to all of the integration routes
- added our non-admin redirect behaviour to the Zapier route which didn't even have an authenticated redirect previously
- added acceptance test for Zapier route so verify the new behaviour
- wrapped the Zapier widget `<script>` tag in an "is testing" conditional so that the external script doesn't get loaded during tests
2018-10-04 12:16:41 +01:00
Kevin Ansfield
5390f51e36
Renamed Apps to Integrations (#1050)
refs https://github.com/TryGhost/Ghost/issues/9865, https://github.com/TryGhost/Ghost/issues/9942
- Apps are becoming Integrations that cover the existing built-in integrations as well as new custom integrations
- custom Integrations will comprise of API keys for the Admin and Content APIs and custom-registered webhooks
2018-10-04 11:02:36 +01:00
Kevin Ansfield
2245d93f2b Added gallery card to the editor
no issue
- added gallery card (initial implementation)
    - supports upto 9 images in gallery
    - max 3 images per row
- fixed gh-uploaded error handling for generic errors
- ignore jsconfig.json
2018-08-30 17:48:20 +01:00
Kevin Ansfield
0e73184587 Fixed gh-profile-image tests
no issue
- stubbed `ghostPaths` service did not have the expected `ghostPaths.assetRoot` property that the `gh-profile-image` component started calling `.replace` on in d24bad6aca
2018-08-30 11:10:10 +01:00
Kevin Ansfield
69d3c63b0c 🐛 Koenig - Fixed pasting of plain text
refs https://github.com/TryGhost/Ghost/issues/9724
- `formatMarkdown` was previously changed to return a SafeString but that meant any direct usage of the helper had to account for not dealing with a basic String type
- changed `formatMarkdown` to return a basic String
- modified helper usage of `{{sanitize-html}}` to use triple-curlies
2018-08-15 16:25:02 +01:00
Kevin Ansfield
11e301b63c Made Koenig the default editor, removed Koenig labs flag 2018-08-14 17:49:50 +01:00
Kevin Ansfield
05eb7db8e9 Removed dated permalinks setting
no issue
- permalink config is now handled through `routes.yaml`
2018-08-14 17:49:50 +01:00
Kevin Ansfield
02f45c2a3a Added routes.yaml upload to Labs screen
refs https://github.com/TryGhost/Ghost/issues/9744
- adds `routes.yaml` upload using the same UI as the `redirects.json` upload
  - upload: `POST /settings/routes/yaml/`
  - download: `GET /settings/routes/yaml/`
2018-08-14 17:49:50 +01:00
Kevin Ansfield
e9af1531aa Koenig - Pass html card content through sanitiser
refs https://github.com/TryGhost/Ghost/issues/9724
- extract html sanitisation into a Koenig helper `{{sanitise-html}}` (all markdown handling will eventually move into Koenig too)
- render sanitised html in the html card
2018-08-09 14:59:03 +01:00
Kevin Ansfield
09743cfb2b Koenig - Added rich-text support to captions
refs https://github.com/TryGhost/Ghost/issues/9724
- added `{{koenig-basic-html-input}}` component
  - uses a stripped down version of Koenig
  - supports all inline formatting that Koenig supports
  - supports inline text expansions
  - supports inline key commands
  - limited to a single paragraph
  - serialises and deserialises from HTML rather than mobiledoc
- updated `{{koenig-caption-input}}` to use `{{koenig-basic-html-input}}`
- updated image and embed cards to calculate word counts correctly for html captions
- bumped Spirit dependency to fix styling of toolbars within the editor canvas
- fixed positioning in toolbar components to account for `parentElement` not necessarily being the closest element to position against
2018-08-08 13:38:41 +01:00
Kevin Ansfield
3a7108c975
Use filter instead of status and staticPages params for post queries (#1025)
no issue
- `staticPages` API param is deprecated in favour of using the `filter` param
- switched `status` query to param to the `filter` param as well for consistency
2018-07-20 11:57:53 +01:00
Kevin Ansfield
48384ec9a9 Bump ember-light-table dependency
no issue
2018-07-02 17:18:52 +01:00
Kevin Ansfield
fbf67eb25a Handle empty array of slack setting objects
no issue
- ensure at least one SlackIntegration object exists in the slack setting when deserialising
- remove blank SlackIntegration objects when serialising
2018-07-02 14:57:41 +01:00
Kevin Ansfield
8d5c8c99b5 Koenig - Extract card caption input into component
refs https://github.com/TryGhost/Ghost/issues/9623
- add new `{{koenig-caption-input}}` component
- yield koenig-caption-input instance from the `{{koenig-card}}` component
- remove duplicated caption logic from image and embed cards
- remove placeholder when caption input has focus
2018-06-12 18:10:23 +01:00
Kevin Ansfield
7967ee3894 Koenig - Embed card
refs https://github.com/TryGhost/Ghost/issues/9623
requires https://github.com/TryGhost/Ghost/pull/9666
- `{{koenig-card-embed}}`
    - URL input
    - perform oembed lookup & fetch on <kbd>Enter</kbd>
    - remove card if enter pressed with empty URL
    - show error message on server error
        - "retry" returns to input bar
        - "paste as link" removes card and outputs link
        - "X" removes card
    - force embedded <script> tags to run
    - wrap embed html with `.koenig-embed-{video,photo,rich}` class
- add embed cards to the (+) and /-menus
    - "section" support in the card menus
    - refactor to use single card menu map and content component for both menus
    - update /-menu keyboard movement to handle sections
- add parameter support to /-menu commands
  - `/embed {url}` will insert embed card and automatically fetch oembed for supplied url
2018-06-12 14:07:50 +01:00
Kevin Ansfield
faba3f59e2 Fix tests
no issue
- 150f68e826 contained a wording change that was not taken into account in the tests
2018-05-17 15:18:09 +01:00
Kevin Ansfield
902e361e22 Add {{background-image-style}} helper
no issue
- cleans up multiple CPs that were only outputting a background image style
- moves URL decoding/encoding and `htmlSafe` output into one place
2018-05-14 13:04:53 +01:00
Kevin Ansfield
80c010d223 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
93bd1ce9d7 Remove usage of ember-element-resize-detector
no issue
- fixes babel deprecation warning coming from `ember-element-resize-detector`
- re-created basic `resize-detector` service to wrap `element-resize-detector`
    - import `element-resize-detector` directly from `npm` (includes bump to latest version)
    - drop usage of jQuery selectors
2018-04-30 17:03:29 +01:00
Kevin Ansfield
61031c35a3 🐛 Fixed admin URL not updating when changing tag slug
closes https://github.com/TryGhost/Ghost/issues/9571
- uses `window.replaceState` to update the URL when a tag is saved with a new URL
    - ensures back button doesn't result in 404
    - use `windowProxy` util so that behaviour can be tested
2018-04-30 12:29:43 +01:00
Kevin Ansfield
f63075fb4b
Fixed subscriber table tests in FF (#1011)
no issue
- `ember-in-viewport` was forced to a newer version in cb46718a26 which has resulted in the subscriber table's infinite scroll triggering immediately in FF when testing
2018-04-25 11:03:15 +01:00
Kevin Ansfield
f49f0c0564 Bump Ember to 3.1.1
no issue
- contains bug fixes for the 3.1.0 release
2018-04-23 22:57:26 +01:00
Kevin Ansfield
93f1712036
Bump dependencies (#1003)
no issue
- bump deps with no major breaking changes
- bump yarn.lock sub-dependencies
- resolve deprecation warnings for removal of Authorizers in ember-simple-auth
2018-04-23 11:53:42 +01:00
Kevin Ansfield
6a9bede003 Fixed multiple 401s caused by token revocation requests
no issue
- disabled Ember Simple Auth's default token revocation
    - we trigger session invalidation on a 401 which means our token isn't valid so the revoke requests will also fail
- renamed application route's `invalidateSession` to `logout` in order to distinguish it from any ESA methods
    - added the token revocation requests to this action, we can be fairly sure at this point that the current tokens will be valid so the requests will succeed
- added check to `ajax.handleResponse` so that we don't invalidate the session for requests to external services
- removed pointless assertion from the ajax integration test
2018-04-16 17:55:21 +01:00
Kevin Ansfield
07aba16846 Koenig - Link hover toolbar
refs https://github.com/TryGhost/Ghost/issues/9505
- disable `mobiledoc-kit`'s built-in link tooltip
- add `{{koenig-link-toolbar}}` component
    - shows toolbar above a link when it is hovered with the mouse
    - hides toolbar when a link isn't hovered
    - has a clickable link with the URL, opens in a new tab
    - edit button switches display to the link input toolbar
    - delete button removes link markup from the link
2018-04-11 18:42:27 +01:00
Kevin Ansfield
f0fe23d50b Koenig - Link creation/editing via formatting toolbar
refs https://github.com/TryGhost/Ghost/issues/9505
- wire up the link button in the toolbar to set a `linkRange` property on `{{koenig-editor}}`
- add `{{koenig-link-input}}` that is shown when `{{koenig-editor}}` has a `linkRange` set
    - <kbd>Escape</kbd> will cancel the link input
    - clicking outside the input will cancel the link input
    - previously selected text will be re-selected on cancel
    - if an existing link was selected (or partially selected) then pre-fill the link input with the `href`
    - `X` is shown when there's a href value and clicking will clear the input
    - <kbd>Enter</kbd> *with* a href value will remove all links from text that is touched by the selection and create a new link across only the selected text
    - <kbd>Enter</kbd> *with no* href value will remove all links touched by the selection
- fixed toolbar tick positioning that was 8px off after change to Spirit classes
2018-04-06 17:49:16 +01:00
Kevin Ansfield
1229509033
Fixed authors filter for posts with multiple authors (#993)
no issue
- we need `?filter=authors:foo` to match all posts where `foo` is an author, the previous `?filter=author:foo` will only match posts where `foo` is the primary author
2018-03-27 20:57:59 +01:00