-
-
Notifications
You must be signed in to change notification settings - Fork 1.7k
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
Cropping issue #98
Comments
Yeah it may be possible that rendered images are cropped from time to time because SVG renders differently based on OS/browser/environment 😕 You can adjust padding manually to mitigate this issue if needed 👍 |
Got it, thanks, I would close the issue but I'm on phone |
@lowlighter a suggestion is just making the svg bigger then it has to be? |
Yeah maybe default It's really hard to find the right compromise because each browser/os really have their own rendering (as it's essentially HTML/CSS), I even sometimes get display issues because Safari is so much behind other browsers like Firefox or Chrome that it's displaying flex box weirdly. An attempt I made was to provide embedded fonts for the classic template, but it looked really odd because the rest of webpage was using system fonts (which are different across OS) so it didn't fit, plus it was significantly increasing produced metrics file size. At least it's better now that when metrics was using static formulas 😅 |
same issue, i have an idea however. |
changing padding doesnt fix |
I'm not remembering whether you had problems with cropped bottom, or just cropped parts inside the SVG (image from first comment is gone) 😅 If that's the latter, it may be a CSS issue instead. Maybe tweaking line-height or div height may solve the problem |
This is now cutting stuff off at the bottom. So yes, cropped @lowlighter |
P.S check my profile for an example, scroll down to the bottom |
This may not be sufficient, maybe try to use something like Also, changes on profile page may not be instantaneous (as images are cached by GitHub). Checking directly your github-metrics.svg (or its raw version) may actually display a different result which is the real render (and seems to be fine, at least from my side) |
I've done both of those and unfortunately, this error persists. How would we fix it? |
I need to think a bit about it, I'll check it tomorrow |
Patch probably needs to be done somewhere here: metrics/source/app/metrics/utils.mjs Lines 118 to 138 in 882a93d
Maybe puppeteer load event is not enough but I'm not sure other options would solve it, as networkidle0 and networkidle0 won't change anything since metrics don't use any external content (images are all base64 encoded).It would explain why boundingRect is incorrectly reporting size. Best would probably to debug without headless mode and on a ubuntu system (same environment as GitHub action) check behaviour of But yeah unfortunately I don't see any other solution for now 😕 |
Sad, I do think this is somewhat high priority |
Yeah, I'll try to find a solution to patch it quickly |
Changes title as it makes more sense. See my profile for an example. |
So this is fixed in the v3.4 release, right? |
Not sure, that's why I didn't link it to v3.4 |
Woooohooo! Fixed 🗡️ |
http://i.fionn.live/76763f.png
The text was updated successfully, but these errors were encountered: