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

[Modal][material-ui] Update it to use the useModal hook #38498

Merged
merged 2 commits into from
Aug 21, 2023

Conversation

mnajdova
Copy link
Member

@mnajdova mnajdova added component: modal This is the name of the generic UI component, not the React module! package: material-ui Specific to @mui/material labels Aug 16, 2023
@mui-bot
Copy link

mui-bot commented Aug 16, 2023

Netlify deploy preview

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

@material-ui/core: parsed: -0.23% 😍, gzip: -0.20% 😍

Bundle size report

Details of bundle changes (Toolpad)
Details of bundle changes

Generated by 🚫 dangerJS against 31e2d13

@mnajdova mnajdova marked this pull request as ready for review August 16, 2023 13:08
@mnajdova mnajdova requested a review from michaldudak August 16, 2023 13:08
Copy link
Member

@michaldudak michaldudak left a comment

Choose a reason for hiding this comment

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

Couldn't find anything to pick on :)

@mnajdova mnajdova merged commit b935d3e into mui:master Aug 21, 2023
Copy link
Member

@oliviertassinari oliviertassinari left a comment

Choose a reason for hiding this comment

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

What's the rationale for going in this direction? I mean, what problem does it solve vs. using Modal?

I mean, as I understand it, in a perfect world we would style Material UI on top of Base UI component, since this provides the highest abstraction level, hence fewer duplications.

So I wonder when we take a step in the opposite direction. Is this about having a simpler React tree? Like better performance, when opening the React component tree, less noise, etc?

packages/mui-material/src/Modal/Modal.js Show resolved Hide resolved
Comment on lines +108 to +117
/**
* If `true`, the modal will not automatically shift focus to itself when it opens, and
* replace it to the last focused element when it closes.
* This also works correctly with any modal children that have the `disableAutoFocus` prop.
*
* Generally this should never be set to `true` as it makes the modal less
* accessible to assistive technologies, like screen readers.
* @default false
*/
disableAutoFocus?: boolean;
Copy link
Member

Choose a reason for hiding this comment

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

Are these types duplicated? If I change the description here, does it fail the CI?

If no, why not import from ModalOwnProps?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
component: modal This is the name of the generic UI component, not the React module! package: material-ui Specific to @mui/material
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants