-
-
Notifications
You must be signed in to change notification settings - Fork 21.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Discussion]: Showing attribution to the stats card #90
Comments
I think it is a nice thing when you can disable it, if we disclose that, I think it is a nice addition. It isn't much disruptive, I like it. @anuraghazra |
I really liked your Idea @anuraghazra 🧡 |
The card looks nice with the credit. One more thing, will it be default to not show the credits after giving a star to repo .Just add one more parameter to let people decide if they want to show credits or not, after giving star to repo, we will have our choice to show credits. |
I completely agree with you @anuraghazra. You deserve every bit of the credit as you have worked so hard. I love the idea and I would love to help and implement it if needed. |
Garvit, Yup that's right, I'll also add a option to show the credits, if the user manually set the show_credit options then we can skip the checking if the user is starred to save some milliseconds. |
I also agree and I think it's so good and helps other developers to use and find it easily. |
I like the idea, and the card looks good with the credits. Not very disruptive |
It is a good idea |
i agree and it's a good idea |
I woudls sugges to show a shortened version. The username/reponame is long, maybe sometrhing like git.io/readme-stats |
@sirwindfield yup good idea, i like this since it's also a direct link instead of an arbitrary username/reponame, btw how did you get the short url to be like that? because git.io generates random urls AFAIK |
|
Okay everyone i have a nicer solution to this, the checking if user is starred method is pretty nice but it would require us to do a API request to check if user is starred the repo, and i don't really want any performance degradation just because of showing credits. So second approach would be an extra query param to disable the credits but it would be something like this Yup very long |
Approach looks nice, but the query will become extra long if there are more query attached to it. |
Hmm yes. it would make it a bit longer, but it would make sure that whoever is copy pasting the link he/she would know the origin 🤔 I'm all ears for more ideas tho, which does not effect performance :) |
I dunno, in that case it could be just left out as well. I mean, people can just append it without starring, so I see no gain there tbh. It would just complicate the code base and bloat it without any real value. Do you happen to have statistics on how often your API is called per day, per hour, per minute? If it is still under 5000 an hour, you're fine. And that's probably the easiest way. IMO the best approach would be to run a scheduled fetcher on the running instance you're hosting, that fetches the API every 24/12 hours and caches the results (just the username). If someone makes the request, it checks if the username is inside the cached values and removes the URL. If not, it keeps the URL. It would result in a delay but I think that is a good compromise if you want to ensure that the users actually have your repository starred @anuraghazra |
Like, a simple JSON file, an array of usernames. Load it once every X hours from disk to update it. And just keep checking the loaded instance every time someone makes a request. |
I can do that, probably i have to write a Github Action to prefetch all the names who actually starred the repo. |
Ye, you could like create a workflow that fetches the list on schedule and pushes it to the repository. Or just some JS that uses the GraphQL API and returns the list. You already run a server, you can already use JS + timer for example. Or other technology. No need to write a whole action. |
@sirwindfield We cannot fetch all the stargazer count from api because they are limited to 100 paginations and i also don't want to run the request on runtime because of the performance issue thats why i would like to prefetch all the data with github actions |
Where did you find the pagination limit? I am skimming the documentation right now and I do not see any mention of pagination limits. Yes, items per page are limited, but not the number of pages. |
The API uses Relay based pagination which uses cursors: query {
repository(name:"github-readme-stats", owner: "anuraghazra") {
stargazers(after:"Y3Vyc29yOnYyOpIAzg2dds8", first: 100) {
pageInfo {
hasNextPage
hasPreviousPage
startCursor
endCursor
}
nodes {
login
}
}
}
} The first is the number of elements per page (from the front). You can get the last n as well using |
Fetching the data isn't an issue, I know I can use the cursor or just loop through each iteration to get all the stargazers usernames but the main problem is performance not the data fetching. That's what I'm also facing in #15 There are 1.7k stargazers and the number of requests we have to make will increase as the stargazers count increases and each graphql request will cause a performance delay and hit the api. So it's just not suitable to run the operation on runtime. We can just do it all in GitHub action to add all the user names in one file and we can then locally fetching them. We can also make the file an object with keys so that access is O(1) |
I agree with you @anuraghazra as It'll have a bad impact upon loading of the stats too. |
I've been thinking about this a bit, this is just my point of view and might not align with yours. I think forcing the users into starring the project to hide the attribution is not the way to go, as it makes the project feel a bit "starrcentric", I know the importance of a project being appreciated and supported but we should not force people to like something just to be able to hide the attribution. It feels wrong to me 😅 Also most people wont mind showing the attribution if its not too obstrusive. If we hide the attribution it will somewhat defy the purpose of the attribution as people will not see who built it, yeah we have a star but it will not bring more people to the project. Some ideas I had:If we add the option to hide it:
If we don't add the option to hide it:
What do you guys think about this? |
This is not the final decision tho, Thats why i proposed this solution #90 (comment)
I don't think we can switch to custom domain first because lot of people are already using the vercel domain & second i cannot buy a domain right now.
This is good but i don't want to brand myself i just want people to know the origin of the stats, thats why git.io link would be preferable. also people might not like another user's name on their readmes so the message would be "Powered by git.io/readme-stats" |
A little bit shorter: ⚡ by git.io/readme-stats |
Yep, that's why I removed the github, not needed. But I couldn't come up with something shorter that has the same expressiveness |
What about |
That could be an alternative |
Just throwing ideas. |
I think readme-stats is ok, it's more similar to the project name, yes md-stat is good but I think readme-stats matches the project title |
yeah, readme-stats is good for me too! |
I like it! Pretty nice @anuraghazra |
also @filiptronicek i'm going with simple undocumented Any suggestions on the parameter name? |
Can you try to center it and post some images of it? I.e. center the text with the summary circle. Curious if that is more pleasant to the eyes, it itches me a little bit that it is not centered, but I do get the decision behind it. Edit: on that note, I am only A+... :( |
I think |
Tried that does not look nice to me, also users can hide the rank circle so we cannot align to that respect. i think corner looks good |
@anuraghazra Vote for config that allows to align it in the center: EDIT: Is it by design that a card with hidden rank does still create a large border and is not compacted down? |
I do think that the middle looks the best to be honest. |
Ye, I do like the center one more! :) Any plans on adding it to the other cards as well? |
I dislike this idea. I would instead only politely point out in the README that the card should use the link to your repo as the hyperlink ( I have noticed that default behavior for me was to click the card in order to find out how it was generated. So this should solve it. There are two reasons as to why I think so:
So I am not sure who the other people are that agreed to the idea, but afaic they are all a little biased towards agreeing with you as they are contributors. PS I love this project ❤ If I would support after you introduced a change like this to promote yourself? No, because I believe open source should not be like that 😕 |
@creativecreatorormaybenot thanks for your opinions now if you read all of the above messages you should get what i'm doing.
Problem here is that, maybe you are linking the card that's fine i appreciate it, BUT 90% of the people are not doing that. and most of the people does not even know what's the origin of their readme stats card because mostly they get to use this tool by forking other people's readme or reading articles on the internet.
This is not a default behaviour, this would only happen when users would willingly link the image WITH the github readme stats github link.
It's not about being selfish, it's about getting the right attribution for work, It happens a lot actually, eg: core-js is a large project and they are literally advertising on the console. (people are mad about it because it makes the terminal console output longer)
I'm not promoting anything here, i'm just making sure whoever is using the project on their readme should know its origin and i'm asking for proper attribution. Also people can disable the attribution message if they want without any hesitation, with |
@anuraghazra Thank you for your response 👍🏽 I had indeed already read through the comments here - I wanted to politely point out that I dislike this approach, genuinely. There is not more to it 🙂 I disagree with your sentiment about exposure, though. Maybe you feel like you deserve more than 5k stars for this project. This is okay, however, I think that the following is not a correct assumption:
Instead, I would suggest that most of the people that do not come to your repo and leave appreciation actually do not care about it. They are simply not interested in knowing what is behind the project (this is of course only an assumption that I am making 😃 - I just want to throw it in here 🙃). Are you interested in how I discovered your project?
I saw the GitHub stats - searched for it using a search engine, found an article, and came straight to your repo from the article. Before that, I tried to click the stats to find out its origins, which I believe will happen a lot because the mouse pointer turns into a hand.
So what is the benefit for other people here? If someone would like to not redirect to another person from their personal README, they will not include the link. If they are fine with it, they will leave it in. IMO the text on the card just makes it ugly (just throwing it in, again - I do not think my opinion has more weight than the opinion of others here 👍🏽). |
Well, this is not an assumption, few days ago while writing this issue i opened vercel serverless logs and i literally opened each and everyone's github account to see if they are actually linking/attributing the original repo and sadly none did. & not just that i've seen various youtube videos/articles specifically talking about new github readmes & using github readme stats without actually linking/attributing the project.
Well if you think so then you should change your mindset. I value everyone's opinions whether i agree or not, i also agreed with @nombrekeff about not doing the stargazer checking because it makes the project "starrcentric"
This statement of yours is also not really nice, you can also contribute to the project and become a contributor, but does that changes your opinions & makes you biased towards me? No right? As a open source community we should only focus on engaging and having healthy discussion instead of concerning about who is biased towards whom. It's not about me, it's about the project. I'm really totally fine with your opinions and i really WANT to know your opinions, this is why i created this issue ❤️ Now let's talk about solution instead of discussing what is right or wrong.What if instead of making the attribution message option Opt-Out we make it Opt-In, if people would prefer to show the attribution and support the project they can enable it otherwise we won't show it. |
@anuraghazra I do believe that you have every right to ask for credit when you work so hard on something. Being open source means that you don't change for it and anyone can build on it. But I do not believe that being an opensource dictates no credit. Many many projects have compulsory credits such as many public app and website templates. Giving credit to the creator should be common behavior and I believe that you should have that feature. It is you being the bigger person by allowing people to opt out of it. I would love to give credits as it does feature on my profile readme too |
What is the url parameter to specify, to have the attribution ? I see many suggested throughout the issue, and have tried some. |
In all honesty, I do not see any problem with having it being opt-out. You started the project and promotion keeps it active and alive. Seeing other open source projects, that little banner won't annoy many people and if it does, they can opt-out. You have to clearly put a how-to somewhere though. Especially the line that uses the url and the emoji is so short, it's hardly taking up space. |
I agree with the support for it being opt-out. Another possible solution, what if it had the attribution message if the url refers to your vercel instance? And then either have it not displayed on seperate forked instances or have it be opt-out/opt-in. This would both better attribute the work going on here and decrease the load on your instance. |
I tend to agree with opt-out behavior here - Found this project being used for somebody else's profile, yet had to clone their repo and open README.md to figure out what they were using - unnecessarily hard. URL parameters sound like the best thing to do here - make it easy to give credit (given by default), and easy to hide the credit if you prefer to do it your own way (hide_credits=true). Forcing me to star a repository to disable it is just... wrong. |
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. |
Hi everyone,
I've seen many people using this project and i'm really happy with it but the one thing i'm not really happy with is that 90% of them actually did not even attributed the project in any way, and a good chunk of people don't even know the origin of the stats they are using.
i know i might sound like a jerk but this project i'm giving time and effort to develop and maintain & and i'm doing this for free,
So i think the project deserves proper credits/attributions.
So for this reason i was thinking that i should show a attribution message at the bottom of the card like this :-
Now here's the nice part.
People can actually hide the attribution text with a condition, they have to star the repo.
if a user starred the repo then he/she would not see any attribution message but if not starred then we would show attribution text. :D
So i would have some logic to check if the current user starred the project before showing the attribution text, i'm not the only one who did implemented this logic i've seen many similar projects doing the same, so i was thinking to enforce people to at least visit the repo once i would do this.
I just wanted to know what you all think about this, and if you have any thoughts or you wanna add something please comment below.
mentioning few contributors for their opinions: @filiptronicek @nombrekeff @garvit-joshi @ApurvShah007
The text was updated successfully, but these errors were encountered: