feat: add responsive footer with navigation, branding, and dark mode support (#284)#287
feat: add responsive footer with navigation, branding, and dark mode support (#284)#287JayRathore10 wants to merge 3 commits into
Conversation
✅ Deploy Preview for github-spy ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
📝 WalkthroughWalkthroughUser model password methods are clarified for safety and promise handling; user model and auth routes test suites are refactored with standardized assertions and guarded teardowns; test infrastructure switches to Jasmine with express added to dependencies; footer component is redesigned with simplified grid layout and updated social media links. ChangesUser Model and Authentication Testing Infrastructure
Footer Component UI Redesign
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 minutes Possibly related issues
Possibly related PRs
Suggested labels
Poem
🚥 Pre-merge checks | ✅ 3 | ❌ 2❌ Failed checks (2 warnings)
✅ Passed checks (3 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
⚔️ Resolve merge conflicts
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.
Actionable comments posted: 1
Caution
Some comments are outside the diff and can’t be posted inline due to platform limitations.
⚠️ Outside diff range comments (2)
src/components/Footer.tsx (1)
5-12:⚠️ Potential issue | 🔴 Critical | ⚡ Quick winRemove stale subscription state/handler (currently breaks build).
Line 5 references
useStatewithout importing it, which is a compile blocker. Since the subscription UI is already removed from the JSX, delete this leftover state/handler instead of re-adding the hook import.Additionally, the placeholder social links at lines 63 and 72 should be updated to point to actual social profiles.
Proposed fix
function Footer() { - const [email, setEmail] = useState(''); - - const handleSubscribe = (e: React.FormEvent) => { - e.preventDefault(); - // Removed raw console logging of emails to protect user data privacy (PII leak fix) - alert('Thank you for subscribing!'); - setEmail(''); - }; - return (🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@src/components/Footer.tsx` around lines 5 - 12, Remove the unused subscription state and handler: delete the email and setEmail useState declaration and the handleSubscribe function (they reference useState which isn't imported and the JSX no longer uses them), and remove any remaining references to email/handleSubscribe; then replace the placeholder social links (currently pointing to example/empty URLs) with the real profile URLs for the project's social accounts in the Footer component so they are not placeholders.package.json (1)
10-15:⚠️ Potential issue | 🟠 Major | ⚡ Quick winRemove the duplicate
testscript key.The second
"test"entry (line 15) overrides the first one (line 10), so the vitest runner is silently ignored. Rename the first entry to"test:frontend"to distinguish it from the backend tests, or consolidate the test runners under a single approach.🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@package.json` around lines 10 - 15, package.json currently has two "test" script keys which causes the latter ("jasmine") to override the vitest entry; rename the vitest entry key from "test" to "test:frontend" (or alternatively consolidate test runners under a single "test" script) so both front-end vitest and back-end jasmine scripts coexist, updating any CI/dev docs or npm run invocations that expect "test" accordingly and leave the jasmine script as "test" or rename it to "test:backend" if you prefer explicit separation.
🧹 Nitpick comments (1)
spec/auth.routes.spec.cjs (1)
71-88: ⚡ Quick winAdd a duplicate-username signup test case.
You already cover duplicate email; adding duplicate username coverage will protect the other uniqueness constraint and prevent route-level regression.
Suggested test addition
+ it('should not sign up a user with existing username', async () => { + await User.create({ + username: 'testuser', + email: 'first@example.com', + password: 'password123', + }); + + const res = await request(app) + .post('/auth/signup') + .send({ + username: 'testuser', + email: 'second@example.com', + password: 'password456', + }); + + expect(res.status).toBe(400); + expect(res.body.message).toBe('User already exists'); + });🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@spec/auth.routes.spec.cjs` around lines 71 - 88, Add a new test that mirrors the existing "should not sign up a user with existing email" case but checks for duplicate username: create a User via User.create with username 'testuser' and a distinct email, then POST to '/auth/signup' with the same username but a different email and password, and assert the response status is 400 and res.body.message equals 'User already exists'; place the test alongside the existing it(...) block so it runs in the same suite and uses request(app) and the same expect assertions.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@src/components/Footer.tsx`:
- Around line 63-73: Replace the placeholder "example" social links in
Footer.tsx with the project's actual profiles: update the href on the Twitter
anchor that renders <FaTwitter .../> and the href on the LinkedIn anchor to
point to the official company/project Twitter and LinkedIn URLs (ensure they
remain target="_blank" rel="noopener noreferrer" and that any displayed text
like "Twitter" / "LinkedIn" matches the link). Double-check the anchors around
the FaTwitter icon and the LinkedIn anchor to ensure no other placeholder URLs
remain and commit the updated links.
---
Outside diff comments:
In `@package.json`:
- Around line 10-15: package.json currently has two "test" script keys which
causes the latter ("jasmine") to override the vitest entry; rename the vitest
entry key from "test" to "test:frontend" (or alternatively consolidate test
runners under a single "test" script) so both front-end vitest and back-end
jasmine scripts coexist, updating any CI/dev docs or npm run invocations that
expect "test" accordingly and leave the jasmine script as "test" or rename it to
"test:backend" if you prefer explicit separation.
In `@src/components/Footer.tsx`:
- Around line 5-12: Remove the unused subscription state and handler: delete the
email and setEmail useState declaration and the handleSubscribe function (they
reference useState which isn't imported and the JSX no longer uses them), and
remove any remaining references to email/handleSubscribe; then replace the
placeholder social links (currently pointing to example/empty URLs) with the
real profile URLs for the project's social accounts in the Footer component so
they are not placeholders.
---
Nitpick comments:
In `@spec/auth.routes.spec.cjs`:
- Around line 71-88: Add a new test that mirrors the existing "should not sign
up a user with existing email" case but checks for duplicate username: create a
User via User.create with username 'testuser' and a distinct email, then POST to
'/auth/signup' with the same username but a different email and password, and
assert the response status is 400 and res.body.message equals 'User already
exists'; place the test alongside the existing it(...) block so it runs in the
same suite and uses request(app) and the same expect assertions.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: defaults
Review profile: CHILL
Plan: Pro
Run ID: 55ae4d56-dffe-4373-af0a-25dc035f4590
📒 Files selected for processing (5)
backend/models/User.jspackage.jsonspec/auth.routes.spec.cjsspec/user.model.spec.cjssrc/components/Footer.tsx
🚀 Feature: Add Responsive Footer Section to Improve Website Navigation and UI (#284)
📌 Overview
This PR introduces a modern, responsive footer to the landing page, enhancing the overall UI/UX and providing users with quick access to important links and project information.
✨ Features Implemented
🎯 Improvements
🛠️ Implementation Details
📂 Files Added/Modified
components/Footer.jsx(or relevant path)🏷️ Open Source Context
This PR is submitted as part of GSSoC (GirlScript Summer of Code) contribution.
👤 Contributor Profile
GSSoC Profile: https://gssoc.girlscript.org/profile/e47b2f4a-f3e9-4cb4-97b5-ddd8cb15a1e9
🚀 Impact
This feature significantly improves the user experience by adding a standard and essential UI component, making the application more complete and user-friendly.
📎 Notes
No breaking changes introduced. This is a purely additive feature.
Closes #284
Screenshots
Summary by CodeRabbit
Release Notes
Refactor
Chores