Add non-breaking *Icon aliases for static icon exports#8035
Draft
Add non-breaking *Icon aliases for static icon exports#8035
Conversation
Generate changelog in
|
Add non-breaking *Icon aliases for static icon exportsBuild artifact links for this commit: documentation | landing | table | demo | storybookThis is an automated comment from the deploy-preview CircleCI job. |
57be0ff to
0af4a1e
Compare
Migrate static icon usage to *Icon across packagesBuild artifact links for this commit: documentation | landing | table | demo | storybookThis is an automated comment from the deploy-preview CircleCI job. |
0af4a1e to
52a11c8
Compare
Migrate static icon usage to *Icon across packagesBuild artifact links for this commit: documentation | landing | table | demo | storybookThis is an automated comment from the deploy-preview CircleCI job. |
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.
Fixes #6258
Summary
This change introduces
*Iconnames for static icon component exports in@blueprintjs/icons. For example,DownloadIconis the canonical component, andDownloadremains available as a deprecated alias of the same implementation (both exported from@blueprintjs/icons). The goal is to make icon imports clearer and avoid naming conflicts with common/global identifiers likeArrayand with other symbols (including some Blueprint components likeTag), while keeping the current API backwards compatible.The existing unsuffixed exports still work. They are marked
@deprecatedon the legacy export in each generated icon module (for exampleexport const Downloadindownload.tsx), so TypeScript and ESLint can surface warnings when those names are used.Changes
Representative diff from
packages/icons/src/generated/index.tsRepresentative diff from
packages/icons/src/generated/components/download.tsxFirst-party usage
Blueprint packages that import static icon components were updated to use
*Iconnames where needed so@typescript-eslint/no-deprecatedstays clean in this repository.