Skip to content

Conversation

janvis11
Copy link

@janvis11 janvis11 commented Sep 14, 2025

Related Issue


Description

This PR enhances the Navbar UI/UX with improved styling and interactions:

Added better typography for headings
Improved hover effects for navbar links
Applied glassmorphism effect with blur and subtle gradient overlay
Polished overall navbar aesthetics for a modern look


How Has This Been Tested?

Verified responsiveness across desktop and mobile.
Keeps the existing code structure intact.
Enhancement inspired by modern UI trends.


Screenshots (if applicable)

Screenshot 2025-09-14 121758 ---

Type of Change

  • New feature
  • Code style update

Summary by CodeRabbit

  • New Features

    • Active route highlighting in the navigation.
  • Enhancements

    • Updated nav links to Home (/), Tracker (/track), Contributors (/contributors), and Login (/login); removed About and Contact.
    • Visual refresh: translucent/blurred navbar, larger logo, gradient hover underline on brand and nav items, and new subtle glow drop-shadow.
    • Theme toggle restyled with colored/glow icons and clearer labels; moved into the mobile panel.
    • Mobile navigation gains smoother expand/collapse animation and retains active item highlighting; desktop and mobile share consistent links.
  • Refactor

    • Unified navigation links into a single source for consistency.

Copy link

netlify bot commented Sep 14, 2025

Deploy Preview for github-spy ready!

Name Link
🔨 Latest commit bee7206
🔍 Latest deploy log https://app.netlify.com/projects/github-spy/deploys/68c6aaf59dfdcf00084ecf4a
😎 Deploy Preview https://deploy-preview-209--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.

Copy link
Contributor

coderabbitai bot commented Sep 14, 2025

Walkthrough

Navbar refactored to use a shared navLinks array, adds route-aware active styling via useLocation, updates desktop/mobile visuals and animations (blurred background, gradient underlines, hover effects), moves/enhances theme toggle, and adds a subtle drop-shadow glow in Tailwind config.

Changes

Cohort / File(s) Summary
Navbar refactor & styling
src/components/Navbar.tsx
Added navLinks array and useLocation for active-route awareness; replaced hard-coded desktop/mobile links with mapped links; removed /about and /contact; added translucent blurred background, larger logo, gradient underline per item, hover animations, and shared active styling across viewports; mobile menu now animates height/opacity and includes labeled theme toggle.
Tailwind config: visual token
tailwind.config.js
Extended theme.dropShadow with a new glow value (0 0 8px rgba(255, 255, 255, 0.6)).

Sequence Diagram(s)

sequenceDiagram
  autonumber
  actor User
  participant Router as Router
  participant Navbar as Navbar
  participant Theme as ThemeContext

  Router->>Navbar: render with current location
  Navbar->>Navbar: build nav items from navLinks
  Navbar->>Navbar: compare location.pathname → apply active styles
  Note right of Navbar: gradient underline + hover animation

  User->>Navbar: click theme toggle
  Navbar->>Theme: toggleTheme()
  Theme-->>Navbar: updated theme
  Navbar-->>User: re-render with new styles

  User->>Navbar: toggle mobile menu
  Navbar->>Navbar: isOpen = !isOpen (animate max-h / opacity)
  Navbar-->>User: show/hide mobile panel with mapped links
Loading

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

Possibly related PRs

Suggested labels

level1

Poem

I hop where gradients softly glow,
Links in rows that gently flow.
A blurred-backdrop, toggle bright—
I nibble themes from day to night. 🐰✨

Pre-merge checks and finishing touches

❌ Failed checks (1 warning, 1 inconclusive)
Check name Status Explanation Resolution
Out of Scope Changes Check ⚠️ Warning Most edits are styling-related and support the stated objective (including the Tailwind dropShadow addition), but the Navbar changes remove the /about and /contact links, which is a functional navigation change not requested by issue #201 and may affect application behavior. Removing navigation items is out of scope for a styling-only enhancement unless intentionally documented and approved. Therefore this PR contains at least one out-of-scope change. Either restore the removed /about and /contact links or document and justify their removal in the PR description and linked issue, and include a short note on navigation impact and relevant tests before merging.
Linked Issues Check ❓ Inconclusive The changes implement hover interactions, gradient underline animations, active-route highlighting, and consistent desktop/mobile link generation, which address the linked issue's hover and transition objectives. However, the provided summaries do not show explicit changes to font-family, font-size, or spacing for navbar items—key typography requirements in issue #201—so those objectives cannot be verified from the artifacts. Because a primary typography/spacing requirement is not clearly evidenced, compliance with the linked issue is inconclusive. Please confirm or add the exact class/CSS changes (or code references) that implement the new font, size, and spacing, or include before/after screenshots that clearly show the typography adjustments so compliance can be re-evaluated.
✅ Passed checks (3 passed)
Check name Status Explanation
Title Check ✅ Passed The title succinctly and accurately summarizes the primary change—enhancing the Navbar's styling, headings, and hover effects. It is concise and specific enough that a teammate scanning history will understand the PR's main purpose.
Description Check ✅ Passed The PR description follows the repository template: it includes the Related Issue (Closes: #201), a clear Description, a brief "How Has This Been Tested?" section, a screenshot, and the Type of Change checkboxes. The testing section is concise and could be improved with explicit reproduction steps or a short list of browsers/viewports tested. Overall the description is mostly complete and meets the template requirements.
Docstring Coverage ✅ Passed No functions found in the changes. Docstring coverage check skipped.
✨ Finishing touches
  • 📝 Generate Docstrings
🧪 Generate unit tests
  • Create PR with unit tests
  • Post copyable unit tests in a comment

Tip

👮 Agentic pre-merge checks are now available in preview!

Pro plan users can now enable pre-merge checks in their settings to enforce checklists before merging PRs.

  • Built-in checks – Quickly apply ready-made checks to enforce title conventions, require pull request descriptions that follow templates, validate linked issues for compliance, and more.
  • Custom agentic checks – Define your own rules using CodeRabbit’s advanced agentic capabilities to enforce organization-specific policies and workflows. For example, you can instruct CodeRabbit’s agent to verify that API documentation is updated whenever API schema files are modified in a PR. Note: Upto 5 custom checks are currently allowed during the preview period. Pricing for this feature will be announced in a few weeks.

Please see the documentation for more information.

Example:

reviews:
  pre_merge_checks:
    custom_checks:
      - name: "Undocumented Breaking Changes"
        mode: "warning"
        instructions: |
          Pass/fail criteria: All breaking changes to public APIs, CLI flags, environment variables, configuration keys, database schemas, or HTTP/GraphQL endpoints must be documented in the "Breaking Change" section of the PR description and in CHANGELOG.md. Exclude purely internal or private changes (e.g., code not exported from package entry points or explicitly marked as internal).

Please share your feedback with us on this Discord post.


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

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

🎉 Thank you @janvis11 for your contribution. Please make sure your PR follows https://github.com/GitMetricsLab/github_tracker/blob/main/CONTRIBUTING.md#-pull-request-guidelines

Copy link
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

🧹 Nitpick comments (7)
src/components/Navbar.tsx (7)

70-91: Add ARIA and restore visible focus for the hamburger button.

Current button hides outlines and lacks name/state; hurts keyboard/screen-reader users.

- <button
-   onClick={() => setIsOpen(!isOpen)}
-   className="relative w-8 h-8 flex flex-col space-y-[5px] items-center group focus:outline-none"
- >
+ <button
+   type="button"
+   onClick={() => setIsOpen(!isOpen)}
+   aria-label={isOpen ? "Close navigation menu" : "Open navigation menu"}
+   aria-controls="mobile-nav"
+   aria-expanded={isOpen}
+   className="relative w-8 h-8 flex flex-col space-y-[5px] items-center group focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-indigo-400 focus-visible:ring-offset-2"
+ >

95-101: Connect aria-controls and label the mobile region.

Tie the toggle to the panel and add a region label.

- <div
+ <div
+   id="mobile-nav"
+   role="region"
+   aria-label="Mobile navigation"
    className={`md:hidden overflow-hidden transition-all duration-500 ${
      isOpen ? "max-h-96 opacity-100" : "max-h-0 opacity-0"
    }`}
  >
-   <div className="bg-white/90 dark:bg-gray-800/90 backdrop-blur-md text-black dark:text-white border-t border-gray-200 dark:border-gray-700 px-6 py-4 space-y-4">
+   <div className="bg-white/90 dark:bg-gray-800/90 backdrop-blur-md text-black dark:text-white border-t border-gray-200 dark:border-gray-700 px-6 py-4 space-y-4">

56-66: Theme toggle needs accessible name/state and focus style.

- <button
-   onClick={toggleTheme}
-   className="ml-4 p-2 rounded-full border border-gray-400 dark:border-gray-600 hover:scale-110 hover:border-indigo-400 transition-all duration-500 transform hover:rotate-12"
- >
+ <button
+   type="button"
+   onClick={toggleTheme}
+   aria-pressed={mode === "dark"}
+   aria-label={mode === "dark" ? "Switch to light mode" : "Switch to dark mode"}
+   className="ml-4 p-2 rounded-full border border-gray-400 dark:border-gray-600 hover:scale-110 hover:border-indigo-400 transition-all duration-500 transform hover:rotate-12 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-indigo-400 focus-visible:ring-offset-2 motion-reduce:transform-none"
+ >

116-124: Mobile theme toggle: add ARIA pressed/name for parity with desktop.

- <button
+ <button
+   type="button"
    onClick={() => {
      toggleTheme();
      setIsOpen(false);
    }}
-   className="w-full text-left text-sm font-semibold px-3 py-2 rounded-lg border border-gray-500 hover:border-indigo-400 hover:text-indigo-400 dark:hover:text-indigo-300 transition duration-300"
+   aria-pressed={mode === "dark"}
+   aria-label={mode === "dark" ? "Switch to light mode" : "Switch to dark mode"}
+   className="w-full text-left text-sm font-semibold px-3 py-2 rounded-lg border border-gray-500 hover:border-indigo-400 hover:text-indigo-400 dark:hover:text-indigo-300 transition duration-300 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-indigo-400 focus-visible:ring-offset-2 motion-reduce:transition-none"
  >

96-99: Avoid fixed 24rem max-height; safer for future link growth.

Use viewport-based max height and allow scrolling to prevent clipping.

- className={`md:hidden overflow-hidden transition-all duration-500 ${
-   isOpen ? "max-h-96 opacity-100" : "max-h-0 opacity-0"
- }`}
+ className={`md:hidden overflow-hidden transition-[max-height,opacity] duration-500 ${
+   isOpen ? "max-h-[60vh] opacity-100" : "max-h-0 opacity-0"
+ }`}

Also consider adding "overflow-y-auto" to the inner panel if links may exceed the height.


43-49: Add visible focus styles on nav links.

Improves keyboard navigation without changing hover visuals.

- className={`relative text-lg font-medium px-3 py-2 rounded-lg transition-all duration-300 group
+ className={`relative text-lg font-medium px-3 py-2 rounded-lg transition-all duration-300 group focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-indigo-400

And mirror the same for the mobile link className base string.

Also applies to: 106-112


11-11: Don’t fail silently when ThemeContext is missing.

Returning null hides primary navigation; consider a defensive hook that throws with a clear message or a minimal fallback UI.

If preferred, I can draft a small useTheme() wrapper that enforces non-null context and centralizes the null check.

📜 Review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 22e52f9 and bfd607a.

📒 Files selected for processing (1)
  • src/components/Navbar.tsx (2 hunks)
🧰 Additional context used
🧬 Code graph analysis (1)
src/components/Navbar.tsx (1)
src/context/ThemeContext.tsx (1)
  • ThemeContext (10-10)
🔇 Additional comments (1)
src/components/Navbar.tsx (1)

15-20: Confirm /about & /contact presence; hoist navLinks

  • src/Routes/Router.tsx (lines ~14–21) includes /about and /contact — confirm their omission from the navbar is intentional.
  • Move the const navLinks (src/components/Navbar.tsx:15–20) outside the Navbar component or wrap it in useMemo([]) to avoid reallocating the array on every render.

@@ -1,62 +1,68 @@
import { Link } from "react-router-dom";
import { Link, useLocation } from "react-router-dom";
Copy link
Contributor

Choose a reason for hiding this comment

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

🛠️ Refactor suggestion

Use NavLink to simplify active state and improve a11y (aria-current).

You can drop manual pathname checks and get correct exact/partial matching + aria-current for free.

- import { Link, useLocation } from "react-router-dom";
+ import { Link, NavLink } from "react-router-dom";
@@
- const location = useLocation();
@@
-          {navLinks.map((link) => (
-            <Link
-              key={link.to}
-              to={link.to}
-              className={`relative text-lg font-medium px-3 py-2 rounded-lg transition-all duration-300 group
-                ${
-                  location.pathname === link.to
-                    ? "text-indigo-500 dark:text-indigo-400 font-semibold bg-indigo-50 dark:bg-indigo-900"
-                    : "hover:text-indigo-400 dark:hover:text-indigo-300 hover:bg-indigo-100 dark:hover:bg-gray-800"
-                }`}
-            >
+          {navLinks.map((link) => (
+            <NavLink
+              key={link.to}
+              to={link.to}
+              end={link.to === "/"}
+              className={({ isActive }) =>
+                `relative text-lg font-medium px-3 py-2 rounded-lg transition-all duration-300 group ${
+                  isActive
+                    ? "text-indigo-500 dark:text-indigo-400 font-semibold bg-indigo-50 dark:bg-indigo-900"
+                    : "hover:text-indigo-400 dark:hover:text-indigo-300 hover:bg-indigo-100 dark:hover:bg-gray-800"
+                }`
+              }
+            >
@@
-            </Link>
+            </NavLink>
@@
-          {navLinks.map((link) => (
-            <Link
-              key={link.to}
-              to={link.to}
-              onClick={() => setIsOpen(false)}
-              className={`block text-lg font-medium px-3 py-2 rounded-lg transition-all duration-300
-                ${
-                  location.pathname === link.to
-                    ? "text-indigo-500 dark:text-indigo-400 font-semibold bg-indigo-50 dark:bg-indigo-900"
-                    : "hover:text-indigo-400 dark:hover:text-indigo-300 hover:bg-indigo-100 dark:hover:bg-gray-800"
-                }`}
-            >
+          {navLinks.map((link) => (
+            <NavLink
+              key={link.to}
+              to={link.to}
+              end={link.to === "/"}
+              onClick={() => setIsOpen(false)}
+              className={({ isActive }) =>
+                `block text-lg font-medium px-3 py-2 rounded-lg transition-all duration-300 ${
+                  isActive
+                    ? "text-indigo-500 dark:text-indigo-400 font-semibold bg-indigo-50 dark:bg-indigo-900"
+                    : "hover:text-indigo-400 dark:hover:text-indigo-300 hover:bg-indigo-100 dark:hover:bg-gray-800"
+                }`
+              }
+            >
@@
-            </Link>
+            </NavLink>

Also applies to: 9-9, 39-54, 101-115

🤖 Prompt for AI Agents
In src/components/Navbar.tsx around lines 1 (and also apply to ranges 9-9,
39-54, 101-115), you are using Link and manual pathname checks to set an active
state and ARIA attributes; replace Link with React Router's NavLink (update the
import) and remove the manual pathname comparisons, relying on NavLink's
built-in active matching (use exact where needed or the end prop for exact
matching) which automatically sets aria-current="page"; update any active
className logic to use NavLink's className callback (or style callback) to
return the correct classes based on isActive.

Copy link
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: 0

🧹 Nitpick comments (1)
tailwind.config.js (1)

10-12: Nice addition: reusable glow token for navbar visuals.

Value is valid for Tailwind’s drop-shadow filter. Tiny polish: prefer modern color syntax.

Apply:

-        glow: "0 0 8px rgba(255, 255, 255, 0.6)", // white glow
+        glow: "0 0 8px rgb(255 255 255 / 0.6)", // white glow
📜 Review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between bfd607a and bee7206.

📒 Files selected for processing (1)
  • tailwind.config.js (1 hunks)
🔇 Additional comments (2)
tailwind.config.js (2)

14-16: LGTM.

No plugins needed for this change. Compatible with darkMode: 'class'.


4-7: Content globs are correct — no action required.
index.html is at the repo root; 'drop-shadow-glow' is used in src/components/Navbar.tsx (lines 62,64) and is defined in tailwind.config.js, so the JIT scanner will pick it up.

@janvis11
Copy link
Author

im done with it

@mehul-m-prajapati
Copy link
Collaborator

okay @janvis11 , thanks.. I will review tonight

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: Enhance Navbar Styling with Better Headings and Hover Effects
2 participants