Skip to content
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

Update to use emojilib v3 #60

Closed
wants to merge 2 commits into from
Closed

Conversation

kemayo
Copy link
Contributor

@kemayo kemayo commented Jun 27, 2021

There were a lot of data structure changes.

I mostly did this because it will fix #44.

This will fix jsumners#44, presumably just because the data source is updated.
@kemayo
Copy link
Contributor Author

kemayo commented Jun 28, 2021

...to elaborate on that, my understanding is that in the time since emojilib v2.4.0 was released back in 2018, platform vendors adjusted how they represent some emoji. Specifically, a bunch of emoji which were specced as gender-neutral but which had always been displayed as a woman got changed to actually display gender-neutral and require the gender codepoint for the female version. This trips up emojilib 2.4, which only included the gender-codepoint for the male versions of those emoji.

There's no release of emojilib inbetween 2.4 and 3.0, so the only way to get the updated data that fixes #44 is to do the full major-version upgrade.

@jsumners
Copy link
Owner

Thank you for digging in to this. I'll review it as soon as I am able.

Copy link
Owner

@jsumners jsumners left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks great. One question around the package.json though.

package.json Show resolved Hide resolved
@jsumners
Copy link
Owner

I have pulled the branch down, run the build, installed it in Alfred, and everything seems to be good. I'll work on merging and releasing soon.

@jsumners
Copy link
Owner

Searches for "-1" and "+1" are not returning "👎" and "👍" respectively with this PR.

@kemayo
Copy link
Contributor Author

kemayo commented Jun 30, 2021

Hm... that'd be because emojilib doesn't include them as keywords. Technically it didn't in 2.4 either, but it had "+1" and "-1" as the names of the emoji -- so it's the switch to the emoji itself being the object-key that's effectively removing it.

I could monkey-patch this into the data, or I could try submitting a pull request to emojilib for it.

@kemayo
Copy link
Contributor Author

kemayo commented Jun 30, 2021

I made an emojilib pull request for it.

@kemayo
Copy link
Contributor Author

kemayo commented Jul 2, 2021

That pull request got merged, and I have verified that doing npm update to pull down the newer version and rebuilding things got me the appropriate emoji for +1.

image

@kemayo
Copy link
Contributor Author

kemayo commented Jul 2, 2021

That said, I just noticed that I missed replacing a use of name in alfredItem, which results in it pasting the name of the emoji rather than the emoji slug when you hold down alt. I'll fix that.

Also, had a reference to emoji.char which no longer exists.
@jsumners
Copy link
Owner

jsumners commented Jul 7, 2021

Found another one: tada is not returning 🎉

@kemayo
Copy link
Contributor Author

kemayo commented Jul 7, 2021

Another one, then!

@jsumners
Copy link
Owner

jsumners commented Jul 8, 2021

🤔 given comment muan/emojilib#195 (comment) I wonder if this PR is complete. Maybe we need to automate backfilling some items during the workflow build.

@kemayo
Copy link
Contributor Author

kemayo commented Jul 8, 2021

I'll argue the point in the PR a bit. If it doesn't get merged, yeah, maintaining some separate monkeypatching data for emojilib is probably needed.

@jsumners
Copy link
Owner

jsumners commented Aug 4, 2021

Found another one: 100 does not map to "hundred points".

I think we need to step back and rework our build to handle these occurrences.

@kemayo
Copy link
Contributor Author

kemayo commented Aug 4, 2021

I think that submitting improvements to upstream libraries is a good idea in general, but you're right that it's going to fall apart as soon as we hit something upstream doesn't want to merge.

I'd be inclined to do something that's past the build step as well -- let people configure it like they can the skin tone. Custom aliases for your own personal usage, that won't necessarily line up with how others think of an emoji.

@jsumners
Copy link
Owner

jsumners commented Aug 5, 2021

I haven't looked too deeply at this in quite some time, but if I remember correctly, the aliases were moved to a sibling package. We should just iterate everything and build out a new tree with those aliases.

@kemayo
Copy link
Contributor Author

kemayo commented Aug 5, 2021

That's what this patch is already doing, unfortunately. The issues we've been seeing are 💯 emoji whose old names weren't transferred over. (Because the migration switched from names as keys to the emoji themselves, and it was spotty about moving those old name-keys into the keywords package.)

@ocean0212
Copy link

👋 !
Thank you both for the pull request and testing!
Just wondering if we have any updates on this.

@jsumners
Copy link
Owner

jsumners commented Dec 16, 2021

I have not had time to get back to this. I want to dig in and see if I can build upon @kemayo's excellent work in order to cover all of these edge cases we have been uncovering. But I'm still in PT from https://jrfom.com/posts/2021/09/03/a-bike-crash/ and also buried under a whole mountain of GitHub notifications for work and OSS projects. If someone else is able to come up with a solution to the issues, that'd be great.

@jsumners
Copy link
Owner

Thanks for the work @kemayo. I have carried it over into #66. Going to merge that and then hopefully find some time soon to fix up CI builds to get something new out.

@jsumners jsumners closed this Jan 26, 2022
@kemayo
Copy link
Contributor Author

kemayo commented Jan 26, 2022

Seems fair! I've not had any free time lately to keep improving it lately either, for sure.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Some of the woman emojis aren't correct and uses gender-inclusive instead
3 participants