-
-
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
Convert more badges to use static previews #1961
Labels
good first issue
New contributors, join in!
performance-improvement
Related to performance or throughput of the badge servers
service-badge
New or updated service badge
Comments
niccokunzmann
added a commit
to niccokunzmann/shields
that referenced
this issue
Aug 24, 2018
@chris48s I tagged this "good first issue." Would you be up for updating your top post with a few sentences about how new contributors could go about helping with this? |
no probs. I've updated the top post |
This was referenced Nov 27, 2018
paulmelnikow
added a commit
that referenced
this issue
Dec 1, 2018
…amo] (#2407) It seems useful to accelerate #1961 even as the badge rewrites are still underway. This introduces a small amount of technical debt by hard-coding the static example, though continuing this work could allow us to eliminate the old ways of specifying examples. It seems like a decent tradeoff.
paulmelnikow
added a commit
that referenced
this issue
Dec 3, 2018
This was referenced Dec 3, 2018
Merged
paulmelnikow
added a commit
that referenced
this issue
Dec 4, 2018
Merged
paulmelnikow
added a commit
that referenced
this issue
Jan 11, 2019
- With examples using `pattern`s, allow building the URL from its component parts, including the query string. - Provide a button to copy the link, with an animation. To enable this for other badges, convert them to use a `pattern`: #1961.
This was referenced Jan 29, 2019
paulmelnikow
added a commit
that referenced
this issue
Jan 30, 2019
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
good first issue
New contributors, join in!
performance-improvement
Related to performance or throughput of the badge servers
service-badge
New or updated service badge
We show example badges on our home page but they don't need to show real data. For performance reasons, it is useful to render a badge using some fake example data instead of making a call to a real API. It is also useful to show the URL format in a parametrised form.
We can do this by switching from defining a
previewUrl
to defining:urlPattern
pattern
(the URL format in a parameterised form)exampleUrl
(a real badge URL the user can call if they want to)namedParams
(mappings of pattern placeholders to values for a real, working example)staticExample
(a JSON object or call to the service'srender()
function which generates a fake badge)You can find examples of service badges which use a
previewUrl
using this search:https://github.com/search?utf8=%E2%9C%93&q=previewUrl+user%3Abadges+repo%3Ashields+path%3A%2Fservices+language%3AJavaScript&type=Code&ref=advsearch&l=JavaScript&l=
An example pull request will probably look like this:
https://github.com/badges/shields/pull/2230/files
The text was updated successfully, but these errors were encountered: