-
-
Notifications
You must be signed in to change notification settings - Fork 383
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Emoji syntax gravatars #56
Comments
Kind of love it personally. 👍 Some will conflict with real emoji so I wonder if it'd be better to use a different syntax. :@cameronmcefee: or something? |
Pretty cool secret feature. :) On Fri, Jun 14, 2013 at 5:12 PM, Ryan Tomayko notifications@github.comwrote:
|
I wonder if that would play nicely with current @mentions |
I'd pick some unused syntax like |
since it's going to be an image and a link, what if we just used an already expected syntax?
|
But that doesn't usually form a link does it? I thought it was just embed the image. |
Hello All, May I help by implementing this filter? As I see it, the filter is responsible for parsing the document, locating Also, the filter can depend upon a service, and the service is responsible for converting a profile string into an avatar. This way, an application can implement I hacked up a prototype to review. Thanks for considering my idea, and any input is appreciated! |
I'd like :@cameronmcefee: |
@simeonwillbanks happy new years! Just revisiting old issues lying around. Are you still interested in turning your prototype into a pull request? As far as feedback, I'm not a fan of the indirection of passing in a service. Yes, it is more flexible, but at this level, the code does nothing and leaves all the work to be done by the service. I'd rather just have common gravatar features passed in. |
Also, |
@jch happy new years to you! Yes. 😄 I suggested a service for two reasons:
With Gravatar, login to avatar isn't deterministic. 😦 Gravatar requires an email hash for the avatar URL. However, you make a solid point. Let's review a Gravatar URL, and see what a It can be simplified. Notably, we can replace my GitHub user ID hash with my login. The new The Default Image is a bit trickier. Maybe the login = "simeonwillbanks"
class Filter
TOKEN = "__login_token__"
end
# default_image_url sent to Filter and references Filter::TOKEN
default_image_url = "https://identicons.github.com/#{Filter::TOKEN}.png"
default_image_url.sub Filter::TOKEN, login
#=> "https://identicons.github.com/simeonwillbanks.png" The email hash requires a simpler service than the prototype service. # Filter receives service
# Service defines login_to_email
email = service.login_to_email "simeonwillbanks"
# => "sfw@simeonfosterwillbanks.com"
email_hash = Digest::MD5.hexdigest email
#=> "a624cb08e20db3ac4adb6380928a7b11"
basic_gravatar_url = "https://www.gravatar.com/avatar/#{email_hash}"
#=> "https://www.gravatar.com/avatar/a624cb08e20db3ac4adb6380928a7b11" Thoughts? Also, 👍 for passed in delimiter with sane default. Thanks! |
That's a good point. If that's the case, I'd suggest naming your filter something more descriptive. Maybe just I like that this filter doesn't add any external code dependencies. Normally, I wouldn't want to depend on a 3rd party external service either, but Gravatar's been around for a long time and feels like the common choice. |
@jch Thanks! An interface with a concrete implementation is a good idea. Agreed. I'll start a branch, and commit early and often. We can hammer out the specifics. |
I'm not sure if this is a good idea or if this is actually the place to suggest it, but it'd be cool if you could put something like
:cameronmcefee:
in any gfm field and have the person's avatar appear, probably linked to their profile and maybe tool-tipped with their name.The text was updated successfully, but these errors were encountered: