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

4159 commits

Author SHA1 Message Date
Kevin Ansfield 313fb1b794 Version bump to 2.0.1 2018-08-20 15:11:51 +01:00
Kevin Ansfield 89cc8a3189 Koenig - Fixed missing borders on some embeds
refs https://github.com/TryGhost/Ghost/issues/9724
- removed 1px white border on embed card click overlay so that it doesn't cover borders used by certain embeds such as Instagram and Facebook posts
2018-08-20 13:34:45 +01:00
kirrg001 892eb7bdf6 Version bump to 2.0.0 2018-08-16 14:10:09 +02:00
Kevin Ansfield d24bad6aca Fixed default user images returning 404s
no issue
- dropping IE11 support meant that babel/uglifyjs was able to be clever and inline the image URLs variables directly into the template strings which was then breaking the fingerprint asset rewriting resulting in files having hashes but file references in the JS not having the hash
- removing use of template strings to build the default image URLs prevents the inlining behaviour, letting the asset fingerprint plugin do it's thing correctly
2018-08-15 23:58:37 +01:00
Katharina Irrgang 065d39ee0f
Updated links to use v2 docs (#1036)
no issue

- found some more v1 links
2018-08-15 23:35:17 +02:00
Zimo e4349edafb Replacing Facebook embed with Spotify 2018-08-15 18:11:16 +02:00
Kevin Ansfield 3e3adede4c Fix linting 2018-08-15 16:52:06 +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
Zimo ad6b7c9a9f Fixing vertical alignment for error and spinner in Unsplash browser 2018-08-15 16:36:24 +02:00
kirrg001 3c3e0d0fb0 Bump package.json version to 2.0.0-rc.1
no issue
2018-08-15 02:51:31 +02:00
kirrg001 c864673125 Bump package.json version to 2.0.0-rc.0
no issue
2018-08-14 17:50:56 +01:00
Kevin Ansfield 427a418f36 Dropped IE11 browser target for transpilation 2018-08-14 17:49:50 +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 512d6d8262 Version bump to 1.25.5 2018-08-14 14:43:40 +01:00
Peter Zimon d62949a0cf Updated install welcome/signup screenshot (#1034)
no issue
- update screenshot to reflect latest design
2018-08-14 14:38:37 +01:00
Zimo 4d45f03d1b Koenig - Minor design refinements
refs https://github.com/TryGhost/Ghost/issues/9724
- fixed Card menu plus icon's rounded edges
- decreased link toolbar appearance delay
- changing 'H'/'h' toolbar mapping to 'H2'/'H3' and harmonized title font size
2018-08-14 14:35:13 +01:00
Kevin Ansfield 84059cd5a7 🎨 Koenig - Added paste-url-over-selection link creation to caption inputs
refs https://github.com/TryGhost/Ghost/issues/9724
- the "paste url on a selection to make it a link" feature from the main editor was missing in caption inputs
- copied functionality across (shared functionality needs extracting at some point)
2018-08-13 10:59:13 +01:00
Kevin Ansfield 1f3d77d723 🐛 Koenig - Fixed pasting of rich-text image captions losing formatting
refs https://github.com/TryGhost/Ghost/issues/9724
- caption payload changed from `textContent` to a cleaned `innerHTML` in our `figureToImageCard` parser plugin
2018-08-13 10:41:01 +01:00
Kevin Ansfield c345019b92 🐛 Koenig - Fixed rich-text captions sometimes losing spaces
refs https://github.com/TryGhost/Ghost/issues/9724
- `clean-basic-html` was being overzealous with it's empty element removal, often contenteditable (especially when pasting) will result in HTML such as `<span>&nbsp;</span>` which was being completely removed
- if an empty element has any spaces in it, replace the element with a textNode containing a single space
2018-08-13 10:37:45 +01:00
Kevin Ansfield 46129aca55 🐛 Koenig - Fixed missing alt/title attributes when pasting markdown or HTML
refs https://github.com/TryGhost/Ghost/issues/9724
- capture the `alt` and `title` attributes in our figure and image parser plugins
2018-08-13 09:50:56 +01:00
Kevin Ansfield e7bcd220a0 Koenig - Fixed backspace not removing card after inserting Unsplash image
refs https://github.com/TryGhost/Ghost/issues/9724
- focus was not being returned to the editor after the Unsplash modal was closed so although the image card looked selected the editor was not responding to any key commands
2018-08-11 18:30:59 +01:00
Kevin Ansfield 482188b263 Koenig - Prevent "Enter" being inserted into captions
refs https://github.com/TryGhost/Ghost/issues/9724
- mobiledoc-kit's `key.isPrintable()` returns true for <kbd>Enter</kbd> but in this instance we don't want to capture newlines as printable chars
- swapped insertion of `event.key` for `key.toString()` for better handling of named keys that output characters (eg. when `event.key` === `Enter` which prints `\n`)
2018-08-11 18:26:30 +01:00
Kevin Ansfield fcc943fc26 Koenig - Fixed .cleanup when called during editor initialisation
refs https://github.com/TryGhost/Ghost/issues/9724
- we call `koenig.cleanup` when setting a post in the editor controller but the call will happen before `componentCards` has been populated so none of our "delete if empty" routines were being run
- calls to `.cleanup` now schedule the cleanup after the next editor render which should mean cards are populated before we try to remove them
2018-08-10 18:11:35 +01:00
Kevin Ansfield 72c600486c Koenig - Unsplash integration
refs https://github.com/TryGhost/Ghost/issues/9724
- standardised `{{gh-unsplash}}` actions and action arguments to better represent a generic "image source"
- added `{{gh-unsplash searchTerm="ghosts"}}` parameter
- added `payload` param to `card` definitions used for plus/slash menus so that default payload params can be passed to cards
- added a concept of "image selectors" to image card
  - if a `payload.imageSelector` param is received by the card it will look it up in it's list of known selectors and display the appropriate image selection component
  - if the card was created with an image selector param and the image selector is closed without selecting an image then the card will be removed
- delete image cards during cleanup if they were created via selector but have no src
2018-08-10 18:11:35 +01:00
Kevin Ansfield f9de6ed354 Redesigned Unsplash modal
no issue
- Koenig is now full-screen so the Unsplash modal needed some design tweaks so that it doesn't look like Unsplash.com
2018-08-10 18:11:35 +01:00
Peter Zimon 9e9984e113 Koenig - Added help link (#1033)
refs https://github.com/TryGhost/Ghost/issues/9724
- basic link to editor help docs
2018-08-10 12:11:15 +01:00
Zimo 377f6addf7 Koenig - Updated menu icons
- changed icons for coloured set
- added Unsplash icon
- bumped Spirit for menu-related style updates
2018-08-10 11:18:02 +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 85dc553b1d Fixed linting 2018-08-09 10:18:45 +01:00
kirrg001 95427364db Version bump to 1.25.4 2018-08-08 19:45:53 +02:00
Kevin Ansfield e9f488eb43 Koenig - Fix divider card text expansion
no issue
- re-org of the text-expansions code meant that the smart hyphens expansion was being picked up before the divider card expansion and blocking it
2018-08-08 15:52:13 +01:00
Kevin Ansfield bb9ed97c24 Koenig - Allow clicks on rich-text captions to place cursor immediately
refs https://github.com/TryGhost/Ghost/issues/9724
- add a `data-kg-allow-clickthrough` attribute so that it's possible to explicitly allow non-input elements to be clicked immediately when clicking on a card
2018-08-08 15:48:31 +01:00
Kevin Ansfield b2d29780e9 Koenig - Fixed broken styles
no issue
- bump `ghost-spirit` version to fix selectors
2018-08-08 14:45:45 +01:00
Zimo b244b294d5 Fixing icon style for text toolbar 2018-08-08 15:29:33 +02:00
Kevin Ansfield 5dedb797a6 Koenig - Fixed error in {{clean-basic-html}} when passed null/undefined
no issue
- default param was not protecting against null value being passed via helper params
2018-08-08 13:50:42 +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
Peter Zimon 9836c91b19 Koenig - Design refinements (#1032)
refs https://github.com/TryGhost/Ghost/issues/9724
- made floating header and footer elements in Koenig opaque
- switched to filled toolbar icons + icon cleanup
- fixed Koenig placeholder image size in Firefox
- increased "wide" image width on smaller screens
- refined divider card margins
- fixed long links not wrapping
2018-08-08 13:14:02 +01:00
Kevin Ansfield d13e0c0a80 Koenig - Do not select embed card when auto-converting pasted URL
refs https://github.com/TryGhost/Ghost/issues/9724
- selecting the embed card as soon as it's created causes problems with the caption input grabbing focus which interferes with being able to continue typing
- if content exists after the paste move the cursor to the beginning of the next section, otherwise create a blank paragraph and move the cursor into that
2018-08-02 15:10:00 +01:00
Kevin Ansfield 6833c0b2fa Koenig - Fixed embeds cards
no issue
- `set` call to remove `linkOnError` from the embed card payload was malformed
2018-08-02 14:39:31 +01:00
Kevin Ansfield 609e9a6787 Koenig - Auto-convert URLs pasted on blank lines to embed cards
refs https://github.com/TryGhost/Ghost/issues/9724
- if a URL is pasted in a blank paragraph, insert an embed card configured to switch immediately to a link if the embed fails
- if <kbd>Shift</kbd> is pressed when pasting insert a linked URL with no auto-embed
- added `payload.linkOnError` handling to the embed card
  - if that option is set, immediately convert the embed card section to a linked URL on embed failure
  - skip adding an undo step when auto-converting to a URL so that no undo loop is created. Without this an undo would convert from link to embed card which would automatically look up the url then convert back to a link meaning it's impossible to undo back past the URL paste
  - ensure that the cursor position doesn't jump if the user has continued writing whilst the oembed lookup is in progress
2018-08-02 13:09:32 +01:00
Kevin Ansfield a497c0f40d 🐛 Koenig - Fixed cards being lost on copy/paste if they immediate followed a list
refs https://github.com/TryGhost/Ghost/issues/9724
- bumped our mobiledoc-kit version that includes related fix (https://github.com/bustle/mobiledoc-kit/pull/638)
2018-08-01 16:29:49 +01:00
Kevin Ansfield 08c5e73b49 Koenig - Support /image {image url} slash menu shortcut
refs https://github.com/TryGhost/Ghost/issues/9724
- add `src` param to the `image` card for use in the slash menu
- typing `/image http://example.com/image.jpeg` then pressing <kbd>Enter</kbd> will create an image card with the src pre-set
2018-08-01 14:17:09 +01:00
Kevin Ansfield de34b3cdc0 🐛 Koenig - Fixed duplicate images when dropping image file on an image card
refs https://github.com/TryGhost/Ghost/issues/9724
- `card.handlesDragDrop` was never accessible, it would have had to be registered through `card.koenigOptions.handlesDragDrop` when the drop handling was first added
- as of 09a8c7fa88 properties on card components are directly accessible so we can use `card.component.handlesDragDrop` to guard against the editor handling drops on cards that handle their own drops
2018-08-01 12:36:02 +01:00
Kevin Ansfield 3f5cf030d0 🐛 Koenig - Fixed error when dropping an image before the editor has focus
refs https://github.com/TryGhost/Ghost/issues/9724
- adjust `insertImageCards()` to handle the editor not having an active section
- add `jumpToCard` option to `_scrollCursorIntoView()` so that we can scroll to a card when appropriate
- call `_scrollCursorIntoView()` after dropping images and creating cards
2018-08-01 10:00:05 +01:00
Kevin Ansfield 98df5b6464 Version bump to 1.25.3 2018-07-31 11:37:01 +01:00
Peter Zimon c68fb36849 Koenig - Design refinements (#1031)
refs https://github.com/TryGhost/Ghost/issues/9724
- fixed image card background colour
- made placeholder illustration for image cards work with Night Shift
- added viewbox prop to `summer.svg` illustration
- bumped ghost-spirit dependency
  - fixed link discoverability when spellcheck is on
  - fixed list spacing after headings 3-6 and refined list line heights
  - added quick transition to format toolbar chiclet
  - removed minimum width for image caption
  - fixed wide image width in Safari
2018-07-31 10:57:58 +01:00
Kevin Ansfield b5559fdd32 Remove unused app/_config.yml file
no issue
- remove file left over from a very early version of Ghost
2018-07-30 15:11:59 +01:00
Kevin Ansfield dc040582d2 🐛 Koenig - Fixed numpad Enter key not behaving like normal Enter key
refs https://github.com/TryGhost/Ghost/issues/9724
- `event.code` represents physical key location rather than the associated key value. Eg, `event.code` could be `NumpadEnter` rather than the expected `Enter` value
- ensure we use `event.key` anywhere that we are acting on the key value so that re-mapped or virtual keys still work as expected
2018-07-30 14:40:00 +01:00