-
-
Notifications
You must be signed in to change notification settings - Fork 5.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
Add links for [Github] Activity Badges #6096
Conversation
Add link for github badges
Several of these badges are not in the social category, and as I recall we only permit (by practice) setting links for badges in the social category because the social badge renderer is the only one that will actually do it. @paulmelnikow @chris48s - you're both far more familiar with the renderers than I, any concerns/issues/etc. with adding default links to non-social badges in the service class definitions? |
@calebcartwright I have asked the same question on the issue #2271 |
Yeah we have tended to only do this for social badges, but we say in the guidelines
https://github.com/badges/shields/blob/master/spec/SPECIFICATION.md#guidelines I did a quick search and we do currently have two non-social badges that include a link by default:
There's no issue with rendering a link on a non-social badge per-se (e.g: https://img.shields.io/dependabot/semver/bundler/puma ) but it is an uncommonly used/not very useful feature because almost everyone embeds badges with an Even if we do add link attrs by default to a bunch of other badges, I think I'm not in favour of allowing link in the frontend previews on the home page, otherwise the frontpage of https://shields.io/ turns into a really random bag of links out to other disparate stuff. Sorry. That's not really a decision.. |
Is this in reference to the badge listings? |
I've got some concerns about plugging in all these links too, though aren't all the badge listings configured to just pop up the badge builder? I didn't think any of them would navigate out to an external site instead of launching the builder window (but if they would I definitely share your concern) I think my two main concerns are: the side effects of #6042 (I could've sworn we had an existing issue for this, but can't find one. Maybe because it's just a well-known behavior and considered more of an expectation than a bug). If we move to a position where we have entirely separate (or even somewhat disjointed) examples and render functions, as would be required today to move forward with these changes, then I feel like we're going to greatly increase the surface for potential drift between the badge listings and the actual badges, and/or add annoying little maintenance paper cuts (since tweaks to the actual rendering logic would no longer necessarily be automatically reflected in the listings) and this 👇 especially since markdown/GitHub are where are badges used most, and the embedded links just don't work
|
Yes - they currently launch the builder modal. I'm just saying whatever we do re #6042 should not change that - they should continue to launch the builder modal. |
Gotcha, and agreed 👍 |
I totally agree that static previews should not have links in them. @chris48s @calebcartwright what's your final decision regarding adding links to badges other than the ones present in social template (not in static previews but otherwise)? |
Somewhat related aside - I updated the PR title to follow our conventions so that the associated tests would be run, and these changes definitely seem to be causing some non-specious test failures. We'd definitely need to have CI passing for any of the changes to be potentially mergeable. As for the changes themselves.. I don't think we'll be able to proceed in the immediately foreseeable future, but that doesn't necessarily mean we won't ever accept some or even all of these changes. There's been some potential concerns raised, and there's also a few decisions that we'll need to make first given the potential impacts those decisions could have here. For the time being I think folks that want clickable badges would want to follow the current recommendation of utilizing the corresponding markdown/markup/etc. syntax based on the context in which they're using the badges. |
Does anyone else from the core team have a view on this one? @paulmelnikow ? @PyvesB ? |
I would tend to agree with this statement. It would be nice to convey this on the documentation of As a side note, I'm a bit annoyed that we've ended with somewhat inconsistent practices. Is there really no good reason why we've been adding default links to social badges? I'm guessing we probably have to live with it at this point, but we could add a note to our guidelines and remove default links from the two deviant non-social badges. |
The twitter and github fork/star/watch badges have had default links for a really really long time (since 2015) and are quite widely used which kind of set that precedent for default links on social badges. |
I updated our contributing guidelines a few weeks ago to clarify that only badges which have a default style equal to Thanks for opening this @rajat19, even if it didn't get merged, it ultimately resulted in a useful discussion and an improvement of our guidelines. 👍🏻 |
Part of solving #2271
Currently Covers all badges included in activity section which includes following
/github/all-contributors
/github/commit-activity
/github/commit-since
/github/commit-since
/github/commit-since
/github/commit-since
/github/commit-since
/github/commit-since
/github/commit-since
/github/contributors
/github/last-commit
/github/last-commit
/github/release-date
/github/release-date-pre
Got issue #6042 while working on this