dwilliamson / donw.io

92 stars 6 forks source link

Comments: Replacing Disqus with Github Comments #1

Open dwilliamson opened 7 years ago

dwilliamson commented 7 years ago

Comments for Replacing Disqus with Github Comments

dwilliamson commented 7 years ago

This is a comment

dwilliamson commented 7 years ago

This is another comment

dwilliamson commented 7 years ago

This is a comment with some markdown...

  1. Jumble
  2. Sale

Boldit or Italicit or ~strikeit~

header

hashtag

something something

int x = 3;
jasminpatry commented 7 years ago

This is great. Thanks for sharing this!

olafleur commented 7 years ago

Awesome ! I think I will try this on my website. :)

vielmetti commented 7 years ago

Nicely done.

vyp commented 7 years ago

Neat!

olalonde commented 7 years ago

You are on HN, congrats :) https://news.ycombinator.com/item?id=14170041

mannuscript commented 7 years ago

I agree that what Disqus is doing is an overkill. However, we should not forget that nothing comes for free... Apart from this, getting redirected to GitHub for comment is very inconvenient... Update: So I am automatically subscribed to comments thread via email... Getting emails not only for replies on my comment but for every new comment. Well, this is another overkill... Don't forget User experience is more valued than user's data nowadays :D

Edit: @dwilliamson forget about the free-ness argument, the bigger issue is of user experience, I got resubscribed to email updates after you mentioned me in one of the comment. This is a serious poor user experience.

rattrayalex commented 7 years ago

Interesting, thanks for sharing!

You might consider changing the link to include #new_comment_field (like so) so that users do not have to scroll. I believe this also focuses the field by default, which may make intent more clear.

Adding a button at the bottom of the comments section that opens the link might be helpful. Using about: _blank could be nice too.

A git hook might be useful to automatically generate the issues, though I'm not sure that'd be a good idea.

EDIT: Looks like their api supports POSTing comments; you'd have to set up user auth of course. https://developer.github.com/v3/issues/comments/#create-a-comment

ghost commented 7 years ago

A test of comment with image and link.

img_4698

globalcitizen commented 7 years ago

Good work. In summary, to improve the solution further, add a button to add a new comment. Only when that button is pushed (in order to preserve privacy, remove drive-by viewer tracking potential, and reduce unnecessary server load on Github), somehow determine whether the user is already logged in to Github.

citrusui commented 7 years ago

I'm impressed by this! I'm going to see what happens when you post a comment from the @ghost account (another name for a deleted account)

ghost commented 7 years ago

Hello world! This is a comment from the @ghost account.

segiddins commented 7 years ago

This is awesome!

olalonde commented 7 years ago

You might want to

1) Add rel="nofollow" to your anchor tags to deter spam

2) Link back to the blog post in the GH issue (you could do that in the first comment and not display it on your website). That way when I go back here due to :octocat: GH notifications, I can go back to the post easily instead of wondering what this is all about 😸

ElijahLynn commented 7 years ago

Great writeup, I was really hoping there was a way to comment without visiting Github.

asciimo commented 7 years ago

Very slick! I came to propose something similar to @globalcitizen's proposal, but they put it more succinctly.

bexelbie commented 7 years ago

Did you consider https://staticman.net ? This gets you comments as PRs and comments from the page.

tbodt commented 7 years ago

@bexelbie but staticman isn't as FUCKING AWESOME as this

dipakc commented 7 years ago

This is amazing! Thanks for sharing.

aleman commented 7 years ago

Great! I can already think of a few use cases for this in my team

colinmegill commented 7 years ago

Great idea. Thank you for this.

crohr commented 7 years ago

I agree this is a great idea. But why not write your post directly into the issue as well? You might want to checkout my post Turn your GitHub issues into blog posts, which implements the same idea but also let you publish right from your GitHub issue as well.

bkaradzic commented 7 years ago

Love it! :+1:

lrzedzicki commented 7 years ago

Very useful!

andreis commented 7 years ago

Great technique that I'll definitely steal. Thanks!

ghost commented 7 years ago

Brilliant idea!

EddieOne commented 7 years ago
test = {
  something: 'monkey',
  function: function(arg) { return arg + 'YAY!'  }
}

Edit: We need pagination!

cerisara commented 7 years ago

Great ! I'll try this out... is it doable with a gitlab instance ?

spinda commented 7 years ago

export-mike commented 7 years ago

Super clever!

thehesiod commented 7 years ago

note I filed a bug LAST MONTH where I found that the github API was returning the same comments multiple times instead of all the comments for large number of comments (500+). They have yet to say they've fixed this. So for example if you had comments: [1,2,3,4], it would return [1,1,3,4]

modest commented 7 years ago

cute, but... when we start needing to solve a Captcha before commenting on GitHub, I'll be sure to thank you guys

rezhajulio commented 7 years ago

did it also prevent executing js ?

DanTup commented 7 years ago

Worth noting, the API results for this comment currently appear to be 1hr stale (probably due to GH caching) which could be important to some in deciding whether to do this.

DanTup commented 7 years ago

Actually, they're not stale, they're paged?

https://api.github.com/repos/dwilliamson/donw.io/issues/1/comments https://api.github.com/repos/dwilliamson/donw.io/issues/1/comments?page=2

mtso commented 7 years ago

I wonder if it's possible to post from your blog page~ Cool implementation tho~

tylerzika commented 7 years ago

really cool! although I'm not seeing this on your blog post..

kennycason commented 7 years ago

Woah! Awesome.

println("Everyone switch to Kotlin")
rhaps0dy commented 7 years ago

I'm going to implement this in my blog. Thank you 😄 .

DmitryOlkhovoi commented 7 years ago

It's better to post comments via api than ask ppl to do it here

rhaps0dy commented 7 years ago

@DmitryAuine True, the notice "go to the GitHub issue to comment" is easy to miss. Well we can try to implement this. (I might at some point)

0b01 commented 7 years ago

Check out txtpen.com. It is like medium but for regular sites

BlueHatbRit commented 7 years ago

Huh awesome, might add this into my Ghost blog!

intraz commented 7 years ago

@dwilliamson, what browser did you use for the network log screen captures? thanks for a good post.

milch commented 7 years ago

@DanTup It looks like if the comments are paged then the navigation is included in the Link response header like this:

<https://api.github.com/repositories/72930823/issues/1/comments?page=1>; rel="first", <https://api.github.com/repositories/72930823/issues/1/comments?page=1>; rel="prev"

So it'd be neat if the JS in the comments.html file detected if the user scrolled to the bottom, and then loaded the next page of comments if there are any.

BadLamb commented 7 years ago
Testing for input sanitizing
tennisfar commented 7 years ago

Simple and efficient. Good idea. 👍

jfernandez commented 7 years ago

Hi mom!