Skip to content
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

Conversation

bsunderhus
Copy link
Contributor

@bsunderhus bsunderhus commented Nov 21, 2022

New Behavior

  1. Scaffolds and creates initial implementation for Tree and TreeItem
  2. Deletes TreeBranch and TreeLeaf components

Next steps

  1. create a TreeItemLayout component to integrate proper design spec
  2. create unit tests and e2e tests to ensure tree behaviours
  3. properly document with stories

@bsunderhus bsunderhus self-assigned this Nov 21, 2022
@fabricteam
Copy link
Collaborator

fabricteam commented Nov 21, 2022

📊 Bundle size report

🤖 This report was generated against ee15af6700870457f304bca6bcb4724a50b621f1

@codesandbox-ci
Copy link

codesandbox-ci bot commented Nov 21, 2022

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:

Sandbox Source
@fluentui/react 8 starter Configuration
@fluentui/react-components 9 starter Configuration

@size-auditor
Copy link

size-auditor bot commented Nov 21, 2022

Asset size changes

Size Auditor did not detect a change in bundle size for any component!

Baseline commit: 6b90a6e90a71bb3ca36a6bc633d0d535ccb717e9 (build)

@bsunderhus bsunderhus force-pushed the react-tree/chore--create-treeItem-and-basic-tree branch 3 times, most recently from 4d3e688 to 856d56f Compare November 23, 2022 11:03
@bsunderhus bsunderhus marked this pull request as ready for review November 23, 2022 11:16
@bsunderhus bsunderhus requested a review from a team as a code owner November 23, 2022 11:16
@bsunderhus bsunderhus force-pushed the react-tree/chore--create-treeItem-and-basic-tree branch from 856d56f to c626b50 Compare November 23, 2022 12:42
@bsunderhus bsunderhus requested a review from ling1726 November 23, 2022 13:47
@bsunderhus bsunderhus force-pushed the react-tree/chore--create-treeItem-and-basic-tree branch from 4307493 to c7d0bb0 Compare November 24, 2022 08:00
@bsunderhus bsunderhus force-pushed the react-tree/chore--create-treeItem-and-basic-tree branch from c7d0bb0 to 48071f7 Compare November 24, 2022 08:17
return normalizeOpenSubtrees(openSubtrees);
}

function updateOpenSubtrees(data: TreeOpenChangeData, previousOpenSubtrees: string[]) {
Copy link
Member

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

Copy link
Contributor Author

@bsunderhus bsunderhus Nov 24, 2022

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

Copy link
Member

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

@bsunderhus bsunderhus enabled auto-merge (squash) November 24, 2022 13:05
@bsunderhus bsunderhus merged commit 8fcefae into microsoft:master Nov 24, 2022
@bsunderhus bsunderhus deleted the react-tree/chore--create-treeItem-and-basic-tree branch November 24, 2022 13:26
marcosmoura added a commit to marcosmoura/fluentui that referenced this pull request Nov 29, 2022
* 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)
  ...
Hotell pushed a commit to Hotell/fluentui that referenced this pull request Feb 9, 2023
* 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]>
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.

3 participants