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

chore(react-provider): Updating FluentProvider types to avoid implicit import in API definition #33590

Open
wants to merge 9 commits into
base: master
Choose a base branch
from

Conversation

khmakoto
Copy link
Member

@khmakoto khmakoto commented Jan 9, 2025

Previous Behavior

Because of type expansion due to inference of the FluentProvider, the API definition for @fluentui/react-provider included an implicit import of @fluentui/tokens.

New Behavior

By adding an explicit type of ForwardRefComponent<FluentProviderProps> to FluentProvider, we remove the implicit reference to @fluentui/tokens in the API file.

Related Issue(s)

@khmakoto khmakoto requested a review from a team as a code owner January 9, 2025 01:07
@github-actions github-actions bot added this to the January Project Cycle Q1 2025 milestone Jan 9, 2025
@khmakoto khmakoto changed the title chore: Updating FluentProvider types to avoid implicit import in API definition chore(react-provider): Updating FluentProvider types to avoid implicit import in API definition Jan 9, 2025
Copy link

github-actions bot commented Jan 9, 2025

📊 Bundle size report

Package & Exports Baseline (minified/GZIP) PR Change
react-accordion
Accordion (including children components)
0 B
0 B
107.08 kB
32.786 kB
🆕 New entry
react-aria
ARIA - Default
0 B
0 B
237 B
181 B
🆕 New entry
react-avatar
Avatar
0 B
0 B
49.303 kB
15.815 kB
🆕 New entry
react-avatar
AvatarGroup
0 B
0 B
20.106 kB
7.968 kB
🆕 New entry
react-avatar
AvatarGroupItem
0 B
0 B
63.447 kB
20.034 kB
🆕 New entry
react-breadcrumb
@fluentui/react-breadcrumb - package
0 B
0 B
114.291 kB
31.695 kB
🆕 New entry
react-button
Button
0 B
0 B
37.174 kB
10.803 kB
🆕 New entry
react-button
CompoundButton
0 B
0 B
43.588 kB
12.101 kB
🆕 New entry
react-button
MenuButton
0 B
0 B
41.989 kB
12.144 kB
🆕 New entry
react-button
SplitButton
0 B
0 B
50.006 kB
13.716 kB
🆕 New entry
react-button
ToggleButton
0 B
0 B
53.107 kB
12.561 kB
🆕 New entry
react-calendar-compat
Calendar Compat
0 B
0 B
150.095 kB
40.026 kB
🆕 New entry
react-card
Card - All
0 B
0 B
101.77 kB
28.772 kB
🆕 New entry
react-card
Card
0 B
0 B
94.544 kB
26.951 kB
🆕 New entry
react-card
CardFooter
0 B
0 B
14.355 kB
5.79 kB
🆕 New entry
react-card
CardHeader
0 B
0 B
16.888 kB
6.669 kB
🆕 New entry
react-card
CardPreview
0 B
0 B
14.42 kB
5.922 kB
🆕 New entry
react-checkbox
Checkbox
0 B
0 B
35.118 kB
12.077 kB
🆕 New entry
react-color-picker-preview
ColorArea
0 B
0 B
50.263 kB
17.553 kB
🆕 New entry
react-color-picker-preview
ColorPicker
0 B
0 B
32.22 kB
11.925 kB
🆕 New entry
react-color-picker-preview
ColorSlider
0 B
0 B
41.577 kB
15.42 kB
🆕 New entry
react-combobox
Combobox (including child components)
0 B
0 B
105.536 kB
34.512 kB
🆕 New entry
react-combobox
Dropdown (including child components)
0 B
0 B
106.16 kB
34.454 kB
🆕 New entry
react-components
react-components: Button, FluentProvider & webLightTheme
0 B
0 B
69.21 kB
20.174 kB
🆕 New entry
react-components
react-components: Accordion, Button, FluentProvider, Image, Menu, Popover
0 B
0 B
222.703 kB
64.42 kB
🆕 New entry
react-components
react-components: FluentProvider & webLightTheme
0 B
0 B
44.447 kB
14.59 kB
🆕 New entry
react-components
react-components: entire library
0 B
0 B
1.164 MB
291.232 kB
🆕 New entry
react-datepicker-compat
DatePicker Compat
0 B
0 B
225.318 kB
63.786 kB
🆕 New entry
react-dialog
Dialog (including children components)
0 B
0 B
100.417 kB
30.097 kB
🆕 New entry
react-field
Field
0 B
0 B
23.399 kB
8.898 kB
🆕 New entry
react-input
Input
0 B
0 B
28.014 kB
9.444 kB
🆕 New entry
react-link
Link
0 B
0 B
17.326 kB
7.032 kB
🆕 New entry
react-list
List
0 B
0 B
89.164 kB
26.599 kB
🆕 New entry
react-list
ListItem
0 B
0 B
112.731 kB
33.432 kB
🆕 New entry
react-menu
Menu (including children components)
0 B
0 B
154.048 kB
46.506 kB
🆕 New entry
react-menu
Menu (including selectable components)
0 B
0 B
156.729 kB
46.992 kB
🆕 New entry
react-message-bar
MessageBar (all components)
0 B
0 B
24.825 kB
9.267 kB
🆕 New entry
react-overflow
hooks only
0 B
0 B
12.808 kB
4.819 kB
🆕 New entry
react-persona
Persona
0 B
0 B
56.194 kB
17.695 kB
🆕 New entry
react-popover
Popover
0 B
0 B
130.294 kB
40.69 kB
🆕 New entry
react-portal
Portal
0 B
0 B
14.563 kB
5.118 kB
🆕 New entry
react-portal-compat
PortalCompatProvider
0 B
0 B
8.39 kB
2.64 kB
🆕 New entry
react-progress
ProgressBar
0 B
0 B
17.084 kB
6.891 kB
🆕 New entry
react-provider
FluentProvider
0 B
0 B
24.623 kB
8.893 kB
🆕 New entry
react-radio
Radio
0 B
0 B
32.672 kB
10.343 kB
🆕 New entry
react-radio
RadioGroup
0 B
0 B
15.762 kB
6.423 kB
🆕 New entry
react-select
Select
0 B
0 B
27.732 kB
10.124 kB
🆕 New entry
react-slider
Slider
0 B
0 B
37.52 kB
12.621 kB
🆕 New entry
react-spinbutton
SpinButton
0 B
0 B
34.839 kB
11.63 kB
🆕 New entry
react-swatch-picker
@fluentui/react-swatch-picker - package
0 B
0 B
105.086 kB
30.516 kB
🆕 New entry
react-switch
Switch
0 B
0 B
35.319 kB
11.314 kB
🆕 New entry
react-table
DataGrid
0 B
0 B
161.034 kB
45.71 kB
🆕 New entry
react-table
Table (Primitives only)
0 B
0 B
42.666 kB
13.854 kB
🆕 New entry
react-table
Table as DataGrid
0 B
0 B
131.869 kB
36.57 kB
🆕 New entry
react-table
Table (Selection only)
0 B
0 B
70.536 kB
19.999 kB
🆕 New entry
react-table
Table (Sort only)
0 B
0 B
69.179 kB
19.61 kB
🆕 New entry
react-tag-picker
@fluentui/react-tag-picker - package
0 B
0 B
185.227 kB
55.684 kB
🆕 New entry
react-tags
InteractionTag
0 B
0 B
15.199 kB
6.157 kB
🆕 New entry
react-tags
Tag
0 B
0 B
29.072 kB
9.55 kB
🆕 New entry
react-tags
TagGroup
0 B
0 B
82.719 kB
24.524 kB
🆕 New entry
react-teaching-popover
TeachingPopover
0 B
0 B
91.711 kB
27.921 kB
🆕 New entry
react-textarea
Textarea
0 B
0 B
26.572 kB
9.755 kB
🆕 New entry
react-timepicker-compat
TimePicker
0 B
0 B
108.525 kB
36.087 kB
🆕 New entry
react-toast
Toast (including Toaster)
0 B
0 B
101.371 kB
30.477 kB
🆕 New entry
react-tooltip
Tooltip
0 B
0 B
57.131 kB
19.949 kB
🆕 New entry
react-tree
FlatTree
0 B
0 B
145.462 kB
41.771 kB
🆕 New entry
react-tree
PersonaFlatTree
0 B
0 B
146.15 kB
41.881 kB
🆕 New entry
react-tree
PersonaTree
0 B
0 B
142.381 kB
40.703 kB
🆕 New entry
react-tree
Tree
0 B
0 B
141.693 kB
40.602 kB
🆕 New entry

🤖 This report was generated against 95af8ed946f334198a8d26c3ae939dab1163911d

Copy link

github-actions bot commented Jan 9, 2025

Pull request demo site: URL

@@ -0,0 +1,7 @@
{
Copy link
Collaborator

@fabricteam fabricteam Jan 9, 2025

Choose a reason for hiding this comment

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

🕵🏾‍♀️ visual regressions to review in the fluentuiv9 Visual Regression Report

Avatar Converged 2 screenshots
Image Name Diff(in Pixels) Image Type
Avatar Converged.Badge Mask RTL.chromium.png 4 Changed
Avatar Converged.badgeMask.chromium.png 41 Changed
Drawer 2 screenshots
Image Name Diff(in Pixels) Image Type
Drawer.Full Overlay High Contrast.chromium.png 2247 Changed
Drawer.Full Overlay RTL.chromium.png 1167 Changed

@@ -1,17 +1,21 @@
import * as React from 'react';
import { ForwardRefComponent } from '@fluentui/react-utilities';
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
import { ForwardRefComponent } from '@fluentui/react-utilities';
import type { ForwardRefComponent } from '@fluentui/react-utilities';

@khmakoto
Copy link
Member Author

khmakoto commented Jan 9, 2025

We should wait until #33599 is merged so that API related failures in other packages go away.

@khmakoto khmakoto requested a review from a team as a code owner January 9, 2025 22:48
@khmakoto khmakoto requested review from mltejera, a team and Mitch-At-Work as code owners January 9, 2025 23:16
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.

[Bug]: index.d.ts for @fluentui/react-provider references a non-dependency
3 participants