Refactor simple-icons naming to use kebab-case with hyphens#660
Merged
Refactor simple-icons naming to use kebab-case with hyphens#660
Conversation
…f filenames Replace the filename-based naming approach with title-based naming using the simple-icons metadata. The titles from simple-icons.json already have proper word boundaries and brand-accurate casing (e.g., "GitHub", "Stack Overflow", "PayPal"), eliminating the need for the 230+ manual filename mappings table. Key changes: - Add titleToComponentName() that converts brand titles to PascalCase while preserving original brand casing - Add getSlugSuffix() for disambiguating the 7 icons with duplicate titles - Build slug→metadata map for O(1) lookups instead of linear scans - Remove filename-mappings.ts (no longer needed) - Regenerate all 3397 icon components with new naming https://claude.ai/code/session_01C6h4nwdPqhXiZJ6pwRnQo9
Convert each word to standard PascalCase (first letter uppercase, rest lowercase) instead of preserving brand casing. e.g., GitHub → Github, PayPal → Paypal, YouTube → Youtube. https://claude.ai/code/session_01C6h4nwdPqhXiZJ6pwRnQo9
This reverts commit 8a1ef1f.
This reverts commit 7646f53.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
This PR refactors the simple-icons generator and icon components to use consistent kebab-case naming with hyphens instead of camelCase. This improves readability and follows common naming conventions for multi-word identifiers.
Key Changes
filename-mappings.tswhich contained a large mapping table for component namesgenerator.tsto dynamically generate kebab-case names instead of relying on static mappings1and1-icon.ts) to kebab-case with hyphens (e.g.,1-and-1-icon.ts)svg[siAbbIcon]) to kebab-case format (e.g.,svg[si-abb-icon])ICON_NAMING.mdto document the new naming strategyNotable Implementation Details
air-asia-icon.ts,apache-airflow-icon.ts)https://claude.ai/code/session_01C6h4nwdPqhXiZJ6pwRnQo9