Skip to content

3.0.0 - #178

Merged
muan merged 24 commits into
masterfrom
three-dot-o
Jan 14, 2021
Merged

3.0.0#178
muan merged 24 commits into
masterfrom
three-dot-o

Conversation

@muan

@muan muan commented Oct 13, 2019 •

Copy link
Copy Markdown
Owner

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
Copy Markdown
Collaborator

Nice! ⚡

@jsumners

Copy link
Copy Markdown

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

tonnoz commented May 15, 2020

Copy link
Copy Markdown

any news? Looking forward for this release 😀

@tcd

tcd commented Aug 13, 2020

Copy link
Copy Markdown

Wondering what's blocking this?

@muan

muan commented Sep 24, 2020

Copy link
Copy Markdown
Owner Author

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
Copy Markdown

@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

muan commented Sep 28, 2020

Copy link
Copy Markdown
Owner Author

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
Copy Markdown

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

@BrianHung

BrianHung commented Nov 9, 2020 •

Copy link
Copy Markdown

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

muan commented Jan 14, 2021 •

Copy link
Copy Markdown
Owner Author

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