Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Koenig: Final Ghost 2.0 Version #9724

Closed
26 of 27 tasks
kevinansfield opened this issue Jul 9, 2018 · 5 comments
Closed
26 of 27 tasks

Koenig: Final Ghost 2.0 Version #9724

kevinansfield opened this issue Jul 9, 2018 · 5 comments
Assignees

Comments

@kevinansfield
Copy link
Contributor

kevinansfield commented Jul 9, 2018

This issue captures the tasks that we'll be working on for the fourth 6-week Koenig sprint. All work will take place on master and will be available in the weekly releases behind a labs flag for anyone wanting to help test. The plan is to replace Ghost's current editor with Koenig at the end of the cycle.

part of #9311 (Feature: Full Koenig editor)

I want to help test! How do I get started?

See the instructions here.


🏃 in-progress
🚢 ready for next release (typically every Tuesday)

Release blockers

  • ✨ supported sources popup / help page for embed card
  • ✨ unsupported browser / mobile editing communication

Released:

  • ✨ word count / reading time display
  • ✨ full text-editing keyboard shortcuts implementation
  • 🎨 Cmd+Enter should exit card edit mode as well as enter it
  • 🐛 Support schema-less URLs in embed cards
  • 🐛 Firefox Up/Down arrow keys jump to top/bottom of doc when hitting a section boundary
    • this is caused by display: flex on the contenteditable element and appears to be a Firefox bug
    • removing display: flex breaks larger image widths
  • 🐛 Slash-menu doesn't work after clicking "New story" whilst in the editor
  • 🐛 Clicking Embed cards from the /-menu throws errors
  • 🐛 Clicking the "Retry" link in the embed card error message doesn't return to URL input
  • 🐛 Clicking Markdown/HTML/embed cards from the /-menu doesn't create the card
  • 🐛 Firefox triple-click to select then typing doesn't replace content (mobiledoc-kit issue, PR)
  • 🐛 Option + Backspace delete only until the first letter with accent (mobiledoc-kit issue, PR)
  • 🐛 Safari scrolls to the bottom when interacting with the link toolbar
  • 🐛 Double-clicks on the MD card whilst it's selected can unexpectedly trigger toolbar buttons when transitioning to edit mode
  • 🐛 Clicking the (+) button when the cursor is not in the respective blank paragraph moves the cursor rather than opening the menu. Requires a second click to open
  • 🐛 Firefox Up requires two presses to move up from a divider card and gets stuck on image cards
  • 🐛 Safari doesn't display "wide" images correctly at all window sizes
  • 🐛 Dropping an image on the editor before a cursor has been placed throws an error
  • 🐛 Dropping an image on an image card creates two image cards
  • 🐛 Cutting a selection that includes a list item and a card loses the card when pasting (mobiledoc-kit issue, PR)

Stretch goals

  • ✨ hide sidebar on editor screen
  • ✨ support /image https://example.com/image.jpeg slash menu shortcut
  • ✨ create an embed card when pasting a URL in a blank section if it matches a known provider
  • ✨ rich-text captions
  • ✨ 🚢 Unsplash image selection for image card
  • ✨ 🚢 general docs and help popup / link
  • ✨ create an embed card based on opengraph data if there's no direct oembed provider
  • ✨ warn if leaving whilst an upload is in progress
  • 🐛 emoji's do not play nicely with the cursor. With 🤷🏻‍♂️ for example you need to press Left 6 times to move the cursor from one side to the other and Backspace will cycle through various forms of the emoji until it's finally deleted and doesn't always play nicely with the undo stack
    • Dropbox Paper converts all emoji's into an "atom" type element
    • Medium has similar struggles except it also doesn't render correctly
    • mobiledoc-kit issue
kevinansfield added a commit to kevinansfield/Ghost that referenced this issue Jul 9, 2018
refs TryGhost#9724
- adjust the "base url" regex in the oembed endpoint to strip schemaless scheme `//` as well as `https?://`
@ErisDS ErisDS mentioned this issue Jul 9, 2018
4 tasks
kevinansfield added a commit that referenced this issue Jul 9, 2018
refs #9724
- adjust the "base url" regex in the oembed endpoint to strip schemaless scheme `//` as well as `https?://`
kevinansfield added a commit to TryGhost/Admin that referenced this issue Jul 10, 2018
refs TryGhost/Ghost#9724
- add `ember-useragent` package so that we can check the user agent screen for known-incompatible browsers/devices
- show alerts for Edge, mobile browsers, and IE11 when accessing the editor with Koenig enabled
kevinansfield added a commit to TryGhost/Admin that referenced this issue Jul 11, 2018
refs TryGhost/Ghost#9724
- if the editor was reloaded by changing the post model either through clicking "New story" or using the search from the editor screen the /-menu would stop working
- keep track of the last seen `editor` instance inside `{{koenig-slash-menu}}` and register the `/` text input handler on the new editor instance if it changes
kevinansfield added a commit to TryGhost/Admin that referenced this issue Jul 12, 2018
refs TryGhost/Ghost#9724
- update Spirit so that we're not using `display: flex` on the `contenteditable` element
kevinansfield added a commit to TryGhost/Admin that referenced this issue Jul 17, 2018
refs TryGhost/Ghost#9724
- `{{koenig-menu-content}}` does not pass any params through when an item is clicked
- move the `params` fetching via the query string from `_performAction()` to `actions.itemClicked` so that it works for both <kbd>Enter</kbd> and icon clicks
kevinansfield added a commit to TryGhost/Admin that referenced this issue Jul 17, 2018
refs TryGhost/Ghost#9724
- `element.contains(target)` was not reliably picking up the `<span>` inside the `<button>` element
- added a fallback that searches the event path for the card component's ID
kevinansfield added a commit to TryGhost/Admin that referenced this issue Jul 17, 2018
refs TryGhost/Ghost#9724
- the click event from clicking on the /-menu items continued propagating after the card was initialised which meant it was picked up by the card as a "click off the card" so certain cards such as the Markdown/HTML cards would then remove themselves as if they were deselected with empty content
- changed the icon click handler to use the DOM `onclick` syntax so that the click can be captured immediately rather than waiting for it to bubble up to Ember's global event handler
- updated the /-menu `itemClicked` action to use the now-accessible MouseEvent to stop it propagating any further and triggering unwanted card behaviour
kevinansfield added a commit to TryGhost/Admin that referenced this issue Jul 17, 2018
…click behaviour

refs TryGhost/Ghost#9724
- bump to custom build of mobiledoc-kit that includes unreleased fixes
  - cmd+backspace stopping on special chars: bustle/mobiledoc-kit#632
  - Firefox triple-click then typing not replacing content: bustle/mobiledoc-kit#593
kevinansfield added a commit to TryGhost/Admin that referenced this issue Jul 18, 2018
refs TryGhost/Ghost#9724
- bump `ghost-spirit`
  - has position fix for placeholder now that we're not using flexbox
kevinansfield added a commit to TryGhost/Admin that referenced this issue Jul 18, 2018
refs TryGhost/Ghost#9724
- e16a300 introduced a bug because it expected an event param that is only available when clicking
- add guard to check for `event` presence before attempting to stop propagation
kevinansfield added a commit to TryGhost/Admin that referenced this issue Jul 18, 2018
…nput

refs TryGhost/Ghost#9724
- `autofocus="true"` in Safari was overriding the custom focus method which keeps the scroll position locked
kevinansfield added a commit to TryGhost/Admin that referenced this issue Jul 18, 2018
…lbar buttons

refs TryGhost/Ghost#9724
- add an overlay to the markdown card for 500ms when entering edit mode to stop extra clicks accidentally triggering toolbar buttons
kevinansfield added a commit to TryGhost/Admin that referenced this issue Jul 18, 2018
…ame paragraph

refs TryGhost/Ghost#9724
- ignore the range change which would otherwise close the menu when clicking a (+) next to a different paragraph then the one the cursor is currently on
kevinansfield added a commit to TryGhost/Admin that referenced this issue Jul 18, 2018
refs TryGhost/Ghost#9724
- <kbd>Ctrl/Cmd+Enter</kbd> is the shortcut to enter edit mode of a card that has it
- adds <kbd>Ctrl/Cmd+Enter</kbd> as a shortcut to exit edit mode as an addition to <kbd>Escape</kbd> for easier toggling in/out of edit mode
kevinansfield added a commit to TryGhost/Admin that referenced this issue Jul 20, 2018
refs TryGhost/Ghost#9724
- <kbd>Ctrl+Alt+1</kbd> - Togggle heading level 1
- <kbd>Ctrl+Alt+2</kbd> - Togggle heading level 2
- <kbd>Ctrl+Alt+3</kbd> - Togggle heading level 3
- <kbd>Ctrl+Alt+4</kbd> - Togggle heading level 4
- <kbd>Ctrl+Alt+5</kbd> - Togggle heading level 5
- <kbd>Ctrl+Alt+6</kbd> - Togggle heading level 6
- <kbd>Ctrl/Cmd+H</kbd> - Cycle through heading levels 2-6
- <kbd>Ctrl+Q</kbd> - Toggle blockquote
- <kbd>Ctrl+L</kbd> - Toggle unordered list
- <kbd>Ctrl/Cmd+K</kbd> - Toggle link
- <kbd>Ctrl/Cmd+B</kbd> - Toggle bold
- <kbd>Ctrl/Cmd+I</kbd> - Toggle italic
- <kbd>Ctrl/Cmd+U</kbd> - Toggle underline
- <kbd>Ctrl+Alt+U</kbd> - Toggle strikethrough
- <kbd>Ctrl/Cmd+Shift+K</kbd> - Toggle code
kevinansfield added a commit to TryGhost/Admin that referenced this issue Jul 20, 2018
refs TryGhost/Ghost#9724
- add `registerComponent` hook to cards so that `{{koenig-editor}}` can fetch properties from card components directly
- add word count and reading time utilities
- add throttled word count update routine to `{{koenig-editor}}` that walks all sections and counts text words or fetches word/image counts from card components
- add `wordCountDidChange` hook to `{{koenig-editor}}` so that word count + reading time can be exposed
- modify editor controller to update it's own word count property when koenig triggers it's action
- modified the editor template to show reading time + word count next to the post status
kevinansfield added a commit to TryGhost/Admin that referenced this issue Jul 23, 2018
refs TryGhost/Ghost#9724
- display word count/reading time in the top-left when the opaque top bar is present otherwise use the bottom-right
kevinansfield added a commit to TryGhost/Admin that referenced this issue Jul 23, 2018
refs TryGhost/Ghost#9724
- Firefox has a bug that prevents the cursor from moving from one element to another when pressing <kbd>Up</kbd> in certain circumstances
- added workaround that replicates the default behaviour that all other browsers have so that <kbd>Up</kbd> can always move to the previous section
kevinansfield added a commit to TryGhost/Admin that referenced this issue Jul 24, 2018
refs TryGhost/Ghost#9724
- removed reading time from word count display, it will be added back later as part of a more comprehensive stats interface
- added background to the bottom right word count so it's still visible when above a full-width image
peterzimon added a commit to peterzimon/playground that referenced this issue Jul 24, 2018
refs TryGhost/Ghost#9724
- just an extra text
peterzimon added a commit to peterzimon/playground that referenced this issue Jul 24, 2018
peterzimon added a commit to TryGhost/Admin that referenced this issue Jul 24, 2018
refs TryGhost/Ghost#9724
- word count is displayed in the bottom right of the screen regardless of screen size
- for smaller screen sizes the word count display is adjusted
- minor visual tweaks and refinements
kevinansfield added a commit to TryGhost/Admin that referenced this issue Jul 24, 2018
refs TryGhost/Ghost#9724
- bump `ghost-spirit` version to pull in styling fix
kirrg001 added a commit that referenced this issue Aug 10, 2018
refs #9742, refs #9724

- handle König Editor format for 2.0
- adapted importer to be able to import 1.0 and 2.0 exports
- added migration scripts
  - remove labs flag for Koenig
  - migrate all old editor posts to new editor format
- ensure we protect the code against mobiledoc or html field being null
- ensure we create a blank mobiledoc structure if mobiledoc field is null (model layer)
- ensure you can fully rollback 2.0 to 1.0
- keep mobiledoc/markdown version 1 logic to be able to rollback (deprecated code)
kevinansfield added a commit to TryGhost/Admin that referenced this issue Aug 10, 2018
refs TryGhost/Ghost#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
kevinansfield added a commit to TryGhost/Admin that referenced this issue Aug 10, 2018
refs TryGhost/Ghost#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
kirrg001 added a commit that referenced this issue Aug 10, 2018
refs #9742, refs #9724

- handle König Editor format for 2.0
- adapted importer to be able to import 1.0 and 2.0 exports
- added migration scripts
  - remove labs flag for Koenig
  - migrate all old editor posts to new editor format
- ensure we protect the code against mobiledoc or html field being null
- ensure we create a blank mobiledoc structure if mobiledoc field is null (model layer)
- ensure you can fully rollback 2.0 to 1.0
- keep mobiledoc/markdown version 1 logic to be able to rollback (deprecated code)
kirrg001 added a commit that referenced this issue Aug 11, 2018
refs #9742, refs #9724

- handle König Editor format for 2.0
- adapted importer to be able to import 1.0 and 2.0 exports
- added migration scripts
  - remove labs flag for Koenig
  - migrate all old editor posts to new editor format
- ensure we protect the code against mobiledoc or html field being null
- ensure we create a blank mobiledoc structure if mobiledoc field is null (model layer)
- ensure you can fully rollback 2.0 to 1.0
- keep mobiledoc/markdown version 1 logic to be able to rollback (deprecated code)
kevinansfield added a commit to TryGhost/Admin that referenced this issue Aug 11, 2018
refs TryGhost/Ghost#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`)
kevinansfield added a commit to TryGhost/Admin that referenced this issue Aug 11, 2018
…mage

refs TryGhost/Ghost#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
kevinansfield added a commit to kevinansfield/Ghost that referenced this issue Aug 11, 2018
refs TryGhost#9724
- perform a HEAD request on a url if we don't find a matching provider, following any redirects until we hit success response before looking up providers for the resulting url
kirrg001 pushed a commit that referenced this issue Aug 12, 2018
refs #9724

- perform a HEAD request on a url if we don't find a matching provider, following any redirects until we hit success response before looking up providers for the resulting url
kirrg001 added a commit that referenced this issue Aug 12, 2018
refs #9742, refs #9724

- handle König Editor format for 2.0
- adapted importer to be able to import 1.0 and 2.0 exports
- added migration scripts
  - remove labs flag for Koenig
  - migrate all old editor posts to new editor format
- ensure we protect the code against mobiledoc or html field being null
- ensure we create a blank mobiledoc structure if mobiledoc field is null (model layer)
- ensure you can fully rollback 2.0 to 1.0
- keep mobiledoc/markdown version 1 logic to be able to rollback (deprecated code)
kevinansfield added a commit that referenced this issue Aug 13, 2018
refs #9724
- `<img>` elements can have both `alt ` and `title` attributes, ensure we render both of them
kevinansfield added a commit to TryGhost/Admin that referenced this issue Aug 13, 2018
…r HTML

refs TryGhost/Ghost#9724
- capture the `alt` and `title` attributes in our figure and image parser plugins
kevinansfield added a commit to TryGhost/Admin that referenced this issue Aug 13, 2018
refs TryGhost/Ghost#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
kevinansfield added a commit to TryGhost/Admin that referenced this issue Aug 13, 2018
refs TryGhost/Ghost#9724
- caption payload changed from `textContent` to a cleaned `innerHTML` in our `figureToImageCard` parser plugin
kevinansfield added a commit to TryGhost/Admin that referenced this issue Aug 13, 2018
…puts

refs TryGhost/Ghost#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)
kirrg001 added a commit that referenced this issue Aug 13, 2018
refs #9742, refs #9724

- handle König Editor format for 2.0
- adapted importer to be able to import 1.0 and 2.0 exports
- added migration scripts
  - remove labs flag for Koenig
  - migrate all old editor posts to new editor format
- ensure we protect the code against mobiledoc or html field being null
- ensure we create a blank mobiledoc structure if mobiledoc field is null (model layer)
- ensure you can fully rollback 2.0 to 1.0
- keep mobiledoc/markdown version 1 logic to be able to rollback (deprecated code)
kevinansfield pushed a commit to TryGhost/Admin that referenced this issue Aug 14, 2018
refs TryGhost/Ghost#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
kirrg001 added a commit that referenced this issue Aug 14, 2018
refs #9742, refs #9724

- handle König Editor format for 2.0
- adapted importer to be able to import 1.0 and 2.0 exports
- added migration scripts
  - remove labs flag for Koenig
  - migrate all old editor posts to new editor format
- ensure we protect the code against mobiledoc or html field being null
- ensure we create a blank mobiledoc structure if mobiledoc field is null (model layer)
- ensure you can fully rollback 2.0 to 1.0
- keep mobiledoc/markdown version 1 logic to be able to rollback (deprecated code)
kevinansfield added a commit to TryGhost/Admin that referenced this issue Aug 15, 2018
refs TryGhost/Ghost#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
kirrg001 added a commit that referenced this issue Aug 16, 2018
refs #9742, refs #9724

- handle König Editor format for 2.0
- adapted importer to be able to import 1.0 and 2.0 exports
- added migration scripts
  - remove labs flag for Koenig
  - migrate all old editor posts to new editor format
- ensure we protect the code against mobiledoc or html field being null
- ensure we create a blank mobiledoc structure if mobiledoc field is null (model layer)
- ensure you can fully rollback 2.0 to 1.0
- keep mobiledoc/markdown version 1 logic to be able to rollback (deprecated code)
@kevinansfield
Copy link
Contributor Author

2.0 has been cut, any outstanding Koenig bugs or features will be opened as separate issues.

The embed card loading bug referenced in the comments above has been opened #9796

kevinansfield added a commit to TryGhost/Admin that referenced this issue Aug 20, 2018
refs TryGhost/Ghost#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
kevinansfield added a commit to kevinansfield/Koenig that referenced this issue Mar 20, 2020
refs TryGhost/Ghost#9724
- render `alt` attribute if the image card payload has an `alt` property
kevinansfield added a commit to kevinansfield/Koenig that referenced this issue Mar 20, 2020
refs TryGhost/Ghost#9724
- captions can have HTML so we need to render as HTML rather than as a text node so special chars don't get escaped
kevinansfield added a commit to kevinansfield/Koenig that referenced this issue Mar 20, 2020
refs TryGhost/Ghost#9724
- `<img>` elements can have both `alt ` and `title` attributes, ensure we render both of them
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants