-
Notifications
You must be signed in to change notification settings - Fork 2
Added a special character info view #9
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The feature works nice and the code is OK.
We only miss the docs.
|
||
import '../../theme/characterinfo.css'; | ||
|
||
export default class CharacterInfoView extends View { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please add some docs for the class.
src/ui/characterinfoview.js
Outdated
this.set( 'character', null ); | ||
this.set( 'name', null ); | ||
|
||
this.bind( 'code' ).to( this, 'character', char => { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not so needed but maybe extract this to charcterToUnicode
function as implementation is not needed here - only what happens in this binding.
src/ui/characterinfoview.js
Outdated
}, | ||
children: [ | ||
{ | ||
text: bind.to( 'name', name => { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
WDYT about making it compact?
bind.to( 'name', name => name ? name : '\u200B' ) // ZWSP to prevent vertical collapsing.
6 linies for this looks like too much :D
src/ui/charactergridview.js
Outdated
} | ||
} ); | ||
|
||
tile.on( 'mouseover', () => { | ||
this.fire( 'tileHover', { character, name } ); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Missing docs for the event.
Suggested merge commit message (convention)
Feature: Added a special character info view. Closes ckeditor/ckeditor5#5817.
Additional information
Requires CSS: ckeditor/ckeditor5-theme-lark#260