Warehouse: Add support to github smileys

Created on 16 Jan 2017  路  4Comments  路  Source: pypa/warehouse

I think Warehouse must support GitHub smileys on read-me.
cc: https://github.com/pypa/pypi-legacy/issues/588

CSSCSS HTML UUI feature request javascript usability

Most helpful comment

AFAICT, the emojis are parsed within the frontend with some javascript trickery. It's also transforming both emoji code like :+1: (:+1:) and unicode 馃憤 (馃憤). If you look at the sources, you'll see it transforms the emoji (code or unicode) as:

<g-emoji alias="+1" fallback-src="https://assets-cdn.github.com/images/icons/emoji/unicode/1f44d.png" ios-version="6.0">馃憤</g-emoji>

It is done using the gemoji library. So instead, it'd be a better idea to keep supporting general markdown the commonmark people try to make standard, and build the nice to haves in the UI. Actually, this extra thing could be made as a preference.

HTH

All 4 comments

I think Github uses markup to parse GFM (and subsequently emoji). Is there a Python port anywhere?

Looks like py-gfm exists, but does not yet have emoji support. There's also the issue of what to do for reST documents...

AFAICT, the emojis are parsed within the frontend with some javascript trickery. It's also transforming both emoji code like :+1: (:+1:) and unicode 馃憤 (馃憤). If you look at the sources, you'll see it transforms the emoji (code or unicode) as:

<g-emoji alias="+1" fallback-src="https://assets-cdn.github.com/images/icons/emoji/unicode/1f44d.png" ios-version="6.0">馃憤</g-emoji>

It is done using the gemoji library. So instead, it'd be a better idea to keep supporting general markdown the commonmark people try to make standard, and build the nice to haves in the UI. Actually, this extra thing could be made as a preference.

HTH

Thanks for the feature suggestion and the discussion and resources, and sorry for the slow response!

For context: Warehouse has been moving somewhat slowly for years, but now, the folks working on Warehouse have gotten funding to concentrate on improving and deploying Warehouse. The team has kicked off work towards our development roadmap -- the most urgent task is to improve Warehouse to the point where we can redirect pypi.python.org to pypi.org so the site is more sustainable and reliable.

And since this feature isn't something that the legacy site has, I've moved it to a future milestone. Like Ernest, I'll also recommend that you look at pypa/readme_renderer to see whether an issue about this belongs there.

Those of you who are interested in helping with front-end Warehouse functionality, check out our "javascript" issue label. For directions for getting set up, see our Getting Started Guide. And please feel free to ask questions on the issue, in #pypa-dev on Freenode, or on the pypa-dev mailing list.

Thanks and sorry again for the wait.

Was this page helpful?
0 / 5 - 0 ratings