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 <[email protected]>
|
@copilot rebase this branch against master |
Co-authored-by: Claude Sonnet 4.6 <[email protected]> Co-authored-by: tudorpopams <[email protected]>
Co-authored-by: tudorpopams <[email protected]>
|
@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
|
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 <[email protected]>
Considered both info items:
|
|
@copilot fix CI |
….style assignment Agent-Logs-Url: https://github.com/microsoft/fluentui/sessions/d1ab7dce-2cac-4325-a83e-e8a57d3bd5e3 Co-authored-by: tudorpopams <[email protected]>
Fixed in 9e21616. The CI failure was |

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.