-
Notifications
You must be signed in to change notification settings - Fork 2.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
chore: creates TreeItem and basic Tree #25742
chore: creates TreeItem and basic Tree #25742
Conversation
📊 Bundle size report🤖 This report was generated against ee15af6700870457f304bca6bcb4724a50b621f1 |
This pull request is automatically built and testable in CodeSandbox. To see build info of the built libraries, click here or the icon next to each commit SHA. Latest deployment of this branch, based on commit 632ac32:
|
Asset size changesSize Auditor did not detect a change in bundle size for any component! Baseline commit: 6b90a6e90a71bb3ca36a6bc633d0d535ccb717e9 (build) |
4d3e688
to
856d56f
Compare
packages/react-components/react-tree/src/components/Tree/useTree.ts
Outdated
Show resolved
Hide resolved
packages/react-components/react-tree/src/components/Tree/useTree.ts
Outdated
Show resolved
Hide resolved
packages/react-components/react-tree/src/components/Tree/useTree.ts
Outdated
Show resolved
Hide resolved
packages/react-components/react-tree/src/components/TreeItem/TreeItem.types.ts
Outdated
Show resolved
Hide resolved
packages/react-components/react-tree/src/components/TreeItem/useTreeItem.ts
Outdated
Show resolved
Hide resolved
packages/react-components/react-tree/src/components/TreeItem/useTreeItem.ts
Outdated
Show resolved
Hide resolved
856d56f
to
c626b50
Compare
4307493
to
c7d0bb0
Compare
c7d0bb0
to
48071f7
Compare
return normalizeOpenSubtrees(openSubtrees); | ||
} | ||
|
||
function updateOpenSubtrees(data: TreeOpenChangeData, previousOpenSubtrees: string[]) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
not blocking, but have you considered using Set
, I started using it for Table
selection scenarios and honestly it makes updating things with ids so much cleaner
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Set is actually slower than Array.includes
methods for small sets of data, according to some benchmarks. I'm not sure I'd go for that, but we might analyze that in the future
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yeah it's not about perf, but the code is much cleaner
packages/react-components/react-tree/src/components/Tree/useTree.ts
Outdated
Show resolved
Hide resolved
…ee.ts Co-authored-by: ling1726 <[email protected]>
* master: (34 commits) chore(react-tooltip): migrate to new package structure (microsoft#25818) chore(react-field): migrate to new package structure (microsoft#25817) Update vr screenshotdiff lib to accept vr host url as param (microsoft#25772) feat(scripts): enable strict checking for additional sub-folders(packages) v4 (microsoft#25710) fix(tools): bump norhtstar packages v9 deps on dep mismatch resolution (microsoft#25806) feat: remove react-storybook and replace its functionality via standard react-storybook-addon package (microsoft#25786) applying package updates chore(react-spinbutton): migrate to new package structure (microsoft#25813) chore(react-spinner): migrate to new package structure (microsoft#25814) chore(react-provider): migrate to new package structure (microsoft#25809) chore(react-radio, shared-contexts): migrate to new package structure (microsoft#25810) chore(react-theme): migrate to new package structure (microsoft#25812) docs: add Fluent UI Insights EP04 to README (microsoft#25775) chore(react-migration-v8-v9): use same build process/setup as v9/ts-solution packages (microsoft#25679) docs: Improves `Table` documentation (microsoft#25787) feat: improve react-18 tests (microsoft#25758) docs: Add examples for DataGrid (microsoft#25783) chore(react-tree): scaffold TreeItemLayout (microsoft#25781) perf: make ts-minbar test compilation faster and asset preparation simpler (microsoft#25754) chore: creates TreeItem and basic Tree (microsoft#25742) ...
* chore: initial Tree & TreeItem implementation * chore: convert context to use context selector * chore: converts focus to use a tree walker * Update packages/react-components/react-tree/src/components/Tree/useTree.ts Co-authored-by: ling1726 <[email protected]> Co-authored-by: ling1726 <[email protected]>
New Behavior
Tree
andTreeItem
TreeBranch
andTreeLeaf
componentsNext steps
TreeItemLayout
component to integrate proper design spec