You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Display collaborator reactions more prominently #95
Previously, when we did :+1: as comments, I could quickly see which collaborators that 👍'd something. Now it's intermixed with all other users reactions.
We could maybe show the avatar of collaborators inside the relevant reaction. Open to other suggestions though.
Good idea. I'd suggest showing avatars of all users on the right of reactions in the same horizontal space. So you'd see the avatars of users who reacted at a glance and you could go deeper by hovering over reactions as you can do now.
Of course we need to limit the user avatars to a reasonable number and use overflow-x: hidden.
@sindresorhus Can you think of any way for getting avatars of users who reacted, but haven't commented on the issue/PR? The GitHub avatar URLs are based on their GitHub user ID, but it's not provided in the HTML. I can use the API, but I couldn't find a way neither to get multiple users data in a single request nor request just the image like Facebook allows.
However I don't want a separate request for every user reacted on a page. I'd very much like a way to generate the avatar URL and just insert <img> elements.
However I don't want a separate request for every user reacted on a page. I'd very much like a way to generate the avatar URL and just insert elements.
Build a micro app and deploy to Heroku? The endpoint should take an array of usernames and send back an array of key/values with username and image. That's the only way I see around this other than hitting each usename and parsing the JSON.
IMO the GitHub API is cumbersome. It sends back a ton of stuff I don't need and makes it hard to get specific stuff in a single request.
A separate Heroku app is my last resort. If I go that way I prefer the Facebook way.
E.g. heroku-url.com/username/avatar to 301 redirect to the GitHub avatar URL and the browsers would take care of following the redirect when loading an <img> tag.
The code in this branch just process the usernames from every reaction on every comment and puts them in a container after the reactions. It processes the username lists separated by comma or an and and builds an unique set.
The code in this branch does not deal with any styling and finding avatars for these usernames.
Reacted by Mark Knol, Nitesh Tiwari, Devin McInnis, Vlad Severin, Hugo Sainte-Marie, xn00bdeveloper, Derry Pratama, Kamal, Martin Braun, Kennedy and 4 more
Activity
hkdobrev commentedon Mar 22, 2016
Good idea. I'd suggest showing avatars of all users on the right of reactions in the same horizontal space. So you'd see the avatars of users who reacted at a glance and you could go deeper by hovering over reactions as you can do now.
Of course we need to limit the user avatars to a reasonable number and use
overflow-x: hidden.sindresorhus commentedon Mar 22, 2016
👍 Good ideas!
hkdobrev commentedon Mar 22, 2016
@sindresorhus Can you think of any way for getting avatars of users who reacted, but haven't commented on the issue/PR? The GitHub avatar URLs are based on their GitHub user ID, but it's not provided in the HTML. I can use the API, but I couldn't find a way neither to get multiple users data in a single request nor request just the image like Facebook allows.
paulmolluzzo commentedon Mar 22, 2016
Will this work? http://stackoverflow.com/questions/22932422/get-github-avatar-from-email-or-name
hkdobrev commentedon Mar 22, 2016
@paulmolluzzo This is the endpoint I meant
However I don't want a separate request for every user reacted on a page. I'd very much like a way to generate the avatar URL and just insert
<img>elements.hkdobrev commentedon Mar 22, 2016
BTW for now I have this: https://github.com/sindresorhus/refined-github/compare/reactions-participants
Feel free to take it and experiment with it.
paulmolluzzo commentedon Mar 22, 2016
Build a micro app and deploy to Heroku? The endpoint should take an array of usernames and send back an array of key/values with username and image. That's the only way I see around this other than hitting each usename and parsing the JSON.
IMO the GitHub API is cumbersome. It sends back a ton of stuff I don't need and makes it hard to get specific stuff in a single request.
hkdobrev commentedon Mar 22, 2016
A separate Heroku app is my last resort. If I go that way I prefer the Facebook way.
E.g.
heroku-url.com/username/avatarto 301 redirect to the GitHub avatar URL and the browsers would take care of following the redirect when loading an<img>tag.hkdobrev commentedon Mar 30, 2016
BTW I've rebased my branch on latest master: https://github.com/sindresorhus/refined-github/compare/reactions-participants
I'm probably not going to dedicate the time to pursue this further, but if someone is willing to take it, please do.
sindresorhus commentedon Mar 30, 2016
@hkdobrev Can you shortly describe what's in that branch and what's missing?
hkdobrev commentedon Mar 30, 2016
@sindresorhus Sure.
The code in this branch just process the usernames from every reaction on every comment and puts them in a container after the reactions. It processes the username lists separated by comma or an
andand builds an unique set.The code in this branch does not deal with any styling and finding avatars for these usernames.
paulmolluzzo commentedon Mar 30, 2016
I still don't see a way around making another app to get those avatars, "Facebook Way" or otherwise. GH doesn't have an endpoint for the avatar.
paulmolluzzo commentedon Apr 1, 2016
@hkdobrev This is super ugly and will probably break frequently: https://github-avatar-redirect.herokuapp.com/
Code is here: https://github.com/paulmolluzzo/github-avatar-redirect
hkdobrev commentedon Apr 2, 2016
@paulmolluzzo I've found it! https://github.com/hkdobrev.png If you append
.pngto usernames in GitHub you get redirected to the avatar image. It's just like Facebook, just not on the API, but on GitHub.com instead. Learned that from the 3rd tip in https://www.youtube.com/watch?v=jpMmboYadnApaulmolluzzo commentedon Apr 2, 2016
@hkdobrev LOL so I built that app for nothing?
hkdobrev commentedon Apr 2, 2016
@paulmolluzzo Well, sorry about that 🙈
paulmolluzzo commentedon Apr 2, 2016
@hkdobrev no worries! Good find! I'm sure I can reuse something in there someday anyway.
hkdobrev commentedon Apr 6, 2016
Implemented in #145.