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

[Bug]: After version 9.54.1, bundleIcon required additional parameter to create composite icon!!!!! #31729

Closed
2 tasks done
pradeept95 opened this issue Jun 17, 2024 · 5 comments

Comments

@pradeept95
Copy link

Library

React Components / v9 (@fluentui/react-components)

System Info

NA

Are you reporting Accessibility issue?

no

Reproduction

https://stackblitz.com/run?file=src%2Fexample.tsx

Bug Description

Actual Behavior

after V9.54.1, the bundleIcon added one more prams while creating composite icon called "LightIcon" which causing all application incompatible with v9.54.1 and above.

image

Expected Behavior

bundleIcon should not add more parameter without providing support for existing behavior

Logs

Expected 3 arguments, but got 2.(2554)
bundleIcon.d.ts(2, 77): An argument for 'LightIcon' was not provided.
(alias) bundleIcon(FilledIcon: FluentIcon, RegularIcon: FluentIcon, LightIcon: FluentIcon): FluentIcon
import bundleIcon

Requested priority

High

Products/sites affected

No response

Are you willing to submit a PR to fix?

no

Validations

  • Check that there isn't already an issue that reports the same bug to avoid creating a duplicate.
  • The provided reproduction is a minimal reproducible example of the bug.
@layershifter
Copy link
Member

Linking with microsoft/fluentui-system-icons#727

@christophepeerens
Copy link

christophepeerens commented Jun 17, 2024

Hello,

Since not finding the Light icon, I tried to define the Regular one twice.

const EditIcon = bundleIcon(EditFilled, EditRegular, EditRegular);

<Button
    icon={<EditIcon />}
    appearance="subtle"
    aria-label={t('Edit')}
/>

But the button displays the icon twice!

@techienickb
Copy link

techienickb commented Jun 17, 2024

Work around for anyone with this issue, override fluent ui icons back to before this breaking change, add this to your package.json

   "overrides": {
      "@fluentui/react-icons": "2.0.243"
   },

@tomi-msft
Copy link
Contributor

PR to revert the change: microsoft/fluentui-system-icons#728

@tomi-msft
Copy link
Contributor

Fixed in latest version of @fluentui/react-icons

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants