Skip to content

Add non-breaking *Icon aliases for static icon exports#8035

Draft
ggdouglas wants to merge 3 commits intodevelopfrom
gd/icon-suffix-static-export-aliases
Draft

Add non-breaking *Icon aliases for static icon exports#8035
ggdouglas wants to merge 3 commits intodevelopfrom
gd/icon-suffix-static-export-aliases

Conversation

@ggdouglas
Copy link
Copy Markdown
Contributor

@ggdouglas ggdouglas commented Apr 7, 2026

Fixes #6258

Summary

This change introduces *Icon names for static icon component exports in @blueprintjs/icons. For example, DownloadIcon is the canonical component, and Download remains 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 like Array and with other symbols (including some Blueprint components like Tag), while keeping the current API backwards compatible.

CleanShot 2026-04-07 at 21 24 50@2x

The existing unsuffixed exports still work. They are marked @deprecated on the legacy export in each generated icon module (for example export const Download in download.tsx), so TypeScript and ESLint can surface warnings when those names are used.

Changes

Representative diff from packages/icons/src/generated/index.ts

-export { AddApplication } from "./components/add-application";
-export { AddChild } from "./components/add-child";
-export { AddClip } from "./components/add-clip";
+export { AddApplicationIcon, AddApplication } from "./components/add-application";
+export { AddChildIcon, AddChild } from "./components/add-child";
+export { AddClipIcon, AddClip } from "./components/add-clip";-export { Add } from "./components/add";
+export { AddIcon, Add } from "./components/add";-export { Download } from "./components/download";
+export { DownloadIcon, Download } from "./components/download";

Each line goes from exporting a single component Foo to re-exporting FooIcon (canonical) and Foo (deprecated alias) from the same ./components/foo module.

Representative diff from packages/icons/src/generated/components/download.tsx

-export const Download: React.FC<SVGIconProps> = React.forwardRef<any, SVGIconProps>((props, ref) => {
+export const DownloadIcon: React.FC<SVGIconProps> = React.forwardRef<any, SVGIconProps>((props, ref) => {
     ...
 });
-Download.displayName = `Blueprint6.Icon.Download`;
-export default Download;
+DownloadIcon.displayName = `Blueprint6.Icon.DownloadIcon`;
+
+/**
+ * @deprecated Use {@link DownloadIcon} instead.
+ */
+export const Download: typeof DownloadIcon = DownloadIcon;
+
+export default DownloadIcon;

First-party usage

Blueprint packages that import static icon components were updated to use *Icon names where needed so @typescript-eslint/no-deprecated stays clean in this repository.

@changelog-app
Copy link
Copy Markdown

changelog-app Bot commented Apr 7, 2026

Generate changelog in packages/core/changelog/@unreleased

Type (Select exactly one)

  • Feature (Adding new functionality)
  • Improvement (Improving existing functionality)
  • Fix (Fixing an issue with existing functionality)
  • Break (Creating a new major version by breaking public APIs)
  • Deprecation (Removing functionality in a non-breaking way)
  • Migration (Automatically moving data/functionality to a new system)

Description

Add non-breaking *Icon aliases for static icon exports


Generate changelog in packages/icons/changelog/@unreleased

Type (Select exactly one)

  • Feature (Adding new functionality)
  • Improvement (Improving existing functionality)
  • Fix (Fixing an issue with existing functionality)
  • Break (Creating a new major version by breaking public APIs)
  • Deprecation (Removing functionality in a non-breaking way)
  • Migration (Automatically moving data/functionality to a new system)

Description

Add non-breaking *Icon aliases for static icon exports


Check the box to generate changelog(s)

  • Generate changelog entry

@blueprint-previews
Copy link
Copy Markdown

Add non-breaking *Icon aliases for static icon exports

Build artifact links for this commit: documentation | landing | table | demo | storybook

This is an automated comment from the deploy-preview CircleCI job.

@ggdouglas ggdouglas force-pushed the gd/icon-suffix-static-export-aliases branch from 57be0ff to 0af4a1e Compare April 8, 2026 01:36
@blueprint-previews
Copy link
Copy Markdown

Migrate static icon usage to *Icon across packages

Build artifact links for this commit: documentation | landing | table | demo | storybook

This is an automated comment from the deploy-preview CircleCI job.

@ggdouglas ggdouglas force-pushed the gd/icon-suffix-static-export-aliases branch from 0af4a1e to 52a11c8 Compare April 8, 2026 12:26
@blueprint-previews
Copy link
Copy Markdown

Migrate static icon usage to *Icon across packages

Build artifact links for this commit: documentation | landing | table | demo | storybook

This is an automated comment from the deploy-preview CircleCI job.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Suggestion: Export Icons with "Icon" Appended to Component Name

1 participant