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

[Select] Make error part of the ownerState to enable overriding styles with it in theme #36422

Merged
merged 17 commits into from Apr 3, 2023
Merged

Conversation

gitstart
Copy link
Contributor

@gitstart gitstart commented Mar 3, 2023

closes #36269


This code was written and reviewed by GitStart Community. Growing future engineers, one PR at a time.

… a custom theme for MuiSelect

Co-authored-by: seunexplicit <48022904+seunexplicit@users.noreply.github.com>
@mui-bot
Copy link

mui-bot commented Mar 3, 2023

Netlify deploy preview

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

Bundle size report

Details of bundle changes

Generated by 🚫 dangerJS against 7fb9318

gitstart and others added 5 commits March 8, 2023 09:42
Co-authored-by: seunexplicit <48022904+seunexplicit@users.noreply.github.com>
Co-authored-by: seunexplicit <48022904+seunexplicit@users.noreply.github.com>
Co-authored-by: seunexplicit <48022904+seunexplicit@users.noreply.github.com>
Co-authored-by: seunexplicit <48022904+seunexplicit@users.noreply.github.com>
@gitstart gitstart marked this pull request as ready for review March 8, 2023 13:06
@gitstart
Copy link
Contributor Author

gitstart commented Mar 8, 2023

@siriwatknp this PR is ready for review

@zannager zannager added the component: select This is the name of the generic UI component, not the React module! label Mar 9, 2023
@zannager zannager requested a review from siriwatknp March 9, 2023 09:08
Copy link
Member

@ZeeshanTamboli ZeeshanTamboli left a comment

Choose a reason for hiding this comment

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

Select with error prop has a border color applied for error state. See https://codesandbox.io/s/falling-leaf-v6uuzt?file=/src/App.tsx.

While it does not work after changes in this PR, see https://codesandbox.io/s/material-cra-ts-forked-m06iu4?file=/src/App.tsx.

@ZeeshanTamboli ZeeshanTamboli added bug 🐛 Something doesn't work customization: theme Centered around the theming features labels Mar 23, 2023
@ZeeshanTamboli ZeeshanTamboli changed the title [Select] - make error part of the ownerState when overriding styles within a custom theme for MuiSelect [Select] Make error part of the ownerState Mar 23, 2023
gitstart and others added 2 commits March 23, 2023 10:03
Co-authored-by: seunexplicit <48022904+seunexplicit@users.noreply.github.com>
@gitstart
Copy link
Contributor Author

Thanks for the review @ZeeshanTamboli, your feedback comment has been addressed.

@gitstart gitstart requested review from ZeeshanTamboli and removed request for siriwatknp March 23, 2023 10:10
@ZeeshanTamboli ZeeshanTamboli changed the title [Select] Make error part of the ownerState [Select] Make error part of the ownerState to enable overriding styles with it in theme Mar 25, 2023
Copy link
Member

@ZeeshanTamboli ZeeshanTamboli left a comment

Choose a reason for hiding this comment

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

Left some comments. Can you also add a test for native select? Like a Select component with the native prop (<Select native/>).

packages/mui-material/src/Select/Select.js Outdated Show resolved Hide resolved
packages/mui-material/src/Select/Select.js Outdated Show resolved Hide resolved
packages/mui-material/src/Select/SelectInput.js Outdated Show resolved Hide resolved
gitstart and others added 2 commits March 30, 2023 07:40
Co-authored-by: seunexplicit <48022904+seunexplicit@users.noreply.github.com>
@gitstart
Copy link
Contributor Author

Your feedback comments have been addressed @ZeeshanTamboli, please check again.

Co-authored-by: seunexplicit <48022904+seunexplicit@users.noreply.github.com>
packages/mui-material/src/Select/Select.test.js Outdated Show resolved Hide resolved
packages/mui-material/src/Select/Select.test.js Outdated Show resolved Hide resolved
packages/mui-material/src/Select/Select.test.js Outdated Show resolved Hide resolved
packages/mui-material/src/Select/Select.test.js Outdated Show resolved Hide resolved
packages/mui-material/src/Select/Select.test.js Outdated Show resolved Hide resolved
gitstart and others added 2 commits April 1, 2023 11:30
Co-authored-by: seunexplicit <48022904+seunexplicit@users.noreply.github.com>
Copy link
Member

@ZeeshanTamboli ZeeshanTamboli left a comment

Choose a reason for hiding this comment

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

Few nits!

packages/mui-material/src/Select/Select.test.js Outdated Show resolved Hide resolved
packages/mui-material/src/Select/Select.test.js Outdated Show resolved Hide resolved
Signed-off-by: Zeeshan Tamboli <zeeshan.tamboli@gmail.com>
Signed-off-by: Zeeshan Tamboli <zeeshan.tamboli@gmail.com>
Signed-off-by: Zeeshan Tamboli <zeeshan.tamboli@gmail.com>
Signed-off-by: Zeeshan Tamboli <zeeshan.tamboli@gmail.com>
Copy link
Member

@ZeeshanTamboli ZeeshanTamboli left a comment

Choose a reason for hiding this comment

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

@gitstart Looks great! Thanks!

@ZeeshanTamboli ZeeshanTamboli added the package: material-ui Specific to @mui/material label Apr 3, 2023
@ZeeshanTamboli ZeeshanTamboli merged commit 0b7beb9 into mui:master Apr 3, 2023
22 checks passed
@seunexplicit
Copy link
Contributor

@ZeeshanTamboli Thanks for the review rounds.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug 🐛 Something doesn't work component: select This is the name of the generic UI component, not the React module! customization: theme Centered around the theming features package: material-ui Specific to @mui/material
Projects
None yet
Development

Successfully merging this pull request may close these issues.

error is not part of the ownerState when overriding styles within a custom theme for MuiSelect
5 participants