fix: polish mobile responsive layout#1340
Open
TUPM96 wants to merge 1 commit into
Open
Conversation
There was a problem hiding this comment.
Pull request overview
Note
Copilot was unable to run its full agentic suite in this review.
This PR improves mobile responsiveness and UI polish across the frontend, focusing on preventing horizontal overflow and making navigation/cards behave better on small screens.
Changes:
- Refined mobile layouts for Hero, Bounty grid/cards, and Navbar (spacing, wrapping, truncation, mobile menu behavior).
- Added shared UI helpers (
utils.ts) and reusable Framer Motion variant definitions (animations.ts). - Introduced global CSS rules and a new test to validate mobile polish and navbar accessibility/scroll locking.
Reviewed changes
Copilot reviewed 9 out of 10 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| frontend/src/pages/BountiesPage.tsx | Adjusts top padding for the bounties page container. |
| frontend/src/lib/utils.ts | Adds formatting helpers (currency, relative time, deadline time-left) and language color mapping. |
| frontend/src/lib/animations.ts | Adds shared Framer Motion variants for consistent UI animation. |
| frontend/src/index.css | Adds global overflow prevention and utility styles (no-scrollbar, media max-width). |
| frontend/src/components/layout/Navbar.tsx | Improves mobile menu accessibility, closes menus on route change, and locks body scroll when open. |
| frontend/src/components/home/HeroSection.tsx | Adjusts hero sizing/typography and improves small-screen wrapping and button layout. |
| frontend/src/components/bounty/BountyGrid.tsx | Improves mobile filter/header layout and makes filter pills horizontally scrollable. |
| frontend/src/components/bounty/BountyCard.tsx | Improves small-screen layout (wrapping, truncation) and moves status badge into normal flow. |
| frontend/src/tests/mobile-responsive-polish.test.tsx | Adds regression coverage for mobile card layout and navbar menu a11y + scroll lock. |
| .gitignore | Un-ignores frontend/src/lib so newly added shared libs are tracked. |
Comments suppressed due to low confidence (1)
frontend/src/index.css:1
- Globally forcing
overflow-x: hiddenonhtml,body, and#rootcan mask layout bugs and can make legitimately overflowing content unreachable (e.g., wide code blocks, tables, devtools-like UI). Prefer fixing the specific element(s) causing overflow, or scope overflow clipping to a responsible layout wrapper. If the goal is only to prevent tiny sub-pixel overflow, consider more targeted CSS (and avoid redundantmax-width: 100%on these root elements unless there’s a demonstrated need).
@import "tailwindcss";
| animate="animate" | ||
| exit="exit" | ||
| className="pt-16" | ||
| className="pt-0" |
Comment on lines
+37
to
+47
| const deltaSeconds = Math.max(0, Math.floor((Date.now() - date.getTime()) / 1000)); | ||
| if (deltaSeconds < 30) return 'just now'; | ||
|
|
||
| for (const unit of RELATIVE_TIME_UNITS) { | ||
| const value = Math.floor(deltaSeconds / unit.seconds); | ||
| if (value >= 1) { | ||
| return `${value} ${unit.label}${value === 1 ? '' : 's'} ago`; | ||
| } | ||
| } | ||
|
|
||
| return 'just now'; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #833
Summary
Verification
Wallet