Skip to content

Conversation

@christian-byrne
Copy link
Contributor

@christian-byrne christian-byrne commented Aug 25, 2025

Summary

  • Converts build/customIconCollection.js to TypeScript with proper type safety
  • Adds comprehensive SVG validation and error handling
  • Implements graceful failure handling - malformed icons don't break builds
  • Removes verbose console logging, keeping only errors/warnings
  • Updates documentation across README.md, CONTRIBUTING.md, and icons/README.md
  • Adds missing @iconify/tailwind dependency

Improvements Made

1. TypeScript Migration

  • Converted JavaScript build script to TypeScript
  • Added proper interfaces for IconifyCollection and IconifyIcon
  • Integrated with project's typecheck/lint/format pipeline

2. Enhanced Error Handling

  • SVG content validation (checks for <svg> tags, balanced markup)
  • Graceful handling of missing directories and malformed files
  • Build continues even if individual icons fail to load
  • Clear error messages for debugging

3. Reduced Noise

  • Removed verbose per-icon logging that cluttered dev server output
  • Kept only error/warning messages for actual issues
  • Silent operation during successful builds

4. Documentation Updates

  • Updated README.md to reflect custom icon support is now available
  • Enhanced CONTRIBUTING.md with build script details
  • Expanded icons/README.md with technical architecture details

Testing

  • Icons display correctly in sidebar
  • Build script handles malformed SVGs gracefully
  • TypeScript compilation passes
  • Linting and formatting pass
  • Dev server runs cleanly without verbose logging

┆Issue is synchronized with this Notion page by Unito

@christian-byrne christian-byrne requested review from a team as code owners August 25, 2025 21:45
@github-actions
Copy link

github-actions bot commented Aug 25, 2025

🎭 Playwright Test Results

All tests passed across all browsers!

⏰ Completed at: 08/25/2025, 10:37:08 PM UTC

📊 Test Reports by Browser


🎉 Your tests are passing across all browsers!

…dling

- Convert customIconCollection.js to TypeScript with proper interfaces
- Add comprehensive SVG validation and error handling
- Implement graceful failure - malformed icons don't break builds
- Remove verbose logging, keep only errors/warnings
- Update documentation in README.md, CONTRIBUTING.md, icons/README.md
- Add missing @iconify/tailwind dependency

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <[email protected]>
@christian-byrne christian-byrne force-pushed the feat/improve-custom-icon-build-script branch from c775f16 to 8c47d45 Compare August 25, 2025 22:14
@christian-byrne christian-byrne merged commit 7d6e252 into main Aug 26, 2025
12 checks passed
@christian-byrne christian-byrne deleted the feat/improve-custom-icon-build-script branch August 26, 2025 00:55
benceruleanlu added a commit that referenced this pull request Aug 26, 2025
@christian-byrne christian-byrne mentioned this pull request Aug 27, 2025
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.

3 participants