-
-
Notifications
You must be signed in to change notification settings - Fork 10.6k
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: Release Candidate version #9623
Labels
Comments
kevinansfield
added a commit
to TryGhost/Admin
that referenced
this issue
May 14, 2018
refs TryGhost/Ghost#9623 - keep a truthy "skip mouse move" flag around across re-triggers within the 50ms restart window to cater for slightly different mouse/selection event orders - add a couple of guards to avoid triggering the toggle task unnecessarily
kevinansfield
added a commit
to TryGhost/Admin
that referenced
this issue
May 14, 2018
…raph refs TryGhost/Ghost#9623 - triple-click select will by default end the selection at position 0 of the following paragraph which means section-level formatting such as headers or quotes will affect the apparently unselected following paragraph - add a guard to check for that selection situation and ensure the selection is constrained to the visibly selected text
kevinansfield
added a commit
to TryGhost/Admin
that referenced
this issue
May 14, 2018
kevinansfield
added a commit
to TryGhost/Admin
that referenced
this issue
May 14, 2018
…toolbar refs TryGhost/Ghost#9623 - maintains easy reversibility by keeping text selected and toolbar shown in the same position to avoid jumping buttons when font size or other formatting changes
kevinansfield
added a commit
to TryGhost/Admin
that referenced
this issue
May 14, 2018
refs TryGhost/Ghost#9623 - match `--` and `---` and convert if followed by a space or any character respectively - include guards to ensure that expansion doesn't occur inside code blocks
kevinansfield
added a commit
to TryGhost/Admin
that referenced
this issue
May 14, 2018
refs TryGhost/Ghost#9623 - disable the default mobiledoc-kit heading text expansion and replace with our own that matches heading markdown at the beginning of existing text and will change the heading level of the existing text
kevinansfield
added a commit
that referenced
this issue
May 15, 2018
refs #9623 - add tests for undefined payloads in container cards - add guard for undefined payload in html card
ololoken
pushed a commit
to ololoken/Ghost-Admin
that referenced
this issue
May 15, 2018
refs TryGhost/Ghost#9623 - disable the default mobiledoc-kit heading text expansion and replace with our own that matches heading markdown at the beginning of existing text and will change the heading level of the existing text
kevinansfield
added a commit
to TryGhost/Admin
that referenced
this issue
May 15, 2018
refs TryGhost/Ghost#9623 - adds `toggleHeaderSection` action to have a central place for logic - adds `_performEdit()` so that we can avoid nested runloops in actions - update text expansion and toolbar to use the new `toggleHeaderSection` action
kevinansfield
added a commit
to TryGhost/Admin
that referenced
this issue
May 15, 2018
refs TryGhost/Ghost#9623 - `code` card that uses CodeMirror for the edit view and outputs `<pre><code>...</code></pre>` for the rendered view - adds triple-backtick text expansion for creating code cards
kevinansfield
added a commit
that referenced
this issue
May 15, 2018
refs #9623 - add support for `code` card that renders into `<pre><code>...</code></pre>` - render language class if one is provided
kevinansfield
added a commit
to TryGhost/Admin
that referenced
this issue
May 15, 2018
refs TryGhost/Ghost#9623 - fixes the broken click handling and expands it - trigger for clicks on the container rather than only the editor canvas - trigger only if the click is below the editor canvas - create an empty paragraph if the last section in the doc is a card
ololoken
pushed a commit
to ololoken/Ghost
that referenced
this issue
May 16, 2018
refs TryGhost#9623 - add support for `code` card that renders into `<pre><code>...</code></pre>` - render language class if one is provided
kevinansfield
added a commit
to TryGhost/Admin
that referenced
this issue
May 16, 2018
refs TryGhost/Ghost#9623 - plain text that's pasted will be run through our markdown parser then mobiledoc-kit will perform it's usual rich-text paste handling on the resulting HTML - add a <kbd>Cmd/Ctrl+V+Shift</kbd> escape valve that will skip markdown parsing so mobiledoc-kit's default plain text parsing is invoked - will not work with IE or Edge <= 16 due to missing browser support for distinguishing plain text vs html pastes
ololoken
pushed a commit
to ololoken/Ghost-Admin
that referenced
this issue
May 16, 2018
refs TryGhost/Ghost#9623 - plain text that's pasted will be run through our markdown parser then mobiledoc-kit will perform it's usual rich-text paste handling on the resulting HTML - add a <kbd>Cmd/Ctrl+V+Shift</kbd> escape valve that will skip markdown parsing so mobiledoc-kit's default plain text parsing is invoked - will not work with IE or Edge <= 16 due to missing browser support for distinguishing plain text vs html pastes
kevinansfield
added a commit
to TryGhost/Admin
that referenced
this issue
May 16, 2018
…ting refs TryGhost/Ghost#9623 - fixes `Maximum call stack size exceeded` error when you paste content containing `<code>` elements and then place the cursor at the end of one of those elements - this was occurring because the code in `inputModeDidChange()` was triggering another `inputModeDidChange() call - use the private mobiledoc-kit methods to toggle editor state because we don't want to trigger `inputModeDidChange()` callbacks - look at the editor state directly rather than going by what we _think_ the editor state should be based on the markers around the cursor - fixes another subtle issue where after pasting if you placed the cursor at the end of the code format and started typing it would still be formatted as code - mobiledoc-kit has an odd behaviour where duplicate edit states for the markup are present so we have to loop over them rather than relying on a single `toggleMarkupState()` call
kevinansfield
added a commit
to TryGhost/Admin
that referenced
this issue
May 17, 2018
kevinansfield
pushed a commit
to TryGhost/Admin
that referenced
this issue
May 17, 2018
refs TryGhost/Ghost#9623 - added code block card to (+) and / menus - changed card row length to 3 - swapped html icon for code icon and added new html icon
kevinansfield
added a commit
to TryGhost/Admin
that referenced
this issue
May 17, 2018
refs TryGhost/Ghost#9623 - catches and ignores `editor.positionAtPoint` TypeError due to not having a correct node value whilst dragging with a selection - fixes error thrown from the triple-click handling which expected a value to always be present
kevinansfield
added a commit
to TryGhost/Admin
that referenced
this issue
May 17, 2018
refs TryGhost/Ghost#9623 - use our paste handler to perform a replacement on any pasted HTML - `<b>` -> `<strong>` - `<i>` -> `<em>`
kevinansfield
added a commit
to TryGhost/Admin
that referenced
this issue
May 17, 2018
refs TryGhost/Ghost#9623 - header text expansion skip for headers with the same level didn't take into account that the toolbar should actually toggle the heading on/off
kevinansfield
added a commit
to TryGhost/Admin
that referenced
this issue
May 17, 2018
refs TryGhost/Ghost#9623 - adds `parserPlugins` option with array of parser plugins that read node values and convert them when pasting - converts `<br>` to a soft-break atom for line breaks - removes leading newlines from text nodes to avoid leading spaces in the render output (common when pasting MD with line breaks)
kevinansfield
added a commit
to TryGhost/Admin
that referenced
this issue
May 18, 2018
refs TryGhost/Ghost#9623 - use our custom paste event to intercept and modify pasted HTML before passing to mobiledoc - wrap the html in a `<div>` so that all elements get parsed by mobiledoc-kit - when pasting results in the last pasted section being a card, insert a blank paragraph - fixes immediate breaking of the undo stack
kevinansfield
added a commit
to TryGhost/Admin
that referenced
this issue
May 18, 2018
refs TryGhost/Ghost#9623 - add parser plugin to match a `<pre>` with a nested `<code>` as it's first child and transform it into a code card
kevinansfield
added a commit
to TryGhost/Admin
that referenced
this issue
Jun 15, 2018
refs TryGhost/Ghost#9623 - toggle the list type (unordered vs ordered) when typing `- `, `* `, `1 `, or `1. ` at the beginning of a list item
kevinansfield
added a commit
to TryGhost/Admin
that referenced
this issue
Jun 15, 2018
…t items refs TryGhost/Ghost#9623 - update "exit cursor at top" logic so it doesn't look at the parent ListSection until the cursor has reached the first ListItem in a ListSection
kevinansfield
added a commit
to TryGhost/Admin
that referenced
this issue
Jun 15, 2018
refs TryGhost/Ghost#9623 - bump Ghost-Spirit dependency
kevinansfield
added a commit
to TryGhost/Admin
that referenced
this issue
Jun 15, 2018
refs TryGhost/Ghost#9623 - 3978894 broke dash expansions because the list toggle was matching the `- ` before the dash text expansion could be triggered - resolved by adding the missing beginning-of-string `^`
kevinansfield
added a commit
to TryGhost/Admin
that referenced
this issue
Jun 18, 2018
…raphs refs TryGhost/Ghost#9623 - switch to custom `mobiledoc-kit` build - fixes top-level elements not being run through parser plugins (bustle/mobiledoc-kit#627) - fixes <kbd>Alt</kbd> getting stuck and causing <kbd>Backspace</kbd> to delete whole words (bustle/mobiledoc-kit#626) - fixes error that can occur when a paste results in blank insert (bustle/mobiledoc-kit#620) - add new `figureToImageCard` parser - replaces hacky workaround to detect an image+figcaption inside the `imgToCard` parser plugin - remove wrapping of html in a `<div>...</div>` when pasting - no longer necessary now that top-level elements are parsed - fixes rich-text pastes where multiple paragraphs would be collapsed into a single paragraph
kevinansfield
added a commit
to TryGhost/Admin
that referenced
this issue
Jun 19, 2018
refs TryGhost/Ghost#9623 - override <kbd>Enter</kbd> behaviour when pressed on a blank list item mid-list
kevinansfield
added a commit
to TryGhost/Admin
that referenced
this issue
Jun 19, 2018
refs TryGhost/Ghost#9623 - ensure images are placed where the cursor is when dropping or pasting images - fixed errors when dropping/pasting images into a list
1.24.5 has been released containing new Koenig features and bug fixes:
|
kevinansfield
added a commit
to TryGhost/Admin
that referenced
this issue
Jun 20, 2018
refs TryGhost/Ghost#9623 - do not process drop in `{{koenig-editor}}` if the drop happened on a card and the card's `handlesDragDrop` property is true - allow `dragover` events on cards to bubble up to Ember's event handler in `{{koenig-editor}}` - handle drag/drop in `{{koenig-card-image}}` - show different overlays when dragging files over the card to indicate an upload or replace action - start upload when a file is dropped on the card
kevinansfield
added a commit
to TryGhost/Admin
that referenced
this issue
Jun 20, 2018
refs TryGhost/Ghost#9623 - add an overlay to the rendered MD card so that links aren't clickable
kevinansfield
added a commit
to TryGhost/Admin
that referenced
this issue
Jun 20, 2018
…electing refs TryGhost/Ghost#9623 - track the `mousedown` position and switch the `click` handler to a `mouseup` handler - only trigger the editor focus event if both the `mousedown` and `mouseup` events occur below the editor canvas
kevinansfield
added a commit
to TryGhost/Admin
that referenced
this issue
Jun 20, 2018
refs TryGhost/Ghost#9623 - clicking a card a second time while it is selected can move the invisible cursor to the beginning of a section in which case <kbd>Enter</kbd> would insert a blank paragraph above the card - when <kbd>Enter</kbd> is pressed and a card is selected, move the cursor to the end of the card section without triggering our cursor change so that the default behaviour will always add a paragraph after the card
kevinansfield
added a commit
to TryGhost/Admin
that referenced
this issue
Jun 20, 2018
refs TryGhost/Ghost#9623 - move lazy-click handling to a mouseup handler instead of mousedown in `{{koenig-card}}` - ensure that we don't trigger edit mode on the initial mouseup after a mousedown event has selected the card
kevinansfield
added a commit
to TryGhost/Admin
that referenced
this issue
Jun 20, 2018
refs TryGhost/Ghost#9623 - close menu if it's open and the cursor position changes within the document - closes when you start typing rather than hiding text behind the menu - watch for arrow keys and close the menu if pressed - closes when <kbd>Up</kbd> is pressed and the title is selected rather than the cursor being moved within the document
kevinansfield
added a commit
to TryGhost/Admin
that referenced
this issue
Jun 20, 2018
refs TryGhost/Ghost#9623 - clicks near the HR card when it was selected would trigger immediate deselection putting the cursor into a position where it was not possible to type - update the guard in the click-to-deselect event handler to match any element contained by the editor rather than only clicks that are directly on the editor element
kevinansfield
added a commit
to TryGhost/Admin
that referenced
this issue
Jun 20, 2018
refs TryGhost/Ghost#9623 - only Chrome exposes `MouseEvent.path` so use `MouseEvent.composedPath()` for Safari/FF support
kevinansfield
added a commit
to TryGhost/Admin
that referenced
this issue
Jun 21, 2018
refs TryGhost/Ghost#9623 - disable `contenteditable` on the main editor element when a card is selected - Firefox and Safari both choke on inputs inside a `contenteditable` element - remove `user-select: none` styling from `.form-text` for text inputs
kevinansfield
added a commit
to TryGhost/Admin
that referenced
this issue
Jun 21, 2018
refs TryGhost/Ghost#9623 - disable `contenteditable` on the main editor element when an input in a card gains focus - Firefox chokes on inputs inside a `contenteditable` element - use a MutationObserver inside `{{koenig-card}}` to automatically add event handlers for focus/blur events so that each card is not required to set up handlers and enable/disable content editable manually - bump Spirit dependency - remove `user-select: none` styling from `.form-text` for text inputs - fixes captions and embed inputs in Safari and improves behaviour in Firefox - add a guard around `getSelection(0)` in the `_scrollCursorIntoView()` method to avoid Safari throwing errors
kevinansfield
added a commit
to TryGhost/Admin
that referenced
this issue
Jun 21, 2018
refs TryGhost/Ghost#9623 - Firefox unlike other browsers triggers `keypress` events for non-printable characters - use mobiledoc-kit's `Key` class to guard against adding non-printable key values to captions
kevinansfield
added a commit
to kevinansfield/Ghost
that referenced
this issue
Jul 5, 2018
refs TryGhost#9623 - added `DomModifier` class to walk a SimpleDom document and modify as needed - adds `id` attributes to `h1`, `h2`, etc heading tags - converts H* tag content to a dasherized string for the id attribute (dasherized id's are different to the smushed ids that are generated by our markdown converted but there are no backwards-compatibility concerns here) - if a duplicate id is detected then add a `-1`, `-2`, etc suffix to the id - use `DomModifier` after converting mobiledoc to SimpleDom but before serialising to html - switched top-level var declarations to es6
The RC phase of Koenig development has drawn to a close, we're now pushing for final release. On the Koenig final issue you can see the tasks that have been prioritised for the initial release. We'll be picking up any other unfinished tasks from this issue after the final release and will move them to new issues as appropriate. |
kirrg001
pushed a commit
that referenced
this issue
Jul 10, 2018
refs #9623 - added `DomModifier` class to walk a SimpleDom document and modify as needed - adds `id` attributes to `h1`, `h2`, etc heading tags - converts H* tag content to a dasherized string for the id attribute (dasherized id's are different to the smushed ids that are generated by our markdown converted but there are no backwards-compatibility concerns here) - if a duplicate id is detected then add a `-1`, `-2`, etc suffix to the id - use `DomModifier` after converting mobiledoc to SimpleDom but before serialising to html - switched top-level var declarations to es6
kevinansfield
added a commit
to kevinansfield/Koenig
that referenced
this issue
Mar 20, 2020
refs TryGhost/Ghost#9623 - add tests for undefined payloads in container cards - add guard for undefined payload in html card
kevinansfield
added a commit
to kevinansfield/Koenig
that referenced
this issue
Mar 20, 2020
refs TryGhost/Ghost#9623 - add support for `code` card that renders into `<pre><code>...</code></pre>` - render language class if one is provided
kevinansfield
added a commit
to kevinansfield/Koenig
that referenced
this issue
Mar 20, 2020
refs TryGhost/Ghost#9623 - add `embed` card renderer
kevinansfield
added a commit
to kevinansfield/Koenig
that referenced
this issue
Mar 20, 2020
refs TryGhost/Ghost#9623 - blank images may be used in the editor as placeholders, don't render them on the front-end
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
This issue captures the tasks that we'll be working on for the third 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. We will aim to announce "RC" status early July.
part of #9311 (Feature: Full Koenig editor)
I want to help test! How do I get started?
See the instructions here.
Sprint tasks
🏃 = "in progress"
🚢 = "ready for next release" (releases are every Tuesday)
High Priority
Embed card
Mid priority
General editing
option + backspace
delete only until the first letter with accent (mobiledoc-kit issue)cmd + backspace
doesn't delete the line (mobiledoc-kit issue)Text expansions
---
divider text expansion between two image cards will select the next image card and add a trailing-
to the captionEmbed card
Code card
Markdown card
Image card
src
attribute/image {url}
supportCopy/paste
Low priority
General editing
Embed card
Code card
Image card
Copy/paste
Stretch goals 💪
Embed card
X-Browser Issues
Unable to get property 'find' of undefined or null reference
Array.from: argument is not an Object
Unable to get property 'isBlank' of undefined or null reference
Known issues
These are issues that are related to underlying mobiledoc-kit or browser behaviour rather than our implementation. They are currently lower priority due to the cost/benefit for fixing but will likely be picked up in later cycles.
mobiledoc-kit
contenteditable
problem or something in mobiledoc-kit, same behaviour is visible on mobiledoc-kit demoBrowser behaviour
Completed tasks
General editing
undefined
in the rendered outputcharacters can be lost in the new->edit transition(unable to reproduce)/
menu then deleting the/
doesn't close the menuText expansions (markdown formatting)
>
can not be used at the beginning of an existing paragraph to convert it to a block quote--
within text should expand to ndash (–)---
within text should expand to mdash (—)19^th^
(19th)H~2~O
(H2O)-
,*
or1.
at the beginning of a paragraph with text in it should convert it to the corresponding list-
,*
or1.
at the beginning of a list item of the alternate type should toggle the type of listEmbed card
/embed {url}
supportCode card
Image card
Copy/paste
cursorDidChange
is somehow causing the edit stack to break when a card gets selected after a paste that creates cards. A workaround is in place to avoid immediate breakage when the last section pasted is a card by inserting a blank paragraph at the end, however the undo stack still breaks as soon as a card gets selected<b>
-><strong>
<i>
-><em>
<img>
's to image cardsCannot read property 'tailPosition' of undefined
bustle/mobiledoc-kit#619<figure>
to image card with extracted caption<hr>
's to divider cardsparserPlugin
for this is ready but does not currently work because mobiledoc-kit does not pass the<hr />
element through to the plugins. Related issue here parser plugins should parse top-level unknown and void elements bustle/mobiledoc-kit#494<pre><code>
to code cards<br>
's to soft-break atomsconvert unknown HTML into a HTML cardthis isn't particularly feasible with mobiledoc-kit as it stands. We should investigate specific instances where we want to create an HTML card to see if we can cater for those<p>
tags bunches text<div>...</div>
before passing to mobiledoc-kit's parsersGeneral design
x-Browser support
contenteditable="false"
on the editor element allows arrow keys to work in both browsers and Safari allows full text input and selectionuser-select: none
styling on the input fields is the remaining issue in FFIndexSizeError: The index is not in the allowed range.
from the_scrollCursorIntoView
method when typing with an image card selectedThe text was updated successfully, but these errors were encountered: