Skip to content

Conversation

@JeanMarcMilletScality
Copy link
Contributor

Summary

  • Upgrade Font Awesome from v5 to v7.1.0
  • Refactor Icon component to use explicit static imports instead of deprecated dynamic imports
  • Split icon definitions into a separate file for better maintainability

Details

Font Awesome Upgrade

Updated all Font Awesome packages to v7.1.0:

  • @fortawesome/fontawesome-free: ^7.1.0
  • @fortawesome/fontawesome-svg-core: ^7.1.0
  • @fortawesome/free-regular-svg-icons: ^7.1.0
  • @fortawesome/free-solid-svg-icons: ^7.1.0
  • @fortawesome/react-fontawesome: ^3.1.1

Icon Component Refactoring

Font Awesome v6+ deprecated dynamic imports with Babel macros. The previous implementation used dynamic import() statements which caused webpack bundling issues with FA7's internal import.macro.js file.

Before: Dynamic imports with async loading and loader fallback

import(`@fortawesome/${fontAwesomeType}/${iconClass}.js`)

After: Explicit static imports with synchronous lookup

import { faWallet, faTrash, ... } from '@fortawesome/free-solid-svg-icons';
const icon = iconTable[name]; // Direct lookup, no async

Benefits:

  • Icons render instantly (no loading spinner)
  • Compatible with Font Awesome 7
  • Simpler code (removed useState, useEffect, icon cache)
  • Tree-shaking still works - consuming apps only bundle icons they use

Code Organization

Split Icon.component.tsx into two files:

  • iconDefinitions.ts (~265 lines) - FA imports and icon table
  • Icon.component.tsx (~135 lines) - Component logic only

Breaking Changes

None. The public API remains unchanged:

<Icon name="Account" />
<Icon name="Delete" size="lg" color="critical" />

Test plan

  • Run Storybook and verify icons render correctly
  • Check Icon stories display all icons
  • Verify custom icons (Remote-user, Remote-group) still work
  • Build the package and verify no TypeScript errors

Split icon.component.tsx in 2.
One file for the component and another for the list and import of all used icons
- Use ariaLabel prop directly instead of concatenating with icon name
- Add ariaLabel prop to IconHelper, deprecate title for accessibility
@bert-e
Copy link
Contributor

bert-e commented Jan 26, 2026

Hello jeanmarcmilletscality,

My role is to assist you with the merge of this
pull request. Please type @bert-e help to get information
on this process, or consult the user documentation.

Available options
name description privileged authored
/after_pull_request Wait for the given pull request id to be merged before continuing with the current one.
/bypass_author_approval Bypass the pull request author's approval
/bypass_build_status Bypass the build and test status
/bypass_commit_size Bypass the check on the size of the changeset TBA
/bypass_incompatible_branch Bypass the check on the source branch prefix
/bypass_jira_check Bypass the Jira issue check
/bypass_peer_approval Bypass the pull request peers' approval
/bypass_leader_approval Bypass the pull request leaders' approval
/approve Instruct Bert-E that the author has approved the pull request. ✍️
/create_pull_requests Allow the creation of integration pull requests.
/create_integration_branches Allow the creation of integration branches.
/no_octopus Prevent Wall-E from doing any octopus merge and use multiple consecutive merge instead
/unanimity Change review acceptance criteria from one reviewer at least to all reviewers
/wait Instruct Bert-E not to run until further notice.
Available commands
name description privileged
/help Print Bert-E's manual in the pull request.
/status Print Bert-E's current status in the pull request TBA
/clear Remove all comments from Bert-E from the history TBA
/retry Re-start a fresh build TBA
/build Re-start a fresh build TBA
/force_reset Delete integration branches & pull requests, and restart merge process from the beginning.
/reset Try to remove integration branches unless there are commits on them which do not appear on the source branch.

Status report is not available.

@bert-e
Copy link
Contributor

bert-e commented Jan 26, 2026

Waiting for approval

The following approvals are needed before I can proceed with the merge:

  • the author

  • one peer

Peer approvals must include at least 1 approval from the following list:

@JeanMarcMilletScality JeanMarcMilletScality marked this pull request as draft January 29, 2026 09:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants