gitpoint / git-point

GitHub in your pocket :iphone:
https://gitpoint.co/
MIT License
4.72k stars 788 forks source link

Reactions #25

Open housseindjirdeh opened 7 years ago

housseindjirdeh commented 7 years ago

So I spent a bit of time some while ago working on adding reactions. This is all in the with-reactions branch of the repo. Keep in mind this is a much older branch and there have been a lot of changes since than on master, but I feel we can port our logic from there when we're ready.

This is what I had working:

gitpoint-reactions

You'll notice Slack inspiration there :P

An important thing to point out is that the Reactions APIs are still in development preview. Definitely worth discussing if we wouldn't mind including it now and changing it in the future or if that's not the safest option just yet.

Looking forward to having this rolled out eventually. Discussions/contributions are always welcome :)

SammyIsra commented 7 years ago

Since we are moving to GraphQL, this is worth taking a look at https://developer.github.com/v4/reference/mutation/addreaction/

image

Also, getting the reactions seems also somewhat intuitive with GraphQL. Altho the end result seems a bit messy, but I am sure we can work with it!

RolfKoenders commented 7 years ago

That looks really nice @housseindjirdeh!

housseindjirdeh commented 7 years ago

Thanks @RolfKoenders :)

Nice thank you @SammyIsra - with REST things were quite messy and I really think this can be something we can integrate after we have GraphQL integrated.

housseindjirdeh commented 7 years ago

That being said - looking at the documentation for API v4 I don't see a mention of reactions being in preview mode like it is in the REST docs. @SammyIsra do you know if we need a preview URL or something of that sort to access reactions with GraphQL?

andrewda commented 7 years ago

@housseindjirdeh No developer preview header is needed for reactions in API v4, it's all implemented and standard 👍

housseindjirdeh commented 7 years ago

OMG OMG OMG

Time to make the move to GraphQL :)

housseindjirdeh commented 6 years ago

If it's okay with everyone - I'll like to take this on and tackle it over Christmas break and start my first stab at using GraphQL :)

andrewda commented 6 years ago

👏 1.5 is going to be a good one!