Fix homepage cards rendering at inconsistent heights#2011
Fix homepage cards rendering at inconsistent heights#2011
Conversation
Co-authored-by: n0umen0n <n0umen0n@users.noreply.github.com>
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (1)
🚧 Files skipped from review as they are similar to previous changes (1)
📝 WalkthroughWalkthroughApplied Tailwind layout tweaks across space list and card components: added Changes
Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes Possibly related PRs
Suggested reviewers
Poem
🚥 Pre-merge checks | ✅ 2 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (2 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
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. Comment |
There was a problem hiding this comment.
Caution
Some comments are outside the diff and can’t be posted inline due to platform limitations.
⚠️ Outside diff range comments (1)
packages/epics/src/spaces/components/space-card.tsx (1)
121-127:⚠️ Potential issue | 🟡 MinorLoading skeleton height no longer matches the reserved two-line description area.
Line 125 keeps
height="26px"while Line 127 enforcesmin-h-[2.5rem](40px), so cards can still jump in height between loading and loaded states.Suggested fix
<Skeleton loading={isLoading} className="mb-4" width="100%" - height="26px" + height="40px" > <div className="text-1 text-neutral-11 mb-4 line-clamp-2 min-h-[2.5rem]"> {description} </div> </Skeleton>🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@packages/epics/src/spaces/components/space-card.tsx` around lines 121 - 127, The Skeleton's fixed height ("26px") doesn't match the content container's reserved min height ("min-h-[2.5rem]" ≈ 40px) causing layout jumps; update the Skeleton used around the description (the <Skeleton loading={isLoading} ...> surrounding the div with className "text-1 ... min-h-[2.5rem]") so its height matches the reserved space (e.g., change height to "40px" or "2.5rem") or remove the min-h on the content div so both states reserve the same vertical space.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Outside diff comments:
In `@packages/epics/src/spaces/components/space-card.tsx`:
- Around line 121-127: The Skeleton's fixed height ("26px") doesn't match the
content container's reserved min height ("min-h-[2.5rem]" ≈ 40px) causing layout
jumps; update the Skeleton used around the description (the <Skeleton
loading={isLoading} ...> surrounding the div with className "text-1 ...
min-h-[2.5rem]") so its height matches the reserved space (e.g., change height
to "40px" or "2.5rem") or remove the min-h on the content div so both states
reserve the same vertical space.
ℹ️ Review info
⚙️ Run configuration
Configuration used: defaults
Review profile: CHILL
Plan: Pro
Run ID: 01b79d55-4cc0-4948-a1b0-069310e47d5c
📒 Files selected for processing (4)
apps/web/src/app/[lang]/my-spaces/page.tsxpackages/epics/src/spaces/components/space-card-with-discoverability.tsxpackages/epics/src/spaces/components/space-card.container.tsxpackages/epics/src/spaces/components/space-card.tsx
Co-authored-by: n0umen0n <n0umen0n@users.noreply.github.com>
There was a problem hiding this comment.
🧹 Nitpick comments (1)
packages/epics/src/spaces/components/space-card.tsx (1)
127-130: Switch toline-clamp-2for better description preview while maintaining layout consistency.The current
truncateutility forces single-line truncation. Usingline-clamp-2would display more context to users while keeping themin-h-[2.5rem]row height consistent.♻️ Suggested adjustment
<div - className="text-1 text-neutral-11 mb-4 min-h-[2.5rem] truncate" + className="text-1 text-neutral-11 mb-4 min-h-[2.5rem] line-clamp-2" title={description} >The
line-clamp-*utility is already supported and in use across the codebase (e.g.,packages/ui/src/select.tsx,packages/epics/src/spaces/components/inner-space-card.tsx).🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@packages/epics/src/spaces/components/space-card.tsx` around lines 127 - 130, In the space-card component replace the single-line truncation class on the description div by swapping "truncate" for "line-clamp-2" so the element (the div with className "text-1 text-neutral-11 mb-4 min-h-[2.5rem] truncate" and title={description}) shows two lines of preview while keeping the existing min-h-[2.5rem] height; update the className to "text-1 text-neutral-11 mb-4 min-h-[2.5rem] line-clamp-2" (no other logic changes needed).
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Nitpick comments:
In `@packages/epics/src/spaces/components/space-card.tsx`:
- Around line 127-130: In the space-card component replace the single-line
truncation class on the description div by swapping "truncate" for
"line-clamp-2" so the element (the div with className "text-1 text-neutral-11
mb-4 min-h-[2.5rem] truncate" and title={description}) shows two lines of
preview while keeping the existing min-h-[2.5rem] height; update the className
to "text-1 text-neutral-11 mb-4 min-h-[2.5rem] line-clamp-2" (no other logic
changes needed).
ℹ️ Review info
⚙️ Run configuration
Configuration used: defaults
Review profile: CHILL
Plan: Pro
Run ID: ef79267d-a3fa-43af-9741-51b0b16a818f
📒 Files selected for processing (4)
packages/epics/src/spaces/components/inner-space-card.container.tsxpackages/epics/src/spaces/components/space-card-with-discoverability.tsxpackages/epics/src/spaces/components/space-card.container.tsxpackages/epics/src/spaces/components/space-card.tsx
🚧 Files skipped from review as they are similar to previous changes (1)
- packages/epics/src/spaces/components/space-card-with-discoverability.tsx
Co-authored-by: n0umen0n <n0umen0n@users.noreply.github.com>
Co-authored-by: n0umen0n <n0umen0n@users.noreply.github.com>
|
@cursoragent make sure that two lines are fully visible in the description |
|
@cursoragent make sure that two lines are fully visible in the description |
|
Handled proactively — I pushed an additional fix to ensure the description shows up to 2 full lines without clipping. What I changedIn
This guarantees space for two complete lines based on the same Commit pushed: |
Co-authored-by: n0umen0n <n0umen0n@users.noreply.github.com>



Summary
truncate) to prevent overflow1/3columns to1/2/3(base/sm/lg)min-w-0Testing
eslint: not found)Summary by CodeRabbit