Repository navigation
fix: emojis sent from web not rendering #7594
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
Merged
Merged
Changes from 4 commits
Commits
Show all changes
20 commits
Select commit
Hold shift + click to select a range
a1977e5
fix: missing new emojis
OtavioStasiak fda8e8e
comment
OtavioStasiak 6c290a9
refactor: generate emoji data from emojibase (match web)
OtavioStasiak 0d03f39
Merge branch 'develop' into fix.emoji-not-rendering-as-expected
OtavioStasiak 7a25e1e
Merge branch 'develop' into fix.emoji-not-rendering-as-expected
OtavioStasiak 32e6169
refactor: pin emoji shortnames, drop the legacyShortnames.ts parser
OtavioStasiak 4cf37b3
efactor: import emoji tables directly and fold search into methods/emβ¦
OtavioStasiak aa98a0c
cleanup
OtavioStasiak 029e6e9
cleanup
OtavioStasiak 644142a
fix: make the composers : autocomplete alias-aware
OtavioStasiak 84315e1
ix: delete the whole emoji sequence on one backspace
OtavioStasiak 49c804c
Merge branch 'develop' into fix.emoji-not-rendering-as-expected
OtavioStasiak 7ccd50e
update docs
OtavioStasiak 4597ea4
update docs
OtavioStasiak dc148ad
update docs
OtavioStasiak cb134d4
Merge branch 'develop' into fix.emoji-not-rendering-as-expected
OtavioStasiak 2318869
fix: test
OtavioStasiak 7427c8b
fix: test
OtavioStasiak 00f8ff6
Merge branch 'develop' into fix.emoji-not-rendering-as-expected
OtavioStasiak c331fee
fix: merge conflicts
OtavioStasiak File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,39 @@ | ||
| import { aliasesByEmojiName, emojisByCategory, shortnameToUnicodeMap } from './data'; | ||
| import { emojis } from './emojis'; | ||
| import { legacyShortnameToUnicodeMap } from './legacyShortnames'; | ||
|
|
||
| describe('emoji data', () => { | ||
| it('resolves every listed emoji to a unicode character', () => { | ||
| const unresolved = emojis.filter(name => !shortnameToUnicodeMap[`:${name}:`]); | ||
| expect(unresolved).toEqual([]); | ||
| }); | ||
|
|
||
| it('lists every emoji exactly once', () => { | ||
| expect(emojis.length).toBe(new Set(emojis).size); | ||
| }); | ||
|
|
||
| it('keys aliases by a listed emoji name', () => { | ||
| const listed = new Set(emojis); | ||
| expect(Object.keys(aliasesByEmojiName).filter(name => !listed.has(name))).toEqual([]); | ||
| }); | ||
|
|
||
| it('resolves every alias to the same emoji as the name it belongs to', () => { | ||
| const mismatched = Object.keys(aliasesByEmojiName).filter(name => | ||
| aliasesByEmojiName[name].some(alias => { | ||
| const unicode = shortnameToUnicodeMap[`:${alias}:`] ?? legacyShortnameToUnicodeMap[`:${alias}:`]; | ||
| return !unicode; | ||
| }) | ||
| ); | ||
| expect(mismatched).toEqual([]); | ||
| }); | ||
|
OtavioStasiak marked this conversation as resolved.
|
||
|
|
||
| it('has no category with an empty emoji list', () => { | ||
| expect( | ||
| Object.keys(emojisByCategory).filter(key => emojisByCategory[key as keyof typeof emojisByCategory].length === 0) | ||
| ).toEqual([]); | ||
| }); | ||
|
|
||
| it('keeps legacy shortnames out of the current map', () => { | ||
| expect(Object.keys(legacyShortnameToUnicodeMap).filter(key => key in shortnameToUnicodeMap)).toEqual([]); | ||
| }); | ||
| }); | ||
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.