Skip to content

Conversation

@anarmawala
Copy link

@anarmawala anarmawala commented Jan 27, 2026

Please verify that:

  • Code is up-to-date with the master branch
  • Your changes are covered by tests (if possible)
  • You've run yarn change locally

Previous Behavior

The dir in ProviderContext automatically gets assumed to ltr'.

New Behavior

If we already had a direction specific on the html level then we should already take preference to that.

Related Issue(s)

  • Fixes #
    The Provider Context now reads the document.dir and if a value of rtl or ltr exists then use that, otherwise, assume ltr.

@anarmawala anarmawala requested review from a team as code owners January 27, 2026 22:01
@anarmawala anarmawala closed this Jan 27, 2026
@anarmawala anarmawala reopened this Jan 27, 2026
@anarmawala anarmawala marked this pull request as draft January 27, 2026 22:05
@anarmawala anarmawala marked this pull request as ready for review January 27, 2026 22:10
@github-actions
Copy link

📊 Bundle size report

Package & Exports Baseline (minified/GZIP) PR Change
react-accordion
Accordion (including children components)
107.486 kB
32.905 kB
107.549 kB
32.924 kB
63 B
19 B
react-avatar
Avatar
48.545 kB
15.459 kB
48.608 kB
15.477 kB
63 B
18 B
react-avatar
AvatarGroupItem
61.797 kB
19.459 kB
61.86 kB
19.475 kB
63 B
16 B
react-breadcrumb
@fluentui/react-breadcrumb - package
115.758 kB
31.742 kB
115.821 kB
31.758 kB
63 B
16 B
react-calendar-compat
Calendar Compat
149.207 kB
39.833 kB
149.27 kB
39.85 kB
63 B
17 B
react-card
Card - All
106.017 kB
29.756 kB
106.08 kB
29.771 kB
63 B
15 B
react-card
Card
98.685 kB
27.88 kB
98.748 kB
27.895 kB
63 B
15 B
react-charts
AreaChart
407.113 kB
124.705 kB
407.176 kB
124.728 kB
63 B
23 B
react-charts
DeclarativeChart
756.944 kB
217.867 kB
757.007 kB
217.885 kB
63 B
18 B
react-charts
DonutChart
317.554 kB
94.682 kB
317.617 kB
94.701 kB
63 B
19 B
react-charts
FunnelChart
309.104 kB
91.572 kB
309.167 kB
91.587 kB
63 B
15 B
react-charts
GanttChart
390.222 kB
118.264 kB
390.285 kB
118.279 kB
63 B
15 B
react-charts
GaugeChart
316.985 kB
94.055 kB
317.048 kB
94.076 kB
63 B
21 B
react-charts
GroupedVerticalBarChart
398.1 kB
120.879 kB
398.163 kB
120.897 kB
63 B
18 B
react-charts
HeatMapChart
392.303 kB
120.013 kB
392.366 kB
120.031 kB
63 B
18 B
react-charts
HorizontalBarChart
297.281 kB
86.243 kB
297.344 kB
86.256 kB
63 B
13 B
react-charts
Legends
236.192 kB
69.589 kB
236.255 kB
69.606 kB
63 B
17 B
react-charts
LineChart
417.675 kB
126.61 kB
417.738 kB
126.63 kB
63 B
20 B
react-charts
PolarChart
346.165 kB
105.681 kB
346.228 kB
105.694 kB
63 B
13 B
react-charts
SankeyChart
214.767 kB
65.946 kB
214.83 kB
65.965 kB
63 B
19 B
react-charts
ScatterChart
397.502 kB
120.762 kB
397.565 kB
120.788 kB
63 B
26 B
react-charts
Sparkline
91.393 kB
28.708 kB
91.456 kB
28.724 kB
63 B
16 B
react-charts
VerticalBarChart
434.577 kB
126.369 kB
434.64 kB
126.387 kB
63 B
18 B
react-charts
VerticalStackedBarChart
404.014 kB
121.7 kB
404.077 kB
121.719 kB
63 B
19 B
react-checkbox
Checkbox
34.408 kB
11.73 kB
34.471 kB
11.75 kB
63 B
20 B
react-color-picker
ColorArea
48.424 kB
17.019 kB
48.487 kB
17.037 kB
63 B
18 B
react-color-picker
ColorSlider
40.598 kB
15.068 kB
40.661 kB
15.087 kB
63 B
19 B
react-combobox
Combobox (including child components)
106.07 kB
34.487 kB
106.133 kB
34.508 kB
63 B
21 B
react-combobox
Dropdown (including child components)
106.694 kB
34.414 kB
106.757 kB
34.433 kB
63 B
19 B
react-components
react-components: Button, FluentProvider & webLightTheme
71.11 kB
20.219 kB
71.173 kB
20.238 kB
63 B
19 B
react-components
react-components: Accordion, Button, FluentProvider, Image, Menu, Popover
237.741 kB
68.697 kB
237.804 kB
68.717 kB
63 B
20 B
react-components
react-components: FluentProvider & webLightTheme
44.409 kB
14.303 kB
44.472 kB
14.324 kB
63 B
21 B
react-components
react-components: entire library
1.291 MB
323.024 kB
1.291 MB
323.042 kB
63 B
18 B
react-datepicker-compat
DatePicker Compat
225.9 kB
63.919 kB
225.963 kB
63.936 kB
63 B
17 B
react-dialog
Dialog (including children components)
102.964 kB
30.723 kB
103.027 kB
30.74 kB
63 B
17 B
react-list
List
87.996 kB
26.105 kB
88.059 kB
26.125 kB
63 B
20 B
react-list
ListItem
111.581 kB
32.971 kB
111.644 kB
32.99 kB
63 B
19 B
react-menu
Menu (including children components)
164.613 kB
49.863 kB
164.676 kB
49.881 kB
63 B
18 B
react-menu
Menu (including selectable components)
167.791 kB
50.466 kB
167.854 kB
50.485 kB
63 B
19 B
react-message-bar
MessageBar (all components)
24.15 kB
8.907 kB
24.213 kB
8.927 kB
63 B
20 B
react-motion
@fluentui/react-motion - createMotionComponent()
4.156 kB
1.818 kB
4.219 kB
1.84 kB
63 B
22 B
react-motion
@fluentui/react-motion - createPresenceComponent()
5.908 kB
2.442 kB
5.971 kB
2.463 kB
63 B
21 B
react-persona
Persona
55.436 kB
17.336 kB
55.499 kB
17.354 kB
63 B
18 B
react-popover
Popover
128.086 kB
39.594 kB
128.149 kB
39.613 kB
63 B
19 B
react-portal
Portal
15.55 kB
5.398 kB
15.613 kB
5.417 kB
63 B
19 B
react-positioning
usePositioning
28.865 kB
10.146 kB
28.928 kB
10.165 kB
63 B
19 B
react-positioning
useSafeZoneArea
12.445 kB
5 kB
12.508 kB
5.019 kB
63 B
19 B
react-provider
FluentProvider
23.797 kB
8.479 kB
23.86 kB
8.5 kB
63 B
21 B
react-radio
Radio
31.791 kB
9.937 kB
31.854 kB
9.957 kB
63 B
20 B
react-slider
Slider
37.208 kB
12.393 kB
37.271 kB
12.412 kB
63 B
19 B
react-spinbutton
SpinButton
34.455 kB
11.377 kB
34.518 kB
11.395 kB
63 B
18 B
react-spinner
Spinner
24.387 kB
8.13 kB
24.45 kB
8.148 kB
63 B
18 B
react-swatch-picker
@fluentui/react-swatch-picker - package
105.156 kB
30.267 kB
105.219 kB
30.286 kB
63 B
19 B
react-switch
Switch
35.388 kB
11.152 kB
35.451 kB
11.171 kB
63 B
19 B
react-table
DataGrid
160.195 kB
45.263 kB
160.258 kB
45.28 kB
63 B
17 B
react-table
Table (Primitives only)
41.883 kB
13.493 kB
41.946 kB
13.511 kB
63 B
18 B
react-table
Table as DataGrid
131.41 kB
36.265 kB
131.473 kB
36.284 kB
63 B
19 B
react-table
Table (Selection only)
69.798 kB
19.628 kB
69.861 kB
19.649 kB
63 B
21 B
react-table
Table (Sort only)
68.441 kB
19.244 kB
68.504 kB
19.265 kB
63 B
21 B
react-tag-picker
@fluentui/react-tag-picker - package
187.42 kB
56.172 kB
187.483 kB
56.195 kB
63 B
23 B
react-tags
TagGroup
83.097 kB
24.491 kB
83.16 kB
24.509 kB
63 B
18 B
react-teaching-popover
TeachingPopover
102.017 kB
30.539 kB
102.08 kB
30.556 kB
63 B
17 B
react-timepicker-compat
TimePicker
109.036 kB
36.023 kB
109.099 kB
36.042 kB
63 B
19 B
react-toast
Toast (including Toaster)
103.446 kB
30.938 kB
103.509 kB
30.958 kB
63 B
20 B
react-tooltip
Tooltip
57.962 kB
20.022 kB
58.025 kB
20.044 kB
63 B
22 B
react-tree
FlatTree
148.521 kB
42.459 kB
148.584 kB
42.478 kB
63 B
19 B
react-tree
PersonaFlatTree
150.347 kB
42.844 kB
150.41 kB
42.864 kB
63 B
20 B
react-tree
PersonaTree
146.407 kB
41.672 kB
146.47 kB
41.692 kB
63 B
20 B
react-tree
Tree
144.587 kB
41.298 kB
144.65 kB
41.319 kB
63 B
21 B
Unchanged fixtures
Package & Exports Size (minified/GZIP)
global-context
createContext
510 B
328 B
global-context
createContextSelector
537 B
339 B
react-aria
ARIA - Default
237 B
181 B
react-avatar
AvatarGroup
18.336 kB
7.324 kB
react-badge
Badge
25.08 kB
8.18 kB
react-badge
CounterBadge
25.86 kB
8.453 kB
react-badge
PresenceBadge
24.961 kB
9.091 kB
react-button
Button
38.231 kB
10.651 kB
react-button
CompoundButton
45.12 kB
11.965 kB
react-button
MenuButton
43.183 kB
12.08 kB
react-button
SplitButton
52.236 kB
13.714 kB
react-button
ToggleButton
55.154 kB
12.482 kB
react-card
CardFooter
13.642 kB
5.438 kB
react-card
CardHeader
16.175 kB
6.303 kB
react-card
CardPreview
13.726 kB
5.574 kB
react-charts
HorizontalBarChartWithAxis
63 B
83 B
react-color-picker
ColorPicker
17.055 kB
6.858 kB
react-divider
Divider
17.24 kB
6.246 kB
react-field
Field
22.811 kB
8.583 kB
react-image
Image
14.464 kB
5.84 kB
react-input
Input
27.132 kB
9.019 kB
react-jsx-runtime
Classic Pragma
1.101 kB
550 B
react-jsx-runtime
JSX Dev Runtime
2.8 kB
1.247 kB
react-jsx-runtime
JSX Runtime
3.154 kB
1.359 kB
react-label
Label
13.79 kB
5.567 kB
react-link
Link
17.014 kB
6.763 kB
react-motion
@fluentui/react-motion - PresenceGroup
1.727 kB
823 B
react-overflow
hooks only
11.977 kB
4.574 kB
react-portal-compat
PortalCompatProvider
8.386 kB
2.624 kB
react-progress
ProgressBar
16.586 kB
6.536 kB
react-radio
RadioGroup
14.88 kB
6.017 kB
react-select
Select
26.971 kB
9.762 kB
react-tags
InteractionTag
14.552 kB
5.788 kB
react-tags
Tag
30.407 kB
9.721 kB
react-text
Text - Default
16.181 kB
6.285 kB
react-text
Text - Wrappers
19.341 kB
6.619 kB
react-textarea
Textarea
25.514 kB
9.278 kB
react-utilities
SSRProvider
180 B
160 B
🤖 This report was generated against 57dfcfa6164a69c1be9a9d9f9d7a2dd67be18199

@github-actions
Copy link

Pull request demo site: URL

@@ -0,0 +1,7 @@
{

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/Avatar Converged 1 screenshots
Image Name Diff(in Pixels) Image Type
vr-tests-react-components/Avatar Converged.badgeMask.normal.chromium.png 5 Changed
vr-tests-react-components/Charts-DonutChart 1 screenshots
Image Name Diff(in Pixels) Image Type
vr-tests-react-components/Charts-DonutChart.Dynamic.default.chromium.png 5581 Changed
vr-tests-react-components/Positioning 1 screenshots
Image Name Diff(in Pixels) Image Type
vr-tests-react-components/Positioning.Positioning end.updated 2 times.chromium.png 33 Changed
vr-tests-react-components/TagPicker 1 screenshots
Image Name Diff(in Pixels) Image Type
vr-tests-react-components/TagPicker.disabled - Dark Mode.disabled input hover.chromium.png 658 Changed

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

Copy link
Member

@layershifter layershifter left a comment

Choose a reason for hiding this comment

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

@anarmawala thx for contributing, however the current behavior is intentional as explicit is better over implicit.

For context, this also affects SSR scenarios as document is not available in Node env and the current PR will result in potentially different defaults on a client and a server.

@dmytrokirpa
Copy link
Contributor

I’m with @layershifter on this - it could lead to a hydration issue. If you want to reuse document.dir, just pass it directly to FluentProvider rather than tweaking the default setting.

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.

3 participants