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

[Chip][material-next] Copy chip component from material #38053

Merged
merged 3 commits into from
Jul 26, 2023

Conversation

DiegoAndai
Copy link
Member

Chip issue: #38024
Material You umbrella issue: #29345

This PR copies the Chip component and its related utils from the material package:

  • Copy Chip files and update imports
  • Copy createSvgIcon util
  • Copy Cancel and CheckBox internal icons
  • Stop forwarding classes prop for root slots

This is what's required to get the Chip component to work and tests to pass. There are some things not addressed in this PR that will be fixed later:

  • Chip.js file imports ButtonBase from material, this will be removed when refactoring to use useButton from base (tracked by #38024)
  • Chip.test.js imports the Avatar component from material, this will be changed when the Avatar component is migrated to material-next
  • Chip.test.js imports createTheme from material to get the material default theme for this test, this will be removed when implementing Material You styles (tracked by #38024)
  • createSvgIcon.tsx imports the SvgIcon component from material, this will be changed when the SvgIcon component is migrated to material-next

Besides all the remaining work in #38024

I prefer to do it this way to keep the PRs smaller in size and scope, easier to review, and more atomical changes in git versions history.

@DiegoAndai DiegoAndai added design: material This is about Material Design, please involve a visual or UX designer in the process component: chip This is the name of the generic UI component, not the React module! v6.x design: material you labels Jul 19, 2023
@DiegoAndai DiegoAndai self-assigned this Jul 19, 2023
@mui-bot
Copy link

mui-bot commented Jul 19, 2023

Netlify deploy preview

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

@mui/material-next: parsed: +3.71% , gzip: +2.26%

Bundle size report

Details of bundle changes (Toolpad)
Details of bundle changes

Generated by 🚫 dangerJS against f1a7b58

@DiegoAndai DiegoAndai merged commit e35f9ae into mui:master Jul 26, 2023
18 checks passed
@DiegoAndai DiegoAndai deleted the material-you-chip branch July 26, 2023 17:06
@DiegoAndai DiegoAndai added v7.x and removed v6.x labels Dec 26, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
component: chip This is the name of the generic UI component, not the React module! design: material you design: material This is about Material Design, please involve a visual or UX designer in the process v7.x
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants