impact / search

A web application to search the impact index
MIT License
12 stars 5 forks source link

Star button does nothing #12

Closed sjoelund closed 8 years ago

sjoelund commented 8 years ago

In the search window, we get a button N stars, but the button does nothing when I click it. I don't know what I expect it would do, but I really want to click it.

dietmarw commented 8 years ago

How about linking to https://github.com/<username>/<repo>/stargazers

xogeny commented 8 years ago

The problem is that this assumes the repository is on GitHub.

I've learned an important lesson from building hypermedia APIs. If you are building a URL (in a client), you are "doing it wrong". If the point is to allow people to "like" something, then we should add some kind of "like" url to the index. Clients should be a stupid as possible. Since the server actually knows the content is on GitHub then it should make determinations like this. The client's job (i.e., the web app's job) is to just render stuff...not to think.

I'm not really sure a "like" button on the search results is actually a good idea. But if it was something we wanted to do, this is how we should do it.

xogeny commented 8 years ago

FYI, I'm inclined to simply change this to a "badge" or something. I don't really like the idea of having some kind of active link or embedded script in the search result. The key thing, from my perspective, is to eliminate the "I look like I can be clicked, but I really can't" issue.