Replace emoji-mart with emoji-picker-element (#620)

* Change dependencies

* Use emoji-picker-element instead of emoji-mart

* Optimize emoji-picker appeareance and data-source

* Add twemoji font to emoji-picker

* Add missing useEffect dependency

* Add emoji-shortcode map

* Include emoji-data into bundle and remove dynamic fetch

* Rename shortcode-map

* Fix emoji-picker being hidden on second attempt to open it

* Add support for skin-tone short-codes

* Remove whitespace line

* Don't reinitialize the picker on every open

* Fixed linting and test issues

* Update CHANGELOG entry
This commit is contained in:
Erik Michelson 2020-10-10 23:12:17 +02:00 committed by GitHub
parent fe40d7247d
commit 5574f09ef5
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
15 changed files with 203 additions and 167 deletions

View file

@ -80,7 +80,7 @@ describe('Autocompletion', () => {
describe('normal emoji', () => {
it('via Enter', () => {
cy.get('.CodeMirror textarea')
.type(':book')
.type(':hedg')
cy.get('.CodeMirror-hints')
.should('exist')
cy.get('.CodeMirror textarea')
@ -88,29 +88,29 @@ describe('Autocompletion', () => {
cy.get('.CodeMirror-hints')
.should('not.exist')
cy.get('.CodeMirror-activeline > .CodeMirror-line > span')
.should('have.text', ':book:')
.should('have.text', ':hedgehog:')
cy.get('.markdown-body')
.should('have.text', '📖')
.should('have.text', '🦔')
})
it('via doubleclick', () => {
cy.get('.CodeMirror textarea')
.type(':book')
.type(':hedg')
cy.get('.CodeMirror-hints > li')
.first()
.dblclick()
cy.get('.CodeMirror-hints')
.should('not.exist')
cy.get('.CodeMirror-activeline > .CodeMirror-line > span')
.should('have.text', ':book:')
.should('have.text', ':hedgehog:')
cy.get('.markdown-body')
.should('have.text', '📖')
.should('have.text', '🦔')
})
})
describe('fork-awesome-icon', () => {
it('via Enter', () => {
cy.get('.CodeMirror textarea')
.type(':facebook')
.type(':fa-face')
cy.get('.CodeMirror-hints')
.should('exist')
cy.get('.CodeMirror textarea')
@ -124,7 +124,7 @@ describe('Autocompletion', () => {
})
it('via doubleclick', () => {
cy.get('.CodeMirror textarea')
.type(':facebook')
.type(':fa-face')
cy.get('.CodeMirror-hints > li')
.first()
.dblclick()