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

3864 commits

Author SHA1 Message Date
Kevin Ansfield 1345582340
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 1b65c2dda8 Koenig - Bump ghost-spirit dependency 2018-04-25 10:09:53 +01:00
Kevin Ansfield cb46718a26 Koenig - Fix sticky MD card toolbar 2018-04-24 16:16:03 +01:00
Kevin Ansfield aaf40bc483 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 f88c2e1706 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 ea397c4449 Koenig - Bump ghost-spirit dependency 2018-04-24 10:14:33 +01:00
Aileen Nowak 3ef53ea054 Version bump to 1.22.4 2018-04-24 16:03:39 +08: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 d380753fd3 🐛 Fixed tag/author removal in post settings removing multiple tags/authors
closes https://github.com/TryGhost/Ghost/issues/9575
- in 38b138d759 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 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 b72fe7c49e 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 9eb0019628 Koenig - Fixing editing styles for HTML card 2018-04-20 17:51:33 +02:00
Zimo b331cbfd97 Koenig - Fixing Markdown card styling in edit mode 2018-04-20 17:20:15 +02:00
Kevin Ansfield 5a29aae97e 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 4a1273d388 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 284dd057a9 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 f6ec2f23f5 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 92d1454a41 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 ffbecf289b Bump Spirit CSS version 2018-04-20 15:41:07 +01:00
Kevin Ansfield 351c7adf89 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 bd46a6b291 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 2f5f3ce82a 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 cd5541eeac Version bump to 1.22.3 2018-04-17 11:13:53 +01:00
Aileen Nowak ec178590f0 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 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 ee6ca44dca 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 2ba01265d8 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
Kevin Ansfield d45baa7ede Koenig - Enter/Backspace at beginning of heading moves heading
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
2018-04-13 16:15:43 +01:00
Kevin Ansfield 201681a445 Koenig - Backspace undoes code/strike text expansions
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
2018-04-12 17:20:27 +01:00
Kevin Ansfield 1a585517c7 Koenig - Change ~strike~ text expansion to ~~strike~~
refs https://github.com/TryGhost/Ghost/issues/9505
2018-04-12 12:40:15 +01:00
Kevin Ansfield d9c56977f0 Koenig - Disable dragging of text within the editor
refs https://github.com/TryGhost/Ghost/issues/9505
- disable all drags that start within the editor, prevents hectic behaviour when selecting and dragging text
2018-04-12 11:14:47 +01:00
kirrg001 5984156fc6 Version bump to 1.22.2 2018-04-11 22:35:59 +02: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 2f6132eb57 Koenig - Update icons, add divider support to card context toolbars
refs https://github.com/TryGhost/Ghost/issues/9505
2018-04-11 16:48:01 +01:00
Kevin Ansfield 28509c6bf6 Koenig - First pass at image width styles
refs https://github.com/TryGhost/Ghost/issues/9505
- add image style buttons to the image card context menu
- still requires Spirit styles for image classes to work correctly
2018-04-10 18:39:30 +01:00
Kevin Ansfield 52396ce280 Koenig - Fixed card context menu clickableness
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
2018-04-10 16:46:25 +01:00
Kevin Ansfield ac49240d34 Koenig - Fix error on SHIFT+ENTER whilst a card is selected
refs https://github.com/TryGhost/Ghost/issues/9505
- a card section isn't markerable so a guard is needed to prevent inserting the soft-break atom
2018-04-10 15:34:12 +01:00
Kevin Ansfield 7a89333b00 Koenig - Fixed markdown expansions not capturing 1 or 2 char markups
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
2018-04-10 15:04:18 +01:00
Kevin Ansfield c0cef4a211 Koenig - Fixed UP or LEFT on a blank list item jumping cursor to title
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
2018-04-10 11:26:22 +01:00
Kevin Ansfield 426e5a872d 🐛 Fixed plaintext field not being updated when modifying a post
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
2018-04-09 14:58:33 +01:00
Kevin Ansfield 2615e13bf5 Fixed missed color() to color-mod() rename
closes https://github.com/TryGhost/Ghost/issues/9557
- https://github.com/TryGhost/Ghost-Admin/pull/985's global search&replace missed multiple `color()` calls on the same line
2018-04-09 14:37:48 +01:00
Kevin Ansfield 2c48cd6139
🐛 Fixed j and k keys not working in editor after visiting Tags screen (#1002)
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
2018-04-09 13:41:23 +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 7fa52be861 Don't send created_by and updated_by attrs in API requests
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
2018-04-05 11:54:36 +01:00
Kevin Ansfield e7c9406e88 Koenig - Fix hidden toolbar still being clickable
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
2018-04-04 10:12:31 +01:00
Kevin Ansfield c338896793 Koenig - Switch card context menu to Spirit classes
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
2018-04-03 18:34:01 +01:00
Kevin Ansfield 19e3af6365 Koenig - Quick-fix for broken styles
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
2018-04-03 17:28:52 +01:00
Kevin Ansfield 3ec2e87a6c Koenig - Update toolbar to use Spirit classes
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
2018-04-03 16:52:00 +01:00
Kevin Ansfield 9aef06c4c2 Koenig - Fixed trailing-spaces when using markdown text expansions
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
2018-04-03 13:43:08 +01:00
CriticalRespawn b96c6b96ee 🐛 Fixed missing default user image on setup screens (#996)
no issue
- changed image location to be assigned to a variable so the asset rewriter recognises it
2018-04-03 11:59:33 +01:00