-
Notifications
You must be signed in to change notification settings - Fork 6.8k
docs(tree): add docs to cdk-tree #9040
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
Conversation
src/cdk/tree/tree.md
Outdated
|
||
### Using the CDK tree | ||
|
||
#### Wring your tree template |
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.
typo: Wiring?
src/cdk/tree/tree.md
Outdated
|
||
#### Flat tree | ||
|
||
In a flat tree, the hierarchy is flattened; nodes are not rendered inside of each other, but instead |
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.
There's some duplication between the cdk docs and the mat docs. Would it make sense to distinguish these similar to the table docs?
edb8764
to
8f435f4
Compare
src/cdk/tree/tree.md
Outdated
@@ -0,0 +1,157 @@ | |||
The `<cdk-tree>` enable developers to build customized tree for structured data. The cdk-tree |
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.
The `<cdk-tree>` enables developers to build a customized tree experience for structured data.
src/cdk/tree/tree.md
Outdated
@@ -0,0 +1,157 @@ | |||
The `<cdk-tree>` enable developers to build customized tree for structured data. The cdk-tree | |||
provides a foundation to build other features such as filtering on top of tree. | |||
For a Material design styled tree, see `<mat-tree>` which builds on top of the `<cdk-tree>`. |
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.
The 'D' in "Material Design" should also be capitalized
src/cdk/tree/tree.md
Outdated
provides a foundation to build other features such as filtering on top of tree. | ||
For a Material design styled tree, see `<mat-tree>` which builds on top of the `<cdk-tree>`. | ||
|
||
There are two types of trees: Flat tree and Nested Tree. The DOM structures are different for |
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.
"flat" and "nested" don't need to be capitalized
src/cdk/tree/tree.md
Outdated
#### Flat tree | ||
|
||
In a flat tree, the hierarchy is flattened; nodes are not rendered inside of each other, but instead | ||
are rendered as siblings in sequence. An instance of TreeFlattener is used to generate the flat list |
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.
Put class names in backticks
`TreeFlattener`
(here and a few other places)
src/cdk/tree/tree.md
Outdated
#### Nested tree | ||
|
||
In Nested tree, children nodes are placed inside their parent node in DOM. The parent node has an | ||
outlet to keep all the children nodes. |
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.
The parent node contains a node outlet into which children are projected
src/cdk/tree/tree.md
Outdated
in DOM. | ||
|
||
|
||
#### When |
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.
#### Conditional templates
src/cdk/tree/tree.md
Outdated
|
||
|
||
#### When | ||
Different tree node templates can be defined via the `when:` with a function. |
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.
The tree may include multiple node templates, where a template is chosen
for a particular data node via the `when` predicate of the template.
src/cdk/tree/tree.md
Outdated
|
||
#### When | ||
Different tree node templates can be defined via the `when:` with a function. | ||
Please note that the tree will not update the template it uses if the data object does not change. |
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.
Is it worth calling this out here, since it's the same for any other binding on the node?
src/cdk/tree/tree.md
Outdated
|
||
#### Connecting the tree to a data source | ||
|
||
Similar to `cdl-table`, data is provided to the tree through a `DataSource`. When the tree receives |
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.
"cdl" -> "cdk"
src/cdk/tree/tree.md
Outdated
|
||
#### Flat tree | ||
|
||
The flat tree data source should be responsible for the node expansion/collapsing events, since when |
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.
"should be responsible" -> "is responsible"
Comments addressed. Please take a look. Thanks! |
4764d49
to
5e253dd
Compare
5e253dd
to
f109379
Compare
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.
LGTM
This issue has been automatically locked due to inactivity. Read more about our automatic conversation locking policy. This action has been performed automatically by a bot. |
No description provided.