fix(react-tree): support indentation for TreeItem levels greater than 10#36014
fix(react-tree): support indentation for TreeItem levels greater than 10#36014
Conversation
…ine CSS variable Agent-Logs-Url: https://github.com/microsoft/fluentui/sessions/9f80c711-ce28-4674-af00-9dcf00d323b7 Co-authored-by: tudorpopams <97875118+tudorpopams@users.noreply.github.com>
|
@copilot rebase this branch against master |
Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com> Co-authored-by: tudorpopams <97875118+tudorpopams@users.noreply.github.com>
Co-authored-by: tudorpopams <97875118+tudorpopams@users.noreply.github.com>
|
@copilot not sure why this branch now has message bar changes in it. Please make sure you update with the latest changes from master. |
The PR's content diff against Cleaning this up requires a force-push, but my tooling ( |
|
@copilot CI failed. Check why and fix it. |
The failing job was This same failure also occurred on master itself at commit You've since merged latest master into the branch ( |
📊 Bundle size reportUnchanged fixtures
|
|
Pull request demo site: URL |
| @@ -0,0 +1,7 @@ | |||
| { | |||
There was a problem hiding this comment.
🕵🏾♀️ visual changes to review in the Visual Change Report
vr-tests-react-components/Charts-DonutChart 1 screenshots
| Image Name | Diff(in Pixels) | Image Type |
|---|---|---|
| vr-tests-react-components/Charts-DonutChart.Dynamic - RTL.default.chromium.png | 5570 | Changed |
vr-tests-react-components/Menu Converged - submenuIndicator slotted content 1 screenshots
| Image Name | Diff(in Pixels) | Image Type |
|---|---|---|
| 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 | 44 | Changed |
| vr-tests-react-components/Positioning.Positioning end.updated 2 times.chromium.png | 618 | 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 | 141 | Changed |
| vr-tests-react-components/ProgressBar converged.Indeterminate + thickness.default.chromium.png | 93 | Changed |
vr-tests-react-components/TagPicker 1 screenshots
| Image Name | Diff(in Pixels) | Image Type |
|---|---|---|
| vr-tests-react-components/TagPicker.disabled - High Contrast.disabled input hover.chromium.png | 1319 | Changed |
There were 1 duplicate changes discarded. Check the build logs for more information.

useTreeItemStyles.styles.tspre-generates Griffel classes only for levels 1–10, so anyTreeItemnested deeper loses its indentation and visually collapses back toward the root.Changes
useTreeItemStyles.styles.ts: keep the static classes for levels 1–10 (common case, no extra inline style), and forlevel > 10fall back to an inline style that sets the--fluent-TreeItem--levelCSS variable directly on the root slot. User-providedstyleis spread after, so it still wins.TreeItem.test.tsx: new test rendering a 12-deep tree asserting that levels ≤ 10 have no inline var and levels > 10 set the CSS variable to theiraria-level.@fluentui/react-tree.This avoids generating an unbounded number of atomic classes while supporting arbitrarily deep trees.