Parcourir la source

Update docs for the manual tests.

Maciej Gołaszewski il y a 6 ans
Parent
commit
2b34f9ada7

+ 16 - 6
packages/ckeditor5-mention/tests/manual/mention-custom-renderer.md

@@ -1,8 +1,8 @@
 ## Mention
 
-### Configuration
+The mention configuration with custom item renderer for autocomplete list.
 
-The mention configuration with custom balloon panel item renderer.
+### Configuration
 
 The list is returned in promise (no timeout) and is filtered for any match of `name` and `username` (custom feed):
 
@@ -19,9 +19,19 @@ The item is rendered as `<span>` instead of default button.
 
 You can interact with mention panel with keyboard:
 
-- move arrows up/down to select item
-- use <kbd>enter</kbd> or <kbd>tab</kbd> to select item.
+- Move arrows up/down to select an item.
+- Use <kbd>enter</kbd> or <kbd>tab</kbd> to insert a mention into the documentation. 
+- The <kbd>esc</kbd> should close the panel.
+
+Mention panel should be closed on:
+- Click outside the panel view.
+- Changing selection - like placing it in other part of text.
+
+### Editing behavior:
 
-**Note**: <kbd>esc</kbd> not yet implemented.
+The mention should be removed from the text when:
 
-**Note**: Mouse trigger not yet implemented.
+- typing inside a mention
+- removing characters from a mention
+- breaking the mention (<kbd>enter</kbd>)
+- pasting part of a mention

+ 17 - 23
packages/ckeditor5-mention/tests/manual/mention-custom-view.md

@@ -1,22 +1,8 @@
 ## Mention
 
-**NOTE**: Playground for testing model implementation.
+This sample overrides default mention conversion to `<span>`. The mention is converted to a link (`<a>`).
 
-Use the code of this manual sample to change bahavior of the feature.
-
-### Attribute (default)
-- works kinda OK - should use objects to store mention data
-- some quirks with undo (probably the break attribute on edit is wrongly written)
-- easy to change conversion
-
-### Inline Element in model
-- I didn't make it to work and to change the conversion
-
-### Marker
-- works also OK - some quirks might be due to limited time to create (ie editing breaks the editor)
-- harder to overwrite the mention output (easy to customize the `<span>` but to create a link required custom listener)
-
-### Data
+### Configuration
 
 The feed:
 - `{ name: 'Barney Stinson', link: 'https://www.imdb.com/title/tt0460649/characters/nm0000439' }`
@@ -25,15 +11,23 @@ The feed:
 - `{ name: 'Robin Scherbatsky', link: 'https://www.imdb.com/title/tt0460649/characters/nm1130627' }`
 - `{ name: 'Ted Mosby', link: 'https://www.imdb.com/title/tt0460649/characters/nm1102140' }`
 
-The mention is converted to link (`<a>`) with additional data of default span.
-
 ### Interaction
 
-**Note** Not everything works with every setup.
-
 You can interact with mention panel with keyboard:
 
-- move arrows up/down to select item
-- use <kbd>enter</kbd> or <kbd>tab</kbd> to select item.
+- Move arrows up/down to select an item.
+- Use <kbd>enter</kbd> or <kbd>tab</kbd> to insert a mention into the documentation. 
+- The <kbd>esc</kbd> should close the panel.
+
+Mention panel should be closed on:
+- Click outside the panel view.
+- Changing selection - like placing it in other part of text.
+
+### Editing behavior:
+
+The mention should be removed from the text when:
 
-**Note**: Mouse trigger not yet implemented.
+- typing inside a mention
+- removing characters from a mention
+- breaking the mention (<kbd>enter</kbd>)
+- pasting part of a mention

+ 19 - 5
packages/ckeditor5-mention/tests/manual/mention.md

@@ -1,20 +1,34 @@
 ## Mention
 
+The minimal mention configuration with a static list of autocomplete feed:
+
 ### Configuration
 
-The minimal mention configuration - static list:
+The feed:
 
 - Barney
 - Lily
 - Marshall
 - Robin
-- Ted'
+- Ted
 
 ### Interaction
 
 You can interact with mention panel with keyboard:
 
-- move arrows up/down to select item
-- use <kbd>enter</kbd> or <kbd>tab</kbd> to select item.
+- Move arrows up/down to select an item.
+- Use <kbd>enter</kbd> or <kbd>tab</kbd> to insert a mention into the documentation. 
+- The <kbd>esc</kbd> should close the panel.
+
+Mention panel should be closed on:
+- Click outside the panel view.
+- Changing selection - like placing it in other part of text.
+
+### Editing behavior:
+
+The mention should be removed from the text when:
 
-**Note**: <kbd>esc</kbd> not yet implemented.
+- typing inside a mention
+- removing characters from a mention
+- breaking the mention (<kbd>enter</kbd>)
+- pasting part of a mention