Skip to content

fix: license icon#2850

Open
alexdln wants to merge 1 commit into
npmx-dev:mainfrom
alexdln:fix/license-icon
Open

fix: license icon#2850
alexdln wants to merge 1 commit into
npmx-dev:mainfrom
alexdln:fix/license-icon

Conversation

@alexdln
Copy link
Copy Markdown
Member

@alexdln alexdln commented Jun 4, 2026

🔗 Linked issue

Resolves #2558

🧭 Context

Firefox has issues rendering SVG filters added from a sprite via "use"/ To solve this, I added a custom icon and support for them in sprite generation.

A similar style is used in the cursor and is generally closer to the other icons on the page, so I don't think anything will change for the user

Example page - https://npmxdev-git-fork-alexdln-fix-license-icon-npmx.vercel.app/package-code/@babel/helper-define-polyfill-provider/v/1.0.0-rc.2

@vercel
Copy link
Copy Markdown
Contributor

vercel Bot commented Jun 4, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
npmx.dev Ready Ready Preview, Comment Jun 4, 2026 2:40pm
2 Skipped Deployments
Project Deployment Actions Updated (UTC)
docs.npmx.dev Ignored Ignored Preview Jun 4, 2026 2:40pm
npmx-lunaria Ignored Ignored Jun 4, 2026 2:40pm

Request Review

@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented Jun 4, 2026

Review Change Stack

📝 Walkthrough

Walkthrough

A new custom icons asset file is created with five icon definitions, integrated into the build sprite generation script and uno.config runtime configuration, and used to remap LICENSE files to display a custom license-minified icon instead of the standard vscode-icons version.

Changes

Custom License Icon Support

Layer / File(s) Summary
Custom icons asset definition
assets/media/custom-icons.json
Five custom icons (agent-skills, tangled, vlt, a11y, license-minified) are defined as a JSON object, each entry containing SVG body markup and explicit width/height dimensions.
Build sprite generation and runtime configuration
scripts/generate-file-tree-sprite.ts, uno.config.ts
The sprite generation script imports custom-icons.json and updates the collection configuration to recognise custom-* naming patterns with adjusted output paths for dev/stage/prod builds. The uno.config file imports and transforms the custom icons into the presetIcons collections format by extracting the body field from each entry.
FILE_ICONS remapping for LICENSE files
app/utils/file-icons.ts
Entries in FILENAME_ICONS for LICENSE, LICENSE.md, LICENSE.txt and their lowercase variants are remapped from vscode-icons-file-type-license to custom-license-minified.
🚥 Pre-merge checks | ✅ 4
✅ Passed checks (4 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly summarises the main change: adding a custom license icon to fix rendering issues for LICENSE files.
Linked Issues check ✅ Passed The PR fully addresses issue #2558 by implementing icon support for LICENSE files (and variants) through custom icon mapping changes.
Out of Scope Changes check ✅ Passed All changes are directly scoped to implementing custom icon support and fixing the LICENSE icon rendering, with no unrelated modifications.
Description check ✅ Passed The pull request description relates to the changeset, explaining the Firefox SVG filter rendering issue and the custom icon implementation to resolve it.

✏️ 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.

@codecov
Copy link
Copy Markdown

codecov Bot commented Jun 4, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ All tests successful. No failed tests found.

📢 Thoughts on this report? Let us know!

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.

File tree LICENSE icon doesn't render

1 participant