-
Notifications
You must be signed in to change notification settings - Fork 508
Add Emoji picker to message form #3943
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
Conversation
Signed-off-by: Simon Spannagel <[email protected]>
|
What works:
What doesn't work:
I'd appreciate some help for fixing these issues. 😏 |
marcoambrosini
left a comment
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.
Super @simonspa!
As a minor note, I would swap the attachment and emoji buttons positions :)
Co-authored-by: Joas Schilling <[email protected]> Signed-off-by: Simon Spannagel <[email protected]>
48150ca to
78f0268
Compare
Signed-off-by: Simon Spannagel <[email protected]>
78f0268 to
1315411
Compare
Signed-off-by: Joas Schilling <[email protected]>
|
Looks good as a first version, CSS styling needs some adjustment (icon not centered on button and the buttons should be more to the left now, so the text input field is aligned with posted messages again).
I have to admit I'm as clueless as you are. I tried to figure out cursor position handling once, but it is not working with one of the browsers all the time, no matter which attempt I tried. Maybe @danxuliu has an idea, otherwise this is what we use for now and then check later. Due to some other merges a rebase seems needed. |
Signed-off-by: Daniel Calviño Sánchez <[email protected]>
Instead of always inserting the emojis at the end of the text now they are inserted at the current caret position, also replacing any selected text. If the input is not focused then the emoji will be inserted at the end like before. Signed-off-by: Daniel Calviño Sánchez <[email protected]>
I have been investigating this but unfortunately I had limited success. I have added a commit to insert the emoji at the caret position that works as expected with latest Firefox. But...
Besides that the message input loses the caret position for example when writing in the search box of the picker. I have implemented a hack to keep a copy of the selection in the message input when it loses the focus and use that range to do the insertion. However I find it a bit counterintuitive, as it breaks the expectation regarding focus and selections (if you select some text, move the focus to other place and then add an emoji the emoji will replace what was in the selection even if it is no longer selected), so I would rather not apply it. Independently of the above I have also fixed adding the emojis in Firefox when new lines are included in the input (as in that case Firefox adds an extra @simonspa I have pushed my commits as well as one from @nickvergessen to your branch. I hope you do not mind :-) Also feel free to squash/fixup your commits with them ;-) |
This comment has been minimized.
This comment has been minimized.
|
It now uses |
|
Needs a rebase I would say let's get this in because of the feature freeze soon, and then we try to fix the position and focus things in a follow up |
|
Rebased in #3994 |
This MR adds the new emoji picker from nextcloud-vue to the new message form of the Talk text chat. This fixes #1130 .