Skip to content

feat: add responsive footer with navigation, branding, and dark mode support (#284)#287

Open
JayRathore10 wants to merge 3 commits into
GitMetricsLab:mainfrom
JayRathore10:feat/add-responsive-footer
Open

feat: add responsive footer with navigation, branding, and dark mode support (#284)#287
JayRathore10 wants to merge 3 commits into
GitMetricsLab:mainfrom
JayRathore10:feat/add-responsive-footer

Conversation

@JayRathore10
Copy link
Copy Markdown

@JayRathore10 JayRathore10 commented May 17, 2026

🚀 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

  • ✔ Added a responsive footer component
  • ✔ Included project/branding section
  • ✔ Added quick navigation links for better usability
  • ✔ Integrated GitHub repository link
  • ✔ Added optional social/contact links
  • ✔ Implemented clean and minimal design
  • ✔ Added dark mode support
  • ✔ Ensured mobile responsiveness across screen sizes

🎯 Improvements

  • Improves overall website structure and completeness
  • Enhances navigation experience for users
  • Provides better visual balance to the landing page
  • Makes the UI more professional and polished
  • Improves accessibility and responsiveness

🛠️ Implementation Details

  • Created a reusable footer component
  • Used responsive layout (flex/grid) for adaptability
  • Applied consistent styling with existing theme
  • Added hover effects and smooth transitions
  • Ensured compatibility with light/dark mode

📂 Files Added/Modified

  • components/Footer.jsx (or relevant path)
  • Updated layout/page files to include footer

🏷️ 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

image image

Summary by CodeRabbit

Release Notes

  • Refactor

    • Redesigned footer with simplified layout and updated social media links
    • Added social connections to GitHub, Twitter, and LinkedIn
    • Removed subscription form and restructured footer navigation
  • Chores

    • Added Express to project dependencies
    • Updated bcryptjs to latest version
    • Migrated test suite to Jasmine

Review Change Stack

@netlify
Copy link
Copy Markdown

netlify Bot commented May 17, 2026

Deploy Preview for github-spy ready!

Name Link
🔨 Latest commit 8f3f5bf
🔍 Latest deploy log https://app.netlify.com/projects/github-spy/deploys/6a0c73d171475700089e23be
😎 Deploy Preview https://deploy-preview-287--github-spy.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented May 17, 2026

📝 Walkthrough

Walkthrough

User 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.

Changes

User Model and Authentication Testing Infrastructure

Layer / File(s) Summary
User Model Password Methods
backend/models/User.js
UserSchema.pre('save') early-returns when password is unmodified; comparePassword returns bcrypt.compare promise directly.
User Model Test Suite Refactor
spec/user.model.spec.cjs
Password hashing, re-hashing, and comparison tests rewritten with object literal construction and expect().toBe(true/false) assertions; afterAll teardown conditionally drops test database only when Mongoose connection is ready.
Test Script and Dependency Updates
package.json
Test script command switches from Vitest to Jasmine; express added to runtime dependencies; bcryptjs dev dependency upgraded from ^3.0.2 to ^3.0.3.
Auth Routes Test Setup and Cases
spec/auth.routes.spec.cjs
createTestApp helper refactors express-session middleware with session secret changed to test-secret and explicit passport config positioning; afterAll conditionally disconnects when Mongoose is ready; signup/login tests rewritten with direct User.create() seeding; "existing username" signup test removed.

Footer Component UI Redesign

Layer / File(s) Summary
Footer Layout and Social Links
src/components/Footer.tsx
React-icons imports updated to remove Discord and arrow icons, add LinkedIn; footer JSX replaced with simplified grid-based layout containing "Project Info," "Quick Links" (Home/About/Contact), and "Connect With Us" social sections; previous multi-column layout with legal links and subscription form removed.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

Possibly related issues

Possibly related PRs

Suggested labels

gssoc25, type:accessibility

Poem

🐰 A Footer's Tale
From empty space, a footer grows,
With links that guide and social flows,
No Discord now, just GitHub's call,
A LinkedIn handshake for one and all—
The model tested, secure and sound,
Where user passwords safely bound! 🔐

🚥 Pre-merge checks | ✅ 3 | ❌ 2

❌ Failed checks (2 warnings)

Check name Status Explanation Resolution
Out of Scope Changes check ⚠️ Warning The PR contains unrelated changes to backend models, authentication routes, test files, and package.json that are not aligned with the footer feature objective in issue #284. Remove unrelated changes to User.js, auth routes, user model tests, and package.json; keep only the Footer component changes necessary to address issue #284.
Docstring Coverage ⚠️ Warning Docstring coverage is 50.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (3 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly summarizes the main change: adding a responsive footer with navigation, branding, and dark mode support, which aligns with the primary focus of the changeset.
Description check ✅ Passed The PR description is comprehensive and well-structured with clear sections covering overview, features, improvements, implementation details, and impact, addressing all key template elements.
Linked Issues check ✅ Passed The PR implementation addresses all main objectives from issue #284: responsive footer with project info, quick navigation links, GitHub link, social links, copyright text, dark mode support, and mobile responsiveness.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
⚔️ Resolve merge conflicts
  • Resolve merge conflict in branch feat/add-responsive-footer

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link
Copy Markdown
Contributor

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 win

Remove stale subscription state/handler (currently breaks build).

Line 5 references useState without 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 win

Remove the duplicate test script 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 win

Add 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

📥 Commits

Reviewing files that changed from the base of the PR and between 8d17610 and 8f3f5bf.

📒 Files selected for processing (5)
  • backend/models/User.js
  • package.json
  • spec/auth.routes.spec.cjs
  • spec/user.model.spec.cjs
  • src/components/Footer.tsx

Comment thread src/components/Footer.tsx
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

🚀 Feature: Add Responsive Footer Section to Improve Website Navigation and UI

2 participants