fix: lucide-react 1.17 compat — restore Github and Codepen glyphs#502
Conversation
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>
There was a problem hiding this comment.
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-reactdependency from^0.577.0to^1.17.0(and update lockfile). - Add
src/components/icons/shared/brand-icons.tsxexporting localGithubandCodepenReact SVG components. - Update all affected pages/components to import
Github/Codepenfrom the local module instead oflucide-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.
Greptile SummaryUpgrades
Confidence Score: 5/5Safe 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.
|
| 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"]
Reviews (1): Last reviewed commit: "fix: restore Github and Codepen glyphs a..." | Re-trigger Greptile
|
Local checks pass ( |
Replaces #481 (Dependabot bump of
lucide-reactfrom0.577.0to1.17.0).What broke
lucide-react1.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 failspnpm exec tsc --noEmitwith:Fix
Adds a small local module
src/components/icons/shared/brand-icons.tsxexportingGithubandCodepenas React components that mirror the lucide visual style (24x24, currentColor, stroke-linecap round, strokeWidth 2). All eight import sites swap the named import fromlucide-reactto the local module — JSX call sites stay byte-identical.The richer multi-variant brand SVGs in
public/icons/github/andpublic/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— passespnpm lint— 0 errors, 19 warnings (all pre-existing onmain)Test plan
Lint & Buildworkflow passes on this PRCloses #481.