-
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
[docs] Split Rows doc page #5195
Conversation
These are the results for the performance tests:
|
|
||
Row reordering allows to rearrange rows by dragging the special reordering cell. | ||
|
||
By default, row reordering is disabled. |
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.
I would add a paragraph describing the default behavior with a link to the Sorting page to let people know how those two features interplay.
I think this information is worth displaying up-front instead of in a warning at the end of the page
/> | ||
``` | ||
|
||
This approach can also be used to change the location of the toggle column. |
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.
@DanailH What do you think about copying the structure of this example ?
To display both changes instead of adding an explanation after.
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.
Interesting. I was thinking in terms that this is something that a user can do so I wasn't sure what would be the benefit of showcasing this, but we can add a demo with the dragged column be the last one. The problem with this is that if you have a horizontal scroll then the dragged column will be out of view.
title: Data Grid - Row updates | ||
--- | ||
|
||
# Data grid - Row updates |
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 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.
Does it make sense to merge this page with "row definition", to keep consistency with https://mui.com/x/react-data-grid/column-definition/#providing-content? In essence, we're talking here about different approachs to feed the grid with rows. One of the approachs also allows to update rows (updateRows
), but it could also be understood as replacing one row with another (updated) row, so "providing rows via API".
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.
@joserodolfofreitas @samuelsycamore I'm interested in your opinion here
I agree that this section could be on the same page as the row update sections
But having the "Row identifier" section in the same page as well will start to make the page very long.
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.
Would it make sense to split that page into 2, one for Row updates
and one for Row loading
? The Row loading
one will have the infinite + lazy loading and anything else related to loading rows on the fly.
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, I agree it makes sense to move the lazy loading to its own page.
We could probably use one more depth level on the side bar to hold everything about "feeding data", but I agree it makes sense to separate Row updates
from Row Loading
(and merge Row definitions
with Row updates
).
But maybe we could rename these menus?
What about
- Data binding
- Lazy loading
?
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.
It can work but calling the page that is about loading rows "Lazy loading" won't be ideal as my idea was to have lazy and infinite loading there.
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.
Then:
- Data binding
- Lazy and infinite loading
?
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.
@joserodolfofreitas I would add items to the left sidebar. Keeping "lazy loading" inside https://deploy-preview-5195--material-ui-x.netlify.app/x/react-data-grid/row-updates/ will make the page very long. Note that we need to consider that "Row updates" and "Row definition" will be merged.
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.
@DanailH @m4theushw @joserodolfofreitas
Did we reach an agreement on this topic? Or should I create a separate issue for discussion to unlock this PR?
title: Data Grid - Row updates | ||
--- | ||
|
||
# Data grid - Row updates |
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.
Does it make sense to merge this page with "row definition", to keep consistency with https://mui.com/x/react-data-grid/column-definition/#providing-content? In essence, we're talking here about different approachs to feed the grid with rows. One of the approachs also allows to update rows (updateRows
), but it could also be understood as replacing one row with another (updated) row, so "providing rows via API".
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
@@ -0,0 +1,54 @@ | |||
--- | |||
title: Data Grid - Row definition |
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.
This feels vague—it isn't clear what to me what it means to "define" a row. It seems like the page is all about defining row identifiers, so I would go with that.
title: Data Grid - Row definition | |
title: Data Grid - Defining row identifiers |
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.
Apart from row identifiers, this page also mentions rows
prop structure and has a warning about keeping the same reference.
Also, "Row definition" is consistent with "Column definition" page https://mui.com/x/react-data-grid/column-definition/
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.
(Adding missing "Feeding data" section title to make it more clear https://deploy-preview-5195--material-ui-x.netlify.app/x/react-data-grid/row-definition/)
Co-authored-by: Sam Sycamore <71297412+samuelsycamore@users.noreply.github.com>
Co-authored-by: Sam Sycamore <71297412+samuelsycamore@users.noreply.github.com>
Co-authored-by: Sam Sycamore <71297412+samuelsycamore@users.noreply.github.com>
Co-authored-by: Sam Sycamore <71297412+samuelsycamore@users.noreply.github.com>
Co-authored-by: Sam Sycamore <71297412+samuelsycamore@users.noreply.github.com>
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
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.
Regardless of the improvements we may still want to do (like renaming some of the row sub-sections, or reorganizing the content), I think this PR serves its purpose already. It splits the row documentation and it's already a great improvement over what we had before.
Co-authored-by: Sam Sycamore <71297412+samuelsycamore@users.noreply.github.com> Co-authored-by: Andrew Cherniavskyi <andrew@mui.com>
Doc preview
I merged #5156 but we can improve the content here if needed
Some of those pages have outdated content, we can improve them on this PR but if it's heavy changes I would suggest to split and then improve.
I don't really know where to put the "Styling rows" small section.
@m4theushw I moved the Master Detail doc into the "Row" folder instead of "Group & Pivot" as discussed a few weeks ago.