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

[DataGrid] Remove cell min-width / max-width styles #14448

Merged

Conversation

oliviertassinari
Copy link
Member

@oliviertassinari oliviertassinari commented Sep 1, 2024

I can't reproduce this issue https://github.com/mui/mui-x/pull/10059/files#r1417671356 using:

SCR-20240902-nvkl
import * as React from 'react';
import { DataGrid } from '@mui/x-data-grid';

const rows = [
  {
    id: 1,
    username: '@MUI',
    age: 20,
  },
];

export default function ColumnSizingGrid() {
  return (
    <div style={{ height: 250, width: '100%' }}>
      <DataGrid
        columns={[
          { field: 'id' },
          { field: 'username', width: 125, minWidth: 150, maxWidth: 400 },
          { field: 'age', resizable: false },
        ]}
        rows={rows}
      />
    </div>
  );
}

so I'm continuing #13293 (comment). I suspect that we can save bundle size here.

Edit: how fun, the CI is failing with the data picker, unrelated, it seems because we are the 1st of the month, but not 100% sure.

Preview: https://deploy-preview-14448--material-ui-x.netlify.app/x/react-data-grid/

@oliviertassinari oliviertassinari added performance core Infrastructure work going on behind the scenes component: data grid This is the name of the generic UI component, not the React module! labels Sep 1, 2024
@mui-bot
Copy link

mui-bot commented Sep 1, 2024

Deploy preview: https://deploy-preview-14448--material-ui-x.netlify.app/

Generated by 🚫 dangerJS against 79836d4

Copy link
Member

@cherniavskii cherniavskii left a comment

Choose a reason for hiding this comment

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

I can't reproduce the linked issue either 👍🏻
I think it's not relevant anymore after reducing DOM nodes rendered for each cell in #12013

@cherniavskii cherniavskii removed the core Infrastructure work going on behind the scenes label Sep 2, 2024
@cherniavskii cherniavskii changed the title [core] Remove min-width / max-width in data grid [DataGrid] Remove cell min-width / max-width styles Sep 2, 2024
@cherniavskii cherniavskii merged commit 315ffa1 into mui:master Sep 2, 2024
20 of 23 checks passed
@oliviertassinari oliviertassinari deleted the data-grid-remove-min-width branch September 2, 2024 12:01
@oliviertassinari
Copy link
Member Author

Cool, I'm curious to see if we need to add this back: See https://youtu.be/tRsxLLghL1k?si=sRhbVRHVLRR83pMX&t=574. "if you are not adding back at least 10% of what you are removing, you know you are not removing enough".

@romgrk
Copy link
Contributor

romgrk commented Sep 2, 2024

I did the same transformation here but it was reverted after Andrew's comment here.

@oliviertassinari oliviertassinari mentioned this pull request Sep 20, 2024
20 tasks
oliviertassinari added a commit to oliviertassinari/mui-x that referenced this pull request Sep 30, 2024
This is the result of a merge conflict. I refactored this in mui#14448
but this PR wasn't merged yet.
@KenanYusuf KenanYusuf mentioned this pull request Oct 9, 2024
23 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
component: data grid This is the name of the generic UI component, not the React module! performance
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants