fix: PR Analytics layout on tablet/desktop(ipad pro)#359
Conversation
|
@SaishWadnere is attempting to deploy a commit to the PRIYANSHU DOSHI's projects Team on Vercel. A member of the Team first needs to authorize it. |
There was a problem hiding this comment.
Thanks for your first PR on DevTrack! 🎉
A maintainer will review it within 48 hours. While you wait:
- Make sure CI is passing (type-check + lint)
- Double-check the PR description is filled out and the issue is linked
- Feel free to ask questions in Discussions if you need help
|
Hi @SaishWadnere — the fix has the breakpoints inverted, which makes mobile worse not better. Current (correct for mobile): This gives 2 columns on mobile, 4 on tablet/desktop — which is correct. Your change: This gives 4 columns on mobile (very narrow cells) and 2 on tablet+ — the opposite of what's wanted. The real issue for iPad Pro cramping is the <div className="grid grid-cols-2 lg:grid-cols-4 gap-4">
|
Priyanshu-byte-coder
left a comment
There was a problem hiding this comment.
Change is wrong — grid-cols-4 lg:grid-cols-4 forces 4 columns on all screen sizes including mobile, making the stat cards too narrow to read.
The correct fix for the iPad Pro layout issue is to keep 2 columns on mobile and small screens, and use 4 columns only on large screens:
className="grid grid-cols-2 lg:grid-cols-4 gap-4"Also rebase on main — the base changed after recent PRs merged.
51a19e5 to
058d2f0
Compare
Priyanshu-byte-coder
left a comment
There was a problem hiding this comment.
1. PR description doesn't match diff — description says changing grid-cols-2 md:grid-cols-4 to grid-cols-4 md:grid-cols-2 but actual diff is md:grid-cols-5 → lg:grid-cols-4. Fix the description.
2. Layout orphan — 5 stat cards in a 4-column grid leaves 1 card alone on the last row at lg+ widths. Consider lg:grid-cols-5 (keeps 1 row) or restructure to 4 cards if avgFirstReviewHours is being removed.
3. Conflicts with #394 — both touch the same grid class on the same line in PRMetrics.tsx. Coordinate or rebase after #394 resolves.

Summary
This code sets up a layout that switches from 4 columns on small screens (mobile) to 2 columns on medium-and-up screens
Closes #334
Type of Change
Changes Made
Before
<div className="grid grid-cols-2 md:grid-cols-4 gap-4">After
<div className="grid grid-cols-4 md:grid-cols-2 gap-4">How to Test
Steps for the reviewer to verify this works:
Screenshots (if UI change)
For screen width smaller that is 768px

For screen width larger than 768px

For Ipad pro

Checklist
npm run lintpasses locallynpm run type-check)