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

[website] Update main data grid demo on X landing page #37001

Merged
merged 5 commits into from
Apr 25, 2023

Conversation

cherniavskii
Copy link
Member

@cherniavskii cherniavskii commented Apr 24, 2023

@cherniavskii cherniavskii added website Pages that are not documentation-related, marketing-focused. MUI X labels Apr 24, 2023
totalPrice: 'max',
}, [data.columns]);

const initialState = useKeepGroupedColumnsHidden({
Copy link
Member Author

Choose a reason for hiding this comment

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

useKeepGroupedColumnsHidden fixes the missing Commodities column when you stop grouping by it

Comment on lines -295 to -300
rowGroupingModel={rowGroupingModel}
onRowGroupingModelChange={(model) => setRowGroupingModel(model)}
aggregationModel={aggregationModel}
onAggregationModelChange={(newModel) => setAggregationModel(newModel)}
columnVisibilityModel={columnVisibilityModel}
onColumnVisibilityModelChange={(newModel) => setColumnVisibilityModel(newModel)}
Copy link
Member Author

Choose a reason for hiding this comment

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

There's no need to use controlled models for this, initialState should be enough here

@mui-bot
Copy link

mui-bot commented Apr 24, 2023

Netlify deploy preview

https://deploy-preview-37001--material-ui.netlify.app/

Bundle size report

No bundle size changes

Generated by 🚫 dangerJS against 98a4517

editable: true,
visibleFields,
Copy link
Member Author

Choose a reason for hiding this comment

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

visibleFields allows to pick specific columns. This allows to remove the duplicated column definitions.

Copy link
Member

@joserodolfofreitas joserodolfofreitas left a comment

Choose a reason for hiding this comment

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

Thanks for reviewing this, @cherniavskii!

@cherniavskii cherniavskii merged commit 9fe2e1a into mui:master Apr 25, 2023
7 checks passed
@cherniavskii cherniavskii deleted the simplify-data-grid-demo branch April 25, 2023 13:21
@oliviertassinari
Copy link
Member

oliviertassinari commented May 13, 2023

I'm coming from a recent regression in the SEO performance of pages https://search.google.com/search-console/core-web-vitals/drilldown?resource_id=sc-domain%3Amui.com&item_key=CAIQAhgD. It seems that we aren't done yet with this page 😁

Screenshot 2023-05-14 at 00 50 28

A few things I can spot we can improve:

  1. Runtime issue. I don't think that we can keep the demo like this: https://deploy-preview-37001--material-ui.netlify.app/x/.
Screen.Recording.2023-05-14.at.00.46.58.mov

Maybe the issue comes from that we render too many rows, but it seems to be 10,000 it's not 100,000, I would expect it to be x10 faster. I would feel more comfortable with what we were displaying before.

  1. Reduce the row height, it feels almost x2 too tall for the use cases of aggregation. Since the height is small, we can only see 3.4 rows. It's limiting to analytics the data set.
Screenshot 2023-05-14 at 01 01 42
  1. The image displays https://pagespeed.web.dev/analysis/https-mui-com-x/yeun3a5279?utm_source=search_console&form_factor=desktop&hl=en
Screenshot 2023-05-14 at 00 55 53
  1. Set the height on the images so the layout doesn't jump https://pagespeed.web.dev/analysis/https-mui-com-x/yeun3a5279?utm_source=search_console&form_factor=desktop&hl=en
Screenshot 2023-05-14 at 00 59 18

For example, we can copy what's done in https://mui.com/core/, it doesn't jump when the page is loading.

  1. Every now and then, the grouping is broken, I get this:
Screenshot 2023-05-23 at 12 12 18

I think it was better before, either to revert or improve, but I don't think we should keep the current state too long.

@cherniavskii
Copy link
Member Author

@oliviertassinari

  1. Runtime issue. I don't think that we can keep the demo like this: deploy-preview-37001--material-ui.netlify.app/x.

This performance issue is tracked in mui/mui-x#8579, we are working on a fix.

  1. Every now and then, the grouping is broken, I get this:

Yes, we had an issue with data generator 😅 It's fixed now 👍


Regarding the rest of your points - I will submit a PR to address them, thanks for your feedback!

@cherniavskii cherniavskii mentioned this pull request Jun 9, 2023
1 task
@oliviertassinari
Copy link
Member

@cherniavskii Awesome thanks, very thorough.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
MUI X website Pages that are not documentation-related, marketing-focused.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants