Git Merge Request #135: Added Twemoji support (merged)

Merging...

Merged

Something went wrong. Please, merge manually

Checking if merge is possible...

Something went wrong. Please, merge manually

Rohan Verma wants to merge 4 commits from /u/rhnvrm/allura/ to master, 2016-06-29

Hello,

This will "provide standard Unicode emoji support across all platforms.". It only converts standard unicode which looks like this:

into:

P.S.
I'm working on integrating emojis using ReactJS using various libraries but have not been able to do so as of yet due to it taking more time than I had expected. Some promising ones are [http://conor.rodeo/react-emoji-react/demo/, https://github.com/pladaria/react-emojione].
In the future, we will be able to use http://www.emoji-cheat-sheet.com/ emoji which will be converted into emoji by ReactJS along with https://github.com/blog/2119-add-reactions-to-pull-requests-issues-and-comments

Commit Date  
[d35b11] (rhnvrm/discussion/emoji) by Rohan Verma Rohan Verma

Update twemoji size to 36x36 for hi res screens

2016-06-24 11:49:04 Tree
[2c6870] by Rohan Verma Rohan Verma

Removed CDN for code. Updated license. Moved code to proper places

2016-06-23 16:37:44 Tree
[f52637] by Rohan Verma Rohan Verma

Fix emoji size according to neighbor text

2016-06-21 19:44:12 Tree
[529c7f] by rhnvrm rhnvrm

added twemoji cdn and added changes in master template

2016-03-22 17:14:44 Tree

Discussion

  • Dave Brondsema

    Dave Brondsema - 2016-06-22

    Cool. It doesn't seem like we need to do anything with ReactJS do we? Can just set it up the simple way. React seems best suited for specific components, that are dynamic on the page (changing html).

    We prefer to have JS and CSS libraries included in Allura rather than loaded from a CDN url. So could you add it alongside our other .js files and mention it in the LICENSE files like we do for others?

    The onload code would be better in a js file like allura-base.js and can go inside the jquery function instead of using onload. We could potentially parse all the .markdown_content divs, if we wanted to limit it to the spots where user text is present, but doing the whole document seems fine too.

    Similarly, the CSS should all be in the .css file.

    It would be nice when editing something like a comment or ticket, if the preview button ran twemoji then too so you can see exactly how it'll look when it's saved.

    In the future we probably should discuss if/how we want to make it easier to insert emoji characters, but this seems like a good start on its own.

     
    • Rohan Verma - 2016-06-23

      Okay, will put the files in their proper place.

      Also, regarding using React I think I forgot to mention that I'm trying it to implement these features which I'll send in another merge request in the future:
      1. Github's reactions:
      2. Slack's emoji suggestions:
      3. http://www.emoji-cheat-sheet.com/ emoji shortcodes support.

       
      • Dave Brondsema

        Dave Brondsema - 2016-06-23

        Nice. For providing suggestions in our input fields, CodeMirror (which simplemde is based on) has a showHint option https://codemirror.net/doc/manual.html#addons I've looked into that a little bit for other ideas like suggesting tickets if you start typing [#

        Are you thinking we'd save the unicode value? Or the shortcode? Seems like unicode might the best approach so that we don't have to worry about shortcodes showing up in other places besides web pages (e.g. emails, rss feeds, apis)

        And for github-style reactions, did you know tickets can be voted on? (And other things could potentially too, by re-using its VotableArtifact). How would reactions work in relationship to voting? I kind of thought of voting as better way to handle thumbs up/down already.

         
  • Rohan Verma - 2016-06-23

    Updated.

     

    Last edit: Rohan Verma 2016-06-23
  • Dave Brondsema

    Dave Brondsema - 2016-06-23

    This looks good and I was just about to merge it when I was testing different font sizes. For example a big heading like:

    # abc 😳 def 🌄

    And they end up looking pixellated because the images are only 16px. Do you know if there's a way to make that better? It also makes me think about high-res monitors (e.g. retina on a Mac) where double-size images would be best to make it look real sharp.

     
    • Rohan Verma - 2016-06-24

      Updated it to 36x36, now it looks much better.
      Imgur

       
  • Rohan Verma - 2016-06-24
     
  • Dave Brondsema

    Dave Brondsema - 2016-06-29
    • Status: open --> merged
     

Log in to post a comment.