Skip to content

feat(Tree): add component#1127

Open
tenphi wants to merge 11 commits intomainfrom
feat-tree-component
Open

feat(Tree): add component#1127
tenphi wants to merge 11 commits intomainfrom
feat-tree-component

Conversation

@tenphi
Copy link
Copy Markdown
Member

@tenphi tenphi commented Apr 20, 2026

Note

Medium Risk
Adds a new, fairly complex interactive Tree component (selection/expansion/checkbox cascade and async loading) plus a styling library bump, which could introduce subtle state/ARIA behavior or bundle-size regressions.

Overview
Introduces a new Tree component (React Aria/Stately, AntD-like treeData API) supporting controlled/uncontrolled expansion, selection modes, and optional cascading checkboxes with halfChecked reporting, plus optional async loadData with per-row loading state.

Exports Tree from the package entrypoint, adds Storybook docs/stories and a comprehensive test suite for expansion/selection/checking/lazy-load/ref-forwarding behaviors, and bumps @tenphi/tasty to 2.1.1 (with a corresponding size-limit increase).

Reviewed by Cursor Bugbot for commit 9fdcac5. Bugbot is set up for automated code reviews on this repo. Configure here.

tenphi added 2 commits April 20, 2026 15:57
Pin @tenphi/tasty, record the changeset, and keep Tree row checkboxes
typechecking with a narrow react-types workaround on Checkbox onChange.

Made-with: Cursor
@changeset-bot
Copy link
Copy Markdown

changeset-bot bot commented Apr 20, 2026

🦋 Changeset detected

Latest commit: 9fdcac5

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
@cube-dev/ui-kit Minor

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@vercel
Copy link
Copy Markdown

vercel bot commented Apr 20, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
cube-ui-kit Ready Ready Preview, Comment Apr 20, 2026 7:37pm

Request Review

@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Apr 20, 2026

📦 NPM canary release

Deployed canary version 0.0.0-canary-030c219.

@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Apr 20, 2026

🏋️ Size limit report

Name Size Passed?
All 377.99 KB (+2.8% 🔺) Yes 🎉
Tree shaking (just a Button) 110.47 KB (+0.01% 🔺) Yes 🎉

Click here if you want to find out what is changed in this build

@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Apr 20, 2026

🧪 Storybook is successfully deployed!

Comment thread src/components/content/Tree/use-checkbox-tree.ts
Comment thread src/components/content/Tree/Tree.tsx
Comment thread src/components/content/Tree/Tree.tsx
Comment thread src/components/content/Tree/Tree.tsx Outdated
Comment thread src/components/content/Tree/Tree.tsx Outdated
Comment thread src/components/content/Tree/Tree.tsx
Comment thread src/components/content/Tree/use-load-data.ts Outdated
Comment thread src/components/content/Tree/use-checkbox-tree.ts Outdated
Comment thread src/components/content/Tree/use-checkbox-tree.ts
Comment thread src/components/content/Tree/TreeNode.tsx
Comment thread src/components/content/Tree/TreeNode.tsx
Comment thread src/components/content/Tree/use-checkbox-tree.ts
Comment thread src/components/content/Tree/Tree.tsx Outdated
Copy link
Copy Markdown
Contributor

@cursor cursor bot left a comment

Choose a reason for hiding this comment

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

Cursor Bugbot has reviewed your changes and found 1 potential issue.

Fix All in Cursor

❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.

Reviewed by Cursor Bugbot for commit 9fdcac5. Configure here.

isPressed,
isRowCheckable,
],
);
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

block-node modifier missing from itemMods for rowStyles

Medium Severity

The block-node modifier is documented as a row-level modifier available when overriding rowStyles, but it's only included in rowMods (applied to TreeNodeRow) and not in itemMods (applied to TreeRowItem). Since rowStyles is forwarded to TreeRowItem, any consumer styling that relies on the block-node modifier in rowStyles will have no effect. Other modifiers like selected and disabled work because Item handles them internally via isSelected/isDisabled props, but block-node has no such internal handling.

Additional Locations (1)
Fix in Cursor Fix in Web

Reviewed by Cursor Bugbot for commit 9fdcac5. Configure here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant