Skip to content

Conversation

martin-mfg
Copy link
Contributor

Reducing the magic numbers in src/cards/wakatime.js as requested here.


While working on this I realized that the line let width = normalizedWidth - 5; doesn't make sense imo. The corresponding logic was originally introduced here, where width was set to 490 but the card width was set to 495 (in line 211). I think this was an accident back then. Indeed, when measuring pixels in the generated SVG, the progress bar is not quite centered, because it's 5px too short. This is why I removed the line let width = normalizedWidth - 5; in this PR.

old version, asymmetric progress bar
old

new version, symmetric progress bar:
new

Copy link

vercel bot commented Oct 7, 2025

@martin-mfg is attempting to deploy a commit to the github readme stats Team on Vercel.

A member of the Team first needs to authorize it.

@github-actions github-actions bot added the wakatime-card Issues related to the wakatime card. label Oct 7, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
wakatime-card Issues related to the wakatime card.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant