-
-
Notifications
You must be signed in to change notification settings - Fork 486
fix: improve mobile poll layout for narrow screens #2083
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Fixes layout issues on mobile devices with narrow screens (<300px) where the vote selector button would get cut off when time slot options have long duration labels (e.g., "1h 30m"). Changes: - Add min-w-0 to flex containers to allow proper shrinking - Add shrink-0 to vote selector to prevent it from being cut off - Add truncate to duration text for graceful overflow handling - Reduce gaps on mobile (gap-x-2) with larger gaps on sm+ screens Fixes lukevella#1437
|
@bimakw is attempting to deploy a commit to the rallly Team on Vercel. A member of the Team first needs to authorize it. |
WalkthroughTwo mobile poll components receive Tailwind layout refinements to prevent overflow on narrow screens. The Changes
Estimated code review effort🎯 2 (Simple) | ⏱️ ~8 minutes
Possibly related PRs
Poem
Pre-merge checks and finishing touches✅ Passed checks (5 passed)
✨ Finishing touches
🧪 Generate unit tests (beta)
📜 Recent review detailsConfiguration used: Repository UI Review profile: CHILL Plan: Pro 📒 Files selected for processing (2)
🧰 Additional context used📓 Path-based instructions (9)**/*.{ts,tsx}📄 CodeRabbit inference engine (.cursorrules)
Files:
**/*.{tsx,css,config.ts}📄 CodeRabbit inference engine (.cursorrules)
Files:
**/*.tsx📄 CodeRabbit inference engine (.cursorrules)
Files:
**/*.{ts,tsx,json}📄 CodeRabbit inference engine (.cursorrules)
Files:
**/*📄 CodeRabbit inference engine (.cursorrules)
Files:
**/*.{ts,tsx,js,jsx}📄 CodeRabbit inference engine (CLAUDE.md)
Files:
**/*.{tsx,ts}📄 CodeRabbit inference engine (CLAUDE.md)
Files:
apps/web/src/components/**📄 CodeRabbit inference engine (CLAUDE.md)
Files:
apps/web/**/*.{ts,tsx,js,jsx}📄 CodeRabbit inference engine (apps/web/.cursor/rules/better-auth.md)
Files:
🧠 Learnings (1)📚 Learning: 2025-11-25T11:03:55.173ZApplied to files:
🔇 Additional comments (3)
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 |
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
Closing because this conflicts with some changes we have in-progress to the polls page. |
Summary
Fixes layout issues on mobile devices with narrow screens (<300px) where the vote selector button would get cut off when time slot options have long duration labels (e.g., "1h 30m").
Problem
On devices with low screen widths, the vote selector button becomes partially or fully hidden when polls display date options with extended duration text. Users cannot access the voting functionality on very narrow screens.
Solution
Instead of adding horizontal scrolling (which may not be intuitive for users), this fix uses CSS flexbox properties to ensure proper content sizing:
Changes in
poll-option.tsx:min-w-0to flex containers to allow children to shrink below content sizeshrink-0to the vote selector container to prevent it from being cut offshrink-0toshrinkwithmin-w-0to allow graceful shrinkingChanges in
time-slot-option.tsx:min-w-0to allow the time slot content to shrinkshrink-0to keep start time always visibletruncateto duration text for graceful text overflowgap-x-2,gap-x-1) with larger gaps onsm+screens (sm:gap-x-4,sm:gap-x-1.5)Test Plan
Screenshots
Testing should be done on narrow viewports - the vote button should remain visible and accessible.
Fixes #1437
Summary by CodeRabbit
✏️ Tip: You can customize this high-level summary in your review settings.