-
-
Notifications
You must be signed in to change notification settings - Fork 80
feat(icons): add Icon suffix to all icons and deprecate old names #127
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
Conversation
|
Seems to work fine in a few demos: |
|
Thanks for working on this. The request on #104 was for a prefix. Can you explain why you prefer a suffix? Thanks! |
|
Because one philosophy at Phosphor is to do things as simply as possible. If you'd call it a User icon in conversation, I believe this strongly addresses 2 of the 3 issues OP has with naming, and more or less addresses the third. Sorry if you don't get the exact autocomplete behavior you were looking for 🤷♂️. |
|
I have upgraded to the latest version and noticed the deprecation message. I also came across this topic. Could you please share the timeline for when the old names will no longer be supported? |
|
Answered in #104 |
|
With this change |
|
@knownasilya that's a mistake, yes. I'll check for other legacy names and push an update. |
|
It looks like |
After considering the request in #104 to add the "Icon" prefix to all icon components to aid readability in JSX and to not pollute the scope with common names, I have decided that doing something like this is worthwhile. After playing around with it I landed on using the suffix form, e.g.:
These are now the primary names for icon components exported from the library. The original names are still exported but are marked as deprecated, pointing users to the new suffixed name:
The filenames have not changed to reflect this, for two reasons:
We also should now have better support in some edge cases for Next.js by way of better disambiguation between
esandcjsexports.I will publish this under the
nexttag on NPM for testing until confident in these changes.