Fix text wrapping on repo index page
Fix the text wrapping in the repo index page, when the repo name or the url or the star count overflows/wraps. On mobile especially, it breaks. Id add text overflow ellipsis, and also on mobile id put every line in a new line
PR created: https://github.com/basehub-ai/forums/pull/141
Here's a summary of all the changes:
###Problem
On the repo index page (homepage), when repo names, URLs, or star counts are long, the text wraps/overflows — especially breaking on mobile due to forced minimum widths and whitespace-nowrap.
###Changes
components/typography.tsx — ListItem
- Changed from fixed
h-4.5toh-auto min-h-4.5 sm:h-4.5so rows can grow taller on mobile when content stacks vertically, while keeping the fixed height on desktop.
components/repo-list-with-search.tsx — Repo list table
-
Text overflow ellipsis: Replaced
whitespace-nowrapwithtruncateon repo name spans (both plain text and highlighted search results). This addstext-overflow: ellipsis+overflow: hiddenso long names get clipped with "…" instead of overflowing. -
Added
min-w-0to the link flex container so truncation actually works within flex layout. -
Mobile stacking: Each repo row now uses
flex-colon mobile andflex-rowon desktop (sm:), putting the repo name on one line and the stats (stars, posts, last active) on the next line below it. -
Hidden column headers on mobile: The Stars/Posts/Last Active header row is hidden on mobile (
hidden sm:flex), replaced by inline labels (★prefix for stars,postssuffix) that are only visible on mobile (sm:hidden). -
Removed minimum width constraints on mobile:
min-w-120andmin-w-fitare now only applied atsm:breakpoint and above, preventing forced horizontal scroll on narrow viewports. -
Mobile stats styling: Stats row on mobile gets
pl-5(indent to align under the repo name),text-xs(smaller), andgap-3(spacing between values).
END OF POST