Skip to content

navbar component#320

Closed
ishanraj953 wants to merge 3 commits into
santanu-atta03:mainfrom
ishanraj953:navbar
Closed

navbar component#320
ishanraj953 wants to merge 3 commits into
santanu-atta03:mainfrom
ishanraj953:navbar

Conversation

@ishanraj953

Copy link
Copy Markdown
Contributor

Pull Request — Intervyo


📌 Related Issue

Fixes #249


Description of Changes

I had made a new navbar component, which is the same as the previous one. Even though I had removed the home icon because it was of no use. I had attached the navbar to every page, which will give us the power to reuse it multiple times.


Type of Change

  • 🐛 Bug Fix
  • 🔧 Feature Modification
  • ✨ New Feature
  • 🧹 Maintenance / Cleanup / Documentation Update
  • 🎨 UI/UX or Design Update
  • 📘 Resource / Content Addition
  • Other (please describe):

Testing

Describe the tests you ran to verify your changes.

  • Tested locally
  • No tests required

📸 Screenshots / Video

Screenshot 2026-02-20 145454
Recording.2026-02-20.145657.1.mp4

✅ Checklist

  • I’ve read the CONTRIBUTING.md guidelines.
  • My code follows the project’s conventions.
  • I’ve linked the related issue correctly.
  • I’ve tested my changes locally.
  • I’ve added or updated documentation/comments if needed.
  • My PR title follows the branch & commit naming conventions.
  • My changes introduce no new warnings or errors.
  • I’ve performed a self-review of my work.

💬 Additional Notes (Optional)

Add any context, dependencies, or questions for reviewers.

Copilot AI review requested due to automatic review settings February 20, 2026 09:39
@vercel

vercel Bot commented Feb 20, 2026

Copy link
Copy Markdown

@ishanraj953 is attempting to deploy a commit to the santanu-atta03's projects Team on Vercel.

A member of the Team first needs to authorize it.

@github-actions

Copy link
Copy Markdown

Thanks for creating a PR for your Issue! ☺️

We'll review it as soon as possible.
In the meantime, please double-check the file changes and ensure that all commits are accurate.

If there are any unresolved review comments, feel free to resolve them. 🙌🏼

@ishanraj953

Copy link
Copy Markdown
Contributor Author

Hi, please review my PR once and if you see any potential changes that need to be made. If you like the PR, then put the tag of OSCG contribution.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

This PR refactors duplicate navbar implementations across multiple pages into a centralized, reusable Navbar component. The refactoring addresses issue #249 by extracting common navigation logic from Dashboard.jsx and AboutUs.jsx (and other pages) into a shared component at Frontend/src/components/Navbar.jsx. The new component supports multiple visual tones (landing, skin, light) and variants (pill, simple) with configurable props for authentication buttons, theme toggles, and active link highlighting.

However, the PR also includes an undocumented React downgrade from version 19.1.1 to 18.3.1, which is a significant breaking change not mentioned in the PR description.

Changes:

  • Created reusable Navbar component with three tone configurations and two variant styles
  • Replaced inline navbar code in 9 pages with the new Navbar component
  • Downgraded React from 19.1.1 to 18.3.1 (undocumented major change)

Reviewed changes

Copilot reviewed 11 out of 13 changed files in this pull request and generated 7 comments.

Show a summary per file
File Description
Frontend/src/components/Navbar.jsx New reusable navbar component with configurable tones, variants, and behavior
Frontend/src/pages/Terms.jsx Replaced inline navbar with Navbar component using tone="light"
Frontend/src/pages/Privacy.jsx Replaced inline navbar with Navbar component using tone="light"
Frontend/src/pages/PricingPage.jsx Replaced inline navbar with Navbar component using tone="light"
Frontend/src/pages/Landing.jsx Replaced inline navbar with Navbar component using tone="landing" with scroll functionality
Frontend/src/pages/FAQ.jsx Replaced custom navbar with Navbar component using variant="simple"
Frontend/src/pages/CookiePolicy.jsx Replaced inline navbar with Navbar component using tone="light"
Frontend/src/pages/ContactUs.jsx Replaced inline navbar with Navbar component using tone="skin"
Frontend/src/pages/Career.jsx Replaced inline navbar with Navbar component using tone="light"
Frontend/src/pages/AboutUs.jsx Replaced inline navbar with Navbar component using tone="skin"
Frontend/package.json Downgraded React from 19.1.1 to 18.3.1 and react-dom accordingly
Frontend/package-lock.json Updated lockfile to reflect React 18.3.1 and related dependency changes
package-lock.json Added peer dependencies for React 19.2.4 (likely auto-generated for root dependencies)
Files not reviewed (1)
  • Frontend/package-lock.json: Language not supported

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread Frontend/package.json
Comment on lines +29 to +30
"react": "^18.3.1",
"react-dom": "^18.3.1",

Copilot AI Feb 20, 2026

Copy link

Choose a reason for hiding this comment

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

This PR downgrades React from version 19.1.1 to 18.3.1, which is a major version change, but this isn't mentioned in the PR description. The README.md indicates the project uses React 19 and even has special instructions for handling React 19 peer dependencies. This significant change should be documented and explained. Was this downgrade intentional? If so, please update the README.md to reflect this change and explain the rationale. If not, this may be an unintended change that should be reverted.

Copilot uses AI. Check for mistakes.
<div className="flex items-center gap-2 sm:gap-3">
<div className="relative">
<div className="w-10 h-10 sm:w-12 sm:h-12 rounded-lg sm:rounded-xl flex items-center justify-center ">
<img src={logo} alt="logo" />

Copilot AI Feb 20, 2026

Copy link

Choose a reason for hiding this comment

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

The variable 'logo' is used but never imported or defined in this component. This will cause a runtime error when the Navbar is rendered with variant="simple" (as used in FAQ.jsx). You need to add an import statement at the top of the file, such as: import logo from "../assets/intervyologo.png"

Copilot uses AI. Check for mistakes.
mobileMenu: "bg-white backdrop-blur-md rounded-2xl shadow-xl border border-gray-200",
mobileLink: "text-gray-600 hover:text-gray-900",
menuButton: "text-gray-900 hover:bg-gray-100",
logoPrimary: "text-white-800",

Copilot AI Feb 20, 2026

Copy link

Choose a reason for hiding this comment

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

The class name 'text-white-800' is not a valid Tailwind CSS class. The standard Tailwind color classes use hyphens, so this should likely be 'text-gray-100' or 'text-white' depending on the desired color. If you intended to use a custom color, ensure it's defined in your Tailwind configuration.

Suggested change
logoPrimary: "text-white-800",
logoPrimary: "text-white",

Copilot uses AI. Check for mistakes.
</div>
)}
</nav>
<Navbar tone="light" activeKey="about" />

Copilot AI Feb 20, 2026

Copy link

Choose a reason for hiding this comment

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

The activeKey prop is set to "about" but this is the Terms and Conditions page, not the About page. This will incorrectly highlight the "About" link in the navbar when users are on the Terms page. Consider either removing the activeKey prop or setting it to a value that represents the current page, or adding a "terms" key to the navbar links if you want to highlight it.

Suggested change
<Navbar tone="light" activeKey="about" />
<Navbar tone="light" />

Copilot uses AI. Check for mistakes.
</div>
)}
</nav>
<Navbar tone="light" activeKey="about" />

Copilot AI Feb 20, 2026

Copy link

Choose a reason for hiding this comment

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

The activeKey prop is set to "about" but this is the Privacy Policy page, not the About page. This will incorrectly highlight the "About" link in the navbar when users are on the Privacy page. Consider either removing the activeKey prop or setting it to a value that represents the current page, or adding a "privacy" key to the navbar links if you want to highlight it.

Suggested change
<Navbar tone="light" activeKey="about" />
<Navbar tone="light" />

Copilot uses AI. Check for mistakes.
Comment thread Frontend/src/pages/CookiePolicy.jsx Outdated
</div>
)}
</nav>
<Navbar tone="light" activeKey="about" />

Copilot AI Feb 20, 2026

Copy link

Choose a reason for hiding this comment

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

The activeKey prop is set to "about" but this is the Cookie Policy page, not the About page. This will incorrectly highlight the "About" link in the navbar when users are on the Cookie Policy page. Consider either removing the activeKey prop or setting it to a value that represents the current page, or adding a "cookie-policy" key to the navbar links if you want to highlight it.

Suggested change
<Navbar tone="light" activeKey="about" />
<Navbar tone="light" />

Copilot uses AI. Check for mistakes.
Comment thread Frontend/package.json
Comment on lines +29 to +30
"react": "^18.3.1",
"react-dom": "^18.3.1",

Copilot AI Feb 20, 2026

Copy link

Choose a reason for hiding this comment

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

React has been downgraded from ^19.1.1 to ^18.3.1. However, note that react-is at version 19.2.3 (line 35) should typically match the React version for compatibility. Consider downgrading react-is to a version compatible with React 18 (e.g., ^18.3.1) to avoid potential compatibility issues.

Copilot uses AI. Check for mistakes.
@lokeshjakhar7781 lokeshjakhar7781 added the ECWoC26 Required for ECWoC26 scoring label Feb 20, 2026
@santanu-atta03

Copy link
Copy Markdown
Owner

@ishanraj953 there are many conflicts, resolve all of them

@ishanraj953

Copy link
Copy Markdown
Contributor Author

@santanu-atta03 Please check it once

@ishanraj953

Copy link
Copy Markdown
Contributor Author

@santanu-atta03 Please check it once

@ishanraj953

Copy link
Copy Markdown
Contributor Author

@santanu-atta03 Could please review my PR

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ECWoC26-L3 ECWoC26 Required for ECWoC26 scoring

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Refactoring: Extract Reusable Navbar

4 participants