palmerabollo / game-ladder

The simplest game ladder out there.
2 stars 2 forks source link

Emoji Support on comments #26

Open labajo opened 11 years ago

labajo commented 11 years ago

We can replace special strings by emojis :blush: in the same way as github does. I put here an example of the emojify.js(http://hassankhan.github.com/emojify.js/). https://gist.github.com/labajo/5128035

In this example I take less styles compiled from author page, but we can use less and only compile some kinds of them.

Example: Google Chrome

palmerabollo commented 11 years ago

Sounds great. I've just committed all the pending changes to master. Feel free to add this, seems easy. By the way, I'll start developing in branches to avoid conflicts when merging.

labajo commented 11 years ago

In this afternoon I will add emoji support and a new pingpong favicon (I took the blue racket from this image http://dribbble.s3.amazonaws.com/users/161434/screenshots/939962/pong_1x.jpg and I created a transparent png and a ICO file for favicons).

palmerabollo commented 11 years ago

Ok, replace the favicon I downloaded from google. I think that in general it is better if we avoid using images related with tennis table, to keep it generic enough for any competition. But for the favicon it is ok, I like it.

labajo commented 11 years ago

I think we can have an array of favicons and set the kind of game in a variable, like humiliation mode variable.

palmerabollo commented 11 years ago

Too complex, use yours. Mine was only to avoid 404 errors.

labajo commented 11 years ago

I have problems with emojis :worried: . The problem is that I need to execute in the client emojify.run(); when the DOM is completed. Meteor don't send the players at the beggining. Meteor send a empty list and using websockets initialize the list. I haven't found a way to solve this yet, but I'm on it. We need emojis :laughing: .

ggarber commented 11 years ago

For your interest, I debugged the app the other day and meteor is not using websockets to send the data, it looks like HTTP long polling, what makes sense if you want to support android browsers that doesn't have websockets support yet.

Regarding emojify you could try using this event to run emojify.run(): http://docs.meteor.com/#template_rendered

labajo commented 11 years ago

Yes, sorry, it uses xhr. I prefer use Socket.io for this kinds of solutions. I had in my copy Template.game.rendered = function() { emojify.run(); }; This code runs well when someone refresh the whole web. When someone write a comment on a game, the game loses all emojis, and to execute emojify.run() again implies a game deletion in the web. My next step is to create a new method in emojify script that only apply emojis in the comments of a game and not to the whole web.

labajo commented 11 years ago

I think that habemus emojis :smile: :smile: :smile: :smile: . Very soon in your comments. It is very late. Tomorrow will be a pull request.

palmerabollo commented 11 years ago

Tomorrow we will have a merge hell because I also have the new "challenge a player" feature. :crying_cat_face:

labajo commented 11 years ago

Don't worry Guido. I need space for 5 lines of code and two new files. :smile:

palmerabollo commented 11 years ago

Where is my PR !?

labajo commented 11 years ago

Wait 1 hour please. Our experts are on it.