Skip to content

fix(svg): support dynamic text-overflow scaling for extremely long usernames#6122

Merged
JhaSourav07 merged 1 commit into
JhaSourav07:mainfrom
MasterJi27:fix/dynamic-username-scaling-5248
Jun 21, 2026
Merged

fix(svg): support dynamic text-overflow scaling for extremely long usernames#6122
JhaSourav07 merged 1 commit into
JhaSourav07:mainfrom
MasterJi27:fix/dynamic-username-scaling-5248

Conversation

@MasterJi27

Copy link
Copy Markdown
Contributor

Fixes #5248

…ernames

Closes JhaSourav07#5248

- Increase MAX_USERNAME_DISPLAY_LENGTH to 20
- Add getUsernameFontSize() to calculate scaling font-size for usernames longer than 12 chars
- Apply getUsernameFontSize() to text tags inside generator.ts and VersusPanel.tsx
- Add and update unit tests for username truncation and scaling
@vercel

vercel Bot commented Jun 20, 2026

Copy link
Copy Markdown
Contributor

@MasterJi27 is attempting to deploy a commit to the jhasourav07's projects Team on Vercel.

A member of the Team first needs to authorize it.

@github-actions

Copy link
Copy Markdown
Contributor

📦 Next.js Bundle Size Report (Gzipped Sizes)

✨ No significant bundle size changes detected.

📊 Summary of Totals

Category PR Size Base Size Difference
Total JS 3694.34 KB 3694.34 KB 0 B
Total CSS 296.06 KB 296.06 KB 0 B

@Aamod-Dev Aamod-Dev added GSSoC 2026 mentor:Aamod007 level:advanced Complex contributions involving architecture, optimization, or significant feature work quality:clean PR follows clean coding practices, proper formatting, documentation, and maintainability standards. feature A completely new feature or major addition to the project. Design Creating new color themes, favicons, or Figma mockups. labels Jun 21, 2026

@Aamod-Dev Aamod-Dev left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

This is a great enhancement for UI robustness. Applying getUsernameFontSize in lib/svg/components/VersusPanel.tsx ensures that extremely long usernames don't break out of the SVG boundaries. The math rounding is a nice touch for cleaner SVG output. Approved!

@JhaSourav07 JhaSourav07 added the gssoc:approved PR has been reviewed and accepted for valid contribution points label Jun 21, 2026
@JhaSourav07 JhaSourav07 merged commit f0a6fc2 into JhaSourav07:main Jun 21, 2026
11 of 12 checks passed
@github-actions

Copy link
Copy Markdown
Contributor

🎉 Congratulations @MasterJi27! Your PR has been successfully merged. 🚀

Thank you for contributing to CommitPulse. Your work helps us build a better tool for the community.

⚠️ Important for GSSoC Contributors:
You are strictly advised to join our Discord Server as it is mandatory for all GSSoC participants. All important announcements, point claims, and community discussions happen there.

Keep building! 💻✨

@github-actions github-actions Bot added this to the GSSoC 2026 milestone Jun 21, 2026
@github-actions github-actions Bot added the type:bug Something isn't working as expected label Jun 21, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Design Creating new color themes, favicons, or Figma mockups. feature A completely new feature or major addition to the project. gssoc:approved PR has been reviewed and accepted for valid contribution points GSSoC 2026 level:advanced Complex contributions involving architecture, optimization, or significant feature work mentor:Aamod007 quality:clean PR follows clean coding practices, proper formatting, documentation, and maintainability standards. type:bug Something isn't working as expected

Projects

None yet

Development

Successfully merging this pull request may close these issues.

bug: Dynamic text-overflow scaling for extremely long usernames

3 participants