1236 switch Heroicons imports to individual ESM paths in general page, first-time configuration and dashboard#23295
Open
vraja-pro wants to merge 3 commits into
Conversation
…st-time configuration and dashboard Replaces barrel imports from @heroicons/react/outline and @heroicons/react/solid with individual ESM path imports across files in packages/js/src/general/, packages/js/src/first-time-configuration/, packages/dashboard-frontend/src/, and packages/js/src/dashboard/, allowing the bundler to tree-shake unused icons. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
vraja-pro
added a commit
that referenced
this pull request
May 25, 2026
…to PR #23295 Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Coverage Report for CI Build 684Coverage remained the same at 53.945%Details
Uncovered ChangesNo uncovered changes found. Coverage RegressionsNo coverage regressions found. Coverage Stats💛 - Coveralls |
…-frontend Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
vraja-pro
added a commit
that referenced
this pull request
May 25, 2026
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
vraja-pro
added a commit
that referenced
this pull request
May 25, 2026
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Contributor
There was a problem hiding this comment.
Pull request overview
This PR updates Heroicons usage in the General page, first-time configuration wizard, and dashboard packages by switching from barrel imports (e.g. @heroicons/react/outline) to per-icon import paths (e.g. @heroicons/react/outline/BellIcon) to better support bundle-size reduction.
Changes:
- Replaced Heroicons barrel imports with individual icon imports across General/FTC/Dashboard code.
- Updated the related General page test import to match the new icon import style.
- Added an ESLint restriction in
dashboard-frontendto prevent reintroducing Heroicons barrel imports.
Reviewed changes
Copilot reviewed 33 out of 33 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| packages/js/tests/general/components/alerts-title.test.js | Updates Bell icon import path used by the AlertsTitle test theme. |
| packages/js/src/general/components/task-list-upsell-row.js | Switches lock icons to per-icon import paths. |
| packages/js/src/general/components/task-list-opt-in-notification.js | Switches right-arrow icon to a per-icon import path. |
| packages/js/src/general/components/problems.js | Switches exclamation-circle icon to a per-icon import path. |
| packages/js/src/general/components/notifications.js | Switches bell icon to a per-icon import path. |
| packages/js/src/general/components/notice.js | Switches X icon to a per-icon import path. |
| packages/js/src/general/components/collapsible.js | Switches chevron-down icon to a per-icon import path. |
| packages/js/src/general/components/alerts-title.js | Switches exclamation-circle icon to a per-icon import path. |
| packages/js/src/general/components/alerts-list.js | Switches eye/eye-off icons to per-icon import paths. |
| packages/js/src/general/components/alert-items/ping-other-admins-alert-item.js | Switches right-arrow icon to a per-icon import path. |
| packages/js/src/general/app.js | Switches sidebar/navigation icons to per-icon import paths. |
| packages/js/src/first-time-configuration/tailwind-components/steps/social-profiles/social-field-array.js | Switches trash/plus icons to per-icon import paths. |
| packages/js/src/first-time-configuration/tailwind-components/steps/finish/finish-step.js | Switches external-link and right-arrow icons to per-icon import paths. |
| packages/js/src/first-time-configuration/tailwind-components/step-circle.js | Switches check icon to a per-icon import path. |
| packages/js/src/first-time-configuration/tailwind-components/base/text-input.js | Switches check-circle / exclamation-circle icons to per-icon import paths. |
| packages/js/src/first-time-configuration/tailwind-components/base/single-select.js | Switches check / exclamation-circle / selector icons to per-icon import paths. |
| packages/js/src/first-time-configuration/tailwind-components/base/image-select.js | Switches photograph icon to a per-icon import path. |
| packages/js/src/first-time-configuration/tailwind-components/base/combo-box.js | Switches check / selector icons to per-icon import paths. |
| packages/js/src/first-time-configuration/tailwind-components/base/alert.js | Switches alert variant icons to per-icon import paths. |
| packages/js/src/dashboard/widgets/site-kit-setup-widget.js | Switches widget icons to per-icon import paths. |
| packages/dashboard-frontend/src/widgets/top-pages-widget.js | Switches pencil icon to a per-icon import path. |
| packages/dashboard-frontend/src/task-list/components/tasks-progress-badge.js | Switches check-circle icon to a per-icon import path. |
| packages/dashboard-frontend/src/task-list/components/task-row.js | Switches chevron-right icon to a per-icon import path. |
| packages/dashboard-frontend/src/task-list/components/single-task-button.js | Switches chevron-right icon to a per-icon import path. |
| packages/dashboard-frontend/src/task-list/components/priority.js | Switches priority icons to per-icon import paths. |
| packages/dashboard-frontend/src/task-list/components/get-tasks-error-row.js | Switches exclamation/refresh icons to per-icon import paths. |
| packages/dashboard-frontend/src/task-list/components/duration.js | Switches clock icon to a per-icon import path. |
| packages/dashboard-frontend/src/task-list/components/child-tasks.js | Switches left/right arrow icons to per-icon import paths. |
| packages/dashboard-frontend/src/task-list/components/call-to-action-button.js | Switches CTA icons to per-icon import paths. |
| packages/dashboard-frontend/src/icons/task-status-icon.js | Switches check-circle icon to a per-icon import path. |
| packages/dashboard-frontend/src/components/widget-table.js | Switches X icon to a per-icon import path. |
| packages/dashboard-frontend/src/components/info-tooltip.js | Switches information-circle icon to a per-icon import path. |
| packages/dashboard-frontend/eslint.config.mjs | Adds no-restricted-imports rules to disallow Heroicons barrel imports. |
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.
Context
Switches Heroicons imports in `packages/js/src/general/`, `packages/js/src/first-time-configuration/`, `packages/dashboard-frontend/src/`, and `packages/js/src/dashboard/` from barrel paths (e.g. `@heroicons/react/outline`) to individual ESM paths (e.g. `@heroicons/react/outline/BellIcon`) to reduce the plugin bundle size by allowing the bundler to tree-shake unused icons.
Summary
This PR can be summarized in the following changelog entry:
Relevant technical choices:
Test instructions
Test instructions for the acceptance test before the PR gets merged
This PR can be acceptance tested by following these steps:
Open the browser console (F12) before starting — verify no JS errors related to icon imports appear at any point.
General page (Yoast SEO → General)
First-time configuration wizard (Yoast SEO → General → First-time configuration)
Dashboard (Yoast SEO Dashboard / site health widget)
Relevant test scenarios
Test instructions for QA when the code is in the RC
QA can test this PR by following these steps:
Not applicable — this is a non-user-facing refactor of internal import paths. No user-visible behaviour changes.
Impact check
This PR affects the following parts of the plugin, which may require extra testing:
Other environments
[shopify-seo], added test instructions for Shopify and attached theShopifylabel to this PR.[yoast-doc-extension], added test instructions for Yoast SEO for Google Docs and attached theGoogle Docs Add-onlabel to this PR.Documentation
Quality assurance
grunt build:imagesand commited the results, if my PR introduces new images or SVGs.Innovation
innovationlabel.Fixes https://github.com/Yoast/reserved-tasks/issues/1236