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 static preview with social style #2479

Closed
paulmelnikow opened this issue Dec 8, 2018 · 2 comments
Closed

Support static preview with social style #2479

paulmelnikow opened this issue Dec 8, 2018 · 2 comments
Labels
blocker PRs and epics which block other work core Server, BaseService, GitHub auth, Shared helpers

Comments

@paulmelnikow
Copy link
Member

The social badges have typically included ?style=social. However staticPreview returns serviceData which does not support the style parameter. This makes it impossible to render a static preview for the social badges.

e.g.

staticPreview: {
label: 'Follow',
message: '150',
// style: 'social',
},

This also came up in #2473 where I was adding an Endpoint badge, and thinking we should make it possible for a developer to make a badge which defaults to a particular style.

I'm not totally convinced we should do that. In some ways it violates a user's expectation, which is that Shields will always default to flat. Should we also let the developer specify flat-square or for-the-badge? At the same time, these are custom badges, and it's useful to be able to include especially logos by default. Maybe it's okay, for custom badges.

@paulmelnikow paulmelnikow added the core Server, BaseService, GitHub auth, Shared helpers label Dec 8, 2018
@chris48s
Copy link
Member

chris48s commented Dec 8, 2018

Given we've only got 6 social badges in the home page examples (out of some-hundred in total), I reckon static preview for social badges would be nice to have but its quite low priority.

@paulmelnikow
Copy link
Member Author

It's true it's not so important to render it statically, though it would be nice to drop support for exampleUrl which adds complexity in BaseService and the frontend.

@paulmelnikow paulmelnikow mentioned this issue Dec 10, 2018
12 tasks
@paulmelnikow paulmelnikow added the blocker PRs and epics which block other work label Jan 4, 2019
paulmelnikow added a commit that referenced this issue Jan 25, 2019
paulmelnikow added a commit that referenced this issue Jan 29, 2019
The static previews don't support the social badges. Adding that lets us remove support for `exampleUrl`. Close #2479.

This includes `style` and `namedLogo` in the service-definition export and updates the frontend to use it. To accomplish this, it passes `namedLogo` through `coalesceBadge`. After logo resolution is moved to `makeBadge` this duplication can be removed, as `logo` will no longer be needed in the result of `coalesceBadge`.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
blocker PRs and epics which block other work core Server, BaseService, GitHub auth, Shared helpers
Projects
None yet
Development

No branches or pull requests

2 participants