drinking-code / openmoji-for-react Goto Github PK
View Code? Open in Web Editor NEWi reactified openmoji
i reactified openmoji
The replaced emojis take up no space when not yet loaded. So, when they are loaded and rendered, the content jumps.
The improvement here would be to
font-display: swap
)to reduce/eliminate cumulative layout shift coming from react-openmoji
Consecutive emojis are not replaced with SVGs whatsoever.
Separating them with any character/s (e.g. spaces, zero width spaces) makes it work fine, but emojis without any character/s in between them are not replaced.
Hi, I get this error when trying to install this lib.
Probably comes from this namespace "sodipodi:docname="flag-quebec.svg"". I've seen then being produced by inkscape. @svgo removes them.
Could probably be resolved by using @svgr here : https://github.com/drinking-code/openmoji-for-react/blob/master/build/correct-dom-properties.js
[5/6] Building fresh packages...
error XXX/node_modules/react-openmoji: Command failed.
Exit code: 1
Command: node build/build.js && npx babel --presets @babel/preset-react src --out-dir lib --copy-files && node build/correct-dom-properties.js && rm -rf src
Arguments:
Directory: node_modules/react-openmoji
Output:
SyntaxError:XXX/node_modules/react-openmoji/src/icons/1F3F4-E0063-E0061-E0071-E0063-E007F.js: Namespace tags are not supported by default. React's JSX doesn't support namespace tags. You can set `throwIfNamespace: false` to bypass this warning.
5 | if (!outline) {
6 | return (
> 7 | <svg width={size} height={size} className="openmoji" viewBox="0 0 72 72" version="1.1" sodipodi:docname="flag-quebec.svg" xmlns="http://www.w3.org/2000/svg" ><g id="line-supplement"><path stroke-width="1.849" d="m5 40.5v14.5h26v-14.5h-26zm13.521 2.4785a0.68564 0.68564 0 0 1 0.68555 0.68555v4.8242h0.20312c0.064592-0.48327 0.2712-0.91288 0.58398-1.2344 0.36396-0.3741 0.83888-0.61685 1.3594-0.77148a0.51863 0.51863 0 0 1 0.14648-0.021484 0.51863 0.51863 0 0 1 0.49805 0.37109 0.51863 0.51863 0 0 1-0.34961 0.64453c-0.39915 0.11858-0.71132 0.29362-0.91211 0.5-0.14013 0.14403-0.21782 0.314
It would be useful if replaced emojis could be text-selected (like normal emojis), for example to be then copied and pasted somewhere else (as the actual emoji character)
Some concatenated emojis, like ❤️🔥, get replaced only partly (the fire part, and the heart stays as a preinstalled emoji), and some, like 👩❤️💋👩, not at all.
❤️🔥 in particular is not supported by Openmoji, so an option for handling those situations would be appropriate.
Probably should go through the list of all recommended ZWJ sequences and make all of them work (or purposely not, if Openmoji does not have a replacement).
npm install fails when openmoji is not yet installed.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.