Skip to content

feat(react-file-type-icons): align v9 file type icon package path#36330

Draft
bigbadcapers wants to merge 215 commits into
microsoft:masterfrom
bigbadcapers:caperez/fti-weaved
Draft

feat(react-file-type-icons): align v9 file type icon package path#36330
bigbadcapers wants to merge 215 commits into
microsoft:masterfrom
bigbadcapers:caperez/fti-weaved

Conversation

@bigbadcapers

Copy link
Copy Markdown
Contributor

Summary

Draft companion PR for the file-type-icons weaved path in Fluent UI.

This branch carries the Fluent UI-side react-file-type-icons v9 migration/adoption work that pairs with the standalone package work in microsoft/fluentui-system-icons.

Companion PRs / branches

Notes

This PR is intentionally draft while the fabric-cdn @ms/fluentui-resources package dry-run/publish path is validated and while the package-side GitHub workflow is reviewed.

The branches are intended to move together:

  1. fabric-cdn produces a bumped resources package / CDN drop.
  2. fluentui-system-icons validates @fluentui/react-icons-file-type against that drop.
  3. Fluent UI can then consume/align the file-type icon package work with the package-side contract.

Validation

Not rerun in this step. This is the preserved Fluent UI branch content under the new caperez/fti-weaved branch name for draft review alignment.

# 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
… wrapped in an if statement to filter unwanted properties from the prototype guard-for-in
…mitting with linter fix to ensure the GH Actions pass.
- Fix react-compiler-analyzer: move width/height defaults into slot.always() call (no post-slot mutation); remove redundant 'use no memo' from styles hook.

- DRY: useFileTypeIcon_unstable now uses single resolveFileTypeIconUrl() returning { src, iconName, ariaLabel }.

- DRY: replace six createFileTypeIconImage blocks in _initializeIcons with a declarative ICON_VARIANTS table.

- KISS/YAGNI: drop unused __remapped, __callbacks__, CALLBACK_STATE_PROP_NAME scaffolding from initializeFileTypeIcons.

- KISS: new shared getDevicePixelRatioVariant() helper drives both getFileTypeIconSuffix and resolveFileTypeIconUrl; no more split('_') reverse-parsing.

- KISS: use canUseDOM() in getFileTypeIconSuffix for SSR guard, consistent with initializeFileTypeIcons.

- Change file: minor -> major to match documented 9.0.0 jump.
@github-actions

Copy link
Copy Markdown

📊 Bundle size report

✅ No changes found

@github-actions

Copy link
Copy Markdown

Pull request demo site: URL

@@ -27,6 +27,7 @@
"@fluentui/react-northstar": "*",

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🕵🏾‍♀️ visual changes to review in the Visual Change Report

vr-tests-react-components/CalendarCompat 4 screenshots
Image Name Diff(in Pixels) Image Type
vr-tests-react-components/CalendarCompat.multiDayView - Dark Mode.default.chromium.png 1097 Changed
vr-tests-react-components/CalendarCompat.multiDayView.default.chromium_1.png 481 Changed
vr-tests-react-components/CalendarCompat.multiDayView - High Contrast.default.chromium.png 1212 Changed
vr-tests-react-components/CalendarCompat.multiDayView.default.chromium.png 482 Changed
vr-tests-react-components/FileTypeIcon 3 screenshots
Image Name Diff(in Pixels) Image Type
vr-tests-react-components/FileTypeIcon.default - Dark Mode.default.chromium.png 0 Added
vr-tests-react-components/FileTypeIcon.default - High Contrast.default.chromium.png 0 Added
vr-tests-react-components/FileTypeIcon.default.default.chromium.png 0 Added
vr-tests-react-components/Menu Converged - submenuIndicator slotted content 2 screenshots
Image Name Diff(in Pixels) Image Type
vr-tests-react-components/Menu Converged - submenuIndicator slotted content.default.submenus open.chromium.png 413 Changed
vr-tests-react-components/Menu Converged - submenuIndicator slotted content.default - RTL.submenus open.chromium.png 404 Changed
vr-tests-react-components/Positioning 2 screenshots
Image Name Diff(in Pixels) Image Type
vr-tests-react-components/Positioning.Positioning end.chromium.png 157 Changed
vr-tests-react-components/Positioning.Positioning end.updated 2 times.chromium.png 952 Changed
vr-tests-react-components/ProgressBar converged 2 screenshots
Image Name Diff(in Pixels) Image Type
vr-tests-react-components/ProgressBar converged.Indeterminate + thickness - High Contrast.default.chromium.png 83 Changed
vr-tests-react-components/ProgressBar converged.Indeterminate + thickness.default.chromium.png 93 Changed
vr-tests-react-components/TagPicker 2 screenshots
Image Name Diff(in Pixels) Image Type
vr-tests-react-components/TagPicker.disabled - RTL.chromium.png 635 Changed
vr-tests-react-components/TagPicker.disabled.chromium.png 677 Changed
vr-tests-web-components/Badge 1 screenshots
Image Name Diff(in Pixels) Image Type
vr-tests-web-components/Badge. - Dark Mode.normal.chromium.png 443 Changed
vr-tests-web-components/RadioGroup 1 screenshots
Image Name Diff(in Pixels) Image Type
vr-tests-web-components/RadioGroup. - Dark Mode.normal.chromium_1.png 89 Changed
vr-tests/Callout 3 screenshots
Image Name Diff(in Pixels) Image Type
vr-tests/Callout.Bottom center.default.chromium.png 2128 Changed
vr-tests/Callout.Bottom left edge.default.chromium.png 2195 Changed
vr-tests/Callout.No callout width specified.default.chromium.png 2143 Changed
vr-tests/Coachmark 1 screenshots
Image Name Diff(in Pixels) Image Type
vr-tests/Coachmark.Collapsed.default.chromium.png 159 Changed
vr-tests/react-charting-VerticalBarChart 1 screenshots
Image Name Diff(in Pixels) Image Type
vr-tests/react-charting-VerticalBarChart.Basic - Secondary Y Axis.default.chromium.png 3 Changed

There were 6 duplicate changes discarded. Check the build logs for more information.

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant