Skip to content

feat: add glassmorphism effect to navbar#330

Open
Kartikey-Pathak wants to merge 3 commits into
GitMetricsLab:mainfrom
Kartikey-Pathak:feat/glass-navbar
Open

feat: add glassmorphism effect to navbar#330
Kartikey-Pathak wants to merge 3 commits into
GitMetricsLab:mainfrom
Kartikey-Pathak:feat/glass-navbar

Conversation

@Kartikey-Pathak
Copy link
Copy Markdown

@Kartikey-Pathak Kartikey-Pathak commented May 19, 2026

Related Issue


Description

This PR enhances the navbar UI by introducing a modern glassmorphism effect while preserving existing functionality and responsiveness.

Changes Made

  • Added subtle background transparency to the navbar
  • Added backdrop blur effect for a glass-like appearance
  • Added soft border separation for improved visual layering
  • Ensured proper readability in both light and dark themes
  • Maintained responsiveness without layout shifts

Why This Change?

  • Improves modern UI aesthetics
  • Enhances visual depth and consistency
  • Aligns the navbar with current application design trends
  • Improves user experience without changing functionality

How Has This Been Tested?

✅ Tested locally using npm run dev

Verified:

  • Navbar renders correctly on desktop and mobile devices

  • Glass effect works properly in both:

    • ☀️ Light Mode
    • 🌙 Dark Mode
  • Text and icons remain readable

  • No responsiveness or layout issues introduced

  • Existing navbar functionality remains unchanged


Screenshots (if applicable)

Before

Screenshot 2026-05-15 164331

After

Screenshot 2026-05-19 132633 ---

Type of Change

  • Bug fix
  • New feature
  • Code style update
  • Breaking change
  • Documentation update

Summary by CodeRabbit

  • Style
    • Applied fixed background color to the application container
    • Updated navigation bar styling and layout for desktop and mobile views
    • Refined mobile menu panel structure and appearance

Review Change Stack

@netlify
Copy link
Copy Markdown

netlify Bot commented May 19, 2026

Deploy Preview for github-spy ready!

Name Link
🔨 Latest commit 79e21cc
🔍 Latest deploy log https://app.netlify.com/projects/github-spy/deploys/6a0c17d8ec623a00081089a1
😎 Deploy Preview https://deploy-preview-330--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 19, 2026

📝 Walkthrough

Walkthrough

The PR updates the application's visual appearance by adding a fixed dark background to the root container and refactors the navigation bar. The Navbar now uses plain Link elements for desktop routes instead of NavLink, removes the UserPlus icon import, and rewrites the MobileNavLink helper as a typed component that derives its className from the isActive state.

Changes

UI Styling and Navigation Updates

Layer / File(s) Summary
App root background color
src/App.tsx
The root <div> container adds a fixed background color class bg-[#1F2937] to establish the base page background.
Navbar structure and component helpers
src/components/Navbar.tsx
Lucide-react imports remove UserPlus; desktop navigation links switch from NavLink to Link elements, affecting how active states are styled; mobile menu panel markup and styling are revised; MobileNavLink is rewritten as a typed component computing its NavLink className from isActive instead of a simple definition.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~12 minutes

Possibly related issues

Possibly related PRs

Poem

🐰 A darker canvas now awaits,
With navbar links through redesigned gates,
MobileNavLink hops with types so clear,
Dark background sets the atmosphere!
Navigation springs and buttons align,
This rabbit declares the UI divine. ✨

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Title check ✅ Passed The PR title 'feat: add glassmorphism effect to navbar' directly matches the primary change: adding glassmorphism styling to the navbar component.
Description check ✅ Passed The PR description is comprehensive and complete, including all required template sections: related issue, detailed description with changes made and rationale, testing verification, before/after screenshots, and type of change selection.
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

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

🤖 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/App.tsx`:
- Line 15: The root layout hardcodes a dark background via the div className
"bg-[`#1F2937`]" in App (the root JSX element), which breaks theme-awareness;
replace that hardcoded color with theme-aware utility classes (e.g., separate
light and dark classes such as bg-white and dark:bg-... or your design-system
surface classes) so the root background follows the active theme and doesn't
tint translucent components like the glass navbar; update the className on the
same root div in App.tsx (where "relative bg-[`#1F2937`] flex flex-col
min-h-screen" appears) to use appropriate light/dark classes and remove the
hardcoded hex.

In `@src/components/Navbar.tsx`:
- Around line 27-53: The desktop navbar in Navbar.tsx is missing the Sign Up
link (the <Link to="/signup"> entry present in the mobile nav), causing signup
to be accessible only at mobile breakpoints; add a matching Sign Up <Link
to="/signup"> with the same classes/structure as the other desktop links (same
styling used by Home/Tracker/Contributors/Login) so the signup route is
available for md+ users; locate the desktop link group where those Link
components are rendered and insert the Sign Up link there to mirror the mobile
navigation.
🪄 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: 7c30a94e-ded3-4856-9851-9b1580f8393a

📥 Commits

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

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

Comment thread src/App.tsx

return (
<div className="relative flex flex-col min-h-screen">
<div className="relative bg-[#1F2937] flex flex-col min-h-screen">
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 | 🟡 Minor | ⚡ Quick win

Avoid hardcoding a dark root background in a theme-aware layout.

Line 15 sets a fixed dark color (bg-[#1F2937]), which can make the light theme look tinted behind translucent UI (notably the glass navbar). Use light/dark classes instead.

Proposed fix
-      <div className="relative bg-[`#1F2937`] flex flex-col min-h-screen">
+      <div className="relative bg-gray-50 dark:bg-gray-900 flex flex-col min-h-screen">
📝 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
<div className="relative bg-[#1F2937] flex flex-col min-h-screen">
<div className="relative bg-gray-50 dark:bg-gray-900 flex flex-col min-h-screen">
🤖 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/App.tsx` at line 15, The root layout hardcodes a dark background via the
div className "bg-[`#1F2937`]" in App (the root JSX element), which breaks
theme-awareness; replace that hardcoded color with theme-aware utility classes
(e.g., separate light and dark classes such as bg-white and dark:bg-... or your
design-system surface classes) so the root background follows the active theme
and doesn't tint translucent components like the glass navbar; update the
className on the same root div in App.tsx (where "relative bg-[`#1F2937`] flex
flex-col min-h-screen" appears) to use appropriate light/dark classes and remove
the hardcoded hex.

Comment thread src/components/Navbar.tsx
Comment on lines +27 to +53
<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"
>
Home
</Link>

<div className="hidden lg:flex items-center justify-center flex-1 space-x-1">
<NavLink to="/" className={navLinkStyles}>Home</NavLink>
<NavLink to="/track" className={navLinkStyles}>Tracker</NavLink>
<NavLink to="/contributors" className={navLinkStyles}>Contributors</NavLink>
</div>
<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"
>
Tracker
</Link>

<div className="hidden lg:flex items-center space-x-5">
<div className="h-8 w-[1.5px] bg-indigo-200/60 dark:bg-gray-700 mx-2 rounded-full" />
<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>

<button
onClick={toggleTheme}
className="p-2.5 rounded-full text-slate-500 dark:text-gray-400 bg-white/40 dark:bg-gray-800/40 hover:bg-white transition-all shadow-sm"
aria-label={mode === 'dark' ? "Switch to light mode" : "Switch to dark mode"}
>
{mode === "dark" ? <Sun className="h-5 w-5" /> : <Moon className="h-5 w-5" />}
</button>

<Link to="/login" className="text-lg font-bold text-slate-700 dark:text-gray-200 hover:text-blue-600 px-2">Login</Link>
<Link to="/signup" className="flex items-center space-x-2 px-7 py-3 text-lg font-bold text-white bg-blue-600 rounded-full hover:shadow-lg transition-all active:scale-95">
<UserPlus className="h-5 w-5" />
<span>Sign Up</span>
</Link>
</div>
<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"
>
Login
</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

Desktop navigation drops Sign Up, creating breakpoint-only access.

/signup is available in mobile nav but missing on desktop. This is a functionality regression for md+ users and inconsistent behavior across responsive layouts.

Proposed fix
           <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"
           >
             Login
           </Link>
+          <Link
+            to="/signup"
+            className="text-lg font-medium px-3 py-1 rounded border border-blue-500 text-blue-600 dark:text-blue-400 hover:bg-blue-50 dark:hover:bg-blue-900/30 transition-all"
+          >
+            Sign Up
+          </Link>

Also applies to: 126-140

🤖 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 27 - 53, The desktop navbar in
Navbar.tsx is missing the Sign Up link (the <Link to="/signup"> entry present in
the mobile nav), causing signup to be accessible only at mobile breakpoints; add
a matching Sign Up <Link to="/signup"> with the same classes/structure as the
other desktop links (same styling used by Home/Tracker/Contributors/Login) so
the signup route is available for md+ users; locate the desktop link group where
those Link components are rendered and insert the Sign Up link there to mirror
the mobile navigation.

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.

1 participant