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

#6693: Keyboard support for the widget type around feature #7387

Merged
merged 77 commits into from
Jun 10, 2020
Merged

Conversation

oleq
Copy link
Member

@oleq oleq commented Jun 5, 2020

Suggested merge commit message (convention)

Fix (engine): The model selection post-fixer should not set a new selection if the ranges before and after post-fixing are the same (see #6693).

Tests (image): Aligned image tests to the latest WidgetTypeAround plugin API (see #6693).

Other (paragraph): The InsertParagraphCommand should split ancestors of the Position to find a parent that allows 'paragraph' (see #6693).

Tests (table): Aligned Table plugin tests to the latest WidgetTypeAround API. Code refactoring (see #6693).

Feature (theme-lark): Added styles for a "fake caret" brought by the WidgetTypeAround plugin (see #6693).

Feature (typing): Created a public isNonTypingKeystroke() helper (see #6693).

Feature (utils): Created isArrowKeyCode(), getLocalizedArrowKeyCodeDirection(), and isForwardArrowKeyCode() helpers (see #6693).

Feature (widget): Implemented keyboard support for inserting paragraphs around block widgets using a "fake horizontal caret" (WidgetTypeAround). Both "Insert new paragraph" buttons are now always displayed for all block widgets regardless of their location in the document. Closes #6693. Closes #6825. Closes #6694.

Also:

  • code refactoring in the Widget plugin,
  • aligned Widget tests to the new WidgetTypeAround keyboard behavior,
  • moved the Enter and Shift+Enter support from the Widget plugin to the WidgetTypeAround plugin.

MINOR BREAKING CHANGE (widget): Removed the getWidgetTypeAroundPositions() helper since the "Insert new paragraph" buttons are now visible regardless of the widget location in the document.


Additional information

@ckeditor/qa-team Can you take a look at this new feature? It supports arrow keys and enter/backspace/typing when a "fake caret" is displayed (no paste support yet).

oleq added 30 commits May 21, 2020 10:50
… faster feedback and better UX when navigating the document.
…e regular caret disappears and so should the fake one.
…ause they are used in WidgetTypeAround now.
…et the new selection if no range was "post-fixed".
… part of the Widget plugin to the WidgetTypeAround plugin.
@oleq
Copy link
Member Author

oleq commented Jun 9, 2020

It seems to work really good with TC and real time in general. The only thing I found now, that this PR introduces is - you cannot remove empty paragraph before a widget ( which works fine on CF with CKE5 master and on CF demos )

@FilipTokarski I checked this on CKEditor 5 master and it's the same. The change is not related to this PR. Can you please confirm this?

@FilipTokarski
Copy link
Member

🤔 True. IDK what happened, but you are right. The PR is 👍

… listeners for more flexibility when integrating with other features (TableKeyboard, WidgetTypeAround).
@oleq
Copy link
Member Author

oleq commented Jun 10, 2020

More review frenzy please, @niegowski.

@niegowski niegowski merged commit eb8dd9f into master Jun 10, 2020
@niegowski niegowski deleted the i/6693 branch June 10, 2020 15:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
3 participants