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 - Dark Mode.default.chromium.png | 7530 | Changed |
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 - RTL.submenus open.chromium.png | 599 | Changed |
| vr-tests-react-components/Menu Converged - submenuIndicator slotted content.default.submenus open.chromium.png | 605 | Changed |
vr-tests-react-components/Positioning 2 screenshots
| Image Name | Diff(in Pixels) | Image Type |
|---|---|---|
| vr-tests-react-components/Positioning.Positioning end.updated 2 times.chromium.png | 962 | Changed |
| vr-tests-react-components/Positioning.Positioning end.chromium.png | 620 | Changed |
vr-tests-react-components/ProgressBar converged 2 screenshots
| Image Name | Diff(in Pixels) | Image Type |
|---|---|---|
| vr-tests-react-components/ProgressBar converged.Indeterminate + thickness - Dark Mode.default.chromium.png | 58 | Changed |
| vr-tests-react-components/ProgressBar converged.Indeterminate + thickness.default.chromium.png | 159 | Changed |
PR Review: #36014 — fix(react-tree): support indentation for TreeItem levels greater than 10Author: app/copilot-swe-agent Confidence Score: 100/100Surgical one-branch addition with a dedicated test; uses pre-existing types ( FindingsBlockers (must fix before merge)none Warnings (should address)none Info (consider)
Category Breakdown
RecommendationAPPROVE The fix adds exactly one Posted via the |
|
@copilot consider the changes suggested above |
… to reflect automatic fallback Agent-Logs-Url: https://github.com/microsoft/fluentui/sessions/b7e51df0-83b9-4c97-b737-0c1922a87851 Co-authored-by: tudorpopams <97875118+tudorpopams@users.noreply.github.com>
Considered both info items:
|

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.