Skip to content

Conversation

mahir-ordex
Copy link

Bug Fix: WakaTime Compact Layout Consistency

Problem

The WakaTime and Top Languages cards had inconsistent compact layout grid ordering:

  • WakaTime: Used row-first filling (horizontal: 1-2 | 3-4 | 5-6)
  • Top Languages: Used column-first filling (vertical: 1-3-5 | 2-4-6)

This created visual inconsistency when both cards were used together.

Solution

  • Changed WakaTime layout from index % 2 to index < halfLength logic
  • Added configurable lineHeight parameter for better spacing control
  • Updated height calculation to use dynamic line height
  • Both cards now use consistent column-first layout pattern

Changes Made

  • Modified createLanguageTextNode function in src/cards/wakatime.js
  • Added lineHeight parameter with default value of 25px
  • Fixed Y-position calculations for proper alignment
  • Updated compact layout height calculation

Testing

  • All 230 tests passing
  • Backward compatibility maintained
  • 96.95% code coverage preserved

-Fixes #4432

Copy link

vercel bot commented Sep 29, 2025

@mahir-ordex 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 Sep 29, 2025
Copy link
Collaborator

@qwerty541 qwerty541 left a comment

Choose a reason for hiding this comment

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

Hello @mahir-ordex

Thank you for opening pull request. I appreciate your interest in our project.

We already have a pull request #4435 about the problem. Recently I left a review there #4435 (review) and all it's points related to your changes as well.

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.

Compact layout grid order between WakaTime and Top Languages cards is inconsistent
2 participants