-
Notifications
You must be signed in to change notification settings - Fork 92
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
Add emoji autocompletion #1474
Add emoji autocompletion #1474
Conversation
skjnldsv
commented
Oct 15, 2020
•
edited
Loading
edited
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
Joke aside, it's working, just need to be polished for the ui (not show the whole list, maybe show the shortcut? This is also not translated. Anyone can take over, this is mostly for talk, so I'll let you folks decide what needs to be done. cc @jancborchardt You can all test it in the deploy preview https://deploy-preview-1474--nextcloud-vue-components.netlify.app/ |
@jancborchardt are you ok with this design (see comment above) ? |
|
Please take over @PVince81 :) |
c128781
to
3de5082
Compare
I put some time into this PR and think that it's in a state to be reviewed now 😊 Instead of building another own emoji data set, the existing dataset by emoji-mart-fast is used. Same for emoji lookup/search functions. This brings unified dataset, defaults and recently used logic between EmojiPicker and emoji autocompletion. The number of displayed results is limited to five (Github etc. do the same). I also went with implementing the That's how it looks like at the moment: Looking forward to your thoughts @skjnldsv @PVince81 @jancborchardt @nimishavijay 😊 |
Unfortunately there's no support for translated emoji names in emoji-mart-vue yet. I'd suggest to discuss this in a separate follow-up issue/PR.
Agreed. I now added
Not sure about this. We definitely need a limit here, otherwise we would list more than 3000 emojis without a query string. I like the short list of five results and that's what I discovered at Github and Gitlab. Element (the Matrix client) has a limit of 20 emojis (with a scrollbar), Rocketchat lists 10 emojis (with a scrollbar). Notions lists a lot, but just the emojis (without their name) in a table. Here's how emoji autocompletion would look with a limit of 20 results: Let me know, which one you prefer 😊 |
Signed-off-by: Jonas Meurer <[email protected]>
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.
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.
But since this is already super awesome I'm just going to approve, these comments are just tiny details :)
Looks very nice! :)
|
Good point 😊 What would a good width be? Currently it has Maybe |
Signed-off-by: Jonas Meurer <[email protected]>
Signed-off-by: Jonas Meurer <[email protected]>
Signed-off-by: Jonas Meurer <[email protected]>
Signed-off-by: Jonas Meurer <[email protected]>
Ok, did all the requested changes:
Screenshots (and gif) updated: #1474 (comment) |
Very nice! From the gif the width seems a bit mich for most of the emojis, if it's 200px (and ellipsized text) then all good! 👍 |
Signed-off-by: Jonas Meurer <[email protected]>
Ok, done: #1474 (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.
Nice! :)
@@ -36,7 +36,7 @@ Note you need to register the [tooltip directive](https://nextcloud-vue-componen | |||
:auto-complete="autoComplete" | |||
:maxlength="100" | |||
:user-data="userData" | |||
placeholder="Try mentioning the user Test01" | |||
placeholder="Try mentioning user @Test01 or inserting emoji :smile" |
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.
placeholder="Try mentioning user @Test01 or inserting emoji :smile" | |
placeholder="Try mentioning user @Test01 or inserting emoji :smile:" |
Typo?
@@ -46,7 +46,7 @@ Note you need to register the [tooltip directive](https://nextcloud-vue-componen | |||
:maxlength="400" | |||
:multiline="true" | |||
:user-data="userData" | |||
placeholder="Try mentioning the user Test01" | |||
placeholder="Try mentioning user @Test01 or inserting emoji :smile" |
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.
placeholder="Try mentioning user @Test01 or inserting emoji :smile" | |
placeholder="Try mentioning user @Test01 or inserting emoji :smile:" |
Typo?
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.
I decided not to append a colon on purpose. The trailing colon is not needed for autocompletion and makes it harder to read in my opinion. It's more that the prepending colon is the trigger for autocompletion, and then you type your search query (e.g. "smile").
I agree that this might change when we implement automatic conversion of :smile:
to an emoji, but I would say that's out of scope here 😊
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.
So, autocompletion is one thing, but we're not converting the data in emoji when rendering.
If I type the text :smile:
, there will be no emoji displayed, right?
I guess that would be a nice second step for the RichEdior :)
This brings unified emoji datasource,defaults and recents for EmojiPicker and the emoji autocompletion feature. This depends on nextcloud-libraries/nextcloud-vue#1474 Signed-off-by: Jonas Meurer <[email protected]>
Adds emoji autocompletion by typing `:<search_string>`. It utilizes the emoji functions from nextcloud-vue[1] and the TipTap suggestions extension. [1] nextcloud-libraries/nextcloud-vue#1474 Signed-off-by: Jonas Meurer <[email protected]>
Adds emoji autocompletion by typing `:<search_string>`. It utilizes the emoji functions from nextcloud-vue[1] and the TipTap suggestions extension. [1] nextcloud-libraries/nextcloud-vue#1474 Signed-off-by: Jonas Meurer <[email protected]>
Adds emoji autocompletion by typing `:<search_string>`. It utilizes the emoji functions from nextcloud-vue[1] and the TipTap suggestions extension. [1] nextcloud-libraries/nextcloud-vue#1474 Signed-off-by: Jonas <[email protected]>
Adds emoji autocompletion by typing `:<search_string>`. It utilizes the emoji functions from nextcloud-vue[1] and the TipTap suggestions extension. [1] nextcloud-libraries/nextcloud-vue#1474 Signed-off-by: Jonas <[email protected]>