-
Notifications
You must be signed in to change notification settings - Fork 261
Fixed home page responsiveness #285
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
base: main
Are you sure you want to change the base?
Conversation
WalkthroughUI/layout-only updates to Home.jsx with formatting changes. No functional or logic alterations; data fetching and localStorage behavior remain the same. Responsive Tailwind classes adjusted to modify alignment, spacing, width distribution, and rounding on small screens. Changes
Estimated code review effort🎯 1 (Trivial) | ⏱️ ~3 minutes Possibly related issues
Poem
Tip 🔌 Remote MCP (Model Context Protocol) integration is now available!Pro plan users can now connect to remote MCP servers from the Integrations page. Connect with popular remote MCPs such as Notion and Linear to add more context to your reviews and chats. ✨ Finishing Touches
🧪 Generate unit tests
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. 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
SupportNeed help? Create a ticket on our support page for assistance with any issues or questions. CodeRabbit Commands (Invoked using PR/Issue comments)Type Other keywords and placeholders
CodeRabbit Configuration File (
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 0
🧹 Nitpick comments (4)
eduaid_web/src/pages/Home.jsx (4)
14-16: LGTM: Multiline fetch formatting only. Consider extracting the repo URL to a constant.Minor nit: hoisting the GitHub repo URL to a top-level constant (or env/config) improves readability and makes it easier to update or test.
31-35: Specify radix for parseInt to avoid edge cases.Using parseInt without a radix is error-prone. Prefer parseInt(storedTime, 10) or Number(storedTime).
Apply this diff:
- !isMoreThanOneDayOld(parseInt(storedTime)) + !isMoreThanOneDayOld(parseInt(storedTime, 10))Additionally, consider doing the same for storedStars at Line 36 for consistency: parseInt(storedStars, 10).
74-76: Verify mobile alignment: items-end right-aligns feature chips on small screens.With flex-col and w-fit on children, items-end will right-align the chips on narrow screens. If the intent is to center them on mobile (common for CTAs/badges), switch to items-center.
If centering is desired, apply:
- className="flex flex-col items-end mt-8 gap-4 sm:flex-row sm:items-stretch sm:justify-between"> + className="flex flex-col items-center mt-8 gap-4 sm:flex-row sm:items-stretch sm:justify-between">
83-85: Corner rounding may look asymmetric on mobile.rounded-l-2xl on base + sm:rounded-2xl at sm may cause odd visuals when stacked vertically. If consistent pill-like cards are desired on mobile too, use rounded-2xl at base.
Apply this diff:
- className="flex items-center rounded-l-2xl px-6 py-3 bg-gradient-to-r from-[#FF005C] via-[#7600F2] to-[#00CBE7] gap-4 w-fit - sm:flex-1 sm:justify-center sm:rounded-2xl" + className="flex items-center rounded-2xl px-6 py-3 bg-gradient-to-r from-[#FF005C] via-[#7600F2] to-[#00CBE7] gap-4 w-fit + sm:flex-1 sm:justify-center sm:rounded-2xl"If the asymmetric rounding is intentional for the gradient effect, feel free to keep as-is.
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
💡 Knowledge Base configuration:
- MCP integration is disabled by default for public repositories
- Jira integration is disabled by default for public repositories
- Linear integration is disabled by default for public repositories
You can enable these settings in your CodeRabbit configuration.
📒 Files selected for processing (1)
eduaid_web/src/pages/Home.jsx(4 hunks)
🔇 Additional comments (1)
eduaid_web/src/pages/Home.jsx (1)
3-3: LGTM: Import formatting change is harmless.No functional impact; keeping asset imports explicit is good.
This PR resolves a responsiveness issue on the home page, ensuring the layout adapts correctly across different screen sizes. The changes improve the user experience on mobile and desktop devices while maintaining the existing design
Resolves Issue #284
NOTE: This is a duplicate pull request of issue #283
I have closed the prior pull request so that no conflicts happens
Summary by CodeRabbit
Style
Refactor