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

[two_dimensional_scrollables] TreeView #6592

Open
wants to merge 31 commits into
base: main
Choose a base branch
from
Open

Conversation

Piinks
Copy link
Contributor

@Piinks Piinks commented Apr 22, 2024

FYI for Reviewers: Much of the API surface matches that of the 1D SliverTree in flutter/flutter#147171 If it changes here, it should change there, and vice versa.

📜 Design Document

Adds classes and associated callbacks and controllers for TreeView. Core components:

  • TreeView
  • TreeViewport
  • RenderTreeViewport
  • TreeViewController
  • TreeViewNode
  • TreeViewStateMixin
  • TreeViewIndentationType
  • TreeRowDelegateMixin
  • TreeRowBuilderDelegate

Along with Span subclasses for trees:

  • TreeRowPadding
  • TreeRowExtentDelegate
  • TreeRowExtent (and subclasses)
  • TreeRowBorder

Fixes flutter/flutter#42332
Fixes flutter/flutter#126298

treeView_0.mov
treeView_1.mov

Pre-launch Checklist

If you need help, consider asking for advice on the #hackers-new channel on Discord.

@Piinks Piinks added the p: two_dimensional_scrollables Issues pertaining to the two_dimensional_scrollables package label Apr 22, 2024
@Piinks Piinks mentioned this pull request Apr 22, 2024
9 tasks
@Piinks
Copy link
Contributor Author

Piinks commented May 9, 2024

No rush on the re-review, it's a big one. Best taken in breaks. :)

Review feedback diff is contained in 5a0194c

final T _content;

/// Other [TreeViewNode]s this this node will be [parent] to.
List<TreeViewNode<T>> get children => _children;
Copy link
Member

Choose a reason for hiding this comment

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

Is this true? didUpdateWidget wouldn't be called if I pass a TreeViewNode to TreeView and then later on call .children.append(...) on that TreeViewNode? Or can you show in a test that that actually works?

@Piinks
Copy link
Contributor Author

Piinks commented May 14, 2024

@Piinks Piinks requested a review from goderbauer May 14, 2024 22:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
p: two_dimensional_scrollables Issues pertaining to the two_dimensional_scrollables package platform-macos
Projects
None yet
4 participants