obsidian-emoji-shortcodes icon indicating copy to clipboard operation
obsidian-emoji-shortcodes copied to clipboard

Better ordering of Emoji suggestions

Open GollyTicker opened this issue 2 years ago • 1 comments

First of all, I and very thankful for this plugin :star: . I enjoy using emojis in my notes as the small images make some content more easily communicated.

However, during usage of the plugin, I noticed, that the order of the suggesting emojis when starting a shoartcode : is sub-optimal.

Consider these shortcodes: star, heart, x and right When using the first three, I expect, that after typing it out, the top-most suggestion is the most specific one corresponding to it. e.g. for star I expect the star :star: suggestion to be top-most. However, we see a different list: image

The same problem also appears with the other shortcodes.

image

image

This is less helpful, as sometimes we need to scroll down a lot to see the right emoji.

For the prefix right, we get these suggestions: image

However, I think it's better, when shorter completions such as arrow_right, fist_right and copyright are higher prioritised than the other ones. Generally, if the suffix needed to complete the shortcode is short, then the emoji should be higher on the list.

And for the case of x, if the emoji is short alltogether and has a relatively large matching with the prefix shortcode, then it should be also higher on the list.

Most other existing emoji shortcode suggestion lists seem to return, what I would intuitively expect. For instance, when writing an issue comment, the github emojis suggest this:

Screenshot from 2022-05-08 17-06-08

Screenshot from 2022-05-08 17-07-37

Screenshot from 2022-05-08 17-06-52

Could we have the shortcodes prioritised differently?

What do you think? :star:

If there is need, I could provide some help.

This issue relates to: https://github.com/phibr0/obsidian-emoji-shortcodes/issues/31

GollyTicker avatar May 09 '22 12:05 GollyTicker

Also relates to https://github.com/phibr0/obsidian-emoji-shortcodes/issues/33, as one could also potentially list recently used emojis first.

GollyTicker avatar May 09 '22 12:05 GollyTicker

i agree with this! image image image

i think it should order the suggestions based on how close to start of the string is the query: (example)
query => :sta star custard eight_pointed_black_star

KraXen72 avatar Nov 11 '22 21:11 KraXen72

@phibr0 What do you think about all of this?

GollyTicker avatar Nov 11 '22 23:11 GollyTicker