Skip to content

Replace deprecated icons in EUI components#9375

Merged
tkajtoch merged 17 commits intoelastic:mainfrom
tkajtoch:feat/9371-replace-deprecated-icons
Feb 26, 2026
Merged

Replace deprecated icons in EUI components#9375
tkajtoch merged 17 commits intoelastic:mainfrom
tkajtoch:feat/9371-replace-deprecated-icons

Conversation

@tkajtoch
Copy link
Member

@tkajtoch tkajtoch commented Feb 10, 2026

Summary

Resolves #9371

This PR replaces deprecated icons internally in our components based on the @JoseLuisGJ recommendations in icon_map.ts.

Why are we making this change?

Part of the Iconography M2 initiative. We want to use correct, non-deprecated icons in EUI.

Impact to users

There are no breaking changes in this PR. DOM snapshots of updated components may change. The PR is marked as skip-changelog as there are no user-facing changes

QA

Remove or strikethrough items that do not apply to your PR.

General checklist

Generally speaking, VRT tests cover most (if not all) uses of the updated icons and show no changes, so manual verification is not mandatory. I recommend comparing a few important components modified in this PR:

  • Code quality checklist

@tkajtoch tkajtoch self-assigned this Feb 10, 2026
@tkajtoch tkajtoch force-pushed the feat/9371-replace-deprecated-icons branch from 0ef17d8 to 7daaa92 Compare February 16, 2026 21:39
@tkajtoch tkajtoch added the skip-changelog Use on PRs to skip changelog requirement (Don't delete - used for automation) label Feb 16, 2026
@tkajtoch
Copy link
Member Author

Some of the VRT updates come from main and aren't related to changes made in this PR. I decided to commit them all to get main up to date again.

@tkajtoch tkajtoch marked this pull request as ready for review February 17, 2026 09:48
@tkajtoch tkajtoch requested a review from a team as a code owner February 17, 2026 09:48
@weronikaolejniczak
Copy link
Contributor

@tkajtoch some time ago, @JoseLuisGJ suggested a story with all icons (kind of like the "kitchen sink"). Could we possibly add that on this PR?

Some of the VRT updates come from main and aren't related to changes made in this PR. I decided to commit them all to get main up to date again.

Regarding this, we discussed with @mgadewoll that some of the VRTs are flaky or unexpected. I was planning to fix that on a separate PR. But no action for this PR, we can still merge these updates.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

doubt:

This is a very weird change. Is this expected?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's not expected, but comes from the sensitivity of our current VRT setup, so I left it as-is 🤷🏻 We really need to do something about these tests and I'm looking into possible solutions

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm looking into this ATM so let's sync on 1:1. I agree we should do sth about it but of course this is not the concern for this PR!

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

doubt:

This is a rather unexpected change. We can merge it to main to silence it and work off clean slate but just to point it out.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

out-of-scope:

Just noticed that the note by boxesHorizontal says // NOTE: To be deprecated in favor of boxes_vertical``. It should be boxesVertical. Just pointing out.

boxesHorizontal: () => import('./assets/boxes_vertical'), // NOTE: To be deprecated in favor of `boxes_vertical`

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Weird that it doesn't highlight the actual iconType value change 😄

@weronikaolejniczak
Copy link
Contributor

I see that there are some deprecated icon usages still in documentation website (e.g. packages/website/docs/components/forms/selection/selectable.mdx), Docusaurus theme files (e.g. packages/docusaurus-theme/src/theme/DocBreadcrumbs/Items/Home/index.tsx), ESLint plugin (e.g. packages/eslint-plugin/src/rules/a11y/icon_accessibility_rules.test.ts) and react-datepicker source. If we are replacing the deprecated handles, it would be nice to replace all their references in our whole repo.

@JoseLuisGJ
Copy link
Contributor

Moving here also this concern I have regarding this PR and it's related GH ticket

#9371 (comment)

@weronikaolejniczak
Copy link
Contributor

@tkajtoch fyi I made some changes to VRT: #9402

@tkajtoch tkajtoch force-pushed the feat/9371-replace-deprecated-icons branch from 17c72f4 to 1f78bce Compare February 23, 2026 22:46
Copy link
Contributor

@weronikaolejniczak weronikaolejniczak left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for updating the icons in the whole repo! I found only one wrong handler 😄 but I found a bunch of not replaced cases:

cheerpopper

  • packages/website/docs/components/data-grid/data-grid.mdx:179

editorBoldtextBold

  • packages/website/docs/components/forms/layouts/compressed-forms.mdx:461

editorItalictextItalic

  • packages/website/docs/components/forms/layouts/compressed-forms.mdx:467

editorUnderlinetextUnderline

  • packages/website/docs/components/forms/layouts/compressed-forms.mdx:473

editorStriketextStrike

  • packages/website/docs/components/forms/layouts/compressed-forms.mdx:479

help (it says NOTE: Might be deprecated later (not recommended in Kibana))

  • packages/eui/src/components/header/header.stories.tsx:86
  • packages/website/docs/components/layout/header.mdx:561
  • packages/website/docs/components/layout/header.mdx:647

searchmagnify

  • packages/eui/src/components/icon/icon.test.tsx
  • packages/eui/src/components/form/form_control_layout/_num_icons.test.ts:20
  • packages/website/docs/components/navigation/context-menu.mdx:52
  • packages/website/docs/components/navigation/buttons/split-button.mdx:245

starFilledstarFill

  • packages/website/docs/components/data-grid/schema-and-columns.mdx:142

starFilledSpacestarFillSpace

  • packages/website/docs/components/navigation/buttons/button.mdx:990

stopFilledstopFill

  • packages/website/docs/components/forms/layouts/controls.mdx:94

It's expected that packages/website/docs/components/display/icons/icon_types.ts mentions icons to be deprecated?

@tkajtoch
Copy link
Member Author

It's expected that packages/website/docs/components/display/icons/icon_types.ts mentions icons to be deprecated?

@weronikaolejniczak yes, we're replacing the usages but not removing the actual icons or mentions in this PR. We'll do that separately

# Conflicts:
#	packages/eui/src/components/date_picker/auto_refresh/auto_refresh.tsx
#	packages/eui/src/components/date_picker/super_date_picker/quick_select_popover/quick_select_popover.tsx
#	packages/eui/src/components/form/form_control_layout/form_control_layout.stories.tsx

# Conflicts:
#	packages/eui/src/components/flyout/flyout_menu.tsx
Some VRT updates come from `main` and are unrelated to changes in this PR.
tkajtoch and others added 2 commits February 26, 2026 13:30
Co-authored-by: Weronika Olejniczak <32842468+weronikaolejniczak@users.noreply.github.com>
@tkajtoch tkajtoch force-pushed the feat/9371-replace-deprecated-icons branch from d4189b3 to 6f40a9d Compare February 26, 2026 12:32
@tkajtoch
Copy link
Member Author

@weronikaolejniczak I fixed all icons you mentioned above and grepped all source files in all packages to ensure there are no other usages of the deprecated icons. Thank you for a thorough review!

tkajtoch and others added 2 commits February 26, 2026 16:36
Co-authored-by: Weronika Olejniczak <32842468+weronikaolejniczak@users.noreply.github.com>
Co-authored-by: Weronika Olejniczak <32842468+weronikaolejniczak@users.noreply.github.com>
@tkajtoch tkajtoch enabled auto-merge (squash) February 26, 2026 15:42
@elasticmachine
Copy link
Collaborator

💚 Build Succeeded

History

cc @tkajtoch

@elasticmachine
Copy link
Collaborator

elasticmachine commented Feb 26, 2026

💚 Build Succeeded

History

cc @tkajtoch

@tkajtoch tkajtoch disabled auto-merge February 26, 2026 22:57
@tkajtoch
Copy link
Member Author

tkajtoch commented Feb 26, 2026

The CLA check seems to be broken on this PR and shows status Expected - Waiting for status to be reported. I verified that all commits in this PR are verified and made by Elasticians, and will proceed to admin merging this PR

Update: admin merge wasn't needed. CLA check updated when I posted this comment.

@tkajtoch tkajtoch merged commit 1b50c45 into elastic:main Feb 26, 2026
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

skip-changelog Use on PRs to skip changelog requirement (Don't delete - used for automation)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[EuiIcon] Replace internal usages of deprecated icons

4 participants