Skip to content

Commit 1e4c8f5

Browse files
authored
Sunsetting Shields custom logos (#10347)
* Sunsetting Shields custom logos * Reinstate info to contribute to SimpleIcons * Mention that no changes are required
1 parent 67deddb commit 1e4c8f5

25 files changed

+82
-233
lines changed

CONTRIBUTING.md

+9-4
Original file line numberDiff line numberDiff line change
@@ -77,6 +77,15 @@ don't see it, feel free to [open a new issue][open an issue].
7777

7878
[open an issue]: https://github.com/badges/shields/issues/new/choose
7979

80+
### Requesting new logos
81+
82+
We consume logos via [the SimpleIcons project][simple-icons github], and
83+
encourage you to contribute logos there. Please review their
84+
[guidance][simple-icons contributing] before doing so.
85+
86+
[simple-icons github]: https://github.com/simple-icons/simple-icons
87+
[simple-icons contributing]: https://github.com/simple-icons/simple-icons/blob/develop/CONTRIBUTING.md
88+
8089
### Spreading the word
8190

8291
Feel free to star the repository. This will help increase the visibility of the project, therefore attracting more users and contributors to Shields!
@@ -154,10 +163,6 @@ To run the integration tests:
154163

155164
There is a [High-level code walkthrough](doc/code-walkthrough.md) describing the layout of the project.
156165

157-
### Logos
158-
159-
We have [documentation for logo usage](doc/logos.md) which includes [contribution guidance](doc/logos.md#contributing-logos)
160-
161166
## Pull Requests
162167

163168
All code changes are incorporated via pull requests, and pull requests are always squashed into a single commit on merging. Therefore there's no requirement to squash commits within your PR, but feel free to squash or restructure the commits on your PR branch if you think it will be helpful. PRs with well structured commits are always easier to review!

README.md

-3
Original file line numberDiff line numberDiff line change
@@ -223,9 +223,6 @@ Alumni:
223223
All assets and code are under the [CC0 LICENSE](LICENSE) and in the public
224224
domain unless specified otherwise.
225225

226-
The assets in `logo/` are trademarks of their respective companies and are
227-
under their terms and license.
228-
229226
## Community
230227

231228
Thanks to the people and companies who donate money, services or time to keep the project running. [https://shields.io/community](https://shields.io/community)

core/base-service/coalesce-badge.js

+4-6
Original file line numberDiff line numberDiff line change
@@ -17,12 +17,10 @@ import toArray from './to-array.js'
1717
//
1818
// Logos are resolved in this manner:
1919
//
20-
// 1. When `?logo=` contains a named logo or the name of one of the Shields
21-
// logos or contains base64-encoded SVG, that logo is used. When a
22-
// `&logoColor=` is specified, that color is used (except for the
23-
// base64-encoded logos). Otherwise the default color is used. If the color
24-
// is specified for a multicolor Shield logo, the named logo will be used and
25-
// colored. The appearance of the logo can be customized using `logoWidth`,
20+
// 1. When `?logo=` contains a simple-icons logo or contains a base64-encoded
21+
// SVG, that logo is used. When a `&logoColor=` is specified, that color is
22+
// used (except for the base64-encoded logos). Otherwise the default color
23+
// is used. The appearance of the logo can be customized using `logoWidth`,
2624
// When `?logo=` is specified, any logo-related parameters specified
2725
// dynamically by the service, or by default in the service, are ignored.
2826
// 2. The second precedence is the dynamic logo returned by a service. This is

core/base-service/coalesce-badge.spec.js

+12-39
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import { expect } from 'chai'
2-
import { getShieldsIcon, getSimpleIcon } from '../../lib/logos.js'
2+
import { getSimpleIcon } from '../../lib/logos.js'
33
import coalesceBadge from './coalesce-badge.js'
44

55
describe('coalesceBadge', function () {
@@ -138,7 +138,7 @@ describe('coalesceBadge', function () {
138138
})
139139

140140
it('when a social badge, uses the default named logo', function () {
141-
// .not.be.empty for confidence that nothing has changed with `getShieldsIcon()`.
141+
// .not.be.empty for confidence that nothing has changed with `getSimpleIcon()`.
142142
expect(
143143
coalesceBadge({ style: 'social' }, {}, { namedLogo: 'appveyor' }).logo,
144144
).to.equal(getSimpleIcon({ name: 'appveyor' })).and.not.be.empty
@@ -149,52 +149,35 @@ describe('coalesceBadge', function () {
149149
namedLogo: 'npm',
150150
})
151151
expect(coalesceBadge({}, { namedLogo: 'npm' }, {}).logo).to.equal(
152-
getShieldsIcon({ name: 'npm' }),
152+
getSimpleIcon({ name: 'npm' }),
153153
).and.not.to.be.empty
154154
})
155155

156-
it('applies the named monochrome logo with color', function () {
156+
it('applies the named logo with color', function () {
157157
expect(
158158
coalesceBadge({}, { namedLogo: 'dependabot', logoColor: 'blue' }, {})
159159
.logo,
160-
).to.equal(getShieldsIcon({ name: 'dependabot', color: 'blue' })).and.not
160+
).to.equal(getSimpleIcon({ name: 'dependabot', color: 'blue' })).and.not
161161
.to.be.empty
162162
})
163163

164-
it('applies the named multicolored logo with color', function () {
165-
expect(
166-
coalesceBadge({}, { namedLogo: 'npm', logoColor: 'blue' }, {}).logo,
167-
).to.equal(getSimpleIcon({ name: 'npm', color: 'blue' })).and.not.to.be
168-
.empty
169-
})
170-
171164
it('overrides the logo', function () {
172165
expect(
173166
coalesceBadge({ logo: 'npm' }, { namedLogo: 'appveyor' }, {}).logo,
174-
).to.equal(getShieldsIcon({ name: 'npm' })).and.not.be.empty
167+
).to.equal(getSimpleIcon({ name: 'npm' })).and.not.be.empty
175168
})
176169

177-
it('overrides the monochrome logo with a color', function () {
170+
it('overrides the logo with a color', function () {
178171
expect(
179172
coalesceBadge(
180173
{ logo: 'dependabot', logoColor: 'blue' },
181174
{ namedLogo: 'appveyor' },
182175
{},
183176
).logo,
184-
).to.equal(getShieldsIcon({ name: 'dependabot', color: 'blue' })).and.not
177+
).to.equal(getSimpleIcon({ name: 'dependabot', color: 'blue' })).and.not
185178
.be.empty
186179
})
187180

188-
it('overrides multicolored logo with a color', function () {
189-
expect(
190-
coalesceBadge(
191-
{ logo: 'npm', logoColor: 'blue' },
192-
{ namedLogo: 'appveyor' },
193-
{},
194-
).logo,
195-
).to.equal(getSimpleIcon({ name: 'npm', color: 'blue' })).and.not.be.empty
196-
})
197-
198181
it("when the logo is overridden, it ignores the service's logo color and width", function () {
199182
expect(
200183
coalesceBadge(
@@ -206,35 +189,25 @@ describe('coalesceBadge', function () {
206189
},
207190
{},
208191
).logo,
209-
).to.equal(getShieldsIcon({ name: 'npm' })).and.not.be.empty
192+
).to.equal(getSimpleIcon({ name: 'npm' })).and.not.be.empty
210193
})
211194

212-
it("overrides the service monochome logo's color", function () {
195+
it("overrides the service logo's color", function () {
213196
expect(
214197
coalesceBadge(
215198
{ logoColor: 'blue' },
216199
{ namedLogo: 'dependabot', logoColor: 'red' },
217200
{},
218201
).logo,
219-
).to.equal(getShieldsIcon({ name: 'dependabot', color: 'blue' })).and.not
202+
).to.equal(getSimpleIcon({ name: 'dependabot', color: 'blue' })).and.not
220203
.be.empty
221204
})
222205

223-
it("overrides the service multicolored logo's color", function () {
224-
expect(
225-
coalesceBadge(
226-
{ logoColor: 'blue' },
227-
{ namedLogo: 'npm', logoColor: 'red' },
228-
{},
229-
).logo,
230-
).to.equal(getSimpleIcon({ name: 'npm', color: 'blue' })).and.not.be.empty
231-
})
232-
233206
// https://github.com/badges/shields/issues/2998
234207
it('overrides logoSvg', function () {
235208
const logoSvg = 'data:image/svg+xml;base64,PHN2ZyB4bWxu'
236209
expect(coalesceBadge({ logo: 'npm' }, { logoSvg }, {}).logo).to.equal(
237-
getShieldsIcon({ name: 'npm' }),
210+
getSimpleIcon({ name: 'npm' }),
238211
).and.not.be.empty
239212
})
240213
})

core/base-service/openapi.js

+3-3
Original file line numberDiff line numberDiff line change
@@ -124,7 +124,7 @@ function category2openapi({ category, services, sort = false }) {
124124
in: 'query',
125125
required: false,
126126
description:
127-
'One of the named logos (bitcoin, dependabot, gitlab, npm, paypal, serverfault, stackexchange, superuser, telegram, travis) or simple-icons. All simple-icons are referenced using icon slugs. You can click the icon title on <a href="https://simpleicons.org/" rel="noopener noreferrer" target="_blank">simple-icons</a> to copy the slug or they can be found in the <a href="https://github.com/simple-icons/simple-icons/blob/master/slugs.md">slugs.md file</a> in the simple-icons repository. <a href="/docs/logos">Further info</a>.',
127+
'Icon slug from simple-icons. You can click the icon title on <a href="https://simpleicons.org/" rel="noopener noreferrer" target="_blank">simple-icons</a> to copy the slug or they can be found in the <a href="https://github.com/simple-icons/simple-icons/blob/master/slugs.md">slugs.md file</a> in the simple-icons repository. <a href="/docs/logos">Further info</a>.',
128128
schema: {
129129
type: 'string',
130130
},
@@ -135,7 +135,7 @@ function category2openapi({ category, services, sort = false }) {
135135
in: 'query',
136136
required: false,
137137
description:
138-
'The color of the logo (hex, rgb, rgba, hsl, hsla and css named colors supported). Supported for named logos and Shields logos but not for custom logos. For multicolor Shields logos, the corresponding named logo will be used and colored.',
138+
'The color of the logo (hex, rgb, rgba, hsl, hsla and css named colors supported). Supported for simple-icons logos but not for custom logos.',
139139
schema: {
140140
type: 'string',
141141
},
@@ -146,7 +146,7 @@ function category2openapi({ category, services, sort = false }) {
146146
in: 'query',
147147
required: false,
148148
description:
149-
'Make icons adaptively resize by setting `auto`. Useful for some wider logos like `amd` and `amg`. Supported for simple-icons logos only.',
149+
'Make icons adaptively resize by setting `auto`. Useful for some wider logos like `amd` and `amg`. Supported for simple-icons logos but not for custom logos.',
150150
schema: {
151151
type: 'string',
152152
},

core/base-service/openapi.spec.js

+3-3
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@ const expected = {
8080
in: 'query',
8181
required: false,
8282
description:
83-
'One of the named logos (bitcoin, dependabot, gitlab, npm, paypal, serverfault, stackexchange, superuser, telegram, travis) or simple-icons. All simple-icons are referenced using icon slugs. You can click the icon title on <a href="https://simpleicons.org/" rel="noopener noreferrer" target="_blank">simple-icons</a> to copy the slug or they can be found in the <a href="https://github.com/simple-icons/simple-icons/blob/master/slugs.md">slugs.md file</a> in the simple-icons repository. <a href="/docs/logos">Further info</a>.',
83+
'Icon slug from simple-icons. You can click the icon title on <a href="https://simpleicons.org/" rel="noopener noreferrer" target="_blank">simple-icons</a> to copy the slug or they can be found in the <a href="https://github.com/simple-icons/simple-icons/blob/master/slugs.md">slugs.md file</a> in the simple-icons repository. <a href="/docs/logos">Further info</a>.',
8484
schema: { type: 'string' },
8585
example: 'appveyor',
8686
},
@@ -89,7 +89,7 @@ const expected = {
8989
in: 'query',
9090
required: false,
9191
description:
92-
'The color of the logo (hex, rgb, rgba, hsl, hsla and css named colors supported). Supported for named logos and Shields logos but not for custom logos. For multicolor Shields logos, the corresponding named logo will be used and colored.',
92+
'The color of the logo (hex, rgb, rgba, hsl, hsla and css named colors supported). Supported for simple-icons logos but not for custom logos.',
9393
schema: { type: 'string' },
9494
example: 'violet',
9595
},
@@ -98,7 +98,7 @@ const expected = {
9898
in: 'query',
9999
required: false,
100100
description:
101-
'Make icons adaptively resize by setting `auto`. Useful for some wider logos like `amd` and `amg`. Supported for simple-icons logos only.',
101+
'Make icons adaptively resize by setting `auto`. Useful for some wider logos like `amd` and `amg`. Supported for simple-icons logos but not for custom logos.',
102102
schema: {
103103
type: 'string',
104104
},

dangerfile.js

-12
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,6 @@ const server = fileMatch('core/server/**.js', '!*.spec.js')
2222
const serverTests = fileMatch('core/server/**.spec.js')
2323
const legacyHelpers = fileMatch('lib/**/*.js', '!*.spec.js')
2424
const legacyHelperTests = fileMatch('lib/**/*.spec.js')
25-
const logos = fileMatch('logo/*.svg')
2625
const packageJson = fileMatch('package.json')
2726
const packageLock = fileMatch('package-lock.json')
2827
const secretsDocs = fileMatch('doc/server-secrets.md')
@@ -78,17 +77,6 @@ if (legacyHelpers.created) {
7877
)
7978
}
8079

81-
if (logos.created) {
82-
message(
83-
[
84-
':art: Thanks for submitting a logo. <br>',
85-
'Please ensure your contribution follows our ',
86-
'[guidance](https://github.com/badges/shields/blob/master/doc/logos.md#contributing-logos) ',
87-
'for logo submissions.',
88-
].join(''),
89-
)
90-
}
91-
9280
if (capitals.created || underscores.created) {
9381
fail(
9482
[

doc/logos.md

-42
This file was deleted.

0 commit comments

Comments
 (0)