-
Notifications
You must be signed in to change notification settings - Fork 9
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
[Feature] allow setting skin tone #15
Comments
This is an interesting idea, removing duplication while keeping choice. As of right now I am not sure how to implement it while keeping universal support for character lists, however. We can not just shear off everything after a colon since it could be part of just natural text for additional symbol lists. I am trying to think of a way something like this could be accomplished without coupling the picker too tightly to the single emoji list. |
I looked at the Unicode file that
It also looks like the text downloaded is only in English, so there's not I18N complication. If we don't consider the challenges with math symbols, it seems that lines that match "skin tone" and don't match the |
It's true that the downloaded text itself is English-only currently and I see what you are saying about the code points. The harder issue isn't necessarily translation related, but to the logic of showing/hiding grouped items. Downloaders currently strip of the displayed initial code points and just keep the trailing emoji and description. To change this for displaying skin tones in a sub-menu, we would have to first filter the entries from being shown first time, So, there are three changes necessary:
It honestly seems an interesting feature which could enable more intricate selections in general (aside from emoji skin tone) but also seems like it would be a non-trivial change in the picker code which so far contains zero logic. I'll have a think about it and may play around with it when I get some time, and invite anyone to also have a play to see if it could be implemented elegantly. |
Here's an alternate implementation idea: Just run a filter and at download time and be done with it. The skin tone I pick is a default is unlikely to ever change. Generic solutionSomething like:
The filter would accept input on STDIN and print to STDOUT. Skin-tone-specific solutionBut since filtering to a single skin tone might be the common use of a filter, perhaps there could be an option for just for that:
The documentation would explain that the filter is applied at "download time" not at "run time", so to change the value, you need delete the download cache. Or the current skin tone could be cached in Example filterHere's a filter which accepts a skin tone as an argument and excludes the other skin tones which don't match:
Ex: WorkaroundAs a workaround, you can run the filter directly against your Emoji database. I did this now and it's working well. Here I embed the target skin tone in the perl code rather than use a wrapper script:
|
This is actually a fairly clever idea, i am especially taken with the generic filter solution. We could then supply a filter for skin tones by default, keeping it e.g. in the Will run with this idea a bit when I next have some time to devote! |
I went ahead and filtered my |
If your search matches an emoji with skin tones, your results can be spammed with all the skin tone variations of one or two emojis rather than showing you 10 or more different emojis. The result you are looking for may be pushed off the first page by all the skin tone variations.
For example, if you search for
red
, there are 6 entries for "man with red hair", 6 entries for "woman with red hair" and 6 more for "person with red hair".If a skin tone could be set on the CLI, there could be only 3 results instead of 18:
Or, perhaps even cleaner is not mention the skin tone at all when it's given on the CLI, so the results could be simply:
In this case "man: red hair" would actually show and select "man: medium skin tone, red hair" instead of the generic "man: red hair" emoji.
The text was updated successfully, but these errors were encountered: