Skip to content

Fixed navbar hover contrast issue#235

Open
SiddhiMohite20 wants to merge 2 commits into
GitMetricsLab:mainfrom
SiddhiMohite20:fix-navbar-hover-contrast
Open

Fixed navbar hover contrast issue#235
SiddhiMohite20 wants to merge 2 commits into
GitMetricsLab:mainfrom
SiddhiMohite20:fix-navbar-hover-contrast

Conversation

@SiddhiMohite20
Copy link
Copy Markdown

@SiddhiMohite20 SiddhiMohite20 commented May 14, 2026

Related Issue

  • Closes: #

--- #233

Description

--- Improved Navbar hover text visibility by updating hover colors for better readability and accessibility on light background.

How Has This Been Tested?

--- 1.Ran the project locally using Vite
2.Tested navbar hover interactions on Chrome browser
3.Verified improved text visibility on hover state

Type of Change

  • Bug fix

Summary by CodeRabbit

  • New Features

    • Added About and Contact navigation links to the mobile menu.
    • Mobile menu now closes when a navigation link is selected.
  • Style

    • Updated hover and border colors for navigation links on desktop and mobile.
    • Logo hover color changed to blue for both desktop and mobile.

Review Change Stack

@netlify
Copy link
Copy Markdown

netlify Bot commented May 14, 2026

Deploy Preview for github-spy ready!

Name Link
🔨 Latest commit 4387fc9
🔍 Latest deploy log https://app.netlify.com/projects/github-spy/deploys/6a06b4e964cf5d0008deac07
😎 Deploy Preview https://deploy-preview-235--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 14, 2026

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 342b9af6-543b-4f5c-942c-699bbd4f66cd

📥 Commits

Reviewing files that changed from the base of the PR and between fb94e12 and 4387fc9.

📒 Files selected for processing (1)
  • src/components/Navbar.tsx
🚧 Files skipped from review as they are similar to previous changes (1)
  • src/components/Navbar.tsx

📝 Walkthrough

Walkthrough

This PR updates Navbar styling: logo hover changed to blue, desktop navigation link classes adjusted (including a distinct Tracker hover border), and the mobile menu was reworked to add /about and /contact with updated link styles while preserving menu-close on click.

Changes

Navbar styling and mobile menu restructuring

Layer / File(s) Summary
Logo hover styling
src/components/Navbar.tsx
Changed logo link className from gray-based hover to blue-based hover while keeping the same link structure and layout.
Desktop navigation link updates
src/components/Navbar.tsx
Updated desktop links (Home, Tracker, Contributors, Login) className values: adjusted text/hover color classes and hover border/rounded behavior; Tracker uses a different hover border color.
Mobile menu links and routes
src/components/Navbar.tsx
Reworked mobile nav list: added About (/about) and Contact (/contact); updated className hover/border styles for mobile Home, About, Contact, Contributors, and Login; preserved onClick={() => setIsOpen(false)} to close menu on link click.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

Possibly related PRs

Suggested labels

gssoc25, level1

Poem

🐰 I hopped through code with careful paws,
Swapped gray for blue on logo draws.
Added doors to About and Contact lanes,
Mobile links now close like gentle reins.
A tiny cheer — the navbar’s new campaigns.

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed The title accurately describes the main change: updating navbar hover styling to fix contrast issues.
Description check ✅ Passed The description contains most required sections (Related Issue, Description, Testing, Type of Change), though some sections lack detail and formatting is inconsistent.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

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

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Tip

💬 Introducing Slack Agent: The best way for teams to turn conversations into code.

Slack Agent is built on CodeRabbit's deep understanding of your code, so your team can collaborate across the entire SDLC without losing context.

  • Generate code and open pull requests
  • Plan features and break down work
  • Investigate incidents and troubleshoot customer tickets together
  • Automate recurring tasks and respond to alerts with triggers
  • Summarize progress and report instantly

Built for teams:

  • Shared memory across your entire org—no repeating context
  • Per-thread sandboxes to safely plan and execute work
  • Governance built-in—scoped access, auditability, and budget controls

One agent for your entire SDLC. Right inside Slack.

👉 Get started


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

@github-actions github-actions Bot left a comment

Choose a reason for hiding this comment

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

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: 2

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (2)
src/components/Navbar.tsx (2)

43-54: ⚠️ Potential issue | 🟠 Major | ⚡ Quick win

Incomplete update: Contributors and Login links still use old gray-based hover styling.

The PR aims to improve navbar hover contrast, but only the Home and Tracker links were updated to blue-based hover colors. The Contributors and Login links still use the old hover:text-gray-300 and hover:border-gray-400, creating inconsistency across the navigation bar.

♻️ Proposed fix to update remaining links
           <Link
             to="/contributors"
-            className="text-lg font-medium hover:text-gray-300 transition-all px-2 py-1 border border-transparent hover:border-gray-400 rounded"
+            className="text-lg font-medium hover:text-blue-600 transition-all px-2 py-1 border border-transparent hover:border-blue-400 rounded"
           >
             Contributors
           </Link>
           <Link
             to="/login"
-            className="text-lg font-medium hover:text-gray-300 transition-all px-2 py-1 border border-transparent hover:border-gray-400 rounded"
+            className="text-lg font-medium hover:text-blue-600 transition-all px-2 py-1 border border-transparent hover:border-blue-400 rounded"
           >
             Login
           </Link>
🤖 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/Navbar.tsx` around lines 43 - 54, Update the two Link
components for "Contributors" and "Login" in Navbar (the Link elements around
the "Contributors" and "Login" text) to use the same blue-based hover utility
classes as the other nav items: replace the current hover classes
`hover:text-gray-300` and `hover:border-gray-400` with the blue variants used
elsewhere (e.g., `hover:text-blue-300` and `hover:border-blue-400`) so all nav
links share consistent hover text and border styles.

30-54: ⚠️ Potential issue | 🟠 Major | ⚡ Quick win

Add missing About and Contact routes to desktop navigation.

The mobile menu includes /about and /contact links (lines 100–112), but these are absent from the desktop navigation (lines 30–54). Both route components exist in the application (src/pages/About/About.tsx and src/pages/Contact/Contact.tsx), creating an inconsistent experience where mobile users can access routes that desktop users cannot.

Proposed fix
         <div className="hidden md:flex space-x-6">
           <Link
             to="/"
             className="text-lg font-medium hover:text-blue-300 transition-all px-2 py-1 border border-transparent hover:border-gray-400 rounded"
           >
             Home
           </Link>
           <Link
             to="/track"
             className="text-lg font-medium text-black  hover:text-blue-600 transition-all px-2 py-1 border border-transparent hover:border-blue-400 rounded"
           >
             Tracker
           </Link>
+          <Link
+            to="/about"
+            className="text-lg font-medium hover:text-blue-600 transition-all px-2 py-1 border border-transparent hover:border-blue-400 rounded"
+          >
+            About
+          </Link>
+          <Link
+            to="/contact"
+            className="text-lg font-medium hover:text-blue-600 transition-all px-2 py-1 border border-transparent hover:border-blue-400 rounded"
+          >
+            Contact
+          </Link>
           <Link
             to="/contributors"
             className="text-lg font-medium hover:text-gray-300 transition-all px-2 py-1 border border-transparent hover:border-gray-400 rounded"
           >
             Contributors
           </Link>
🤖 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/Navbar.tsx` around lines 30 - 54, The desktop navigation (the
div with className "hidden md:flex space-x-6") is missing Link entries for the
About and Contact routes; add two Link components for to="/about" (text "About")
and to="/contact" (text "Contact") inside that same div, using the same styling
pattern/classes as the existing Link elements (e.g., mirror the
hover/text/border classes used for Contributors or Tracker) so desktop and
mobile menus contain the same routes.
🧹 Nitpick comments (1)
src/components/Navbar.tsx (1)

92-126: ⚡ Quick win

Mobile menu: hover:border-black may have poor contrast in dark mode.

All mobile navigation links use hover:border-black, which will render as a black border on the dark:bg-gray-800 background in dark mode. This creates low contrast and may not be as visible as intended.

♻️ Proposed fix for better dark mode border visibility
             <Link
               to="/"
-              className="block text-lg font-medium hover:text-blue-500 transition-all px-2 py-1 border border-transparent hover:border-black rounded"
+              className="block text-lg font-medium hover:text-blue-500 transition-all px-2 py-1 border border-transparent hover:border-black dark:hover:border-gray-400 rounded"
               onClick={() => setIsOpen(false)}
             >
               Home
             </Link>

Apply the same change to all mobile navigation links (About, Contact, Contributors, and Login) to add dark:hover:border-gray-400 for better visibility in dark mode.

🤖 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/Navbar.tsx` around lines 92 - 126, The mobile nav Link
elements in Navbar (the Link components for Home, About, Contact, Contributors,
Login) use hover:border-black which has poor contrast in dark mode; update each
Link's className to include dark:hover:border-gray-400 (in addition to the
existing hover:border-black) so the hover border is visible on dark backgrounds
and keep the onClick={() => setIsOpen(false)} behavior unchanged.
🤖 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/Navbar.tsx`:
- Around line 31-42: The Home and Tracker Link elements in Navbar.tsx have
inconsistent hover styles (Home uses hover:text-blue-300; Tracker uses
hover:text-blue-600 and hover:border-blue-400) and the Tracker also forces
text-black; update the Link for "/" (Home) to match the Tracker hover behavior
by using hover:text-blue-600 and hover:border-blue-400 and remove the explicit
text-black from the Link for "/track" so both links share the same hover/font
behavior; locate the Link elements with to="/" and to="/track" in the Navbar
component and make these style changes.
- Line 39: The Tracker link's className in the Navbar component includes an
explicit "text-black" which overrides dark mode; remove "text-black" (and the
extra space) from the className string on the Tracker link so the parent's
"dark:text-white" can take effect, leaving the other utility classes
(hover:text-blue-600, transition-all, px-2, py-1, border border-transparent,
hover:border-blue-400, rounded) intact.

---

Outside diff comments:
In `@src/components/Navbar.tsx`:
- Around line 43-54: Update the two Link components for "Contributors" and
"Login" in Navbar (the Link elements around the "Contributors" and "Login" text)
to use the same blue-based hover utility classes as the other nav items: replace
the current hover classes `hover:text-gray-300` and `hover:border-gray-400` with
the blue variants used elsewhere (e.g., `hover:text-blue-300` and
`hover:border-blue-400`) so all nav links share consistent hover text and border
styles.
- Around line 30-54: The desktop navigation (the div with className "hidden
md:flex space-x-6") is missing Link entries for the About and Contact routes;
add two Link components for to="/about" (text "About") and to="/contact" (text
"Contact") inside that same div, using the same styling pattern/classes as the
existing Link elements (e.g., mirror the hover/text/border classes used for
Contributors or Tracker) so desktop and mobile menus contain the same routes.

---

Nitpick comments:
In `@src/components/Navbar.tsx`:
- Around line 92-126: The mobile nav Link elements in Navbar (the Link
components for Home, About, Contact, Contributors, Login) use hover:border-black
which has poor contrast in dark mode; update each Link's className to include
dark:hover:border-gray-400 (in addition to the existing hover:border-black) so
the hover border is visible on dark backgrounds and keep the onClick={() =>
setIsOpen(false)} behavior unchanged.
🪄 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: 1feec921-1adc-4a5e-894d-d5955519fcfb

📥 Commits

Reviewing files that changed from the base of the PR and between 56e17a3 and fb94e12.

📒 Files selected for processing (1)
  • src/components/Navbar.tsx

Comment thread src/components/Navbar.tsx
Comment on lines 31 to 42
<Link
to="/"
className="text-lg font-medium hover:text-gray-300 transition-all px-2 py-1 border border-transparent hover:border-gray-400 rounded"
className="text-lg font-medium hover:text-blue-300 transition-all px-2 py-1 border border-transparent hover:border-gray-400 rounded"
>
Home
</Link>
<Link
to="/track"
className="text-lg font-medium hover:text-gray-300 transition-all px-2 py-1 border border-transparent hover:border-gray-400 rounded"
className="text-lg font-medium text-black hover:text-blue-600 transition-all px-2 py-1 border border-transparent hover:border-blue-400 rounded"
>
Tracker
</Link>
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.

⚠️ Potential issue | 🟠 Major | ⚡ Quick win

Inconsistent hover styling between Home and Tracker links.

The Home link uses hover:text-blue-300 while the Tracker link uses hover:text-blue-600. This inconsistency creates a confusing visual experience where similar navigation items behave differently on hover.

♻️ Proposed fix for consistent styling
           <Link
             to="/"
-            className="text-lg font-medium hover:text-blue-300 transition-all px-2 py-1 border border-transparent hover:border-gray-400 rounded"
+            className="text-lg font-medium hover:text-blue-600 transition-all px-2 py-1 border border-transparent hover:border-blue-400 rounded"
           >
             Home
           </Link>
           <Link
             to="/track"
-            className="text-lg font-medium text-black  hover:text-blue-600 transition-all px-2 py-1 border border-transparent hover:border-blue-400 rounded"
+            className="text-lg font-medium hover:text-blue-600 transition-all px-2 py-1 border border-transparent hover:border-blue-400 rounded"
           >
             Tracker
           </Link>

This unifies both links to use hover:text-blue-600 and hover:border-blue-400, and removes the problematic explicit text-black.

📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
<Link
to="/"
className="text-lg font-medium hover:text-gray-300 transition-all px-2 py-1 border border-transparent hover:border-gray-400 rounded"
className="text-lg font-medium hover:text-blue-300 transition-all px-2 py-1 border border-transparent hover:border-gray-400 rounded"
>
Home
</Link>
<Link
to="/track"
className="text-lg font-medium hover:text-gray-300 transition-all px-2 py-1 border border-transparent hover:border-gray-400 rounded"
className="text-lg font-medium text-black hover:text-blue-600 transition-all px-2 py-1 border border-transparent hover:border-blue-400 rounded"
>
Tracker
</Link>
<Link
to="/"
className="text-lg font-medium hover:text-blue-600 transition-all px-2 py-1 border border-transparent hover:border-blue-400 rounded"
>
Home
</Link>
<Link
to="/track"
className="text-lg font-medium hover:text-blue-600 transition-all px-2 py-1 border border-transparent hover:border-blue-400 rounded"
>
Tracker
</Link>
🤖 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/Navbar.tsx` around lines 31 - 42, The Home and Tracker Link
elements in Navbar.tsx have inconsistent hover styles (Home uses
hover:text-blue-300; Tracker uses hover:text-blue-600 and hover:border-blue-400)
and the Tracker also forces text-black; update the Link for "/" (Home) to match
the Tracker hover behavior by using hover:text-blue-600 and
hover:border-blue-400 and remove the explicit text-black from the Link for
"/track" so both links share the same hover/font behavior; locate the Link
elements with to="/" and to="/track" in the Navbar component and make these
style changes.

Comment thread src/components/Navbar.tsx
<Link
to="/track"
className="text-lg font-medium hover:text-gray-300 transition-all px-2 py-1 border border-transparent hover:border-gray-400 rounded"
className="text-lg font-medium text-black hover:text-blue-600 transition-all px-2 py-1 border border-transparent hover:border-blue-400 rounded"
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.

⚠️ Potential issue | 🔴 Critical | ⚡ Quick win

Critical: Explicit text-black breaks dark mode visibility.

The Tracker link specifies text-black without a dark mode variant. This will override the parent's dark:text-white class, rendering the link invisible (or extremely low contrast) in dark mode.

🐛 Proposed fix
-            className="text-lg font-medium text-black  hover:text-blue-600 transition-all px-2 py-1 border border-transparent hover:border-blue-400 rounded"
+            className="text-lg font-medium hover:text-blue-600 transition-all px-2 py-1 border border-transparent hover:border-blue-400 rounded"

Remove the explicit text-black to allow the parent's text-black dark:text-white to apply correctly. Also fixes the double space.

📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
className="text-lg font-medium text-black hover:text-blue-600 transition-all px-2 py-1 border border-transparent hover:border-blue-400 rounded"
className="text-lg font-medium hover:text-blue-600 transition-all px-2 py-1 border border-transparent hover:border-blue-400 rounded"
🤖 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/Navbar.tsx` at line 39, The Tracker link's className in the
Navbar component includes an explicit "text-black" which overrides dark mode;
remove "text-black" (and the extra space) from the className string on the
Tracker link so the parent's "dark:text-white" can take effect, leaving the
other utility classes (hover:text-blue-600, transition-all, px-2, py-1, border
border-transparent, hover:border-blue-400, rounded) intact.

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

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant