Skip to content

Display collaborator reactions more prominently #95

Closed

Description

@sindresorhus

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.

screen shot 2016-03-22 at 22 51 03

Activity

  1. hkdobrev commented on Mar 22, 2016

    @hkdobrev
    Contributor

    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.

  2. sindresorhus commented on Mar 22, 2016

    @sindresorhus
    MemberAuthor

    👍 Good ideas!

  3. hkdobrev commented on Mar 22, 2016

    @hkdobrev
    Contributor

    @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.

  4. hkdobrev commented on Mar 22, 2016

    @hkdobrev
    Contributor

    @paulmolluzzo This is the endpoint I meant

    I can use the API

    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.

  5. hkdobrev commented on Mar 22, 2016

    @hkdobrev
    Contributor
  6. paulmolluzzo commented on Mar 22, 2016

    @paulmolluzzo
    Contributor

    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.

  7. hkdobrev commented on Mar 22, 2016

    @hkdobrev
    Contributor

    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.

  8. hkdobrev commented on Mar 30, 2016

    @hkdobrev
    Contributor

    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.

  9. sindresorhus commented on Mar 30, 2016

    @sindresorhus
    MemberAuthor

    @hkdobrev Can you shortly describe what's in that branch and what's missing?

  10. hkdobrev commented on Mar 30, 2016

    @hkdobrev
    Contributor

    @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 and and builds an unique set.

    The code in this branch does not deal with any styling and finding avatars for these usernames.

  11. paulmolluzzo commented on Mar 30, 2016

    @paulmolluzzo
    Contributor

    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.

  12. hkdobrev commented on Apr 2, 2016

    @hkdobrev
    Contributor

    @paulmolluzzo I've found it! https://github.com/hkdobrev.png If you append .png to 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=jpMmboYadnA

  13. paulmolluzzo commented on Apr 2, 2016

    @paulmolluzzo
    Contributor

    @hkdobrev LOL so I built that app for nothing?

  14. hkdobrev commented on Apr 2, 2016

    @hkdobrev
    Contributor

    @paulmolluzzo Well, sorry about that 🙈

  15. paulmolluzzo commented on Apr 2, 2016

    @paulmolluzzo
    Contributor

    @hkdobrev no worries! Good find! I'm sure I can reuse something in there someday anyway.

  16. hkdobrev commented on Apr 6, 2016

    @hkdobrev
    Contributor

    Implemented in #145.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions