Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[core] fix(KeyComboTag): use static icon imports #6629

Merged
merged 1 commit into from
Jan 8, 2024

Conversation

michael-yx-wu
Copy link
Contributor

@michael-yx-wu michael-yx-wu commented Jan 6, 2024

Related to #6249

Checklist

  • Includes tests (n/a)
  • Update documentation (n/a)

Changes proposed in this pull request:

This component previously passed icon string names to a child Icon
component, preventing tree shaking of unused icons. Passing statically
imported icons from @blueprintjs/icons fixes this problem.

Related to #6249.

Reviewers should focus on:

  • Verify combo tag icons are rendered at the correct size. (Statically imported icons have a default size of 16, which I think is the correct default?)
  • I noticed that the arrow up/down/left/right icons don't render in either version of the combo tester. I didn't try to address that here.
  • Perhaps there is a slight regression due to this open issue (Icon edges cut (by transforms?) #6329 (comment)) but since none of these icons are round, it's not very noticeable at all

Screenshot

New:
2024-01-06 14 08 19

Old:
2024-01-06 14 08 19

This component previously passed icon string names to a child Icon
component, preventing tree shaking of unused icons. Passing statically
imported icons from @blueprintjs/icons fixes this problem.

Related to #6249.
@adidahiya
Copy link
Contributor

Use static icon imports for KeyComboTag icon

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

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

@michael-yx-wu michael-yx-wu marked this pull request as ready for review January 6, 2024 19:20
@michael-yx-wu michael-yx-wu changed the title Use static icon imports for KeyComboTag icon [core] fix(KeyComboTag): use static icon imports Jan 7, 2024
Copy link
Contributor

@adidahiya adidahiya left a comment

Choose a reason for hiding this comment

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

thanks @michael-yx-wu!

@adidahiya adidahiya merged commit 1f0d4df into develop Jan 8, 2024
12 checks passed
@adidahiya adidahiya deleted the mw/static-icons-keycombo branch January 8, 2024 13:53
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.

2 participants