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

[core] Clean up "autoHeight" logic #16017

Open
wants to merge 5 commits into
base: master
Choose a base branch
from

Conversation

oliviertassinari
Copy link
Member

@oliviertassinari oliviertassinari commented Dec 28, 2024

A continuation of #14614.

http://0.0.0.0:3000/material-ui/getting-started/templates/dashboard/ uses this autoHeight deprecated prop, but there is no warning in the console. I found this by chance. I would have found this instantly it it was in the console.

I have tried to add:

-  autoHeight: PropTypes.bool,
+  autoHeight: deprecatedPropType(PropTypes.bool, 'Use flex parent container instead: https://mui.com/r/x-grid-deprecate-auto-height.'),

but there are a couple of tests that fail. Overall, I'm not sure that we can remove the autoHeight prop:

For example: https://mui.com/x/react-data-grid/layout/#flex-parent-container

Screen.Recording.2024-12-28.at.18.26.32.mov

I suspect it's what the failing tests are about when removing autoHeight: https://app.circleci.com/pipelines/github/mui/mui-x/76597/workflows/92dfe153-bf52-47c1-9ddc-4df5357a69f6/jobs/435999 and https://app.circleci.com/pipelines/github/mui/mui-x/76597/workflows/92dfe153-bf52-47c1-9ddc-4df5357a69f6/jobs/436000.

@oliviertassinari oliviertassinari added component: data grid This is the name of the generic UI component, not the React module! dx Related to developers' experience labels Dec 28, 2024
@mui-bot
Copy link

mui-bot commented Dec 28, 2024

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

Generated by 🚫 dangerJS against 96cf06d

@oliviertassinari oliviertassinari changed the title [core] Add runtine warning for deprecated autoHeight prop [core] Prepare deprecation of "autoHeight" prop Dec 28, 2024
@oliviertassinari oliviertassinari changed the title [core] Prepare deprecation of "autoHeight" prop [core] Clean up "autoHeight" logic Dec 28, 2024
@github-actions github-actions bot added the PR: out-of-date The pull request has merge conflicts and can't be merged label Dec 30, 2024
Copy link

This pull request has conflicts, please resolve those before we can evaluate the pull request.

Copy link
Member

@michelengelen michelengelen left a comment

Choose a reason for hiding this comment

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

LGTM

@@ -389,6 +389,7 @@ describe('<DataGridPro /> - Detail panel', () => {
const getDetailPanelHeight = spy(() => 100);
const { setProps } = render(
<TestCase
autoHeight
Copy link
Member

Choose a reason for hiding this comment

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

this should also be removed, no?

Copy link
Member Author

Choose a reason for hiding this comment

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

Some of the tests failed. I tried to remove as many as I could.

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! dx Related to developers' experience PR: out-of-date The pull request has merge conflicts and can't be merged
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants