Skip to content

fix: lucide-react 1.17 compat — restore Github and Codepen glyphs#502

Merged
thegdsks merged 2 commits into
mainfrom
fix/lucide-react-1.17-compat
Jun 7, 2026
Merged

fix: lucide-react 1.17 compat — restore Github and Codepen glyphs#502
thegdsks merged 2 commits into
mainfrom
fix/lucide-react-1.17-compat

Conversation

@thegdsks
Copy link
Copy Markdown
Member

@thegdsks thegdsks commented Jun 7, 2026

Replaces #481 (Dependabot bump of lucide-react from 0.577.0 to 1.17.0).

What broke

lucide-react 1.0 was a major rewrite that removed all brand logos (GitHub, Codepen, and other trademarked marks) from the icon set. The 1.17.0 build therefore fails pnpm exec tsc --noEmit with:

src/app/contact/page.tsx(2,10): error TS2305: Module '"lucide-react"' has no exported member 'Github'.
src/app/extensions/page.tsx(9,3): error TS2305: Module '"lucide-react"' has no exported member 'Github'.
src/app/submit/page.tsx(8,3): error TS2305: Module '"lucide-react"' has no exported member 'Github'.
src/components/footer.tsx(1,24): error TS2305: Module '"lucide-react"' has no exported member 'Github'.
src/components/header.tsx(6,39): error TS2305: Module '"lucide-react"' has no exported member 'Github'.
src/components/icons/detail/open-in-editor-menu.tsx(9,3): error TS2305: Module '"lucide-react"' has no exported member 'Codepen'.
src/components/submit/submit-form.tsx(10,3): error TS2305: Module '"lucide-react"' has no exported member 'Github'.
src/components/viewer/deep-link-actions.tsx(8,3): error TS2305: Module '"lucide-react"' has no exported member 'Codepen'.

Fix

Adds a small local module src/components/icons/shared/brand-icons.tsx exporting Github and Codepen as React components that mirror the lucide visual style (24x24, currentColor, stroke-linecap round, strokeWidth 2). All eight import sites swap the named import from lucide-react to the local module — JSX call sites stay byte-identical.

The richer multi-variant brand SVGs in public/icons/github/ and public/icons/codepen/ remain the source of truth for icon detail pages and downloads. The local stand-ins are only for UI chrome (repo links, deep-link affordances) where the line-icon style is wanted.

Verification

  • pnpm exec tsc --noEmit — passes
  • pnpm lint — 0 errors, 19 warnings (all pre-existing on main)

Test plan

  • Lint & Build workflow passes on this PR
  • Footer, header, submit, and contact pages still render the GitHub icon
  • Icon detail "Open in editor" menu still shows the Codepen mark

Closes #481.

dependabot Bot and others added 2 commits June 1, 2026 20:47
Bumps [lucide-react](https://github.com/lucide-icons/lucide/tree/HEAD/packages/lucide-react) from 0.577.0 to 1.17.0.
- [Release notes](https://github.com/lucide-icons/lucide/releases)
- [Commits](https://github.com/lucide-icons/lucide/commits/1.17.0/packages/lucide-react)

---
updated-dependencies:
- dependency-name: lucide-react
  dependency-version: 1.17.0
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
…emoval

lucide-react 1.0 dropped all brand logos (Github, Codepen, and other
trademarked marks) from the icon set. The bumped 1.17.0 build fails
tsc with TS2305 across 8 files importing those names.

Adds local stroke-icon stand-ins under src/components/icons/shared/brand-icons.tsx
matching the lucide visual style (currentColor, 24x24, stroke-linecap round)
so existing JSX call sites stay unchanged. The richer brand SVGs in
public/icons remain the source of truth for icon detail pages and downloads.

Co-Authored-By: Glinr <bot@glincker.com>
Copilot AI review requested due to automatic review settings June 7, 2026 18:12
@github-actions github-actions Bot added ui User interface changes dependencies labels Jun 7, 2026
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Restores Github and Codepen glyph usage after upgrading lucide-react to ^1.17.0 (which removed brand icons) by introducing local brand icon components and swapping imports at the affected call sites.

Changes:

  • Bump lucide-react dependency from ^0.577.0 to ^1.17.0 (and update lockfile).
  • Add src/components/icons/shared/brand-icons.tsx exporting local Github and Codepen React SVG components.
  • Update all affected pages/components to import Github/Codepen from the local module instead of lucide-react.

Reviewed changes

Copilot reviewed 10 out of 11 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
src/components/viewer/deep-link-actions.tsx Switch Codepen import to local brand icon module to restore build compatibility.
src/components/submit/submit-form.tsx Switch Github import to local brand icon module to restore build compatibility.
src/components/icons/shared/brand-icons.tsx New local Github/Codepen SVG components intended to match lucide-style UI chrome.
src/components/icons/detail/open-in-editor-menu.tsx Switch Codepen import to local brand icon module.
src/components/header.tsx Switch Github import to local brand icon module.
src/components/footer.tsx Switch Github import to local brand icon module.
src/app/submit/page.tsx Switch Github import to local brand icon module.
src/app/extensions/page.tsx Switch Github import to local brand icon module.
src/app/contact/page.tsx Switch Github import to local brand icon module (used as an icon component in a config array).
pnpm-lock.yaml Lockfile updates reflecting the lucide-react@1.17.0 bump.
package.json Update lucide-react dependency range to ^1.17.0.
Files not reviewed (1)
  • pnpm-lock.yaml: Language not supported

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

Comment thread src/components/icons/shared/brand-icons.tsx
@greptile-apps
Copy link
Copy Markdown
Contributor

greptile-apps Bot commented Jun 7, 2026

Greptile Summary

Upgrades lucide-react from 0.577.0 to 1.17.0 and introduces a thin local shim (src/components/icons/shared/brand-icons.tsx) to replace the Github and Codepen brand-logo exports that were removed in the lucide-react v1 major rewrite. All eight consuming files are updated to import from the shim instead of the package.

  • New brand-icons.tsx: two forwardRef components that replicate lucide's SVGProps<SVGSVGElement> + size API using the exact pre-v1 path data, keeping UI chrome byte-identical.
  • Eight import sites (contact/page, extensions/page, submit/page, footer, header, open-in-editor-menu, submit-form, deep-link-actions) mechanically swapped from lucide-react to the local module; no JSX call sites change.

Confidence Score: 5/5

Safe to merge — the change is a targeted compatibility fix with no logic changes at any call site.

The shim correctly mirrors lucide's forwardRef + SVGProps + size-prop API, the SVG paths are faithful to the pre-v1 glyphs, all eight import sites are updated, and TypeScript type-checking passes. No JSX call sites were modified, so the rendered output is visually identical to before the lucide-react upgrade.

No files require special attention.

Important Files Changed

Filename Overview
src/components/icons/shared/brand-icons.tsx New shim module. Correct forwardRef + SVGProps + size-prop pattern; SVG paths faithfully match the old lucide pre-v1 glyphs; baseProps spread order ensures callers can override all attributes.
package.json Bumps lucide-react from ^0.577.0 to ^1.17.0 to resolve the Dependabot PR; no other dependency changes.
src/components/header.tsx Github import swapped to local shim; usage at line 566 (className="h-4 w-4") is identical to prior behavior.
src/components/footer.tsx Github import swapped; no other changes.
src/components/icons/detail/open-in-editor-menu.tsx Codepen import swapped to local shim; no JSX call-site changes.
src/components/viewer/deep-link-actions.tsx Codepen import swapped to local shim; no JSX call-site changes.
src/app/contact/page.tsx Github import split: remaining lucide imports stay in lucide-react, Github moved to local shim.
src/components/submit/submit-form.tsx Github import swapped; no other changes.

Flowchart

%%{init: {'theme': 'neutral'}}%%
flowchart TD
    A["lucide-react@1.17.0\n(Github & Codepen removed)"] -->|"still provides"| B["All other Lucide icons\n(ArrowRight, Mail, etc.)"]

    C["brand-icons.tsx\n(new local shim)"] -->|"exports"| D["Github component\n(forwardRef SVG)"]
    C -->|"exports"| E["Codepen component\n(forwardRef SVG)"]

    D --> F["header.tsx"]
    D --> G["footer.tsx"]
    D --> H["contact/page.tsx"]
    D --> I["extensions/page.tsx"]
    D --> J["submit/page.tsx"]
    D --> K["submit-form.tsx"]
    E --> L["open-in-editor-menu.tsx"]
    E --> M["deep-link-actions.tsx"]
Loading

Reviews (1): Last reviewed commit: "fix: restore Github and Codepen glyphs a..." | Re-trigger Greptile

@thegdsks
Copy link
Copy Markdown
Member Author

thegdsks commented Jun 7, 2026

Local checks pass (tsc --noEmit clean, pnpm lint 0 errors) and the GitHub Lint & Build workflow is green. Ready for maintainer review + squash-merge.

@thegdsks thegdsks merged commit 4cb8f82 into main Jun 7, 2026
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

dependencies ui User interface changes

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants