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

[base] Remove @mui/system in tests #32945

Merged
merged 1 commit into from
Jun 1, 2022
Merged

[base] Remove @mui/system in tests #32945

merged 1 commit into from
Jun 1, 2022

Conversation

kevinji
Copy link
Contributor

@kevinji kevinji commented May 30, 2022

@mui/system is used in a test, so it should be explicitly mentioned.

@kevinji kevinji changed the title mui-base: Add @mui/system as a devDependency [base] Add @mui/system as a devDependency May 30, 2022
@mui-bot
Copy link

mui-bot commented May 30, 2022

No bundle size changes

Generated by 🚫 dangerJS against e6ea4ef

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.

We could remove this dependency. It shouldn't be necessary to use System in Base components unit tests.

If we defined the components as such, it would be possible to remove the import from @mui/base:

const SelectListbox = React.forwardRef(function SelectListbox(
  props: SelectUnstyledListboxSlotProps<string>,
  ref: React.ForwardedRef<HTMLUListElement>,
) {
  const { ownerState, ...other } = props;
  return <ul {...other} ref={ref} style={{ maxHeight: '100px', overflow: 'auto' }} />;
});

const Option = React.forwardRef(function Option(
  props: { value: string; children?: React.ReactNode },
  ref: React.Ref<HTMLLIElement>,
) {
  return (
    <OptionUnstyled
      {...props}
      ref={ref}
      componentsProps={{ root: { style: { height: '50px' } } }}
    />
  );
});

@michaldudak michaldudak added component: select This is the name of the generic UI component, not the React module! package: base-ui Specific to @mui/base labels May 30, 2022
@kevinji kevinji changed the title [base] Add @mui/system as a devDependency [base] Remove @mui/system in tests May 30, 2022
@kevinji
Copy link
Contributor Author

kevinji commented May 30, 2022

Sounds good, I've updated the file as suggested.

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.

Thanks a lot!

@michaldudak michaldudak merged commit e7a1c9b into mui:master Jun 1, 2022
@kevinji kevinji deleted the add-missing-deps branch June 1, 2022 07:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
component: select This is the name of the generic UI component, not the React module! package: base-ui Specific to @mui/base
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants