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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

[docs] Improve Tree View selection doc #13105

Merged
merged 16 commits into from May 20, 2024

Conversation

flaviendelangle
Copy link
Member

@flaviendelangle flaviendelangle commented May 13, 2024

My first goal was to add a single selection demo, which was really lacking.
But I ended up doing a lot more changes on this page.
I'll replicate the changes on the SimpleTreeView doc once approved 馃憤

I took the DataGrid doc as an inspiration, but IMHO it is not great (no link to the multi select keyboard shortcuts for instance).

michelengelen and others added 3 commits April 3, 2024 15:34
Signed-off-by: Michel Engelen <32863416+michelengelen@users.noreply.github.com>
Co-authored-by: Olivier Tassinari <olivier.tassinari@gmail.com>
Signed-off-by: Gene Arch <genepaularch@gmail.com>
Co-authored-by: Rom Grk <romgrk.cc@gmail.com>
@flaviendelangle flaviendelangle self-assigned this May 13, 2024
@flaviendelangle flaviendelangle added docs Improvements or additions to the documentation component: tree view TreeView, TreeItem. This is the name of the generic UI component, not the React module! labels May 13, 2024

{{"demo": "MultiSelectTreeView.js"}}

:::success
Copy link
Member Author

Choose a reason for hiding this comment

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

Unlike the data grid, I added those as success because IMHO this is more a side not than the main content here.
The main content is how to enable selection, and then we describe how to use selection but this mostly target end users which won't read to doc, so it's more to say "Hey we have good selection interactions".

@@ -54,3 +74,17 @@ Learn more about the _Controlled and uncontrolled_ pattern in the [React documen
Use the `onItemSelectionToggle` prop if you want to react to an item selection change:

{{"demo": "TrackItemSelectionToggle.js"}}

## Parent / children selection relationship
Copy link
Member Author

Choose a reason for hiding this comment

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

Do you think it's worth adding a demo here on how to do it in user-land?

Copy link
Contributor

Choose a reason for hiding this comment

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

I think it's worth it, yes 馃憣

Copy link
Member Author

Choose a reason for hiding this comment

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

Done 馃憤

Copy link
Contributor

@noraleonte noraleonte left a comment

Choose a reason for hiding this comment

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

Super valuable improvement 馃憣 馃帀

docs/data/tree-view/rich-tree-view/selection/selection.md Outdated Show resolved Hide resolved
@@ -54,3 +74,17 @@ Learn more about the _Controlled and uncontrolled_ pattern in the [React documen
Use the `onItemSelectionToggle` prop if you want to react to an item selection change:

{{"demo": "TrackItemSelectionToggle.js"}}

## Parent / children selection relationship
Copy link
Contributor

Choose a reason for hiding this comment

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

I think it's worth it, yes 馃憣

Copy link
Member

@LukasTy LukasTy left a comment

Choose a reason for hiding this comment

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

LGTM, a very nice improvement. 馃憦

docs/data/tree-view/rich-tree-view/selection/selection.md Outdated Show resolved Hide resolved
@flaviendelangle
Copy link
Member Author

Doc applied to SimpleTreeView and example added for parent-children relationship

Copy link
Contributor

@noraleonte noraleonte left a comment

Choose a reason for hiding this comment

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

Nice improvement 馃帀

@flaviendelangle flaviendelangle merged commit dd9ea2b into mui:master May 20, 2024
17 checks passed
@flaviendelangle flaviendelangle deleted the selection-doc branch May 20, 2024 11:08
arthurbalduini pushed a commit to arthurbalduini/mui-x that referenced this pull request May 23, 2024
Signed-off-by: Michel Engelen <32863416+michelengelen@users.noreply.github.com>
Signed-off-by: Gene Arch <genepaularch@gmail.com>
Signed-off-by: Flavien DELANGLE <flaviendelangle@gmail.com>
Co-authored-by: Michel Engelen <32863416+michelengelen@users.noreply.github.com>
Co-authored-by: Olivier Tassinari <olivier.tassinari@gmail.com>
Co-authored-by: Gene Arch <genepaularch@gmail.com>
Co-authored-by: Rom Grk <romgrk.cc@gmail.com>
Co-authored-by: Nora <72460825+noraleonte@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
component: tree view TreeView, TreeItem. This is the name of the generic UI component, not the React module! docs Improvements or additions to the documentation
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

7 participants