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

webpage: add missing titles + more badge previews #1305

Merged
merged 8 commits into from
Dec 5, 2017
Merged

webpage: add missing titles + more badge previews #1305

merged 8 commits into from
Dec 5, 2017

Conversation

tooomm
Copy link
Contributor

@tooomm tooomm commented Dec 1, 2017

Node 9 support (#1290)
over
Github rate limits cause transient service test failures in CI (#979)

Was messing around with the layout due to the very wide column needed:
untitled

Follow-up commit will fix tests (editing from web).

`Node 9 support` (#1290)
over
`Github rate limits cause transient service test failures in CI` (#979)
@tooomm
Copy link
Contributor Author

tooomm commented Dec 1, 2017

Shouldn't the first commit fail? :)

@paulmelnikow
Copy link
Member

I think this was already fixed in #1297. You can see what it looks like here:
https://shields-staging.herokuapp.com/

The tests and the example page are independent. They don't need to match.

@paulmelnikow paulmelnikow added the frontend The Docusaurus app serving the docs site label Dec 1, 2017
@tooomm
Copy link
Contributor Author

tooomm commented Dec 1, 2017

From #1297 (review)

This badge is really wide. Omitting previewUri prevents the badge from displaying and growing the column too wide.

Isn't that more of a workaround instead a fix? ;)
Not having a preview at all feels bad. That's a very important part of the shields site, no?
If you agree, I would switch it back to previewUri for that one (with the shorter issue).

From shields-staging.herokuapp.com:
preview
(There are several badges having no description/headline, too!)


The tests and the example page are independent. They don't need to match.

Makes sense, the test itself is still valid. For me it sounds more logical to match them though.

@paulmelnikow
Copy link
Member

Eh, it's the same workaround as several of the other long badges.

I do think they should all have a title / headline…

@tooomm
Copy link
Contributor Author

tooomm commented Dec 1, 2017

Eh, it's the same workaround as several of the other long badges.

TeamCity (full build status) is the only other one which seems to be missing a badge preview.
Problem there is that you can't even enter preview mode at all if you try to click the example link.
Edit: there is Issue Stats (long form) and Pull Request Stats (long form) missing preview badges too. fixed in 3cb6270

I do think they should all have a title / headline…

Tried to fix that. Hope I hit all. Please double check, or could you deploy to Heroku review apps?
Edit: my second pass should catch all!

@paulmelnikow paulmelnikow temporarily deployed to shields-staging-pr-1305 December 1, 2017 22:40 Inactive
previewUri: '/issuestats/p/github/expressjs/express.svg'
},
{
title: '(long form)',
title: 'Pull Request Stats (long form)',
exampleUri: '/issuestats/p/long/github/expressjs/express.svg'
Copy link
Contributor Author

Choose a reason for hiding this comment

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

I changed the title here to match what the badge is showing.

Example badge shows: pull closure | 16 hrs

@paulmelnikow
Copy link
Member

TeamCity (full build status) is the only other one which seems to be missing a badge preview.
Problem there is that you can't even enter preview mode at all if you try to click the example link.

Hmm, it seems to be working on current staging:

screen shot 2017-12-01 at 5 42 24 pm

@tooomm
Copy link
Contributor Author

tooomm commented Dec 1, 2017

Not for me:
untitled

Clicking on either the name, the non-existant preview or the example link on the right doesn't open that window.
Actually it's not working for all other badges too! (Have a look at the shortened links all are displaying!)

@paulmelnikow
Copy link
Member

paulmelnikow commented Dec 1, 2017

Same here on the PR branch. You might try merging master into this one. Probably one of my recent commits fixed it.

To clarify:

Working: https://shields-staging.herokuapp.com/
Not working: https://shields-staging-pr-1305.herokuapp.com/

@tooomm
Copy link
Contributor Author

tooomm commented Dec 1, 2017

Can I request you to do so, please @paulmelnikow ?
I can only use the web interface right now.

done

@paulmelnikow paulmelnikow temporarily deployed to shields-staging-pr-1305 December 1, 2017 23:32 Inactive
@tooomm
Copy link
Contributor Author

tooomm commented Dec 1, 2017

Working: https://shields-staging.herokuapp.com
Not working: https://shields-staging-pr-1305.herokuapp.com

I'm sorry, but both have the same problem for me. Even after merging most recent badges/shields master to my fork (and this branch).
Neither open the preview window where you can do adjustments to the badge.

Edit: This is a Firefox and Edge problem... (using FF57 and Edge 41), on chromium it opens the preview! 🙈

Also, #1309 applies to both links and all 3 browsers!

@tooomm tooomm changed the title webpage: change to shorter example webpage: add missing titles + exchange github issue title example badge Dec 1, 2017
those example badges are actually not that big compared to others in that category
@paulmelnikow paulmelnikow temporarily deployed to shields-staging-pr-1305 December 2, 2017 14:12 Inactive
@tooomm tooomm changed the title webpage: add missing titles + exchange github issue title example badge webpage: add missing titles + enable more example badges Dec 2, 2017
@tooomm tooomm changed the title webpage: add missing titles + enable more example badges webpage: add missing titles + more badge previews Dec 2, 2017
@tooomm tooomm mentioned this pull request Dec 2, 2017
2 tasks
@paulmelnikow paulmelnikow temporarily deployed to shields-staging-pr-1305 December 4, 2017 15:20 Inactive
@tooomm
Copy link
Contributor Author

tooomm commented Dec 4, 2017

No empty titles anymore and all preview badges show.
(except that very big one for TeamCity (full build status) )

Last several comments are basically not relevant anymore due to #1322.

Can you revisit this @paulmelnikow?

@paulmelnikow
Copy link
Member

I'm fine with the badge changes, though the test change doesn't seem necessary. It's not necessary to keep them perfectly in sync.

This reverts commit 03389f8.
@paulmelnikow paulmelnikow merged commit f700502 into badges:master Dec 5, 2017
@tooomm tooomm deleted the patch-2 branch December 5, 2017 16:18
paulmelnikow added a commit that referenced this pull request Nov 15, 2018
This simplifies and further optimizes text-width computation by computing the entire width table in advance, and serializing it in the style of QuickTextMeasurer (#1390). This entirely removes the need for PDFKit at runtime. This has the advantage of fixing #1305 – more generally: producing the same result everywhere – without having to deploy a copy of Verdana.

The lifting is delegated to these three libraries, which are housed in a monorepo: https://github.com/metabolize/anafanafo

I'd be happy to move it into the badges org if folks want to collaborate on maintaining them.

QuickTextMeasurer took kerning pairs into account, whereas this implementation does not. I was thinking kerning would be a necessary refinement, though this seems to work well enough.

I dropped in a binary-search package to traverse the data structure, in part to conserve space. This causes a moderate performance regression, though there is ample room for improving on that: #2311 (comment)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
frontend The Docusaurus app serving the docs site
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants