frontend
frontend copied to clipboard
Implement support for emojis in commit messages
Please make sure to add the zfe badge before submitting your PR
Sorry, but I cannot find any info about what “zfe badge” is… Is it some kind of internal stuff? The only reference I found is in the deploy.sh
script.
Rationale Emojis have seen increasing use in Git. gitmoji lays out a guide for using emojis in commit messages. Atom text editor also uses emojis in their commit messages. Displaying emojis properly in commit messages not only saves screen space, but also makes it easier for users to find the right commit to view.
Considerations
- I copied
emojione.min.js
from jsDelivr into the project source tree instead of usingnpm
orbower
because the full emojione package is 90 MB large and it would take a long time to download. - I added a function
convert-emoji
toutils.cljs
because it is shared in many views (head
andbuilds_table
). It converts the emoji shortnames to unicode characters.- However, I am not sure whether I should instead add to any existing
utils/*.cljs
file or create a newutils/emoji.cljs
file. But I feel quite bad for adding to an already largeutils.cljs
file, which is more than 500 lines long now (and I once read an article saying that “A single util file will always grow until it is too big and yet too hard to split apart.”).
- However, I am not sure whether I should instead add to any existing
- I used unicode characters instead of image emojis in order not to make extra network calls to CDN which hosts the emoji images.
- However, older browser may not be able to display the emojis properly.
- I had only one day of experience with ClojureScript, so if something looks wrong, it’s probably because I just don’t know what’s the right thing to do. Any feedback is appreciated.
Ticket: I don’t think I’ve got an access to it…
Before
After
Reading adding-3rdparty-js.txt, it seems that I have to worry about advanced compilation mode.
How do I try the JavaScript bundle that’s compiled with advanced compilation mode, so that I can test if it will work as expected?
Thanks