Skip to content

fix: replace lucide GitHub icon with custom SVG icon#365

Open
ombalgude wants to merge 1 commit into
apsinghdev:mainfrom
ombalgude:fix/replace-github-icon-with-custom-svg
Open

fix: replace lucide GitHub icon with custom SVG icon#365
ombalgude wants to merge 1 commit into
apsinghdev:mainfrom
ombalgude:fix/replace-github-icon-with-custom-svg

Conversation

@ombalgude
Copy link
Copy Markdown

@ombalgude ombalgude commented Apr 22, 2026

What does this PR do?

Replaces the Github icon from lucide-react with a custom branded SVG in the Navbar.

Changes

  • Updated Github icon import in navbar.tsx

Before

Before UI

After

After UI

Type of change

  • UI improvement

Summary by CodeRabbit

  • Style
    • Updated the GitHub icon in the navigation bar to use a custom icon component with improved rendering consistency across desktop and mobile layouts.

@vercel
Copy link
Copy Markdown

vercel Bot commented Apr 22, 2026

@ombalgude is attempting to deploy a commit to the AJEET PRATAP SINGH's projects Team on Vercel.

A member of the Team first needs to authorize it.

@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented Apr 22, 2026

📝 Walkthrough

Walkthrough

The navbar component replaces the GitHub icon from lucide-react with a custom local GitHub icon component. The icon is now rendered within a sized wrapper div instead of directly applying size classes to the icon element, affecting both desktop and mobile navigation sections.

Changes

Cohort / File(s) Summary
GitHub Icon Refactoring
apps/web/src/components/landing-sections/navbar.tsx
Switched GitHub icon source from lucide-react to local @/components/icons/icons component. Icon is now wrapped in a <div className="w-5 h-5"> instead of applying size classes directly to the icon element in both desktop and mobile navbar sections.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~8 minutes

Poem

🐰 A GitHub icon, reimagined with flair,
Swapped from lucide to custom care,
Wrapped in a div with perfect sizing,
The navbar now shows local rising! 🚀

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately describes the main change: replacing a lucide-react GitHub icon with a custom SVG icon in the navbar component, which aligns with the file changes and PR objectives.
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

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

🧹 Nitpick comments (1)
apps/web/src/components/landing-sections/navbar.tsx (1)

3-11: keep imports grouped by source type.

the new local Github import is mixed into the third-party block, and PrimaryButton is still using a relative path. while touching this block, please group third-party imports before local imports and prefer the @/ alias.

proposed import cleanup
 import React, { useState } from "react";
-import PrimaryButton from "../ui/custom-button";
 import { motion, useScroll, useMotionValueEvent } from "framer-motion";
 import Image from "next/image";
-import { Terminal, Menu, X } from "lucide-react";
-import { Github } from "@/components/icons/icons";
 import Link from "next/link";
 import { usePathname } from "next/navigation";
+import { Terminal, Menu, X } from "lucide-react";
+
+import { Github } from "@/components/icons/icons";
+import PrimaryButton from "@/components/ui/custom-button";
 import { cn } from "@/lib/utils";
 import { useAnalytics } from "@/hooks/useAnalytics";

as per coding guidelines, “organize imports in order: react → third-party → local components → utils → types” and “use absolute imports from @/ prefix when available”.

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@apps/web/src/components/landing-sections/navbar.tsx` around lines 3 - 11,
Reorder and normalize the import block in navbar.tsx so imports follow the
project's convention (react → third-party → local components → utils → types):
move third-party imports (framer-motion, next/image, lucide-react, next/link,
next/navigation) together at the top, then local component imports (change
PrimaryButton to use the "@/components/..." alias and place Github with other
local icons like "@/components/icons/icons"), followed by utils/hooks (cn,
useAnalytics). Ensure the unique symbols PrimaryButton and Github are imported
from "@/..." and that useScroll/useMotionValueEvent, Image, Terminal/Menu/X,
Link, usePathname, cn, and useAnalytics remain in their appropriate grouped
sections.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In `@apps/web/src/components/landing-sections/navbar.tsx`:
- Line 119: The Github icon svg is not constrained by its wrapper so it can
overflow; update the shared Github icon in
apps/web/src/components/icons/icons.tsx (the Github function) to accept
SVGProps<SVGSVGElement> (or at minimum forward a className) and apply
className="w-5 h-5" or width/height attributes to the svg itself, then update
usages in navbar.tsx (the <Github /> instances at the reported locations) to
pass the className (e.g. <Github className="w-5 h-5" aria-hidden="true" />) so
the SVG respects the 20px sizing (also apply same change to the other occurrence
noted).

---

Nitpick comments:
In `@apps/web/src/components/landing-sections/navbar.tsx`:
- Around line 3-11: Reorder and normalize the import block in navbar.tsx so
imports follow the project's convention (react → third-party → local components
→ utils → types): move third-party imports (framer-motion, next/image,
lucide-react, next/link, next/navigation) together at the top, then local
component imports (change PrimaryButton to use the "@/components/..." alias and
place Github with other local icons like "@/components/icons/icons"), followed
by utils/hooks (cn, useAnalytics). Ensure the unique symbols PrimaryButton and
Github are imported from "@/..." and that useScroll/useMotionValueEvent, Image,
Terminal/Menu/X, Link, usePathname, cn, and useAnalytics remain in their
appropriate grouped sections.
🪄 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: 7484905d-8e90-4121-98b3-62d21ae611ee

📥 Commits

Reviewing files that changed from the base of the PR and between a2ef5f3 and 62fabb2.

📒 Files selected for processing (1)
  • apps/web/src/components/landing-sections/navbar.tsx

className="hidden min-[1115px]:flex items-center gap-2 px-4 py-2.5 bg-github-bg hover:bg-github-hover transition-colors rounded-lg border border-github-border text-white"
>
<Github className="w-5 h-5" />
<div className="w-5 h-5"><Github /></div>
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

constrain the custom svg, not only its wrapper.

Github currently returns a bare svg from apps/web/src/components/icons/icons.tsx:195-197, so w-5 h-5 on the wrapper does not force the svg itself to 20px. this can overflow the contribute button in both desktop and mobile nav.

proposed local fix
-          <div className="w-5 h-5"><Github /></div>
+          <span
+            aria-hidden="true"
+            className="w-5 h-5 [&>svg]:block [&>svg]:h-full [&>svg]:w-full"
+          >
+            <Github />
+          </span>
-            <div className="w-5 h-5"><Github /></div>
+            <span
+              aria-hidden="true"
+              className="w-5 h-5 [&>svg]:block [&>svg]:h-full [&>svg]:w-full"
+            >
+              <Github />
+            </span>

longer term, consider making the shared icon accept SVGProps<SVGSVGElement> so callers can use <Github className="w-5 h-5" aria-hidden="true" />.

Also applies to: 160-160

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@apps/web/src/components/landing-sections/navbar.tsx` at line 119, The Github
icon svg is not constrained by its wrapper so it can overflow; update the shared
Github icon in apps/web/src/components/icons/icons.tsx (the Github function) to
accept SVGProps<SVGSVGElement> (or at minimum forward a className) and apply
className="w-5 h-5" or width/height attributes to the svg itself, then update
usages in navbar.tsx (the <Github /> instances at the reported locations) to
pass the className (e.g. <Github className="w-5 h-5" aria-hidden="true" />) so
the SVG respects the 20px sizing (also apply same change to the other occurrence
noted).

@ombalgude ombalgude closed this Apr 23, 2026
@ombalgude ombalgude reopened this Apr 23, 2026
@ombalgude
Copy link
Copy Markdown
Author

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant