Skip to content

Fix width on Icon.placeholder()#4456

Merged
amcclain merged 7 commits into
developfrom
placeholderIcon
Jun 25, 2026
Merged

Fix width on Icon.placeholder()#4456
amcclain merged 7 commits into
developfrom
placeholderIcon

Conversation

@PeteDarinzo

@PeteDarinzo PeteDarinzo commented Jun 24, 2026

Copy link
Copy Markdown
Contributor

Apply the correct width to the placeholder icon.

In previous versions of FontAwesome (FA), the fa-fw class was used to provide a standard width to all icons, and the icon placeholder, via enhanceFaClasses.

Starting with FA v7, all icons receive a standard width by default, and the fa-fw class is deprecated.

The xh-icon--placeholder class that the icon placeholder already receives can be used to apply the same default width to the icon placeholders. In addition, the fa-fw class can be removed from enhanceFaClasses since it is deprecated.

Hoist P/R Checklist

Pull request authors: Review and check off the below. Items that do not apply can also be
checked off to indicate they have been considered. If unclear if a step is relevant, please leave
unchecked and note in comments.

  • Caught up with develop branch as of last change.
  • Added CHANGELOG entry.
  • No breaking changes.
  • Updated component and stylesheet comments.
  • Reviewed and tested on Mobile.
  • Toolbox branch / PR not required.

If your change is still a WIP, please use the "Create draft pull request" option in the split
button below to indicate it is not ready yet for a final review.

Pull request reviewers: when merging this P/R, please consider using a squash commit to
collapse multiple intermediate commits into a single commit representing the overall feature
change. This helps keep the commit log clean and easy to scan across releases. PRs containing a
single commit should be rebased when possible.

@PeteDarinzo PeteDarinzo requested a review from lbwexler June 24, 2026 22:01
@amcclain

Copy link
Copy Markdown
Member

This looks good to me - happy to get it in but wasn't sure as it was left in draft - thanks for jumping on this, sorry I missed it with the FA upgrade. Let's get it into our 86.2.0 release tomorrow.

Comment thread icon/impl/IconHtml.ts
export function enhanceFaClasses(className: string, size: string) {
return classNames(className, 'fa-fw', 'xh-icon', isString(size) ? `fa-${size}` : null);
return classNames(className, 'xh-icon', isString(size) ? `fa-${size}` : null);
}

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

why are we removing fa-fw?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

fa-fw is deprecated per FA upgrade documentation. Icons now get a default width, making the class obsolete.

@PeteDarinzo PeteDarinzo marked this pull request as ready for review June 25, 2026 14:23
@amcclain

Copy link
Copy Markdown
Member

Thanks much for this - noticed it fixes misalignment in ViewManager menu - active view has a checkmark icon, others should be aligned but had drifted over. Nice catch.

@amcclain amcclain merged commit 3af335a into develop Jun 25, 2026
3 checks passed
@amcclain amcclain deleted the placeholderIcon branch June 25, 2026 14:36
@amcclain amcclain changed the title Placeholder icon Fix width on Icon.placeholder() Jun 25, 2026
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