AppFlowy
AppFlowy copied to clipboard
feat: emoji shortcut feature
Feature Preview
Closes: https://github.com/AppFlowy-IO/AppFlowy/issues/2797
PR Checklist
- [X] My code adheres to AppFlowy's Conventions
- [X] I've listed at least one issue that this PR fixes in the description above.
- [X] I've added a test(s) to validate changes in this PR, or this PR only contains semantic changes.
- [X] All existing tests are passing.
@Xazin, Can you spare some time to review this PR? If you are too busy I could ask @LucasXu0 if he has some time. Also, kindly help me with feedback if my PR is sufficient. Thank you 😄
I'll have to test something before leaving a final approval, I'll see if I can get to it this weekend, sorry for the wait.
@Tony-MK @LucasXu0
The _selectEmoji
method fails to insert the emoji and delete the search text.
It seems to be due to something wrong with the composition that happens with applying the insert of the emoji.
// Replace text with actual emoji
await widget.editorState.apply(
widget.editorState.transaction
..replaceText(
node,
(selection.end.offset - _emojiController.text.length - 1)
.clamp(0, selection.end.offset),
selection.end.offset,
searchEmojiList[_selectedIndex].emoji,
),
);
We can't merge before this is resolved.
Working on it...
Pending for two months. Closing this PR for now.