Skip to content
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

Support named logos and omit logos by default #1092

Closed
wants to merge 9 commits into from
Closed

Support named logos and omit logos by default #1092

wants to merge 9 commits into from

Conversation

paulmelnikow
Copy link
Member

Unit tests are covering the new code very well, though the underlying functionality (logos) is untested.

@paulmelnikow paulmelnikow added frontend The React app and the infrastructure that supports it core Server, BaseService, GitHub auth labels Sep 25, 2017
This was referenced Sep 25, 2017
@techtonik
Copy link
Contributor

Many features in one go.

Omit the logo from a social badge using the query string: ?logo= (#983)

I would merge this one immediately.

Copy link
Member

@espadrine espadrine left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This patch looks great!

Could you look into why the Travis batch fails before I merge this?

return s !== undefined && /^(data:)([^;]+);([^,]+),(.+)$/.test(s);
}

function hasPrefix (s, prefix) {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For consistency's sake, could you avoid having a space between the function name and the opening parenthesis?
eg. function hasPrefix(s, prefix).

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sure, will change them. I don't think debating is worth it. #1082 is a more productive way forward.

@RedSparr0w
Copy link
Member

Could you look into why the Travis batch fails before I merge this?

Fairly sure this is just failing due to #979:

PR: badges/shields#1092
Error: 403 Forbidden

@paulmelnikow
Copy link
Member Author

Thanks for the review! Have updated the PR. If you merge #1095 that will fix the test failure. 😄

@paulmelnikow paulmelnikow deleted the overrides branch September 28, 2017 14:46
@paulmelnikow paulmelnikow restored the overrides branch September 28, 2017 14:46
@paulmelnikow
Copy link
Member Author

paulmelnikow commented Sep 28, 2017

Buh, I just closed this by accident. 😭 I'm going to go ahead and merge it into master. I've addressed the comments and the red build is due to #979.

paulmelnikow added a commit that referenced this pull request Sep 28, 2017
- Except for social badges, omit logos by default (#983)
- Omit the logo from a social badge using the query string: `?logo=`
  (#983)
- Opt in to named logos using the query string: `?logo=appveyor`
- Provide custom logo data as before: `?logo=data:image/png;base64,...`
- Rewrite badge data functions, with unit tests

Unit tests are covering the new code very well, though the underlying
functionality (logos) is untested.

Close #983
@paulmelnikow paulmelnikow deleted the overrides branch September 28, 2017 14:49
@tooomm
Copy link
Contributor

tooomm commented Sep 29, 2017

Shouldn't appveyor lose it's logo with this now?

Also, I can't find any information/details about that new behavior or named logo explanation etc. on the shields webpge.

@paulmelnikow
Copy link
Member Author

Right, there should be some explanation on the homepage. I'll get a pull request open with that.

As far as appveyor, the logo is still there because this change hasn't been deployed yet.

This was referenced Sep 30, 2017
@TylerLeonhardt
Copy link
Contributor

Nice! Just curious what logos are supported with these changes

@paulmelnikow
Copy link
Member Author

Here's the list as of what is currently deployed: https://github.com/badges/shields/tree/gh-pages/logo

@techtonik
Copy link
Contributor

I've lost the thread - is there a PR that has been committed instead of this one? I'd like to see how logo removal is implemented.

@RedSparr0w
Copy link
Member

@techtonik think it is #1092

@techtonik
Copy link
Contributor

@RedSparr0w it is #1092 already. =)

@TylerLeonhardt
Copy link
Contributor

@paulmelnikow Thanks for that! If I want to contribute an svg, are there any requirements? (single color, etc)

@paulmelnikow
Copy link
Member Author

@tylerl0706 To stay on topic, let's discuss that in #1107.

paulmelnikow added a commit that referenced this pull request Oct 9, 2017
@techtonik
Copy link
Contributor

Requiring people to opt-in for logos by duplicating badge names looks crude - https://img.shields.io/appveyor/ci/Eldinnie/python-telegram-bot/master.svg?logo=appveyor. I still think the ideal way is to opt-out from them with https://img.shields.io/appveyor/ci/Eldinnie/python-telegram-bot/master.svg?logo=

@tooomm
Copy link
Contributor

tooomm commented Oct 9, 2017

I understand that, for a clean and more uniform look of all badges, it defaults to off.
But an easier way to enable badges would be to allow ?logo=yes, ?logo=show, ?logo=enabled or ?logo=on etc.

The badge link basically contains its reference for a service logo already.

img.shields.io/appveyor/ci

I'm pretty sure there is some pattern. :)

@paulmelnikow
Copy link
Member Author

Nice idea. Or ?logo=default. That would be a nice refinement, and not too hard to accomplish.

@techtonik
Copy link
Contributor

I am still not convinced on defaults without logo - https://shields.io/ - all badges look the same without it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
core Server, BaseService, GitHub auth frontend The React app and the infrastructure that supports it
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants