Comments (12)
hey @varmint09,
it's been a while I haven't updated this project, but everything is possible :) Please open another issue for the angular as a devDependency. I will take a look very soon.
from angular-emoji-filter-hd.
@varmint09
I pushed a version to NPM, let me know if it works.
https://www.npmjs.com/package/angular-emoji-filter-hd
from angular-emoji-filter-hd.
Hi,
A few things;
In the package.json please change your main to this;
"main": "./dist/emoji.min.js",
The gruntfile.js isnt the "main" of this project, so that breaks when someone would want to use this.
Also, I had to edit the path in the CSS file, and also copy the image across to my own images folder, might I suggest;
You include an emoji.less file in the lib/dist folders and have a @filepath prefix that a user can set to specify where their images reside, and adding a bit of documentation to copy the images into their own assets/images folder, and to include the emoji.less into their LESS file.
You could even create a SASS version in addition to this, so that it could work with either compiler.
How do those sound? I was tempted to fork this, but its your work not mine, and its almost working great.
- Also, say I had an emoji in a button, how would I make it translate that, or if I had a panel of emoji.
Something like
<div>:dog:</div>
<button>:dog</button>
It would be great if this could swap those for images too!
- Lastly, it would be much more performant if rather than a single spritesheet, if these were separate images, as otherwise there is a 4mb download, even if someone sends one smiley face!
Thoughts?
from angular-emoji-filter-hd.
Bump :)
from angular-emoji-filter-hd.
hey @varmint09, apologies for the late answer.
I have fixed the package.json to use the correct main property.
- I need to do some tests about the filepath but I am not sure to understand, how are you including the js and the css files in your code?
- about having an emoji button or panel, what do you want to do? when the user clicks on the button/link, it executes some code?
why not doing something like that?
<button class="emoji emoji_button emoji_dog"></button>
and you define emoji_button
- about the last point, when I was using this filter, I preloaded the image, so it was working great. Can't you do that?
from angular-emoji-filter-hd.
Hi,
The CSS file I import into a stylesheet, using LESS. Not sure if you use LESS but it might be useful as then you could set an imagePath in the less to the image folder location.
Regarding the images; they are 800kb and 2.5mb each, so preloading for them seems quite wasteful surely? You are putting a requirement to download the entire set of all icons, when it might just be to render one or two.
I like how emojify the plugin offers a CSS Sprite Mode, an Image Sprite Mode, or Image modes, I just think your actual implementation is better and the other project is dead.
It seems like a good chance to make a really awesome Angular plugin, thoughts?
- Good point about just adding the classes, that was stupid of me to miss!
from angular-emoji-filter-hd.
I am more a SASS guy :) but if I do a LESS configuration file, I need to do also a SASS one and keep a version with the default CSS version (for people not using any CSS preprocessors). But I thought that when you are using NPM, you were supposed to include the files like that (I might be wrong):
<link type="text/css" rel="stylesheet" href="node_modules/package/css/style.css"/>
is it because you need to build a production version? but anyway I think it is doable.
Regarding to the images, I need to see what I can do, that requires a lot of work because I haven't "designed" the plugin like that. In my case, I needed to display a large set of emojis (in a chat panel).
from angular-emoji-filter-hd.
I do not link directly to any node packages in my dev, or my production code as I concat it all into a single JS file, the same applies to my CSS. I doubt that would be regarded as good practice. None of the node_modules end up on the prod server.
Sass + Less would be great.
so it would be;
$filepath: '../images/';
.cat {
background-image: url($filepath + '/cat.png';
}
.dog {
background-image: url($filepath + '/dog.png';
}
instead of the css being a position in a sprite sheet, it will be a path to the image, so that wont break or remove any functionality, yes its more network requests, and yes perhaps for a panel its not ideal, but for the actual display it should be kinder to connections, most of the time the few MB wont be needed.
from angular-emoji-filter-hd.
- bump, or is this repo dead? :)
from angular-emoji-filter-hd.
No, I have a job + a life and not a lot of time to code right now on my spare time.
It is on my to do list but feel free to open a PR if you can't wait.
from angular-emoji-filter-hd.
I've pushed this commit: c0f926e
2 new files in the dist/ folder:
- https://github.com/dbaq/angular-emoji-filter-hd/blob/master/dist/emoji.less you have to define after importing the file:
@emoji-images-path
, see http://lesscss.org/features/#variables-feature-default-variables for more information - https://github.com/dbaq/angular-emoji-filter-hd/blob/master/dist/emoji.scss you have to define before importing the file:
$emoji-images-path
let me know if it fits your needs
from angular-emoji-filter-hd.
I am closing this issue. Feel free to reopen it if it does not work for you.
from angular-emoji-filter-hd.
Related Issues (9)
- version 0.0.8 have a major bug HOT 3
- Emojis not showing on low definition devices? HOT 2
- can i specialize the path to the emoji png? HOT 2
- Emoji path images substitution does not work in less
- Mismatching CSS classes HOT 2
- Apple new skin tones support HOT 2
- 0.0.6 is not registered on bower HOT 5
- Support for emoji aliases HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from angular-emoji-filter-hd.