Skip to content

fix: truncate long repository descriptions with ellipsis#480

Merged
PRODHOSH merged 1 commit into
PRODHOSH:mainfrom
Ayush-0918:fix/truncate-repo-description-327
Jul 18, 2026
Merged

fix: truncate long repository descriptions with ellipsis#480
PRODHOSH merged 1 commit into
PRODHOSH:mainfrom
Ayush-0918:fix/truncate-repo-description-327

Conversation

@Ayush-0918

@Ayush-0918 Ayush-0918 commented Jul 17, 2026

Copy link
Copy Markdown
Contributor

Summary

This PR updates the repository description in ProfileReposSection to use Tailwind's line-clamp-2 utility instead of the existing inline WebKit line-clamp styles. This keeps long repository descriptions from stretching the repository cards while preserving a consistent layout.

Related Issue

Closes #327

Type of Change

  • Bug fix
  • New feature
  • Documentation update
  • Refactor
  • Chore / dependency update

Changes Made

  • Replaced the inline WebKit line-clamp styles with Tailwind's line-clamp-2 utility.
  • Preserved the existing spacing and typography.
  • Kept repository cards at a consistent height when descriptions are long.

AI Usage

  • I used AI for coding (ChatGPT) and I fully understand every change I made, including which functions I changed, why I changed them, and what side effects they could create

Used ChatGPT for guidance.

Screenshots (if UI change)

N/A

Checklist

  • I was assigned to the issue before opening this PR
  • My branch is up to date with main
  • Code works locally and I have tested it
  • No console.log left in src/
  • If schema changed — both schema.sql and a new migration file are included
  • If this is a UI change — I read DESIGN.md and followed the design system (colors, spacing, typography, components)
  • Docs updated if needed
  • PR title follows Conventional Commits format (feat:, fix:, docs:, etc.)
  • This PR description is written in my own words

Summary by CodeRabbit

  • Style
    • Improved repository description display by consistently limiting descriptions to two lines.
    • Preserved existing typography and spacing while simplifying the visual presentation.

@github-actions

Copy link
Copy Markdown
Contributor

Welcome to OSSfolio, @Ayush-0918! 🎉

Thank you for opening this pull request and contributing to the open-source community! 🚀

To ensure a smooth review process, please make sure you have:

  • Checked that your changes work locally and compile cleanly.
  • Followed the guidelines outlined in CONTRIBUTING.md.
  • Linked your PR to an open issue (e.g. Closes #ISSUE_NUMBER).

We will review your PR as soon as possible. Happy coding! 💻✨

@github-actions github-actions Bot added frontend Related to UI / Next.js UI Visual / design changes labels Jul 17, 2026
@coderabbitai

coderabbitai Bot commented Jul 17, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: ASSERTIVE

Plan: Pro Plus

Run ID: b53903f5-0f87-4681-bf8b-31ff43e6c18f

📥 Commits

Reviewing files that changed from the base of the PR and between 5d9f7cb and 37afad6.

📒 Files selected for processing (1)
  • src/components/profile/ProfileReposSection.tsx

📝 Walkthrough

Walkthrough

Repository descriptions in ProfileReposSection now use the line-clamp-2 CSS class for two-line truncation, while inline styling retains typography and layout properties.

Changes

Repository description truncation

Layer / File(s) Summary
Apply CSS line clamping
src/components/profile/ProfileReposSection.tsx
Replaces inline WebKit clamping styles with line-clamp-2 and retains typography and spacing styles, including lineHeight.

Estimated code review effort: 1 (Trivial) | ~2 minutes

Suggested labels: ELUSOC, completed, NEWBIE

Suggested reviewers: aditya8369

Poem

I’m a rabbit with a tidy card,
Two little lines, not stretched too far.
Old clamp styles hop away,
CSS keeps text neat today.
Long descriptions rest in place—
Snugly trimmed with bunny grace.

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly matches the main change: truncating long repository descriptions with an ellipsis.
Linked Issues check ✅ Passed The change implements the requested line-clamp truncation in ProfileReposSection and addresses the stretching issue.
Out of Scope Changes check ✅ Passed The only change described is the requested repository-description truncation in the target component.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@Ayush-0918

Copy link
Copy Markdown
Contributor Author

Hi! I noticed that the failing checks appear to be unrelated to this change.

This PR only updates ProfileReposSection.tsx to use Tailwind's line-clamp-2 utility for truncating long repository descriptions. The failing Playwright test seems to be in the API error handling E2E tests.

Please let me know if you'd like me to investigate further.

@PRODHOSH
PRODHOSH self-requested a review July 18, 2026 05:17
@PRODHOSH PRODHOSH added ELUSOC ELUSOC project submission completed NEWBIE Beginner — 10 pts beginner Good for newcomers labels Jul 18, 2026
@PRODHOSH
PRODHOSH merged commit 75cdb75 into PRODHOSH:main Jul 18, 2026
8 of 11 checks passed
@github-actions

Copy link
Copy Markdown
Contributor

🎉 Your PR just got merged, @Ayush-0918 — thank you for contributing to OSSfolio!

Your work is now part of the project. Here's what to do next:

  • ⭐ If you haven't already, consider giving the repo a star — it helps us grow.
  • 📢 Share your contribution on LinkedIn, Twitter, or wherever you hang out. You shipped open source!
  • 🔍 Browse other open issues if you want to keep contributing.

We really appreciate you taking the time. See you in the next PR! 🚀

@Ayush-0918

Copy link
Copy Markdown
Contributor Author

Hi @PRODHOSH ! I recently had my PR merged in OSSfolio as part of ECSoC26. I wanted to ask if there’s any additional step required to receive the ECSoC26 contributor badge, or is it assigned automatically? Thanks!

@PRODHOSH

Copy link
Copy Markdown
Owner

@Ayush-0918 to be clear
this project is part of ELUSOC, and not part of ECSoC'26
image
u wanted this to be part of ELUSOC as well
if it is ELUSOC u meant
in ur dashboard it takes some time to be seen

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

beginner Good for newcomers completed ELUSOC ELUSOC project submission frontend Related to UI / Next.js NEWBIE Beginner — 10 pts UI Visual / design changes

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[GOOD FIRST ISSUE] Truncate long repository descriptions with an ellipsis

2 participants