Commit Graph

3887 Commits

Author SHA1 Message Date
Kevin Ansfield
220b6c6969 Drop Node.js 4 support 2018-04-30 15:13:37 +01:00
Kevin Ansfield
cd30fd6725 Bump dependencies
no issue
- bump dependencies with no breaking changes
- bump yarn.lock sub-dependencies
2018-04-30 14:25:12 +01:00
Kevin Ansfield
e28a960970 Removed used of ember-data-filter
closes https://github.com/TryGhost/Ghost/issues/9591
- swapped use of `store.filter` for a combination `store.peekAll` and CPs to filter the result set
2018-04-30 13:54:09 +01:00
Kevin Ansfield
7d95d42eda Fixed "Route#router intimate API" deprecation notices
closes https://github.com/TryGhost/Ghost/issues/9603
- don't add a `setTitle` method on the router and instead call `window.document.title` directly so that we don't have to access  `Route#router` (throws deprecation) or `Route#_router` (private and may break without notice)
2018-04-30 13:07:37 +01:00
Kevin Ansfield
072a561be1 Fixed duplicate tokens in app titles
no issue
- the `Settings - Apps` part of the title is already set via the `settings` route
2018-04-30 12:49:14 +01:00
Kevin Ansfield
86c75aed72 🐛 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
8ed92dec71 🐛 Fixed 404 handling in admin
refs https://github.com/TryGhost/Ghost/issues/9571
- use `replaceWith` rather than `transitionTo` so that the back button still works and doesn't immediately throw you back to the 404 page
- use the new `router` service to avoid deprecation notices
- update the regex replacements to work with `#` urls
2018-04-30 12:09:30 +01:00
Kevin Ansfield
8dd8257bf7 Koenig - Fixed error on Enter if card is selected
refs https://github.com/TryGhost/Ghost/issues/9505
- depending on the location of the caret around the selected card <kbd>Enter</kbd> could throw an error due to the assumption of a `tagName` property in the enter-at-start-of-header handling
2018-04-26 17:49:14 +01:00
Kevin Ansfield
8f135264dc Koenig - Improve link text expansion matching
refs https://github.com/TryGhost/Ghost/issues/9505
- tightens up regex to ensure we're not matching unexpected chars earlier in the paragraph
2018-04-26 17:40:38 +01:00
Kevin Ansfield
1a2e345957 Koenig - Ctrl/Cmd+K shortcut has same behaviour as toolbar link button
no issue
- override mobiledoc-kit's default <kbd>Ctrl/Cmd+K</kbd> shortcut to trigger our own link editing component
2018-04-26 17:04:40 +01:00
Kevin Ansfield
483ab830b0 Koenig - Fixed autofocus of markdown card when entering edit mode
refs https://github.com/TryGhost/Ghost/issues/9505
- add `autofocus` property to markdown editor component
- remove autofocus routine that was in place for old textarea based editor
2018-04-25 16:15:56 +01:00
Kevin Ansfield
13c402cfe8 Koenig - Fixed error when clicking on card with /-menu open
refs https://github.com/TryGhost/Ghost/issues/9505
- logic assumed that the selected section had a text property (cards do not)
2018-04-25 15:19:09 +01:00
Kevin Ansfield
ec65fc890b Koenig - Fixed card context menus sometimes being misplaced
refs https://github.com/TryGhost/Ghost/issues/9505
- sometimes the toolbar was not in a state to measure correctly during `didInsertElement` so the positioning was incorrect
- fixed by re-calculating width/height each time we want to show the toolbar
2018-04-25 15:11:45 +01:00
Kevin Ansfield
a0169adbbc Koenig - Fix spaces in markdown card editor
refs https://github.com/TryGhost/Ghost/issues/9505
- without `white-space: pre-wrap` any trailing spaces will be ignored by the browser which messes with CodeMirror's cursor positioning
2018-04-25 14:57:57 +01:00
Zimo
f25e4eb361 Koenig - Plus menu positioning and container card style
refs https://github.com/TryGhost/Ghost/issues/9505
2018-04-25 14:28:52 +01:00
Zimo
deea18576e Koenig - Tweaked container card styles
refs https://github.com/TryGhost/Ghost/issues/9505
2018-04-25 14:28:37 +01:00
Zimo
e253174506 Koenig - Styled HTML card edit mode
refs https://github.com/TryGhost/Ghost/issues/9505
2018-04-25 14:27:53 +01:00
Kevin Ansfield
ae92b92175 Koenig - Bump ghost-spirit dependency 2018-04-25 14:26:12 +01:00
Kevin Ansfield
f2736be430 Koenig - Fix divider card insertion
refs https://github.com/TryGhost/Ghost/issues/9505
- ensure we select the next section when inserting a card
- remove duplicated card insertion logic by passing the Koenig instance to our text expansion helpers so that they can call actions
2018-04-25 13:12:59 +01:00
Kevin Ansfield
55645e9dd5 Koenig - Increase undo depth to 50
refs https://github.com/TryGhost/Ghost/issues/9505
2018-04-25 12:46:50 +01:00
Kevin Ansfield
9e1e6ca0c9 Koenig - Remove caption from HTML card
refs https://github.com/TryGhost/Ghost/issues/9505
2018-04-25 12:09:20 +01:00
Kevin Ansfield
761e841875 Koenig - Enable line-wrapping for HTML card's CodeMirror instance
refs https://github.com/TryGhost/Ghost/issues/9505
- pass `lineWrapping` option through to CodeMirror in `{{gh-cm-editor}}`
- add cascade overrides for the `pre` line-wrapping styles needed by CodeMirror
2018-04-25 12:06:01 +01:00
Kevin Ansfield
923a1f8372 Fixed subscriber table tests in FF (#1011)
no issue
- `ember-in-viewport` was forced to a newer version in 13351afe38 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
bc32beef38 Koenig - Card menu and (+) button styles (#1010)
refs https://github.com/TryGhost/Ghost/issues/9505
- apply styles to card menu and replace icons
- apply styles for (+) button
2018-04-25 10:11:48 +01:00
Kevin Ansfield
049d10373b Koenig - Bump ghost-spirit dependency 2018-04-25 10:09:53 +01:00
Kevin Ansfield
13351afe38 Koenig - Fix sticky MD card toolbar 2018-04-24 16:16:03 +01:00
Kevin Ansfield
b21e46aa39 Koenig - Keep MD card formatting toolbar visible when possible
refs https://github.com/TryGhost/Ghost/issues/9505
- use `{{gh-scroll-trigger}}` components at top and bottom of the markdown card when in edit mode so that styles can be applied to the `.editor-toolbar` element to keep the toolbar fixed at the bottom of the screen whilst scrolling
2018-04-24 13:10:20 +01:00
Peter Zimon
af03f8f516 Koenig - Improve styles (#1008)
refs https://github.com/TryGhost/Ghost/issues/9505
- Tweaking UI of link input
- Tweaking toolbar menu
- Tweaking image toolbar style
- Applying image width styles
- Tweaking list typography
- Fixing empty post placeholder
2018-04-24 10:15:54 +01:00
Kevin Ansfield
ec01d8093b Koenig - Bump ghost-spirit dependency 2018-04-24 10:14:33 +01:00
Aileen Nowak
012ed54cea Version bump to 1.22.4 2018-04-24 16:03:39 +08:00
Kevin Ansfield
7405d12302 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
5de0ae5cea 🐛 Fixed tag/author removal in post settings removing multiple tags/authors
closes https://github.com/TryGhost/Ghost/issues/9575
- in 6a3cfc2ca8 an `onmouseover` event handler was added for the close button in token input options which resulted in double firing in some circumstances where our code fired then the ember-power-select removal event handler also fired
2018-04-23 14:25:59 +01:00
Kevin Ansfield
f11cb2e491 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
ab2c4fa3f7 Bump eslint-plugin-ghost
refs https://github.com/TryGhost/Ghost/issues/9594
- fixes node version restrictions
2018-04-23 09:43:21 +01:00
Zimo
58f5941357 Koenig - Fixing editing styles for HTML card 2018-04-20 17:51:33 +02:00
Zimo
af7c6faf65 Koenig - Fixing Markdown card styling in edit mode 2018-04-20 17:20:15 +02:00
Kevin Ansfield
dcd76b5a5e Koenig - Only deselect cards on cursor changes within the doc
refs https://github.com/TryGhost/Ghost/issues/9505
- prevents clicks outside of the document canvas from exiting edit mode
- useful for cards that include modals because previously any click on a modal would exit edit mode and usually remove the modal from view
2018-04-20 15:43:44 +01:00
Kevin Ansfield
21007d0630 Koenig - Use our full markdown editor in markdown card
no issue
- remove jQuery usage in `{{gh-markdown-editor}}` (general cleanup)
- switch `koenig-card-markdown` to use `{{gh-markdown-editor}}`
- update markdown editor styles to fit within the card interface
- add `{{gh-editor}}` for handling image uploads and drag/drop
2018-04-20 15:43:44 +01:00
Kevin Ansfield
4438a33a64 Allow certain toolbar buttons to be disabled in {{gh-markdown-editor}}
no issue
- pre-requisite for using `{{gh-markdown-editor}}` inside a Koenig card
- adds `enablePreview`, `enableSideBySide`, and `enableHemingway` params that can be set to `false` to disable the related toolbar buttons and shortcuts
2018-04-20 15:43:44 +01:00
Kevin Ansfield
a0f33bad06 Move mobiledoc knowledge out of {{gh-markdown-editor}}
no issue
- pre-requisite for using `{{gh-markdown-editor}}` inside a Koenig card
- switch to passing markdown into `{{gh-markdown-editor}}`
- move markdown->mobiledoc logic into the `editor` controller
2018-04-20 15:43:44 +01:00
Peter Zimon
555758a372 Koenig - Basic styles for editor content (#1006)
refs https://github.com/TryGhost/Ghost/issues/9505
- paragraph and heading styles and vert rhythm
- blockquote and link styles
- list styles
- card styles
- markdown card styles
2018-04-20 15:43:20 +01:00
Kevin Ansfield
3dcbec0047 Bump Spirit CSS version 2018-04-20 15:41:07 +01:00
Kevin Ansfield
7875a167ec Fixed post autosave for changes to nested objects in mobiledoc
no issue
- fixes a problem that appeared after the first save of a post; refs for nested objects in the `mobiledoc` object didn't change so any time they were updated in the `scratch` object they were also updated in the `mobiledoc` object which broke our dirty attributes tracking
- by creating a deep copy during save we ensure `scratch` and `mobiledoc` are kept separate without causing unnecessary copying (saves occur much less frequently than scratch updates)
2018-04-19 17:29:01 +01:00
Kevin Ansfield
77fa4439de Koenig - Add card options for automatic edit/select after insert
no issue
- allows specifying Koenig-specific card options via `createComponentCard`
- respect `hasEditMode` and `selectAfterInsert` options when inserting cards via the (+) and / menus
- do not select divider card after insertion
2018-04-18 10:52:49 +01:00
Kevin Ansfield
945e8316a7 Koenig - Fixed _emphasis_ and link text expansions not cancelling
refs https://github.com/TryGhost/Ghost/issues/9505
- the `_` emphasis and link text expansions were toggling the wrong markup on completion
2018-04-18 10:17:13 +01:00
Kevin Ansfield
dbfca4fc82 Version bump to 1.22.3 2018-04-17 11:13:53 +01:00
Aileen Nowak
ffa30881d5 Replaced config routeKeyword with hardcoded one (#1004)
refs TryGhost/Ghost#9561

- used the hardcoded routeKeyword for `preview`
- removed `routeKeywords` from mirage configurations API fixtures
2018-04-17 09:52:41 +01:00
Kevin Ansfield
ae759d39ea 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
f5fb674804 Koenig - Apply link to selected text when pasting a URL
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`
2018-04-13 17:53:40 +01:00
Kevin Ansfield
ff96eb019f Koenig - Fixed error when pasting text with a whole paragraph selected
refs https://github.com/TryGhost/Ghost/issues/9505
2018-04-13 16:42:20 +01:00