-
Notifications
You must be signed in to change notification settings - Fork 31
fix: remove double "Icon" suffix for Circle, Path, and Infinity components #80
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix: remove double "Icon" suffix for Circle, Path, and Infinity components #80
Conversation
The generator was incorrectly appending "Icon" suffix twice for components in componentNameMap (Circle, Path, Infinity), resulting in exports like CircleIconIcon instead of CircleIcon. This fix updates the componentNameMap to not include the "Icon" suffix since it's already added by the generator in the export statements. 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <[email protected]>
|
Hi @nathankim0 thanks for reporting. |
|
@mrkpatchaa Thank you for the review and suggestion! Your approach is indeed better as it maintains backward compatibility while fixing the double suffix issue. I understand the key changes:
This elegantly solves the problem without breaking existing code that might depend on the current export names. I'll update my PR with your suggested changes. |
Per code review feedback, this approach better maintains backward compatibility while fixing the double suffix issue. Key changes: - Keep componentNameMap with original 'Icon' suffixes - Remove componentNameMap usage from generateIconsDefs - Use componentNameMap only for deprecated exports - New Icon-suffixed exports use the plain component name This ensures: - Backward compatibility for existing code using CircleIcon, PathIcon, InfinityIcon - Fixes the double suffix issue (no more CircleIconIcon) - Cleaner separation between deprecated and new exports 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <[email protected]>
|
Thank you @nathankim0 |
Summary
This PR fixes a bug in the icon generator that was causing certain icon components to have a double "Icon" suffix in their exports.
Problem
The generator was incorrectly appending "Icon" suffix twice for components defined in
componentNameMap(Circle, Path, Infinity), resulting in:CircleIconIconinstead ofCircleIconPathIconIconinstead ofPathIconInfinityIconIconinstead ofInfinityIconSolution
Updated the
componentNameMapingenerator/generate-svg.mjsto not include the "Icon" suffix, as it's already added by the generator in the export statements.Impact
After regenerating the icons with this fix:
Test plan
npm run generateto regenerate all icons