Closed TomasHubelbauer closed 6 years ago
Is this the little # of github stars widget? I'm sure we could find a better one than the "official" github one.
Yeah. It's text is white and it also downloads buttons.css
asynchronously which messes with the body
.
This might be nice, it uses the user's IP to talk to the GitHub rate-limited API to get the stars. We could rebuilt the design statically and just load in the number. And if the rate limit is exceeded, it's just for that user.
I'll spike that and if it looks okay will suggest we migrate to it.
Woot I just noticed Zeit covered the surprise charge, I'm super duper glad for that! π π
HA!
HTMLElement.prototype.attachShadow)
It's the same issue as https://github.com/isomorphic-git/isomorphic-git.github.io/issues/19. They're attempting to use the Shadow DOM.
Yup. #19 works for me as it probably just doesn't pull any styles and the rest of the shadow DOM features works in latest FF. Maybe it can be worked around by !important
ing (yeah I said it) the white-space
on our end so they can't break it and then we can just wait out proper shadow DOM support so it fixes itself in time.
@TomasHubelbauer Let's build our own Github Star Count!
I've simplified and modernized stretchr/github-stars
. Here we are:
githubStars = async (repo) =>
(await fetch(`https://api.github.com/repos/${repo}',
{headers:{accept:'application/vnd.github.v3+json'}}).then(x => x.json())).stargazers_count
LOL we don't even need to !imporant
it because attribute style beats the weakass stylesheet file rule. I'll add it.
Sure I'll do that in a separate PR and fix the overflow with the trick above first.
π€¦ββοΈ (No need to fix this since we are going to be replacing GitHub buttonsβ¦ Don't mind meβ¦)
I mean... we could try to fix Github's CSS. But they have all the resources of Microsoft and they still make a bloated Buttons.js
that could easily have a tracker in there for all we know.
It's an unofficial 3rd party thingy, not GitHub's own CSS (but that only reinforces the point about it containing a tracker for all we know).
Docusaurus uses React, so if you know React you could make a little React component.
Or we could just file the issue on ... wait it is? (double checks) oh mtsdfkljer. You're right LOL. It's just a github.IO page
Well heck, let's just open an issue there
It looks like the Shadow DOM thing was added less than 24 hours ago.
So I propose we sit on our butt for a day and see if somebody else will fix this problem. π hint hint button breaker
Unless you feel like making your own. π
Eh... IDK it is really broken. π€ I think I'll yank the Github Stars widget temporarily.
Give me 5 to learn Docusaurus and add our own counter - still good you filed the issue with them though you'll save other sites!
π Alright, I'm hands off! If it doesn't work out, you can merge the backup plan.
I actually like this even better than what we had before! It's got a consistent look & feel with the other links.
On top of that the GitHub button ends up being visually broken too in FF.
I'll investigate if this is a (known?) issue with them or if we can work around it.