-
Notifications
You must be signed in to change notification settings - Fork 2.8k
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
feat(react-file-type-icons): Changing FileIconType-based icon searching to use the same scalable method used for file extensions #32947
base: master
Are you sure you want to change the base?
Conversation
…ileextension based filetype icons.
…/bigbadcapers/fluentui into caperez/sep-filetype-icon-update
…ethod used for file extensions
# Conflicts (merged and resolved): # packages/react-file-type-icons/src/FileIconType.ts # packages/react-file-type-icons/src/FileTypeIconMap.ts # packages/react-file-type-icons/src/getFileTypeIconProps.ts
📊 Bundle size report✅ No changes found |
… wrapped in an if statement to filter unwanted properties from the prototype guard-for-in
Hey @ThomasMichon / @soettl I put this together a few weeks ago, aiming to make future addons more scalable. Would appreciate your take on the change. |
# Conflicts: # packages/react-file-type-icons/src/FileIconType.ts # packages/react-file-type-icons/src/getFileTypeIconProps.ts
hi @dzearing @ecraig12345 @KatherineThayerMicrosoft would appreciate your take on this PR and if you see any issues with this change of method |
📊 Bundle size report✅ No changes found |
Pull request demo site: URL |
I don't work on Fluent any more. I think @tomi-msft owns icons now. |
Changes:
master
branchreact-experiments
under the FileTypeIcon storybook.yarn change
locallyChange in Behavior
Adding a new non-file-extension-based filetype icon required code change in multiple places. We've changed it so you only need to register the new type in FileIconType.ts and map it to an existing icon image in FileTypeIconMap.ts.
The API and calling pattern has not changed. Overall line code count and complexity have been reduced.