Skip to content
This repository has been archived by the owner on Nov 8, 2022. It is now read-only.

✨ Replace item icons with EmojiOne PNGs #3

Merged
merged 3 commits into from
Feb 24, 2019

Conversation

pghk
Copy link
Contributor

@pghk pghk commented Feb 24, 2019

This resolves #2, by replacing the generic icon used for every workflow item with a PNG version of each item's specific emoji.

The image filenames are derived from the emoji's ASCII code, and then downloaded from the EmojiOne Assets repository. Each file will be downloaded a single time when the workflow first opens, and then saved to the workflow's data directory (i.e. /Users/{name}/Library/Application Support/Alfred 3/Workflow Data/org.leolabs.alfred.gitmoji). The local files will continue to be reused as long as they exist there.

Thanks!

pghk added 3 commits March 18, 2018 23:50
This workflow presents a list of emoji, so naturally the icon for each
list item would be that emoji. Problem is, Alfred only supports files
for this.

What we can do is grab the pngs we need from EmojiOne. I'm having them
written to the data directory, which seems better than just packaging
them in the workflow?
The new gitmoji for "Adding or updating types" introduces a new case
where the emoji being used decodes to a combination of \U and \u escaped
codes (4 hex and 8 hex respectively), so the logic needs to improve in
order to correctly resolve to the filename used by emojione-assets.
@leolabs
Copy link
Owner

leolabs commented Feb 24, 2019

That looks good, thanks!

@leolabs leolabs merged commit d6244fe into leolabs:master Feb 24, 2019
@pghk pghk deleted the feature/icons branch February 24, 2019 21:02
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Use a unique icon for each item
2 participants