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

3.0.0 #178

Merged
merged 24 commits into from
Jan 14, 2021
Merged

3.0.0 #178

merged 24 commits into from
Jan 14, 2021

Conversation

muan
Copy link
Owner

@muan muan commented Oct 13, 2019

I plan to introduce a few breaking changes to emojilib in order to contain the scope of this project. In short, this project should only be adding keywords to emoji, and nothing more. This means:

TODO:

  • Generate new JSON based on Unicode data
  • Create CLI for updating dataset

cc @jasonrudolph FYI

@jasonrudolph
Copy link
Collaborator

Nice! ⚡

@jsumners
Copy link

Do I understand correctly that the new version will export a hash like?:

{
  "😀": {
    "keywords": ["face", "smile", "happy", "joy", ":D", "grin"],
    "name": "grinning",
    "fitzpatrick_scale": false,
    "category": "people"
  }
}

Is there an ETA on this work?

@tonnoz
Copy link

tonnoz commented May 15, 2020

any news? Looking forward for this release 😀

@tcd
Copy link

tcd commented Aug 13, 2020

Wondering what's blocking this?

@muan
Copy link
Owner Author

muan commented Sep 24, 2020

Wondering what's blocking this?

My burnout state of mind unfortunately. :)

Do I understand correctly that the new version will export a hash like?:

Looks like this is where I left it:

"😀": [
"grinning_face",
"face",
"smile",
"happy",
"joy",
":D",
"grin"
],

Looking back now though I can see how this is not desirable for existing consumers of this library, as they would need to pull in an alternate source for other emoji metadata (hence the MAJOR version bump).

IIRC, I made this decision because people often request features like "shortcode used for <github/discord/slack/etc> service", which I consider out of the scope of this project. To work around this they'd have to pull in other libraries that do this. This seems tedious, but given that the emoji dataset is gigantic and will only grow in the future, I feel like this is for the best.

I know there are the swiss army knife type of emoji data libraries out there. An ideal scenario would be that they pull this dataset in instead. I'd personally love to see a emoji module that let you build your own dataset.

buildEmojiData --fields character,keywords,unicodeVersion,githubCode --format json

Maybe this already exist, I don't know. But this is more than what I feel comfortable taking on.

So once this is merged, I imagine that I'll be doing something like this for my own use cases:

const emojiData = require('unicode-emoji-json') // https://github.com/muan/unicode-emoji-json/blob/master/data-by-emoji.json
const keywordData = require('emojilib') // needs a better name to clarify purpose

for (const emoji in emojiData) { // 😀
  const keywords = keywordData[emoji] // ["grinning_face","face","smile","happy","joy",":D","grin"]
  return html`<button data-keywords="${keywords.join(' ')}">${emoji} ${emojiData[emoji]['name']}</button>`
}

Any thoughts?

@jsumners
Copy link

@muan I think your approach is the right one. I came to it naturally as well when I investigated the travesty that is this spec (https://twitter.com/jsumners79/status/1211105577188970497). Like you, I haven't had the time or constitution to get back to it. But my idea was to write a tool that will read all of the base spec files and mash them into something usable.

@muan
Copy link
Owner Author

muan commented Sep 28, 2020

think your approach is the right one.

👍

write a tool that will read all of the base spec files and mash them into something usable.

muan/unicode-emoji-json does mostly that with 3 files already, but no CLDR:

https://github.com/muan/unicode-emoji-json/blob/2e9838abfc854890a155957b8ca5dff650f24de6/script/download-unicode-data.js#L10-L17

@jsumners
Copy link

I think I was using CLDR to include skin tone variations.

@BrianHung
Copy link

BrianHung commented Nov 9, 2020

Looking back now though I can see how this is not desirable for existing consumers of this library, as they would need to pull in an alternate source for other emoji metadata (hence the MAJOR version bump).

This makes sense, and it's already what I'm doing. I also saw that Emoji Mart is doing the same. A good source for normal emoji metadata (no keywords) we both used is emoji-data.

@muan muan marked this pull request as ready for review January 14, 2021 15:18
@muan muan merged commit 5f7a200 into master Jan 14, 2021
@muan muan deleted the three-dot-o branch January 14, 2021 15:43
@muan muan mentioned this pull request Jan 14, 2021
@muan
Copy link
Owner Author

muan commented Jan 14, 2021

Apologies for the delay. Here's the new dataset.

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.

6 participants