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
refs https://github.com/TryGhost/Ghost/issues/9505
- add a `paste` event handler to the editor element so that we can override the default mobiledoc-kit paste handling when required
- detect a paste when we have a plain text selection and if it's a valid url convert the selection to a link using the pasted url as the `href`
refs https://github.com/TryGhost/Ghost/issues/9505
- use `ENTER` and `BACKSPACE` key commands to intercept <kbd>Enter</kbd> and <kbd>Backspace</kbd> to insert/remove blank paragraphs rather than splitting the heading when the cursor is at the beginning of a heading
refs https://github.com/TryGhost/Ghost/issues/9505
- prevent typing at the end of a `code` or ~strike~ markup continuing the format
- if <kbd>Backspace</kbd> is pressed at the end of a `code` or ~strike~ markup then undo the text expansion and remove the last char
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
refs https://github.com/TryGhost/Ghost/issues/9505
- ensure we disable `pointer-events` on context menus when hidden so that hidden menus do not interact with the mouse
- add z-index to context menus so that they sit on top of any editor content
- add `relative` positioning to the html card content so the click overlay div doesn't expand outside of the content area
refs https://github.com/TryGhost/Ghost/issues/9505
- adjusted regexes to match a non-space group separately to a spaced group to deal with 1 or 2 chars of markup
- fixed `matchStrongStar` always triggering a markup toggle because the toggle was outside of the match conditional
refs https://github.com/TryGhost/Ghost/issues/9505
- ListItem sections have a parent rather than a prev section so we need to look for a section before the parent section when determining if the cursor is at the beginning of the doc for <kbd>Up</kbd> and <kbd>Left</kbd> key handling
refs https://github.com/TryGhost/Ghost/issues/9512
- if values for auto-generated fields are passed to Ghost via the API then those values will override any auto-generated value and be saved to the database
- add `plaintext` attribute to list of attributes we strip when serialising to avoid the issue until Ghost has appropriate protections in place
closes https://github.com/TryGhost/Ghost/issues/9543
- https://github.com/TryGhost/Ghost-Admin/pull/972 moved `keymaster` from Bower to NPM but version 1.6.3 is not published to NPM and it contains fixes for unbinding multiple keys (eg, `'down, j': 'moveDown'`). Switched to fetching directly from github to ensure we have the latest version
- removed the "has registered shortcuts" guard added in https://github.com/TryGhost/Ghost-Admin/pull/976 - it was working around the buggy keymaster version but was also buggy itself because it meant shortcuts could only be registered the first time a route was loaded even though we unregister all of the shortcuts when leaving the route
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
refs https://github.com/TryGhost/Ghost/issues/9548
- refactor serialisers to use `serialize` rather than `serializeToHash` to avoid code duplication
- strip `created_by` and `updated_by` attrs when serializing - Ghost will set these automatically based on the currently logged in user
no issue
- when switching to Spirit classes the `pointer-events` styles to properly hide the hidden toolbar and `z-index` to keep the toolbar above the title input had both been missed
refs https://github.com/TryGhost/Ghost/issues/9505
- use Spirit classes for card context menu
- add button and icon class options for context menu items
- add ability to have icon+text for context menu items
- add "Edit" context menu item to markdown and html cards
no issue
- our custom `.kg-card-selected` and `.kg-media-placeholder` classes were removed in https://github.com/TryGhost/Ghost-Admin/pull/985
- add them back in our 🛎🛎🛎 **shame** file until they make their way into Spirit
refs https://github.com/TryGhost/Ghost/issues/9505
- switch `{{koenig-toolbar}}` to use Spirit classes and icons
- wrap the toolbar `<ul>` in an absolutely positioned `<div>` rather than positioning the toolbar directly to improve animation behaviour
- remove old/unused Koenig SVG icons
refs https://github.com/TryGhost/Ghost/issues/9505
- previous attempts at toggling the markup state failed because mobiledoc-kit was automatically setting the activeMarkupState after we made the replacement
- by scheduling the toggle we change the active markup state after mobiledoc has done it's thing so you can continue typing without the markdown markup being applied and without needing to insert an unexpected space
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
no issue
- we currently rely on a side-effect of the individual publish menu components calling `setSaveType` when they are rendered
- in tests sometimes the timing was not what we expected and the menu would swap components mid-save which then updated the save type and caused further problems
- added a guard so that we never swap the publish menu components whilst a save is in progress
requires https://github.com/TryGhost/Ghost/pull/9426
- fixed default token component display in {{gh-token-input}}
- if no `tokenComponent` is passed to `{{gh-token-input}}` then it should default to the ember-drag-drop `draggable-object` component but instead it didn't output anything
- put `draggable-object` in quotes because `{{component}}` needs a component name rather than an object
- rename `option` attribute to `content` to match the default `{{draggable-object}}` interface
- add embedded `authors` attr to the Post model
- ensure authors is populated when starting new post
- add validation for empty authors list
- swap author dropdown for a token input in PSM
- show all post authors in posts list
- update tests for `authors`
- always provide through an authors array
- fix mirage serialisation for paginated responses (embedded records were not being serialised)
- unify tags and author inputs design
- remove highlight of primary tags
- highlight internal tags
- remove unnecessary/redundant title attributes on tags
- use SVG icon for "remove option" button in token inputs
refs https://github.com/TryGhost/Ghost/pull/9426/files
- when using `?include=foo` for a related model that itself normally has embedded relationships we need to add the nested relationship to the `include` param
- eg. `/posts?include=authors,authors.roles`
- this is necessary to ensure we don't introduce partial models into the Ember Data store by missing the embedded relationships on some requests
no issue
- bump `ember-cli-chai` and update tests
- add missing Post model properties to the post factory with `null` to better match API output
- replace uses of `.blank` which no longer exists, swapping for `.empty` or explicit checks for `null`
- manually parse strings to numbers before using `.above` and `.below`
- bump top-level deps with no breaking changes
- bump yarn.lock sub-dependencies
no issue
- `validator.js` throws an error if it's `length` method is passed a non-string value
- default to passing an empty string if `post.codeInjectionFoot` is falsy (missed in https://github.com/TryGhost/Ghost-Admin/pull/972)
no issue
- keymaster bindings could be kept around between tests with references to objects that should have been deleted. This was manifesting itself with a Tags acceptance test failing because one of the key binding tests triggered two actions, one on the route under test and another on a route that was kept around from a previous Error Handling acceptance test (previous test intentionally had an aborted transition so the action in the current test was complaining about the first transition not being complete)
- add guard to ensure that shortcuts can't be registered multiple times on an object
- remove all `default` scope keymaster bindings when destroying a test app instance
no issue
- Convert validator to an npm dependency
- clean up validator imports
- fix validator function imports
- remove unused validator extensions
- Convert devicejs to an npm dependency
- Convert remaining used bower deps to npm deps
- 🔥 Remove bower & unused bower dependencies
- remove globals imports in favor of direct module imports where possible
no issue
- ember-cli's asset rewriting was not picking up the asset URLs when they were directly embedded in a template string, fix is to ensure the image location is unambiguous by assigning it to a variable first
no issue
- https://github.com/TryGhost/Ghost-Admin/pull/970 worked for the general public icons but failed for koenig icons because of the incorrect config parameter name (`paths` -> `sourceDirs`)
- disabled the `stripPath` config so that there's no conflicts between public (`icon`) and koenig (`koenig/icon`) icons