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

[Autocomplete] Update unstyled demo to not import Material UI #34060

Merged
merged 1 commit into from Aug 27, 2022

Conversation

oliviertassinari
Copy link
Member

@oliviertassinari oliviertassinari commented Aug 24, 2022

@oliviertassinari oliviertassinari added docs Improvements or additions to the documentation component: autocomplete This is the name of the generic UI component, not the React module! package: base-ui Specific to @mui/base labels Aug 24, 2022
@oliviertassinari
Copy link
Member Author

oliviertassinari commented Aug 24, 2022

It looks like the CODEOWNERS logic fails on this one 😁. I had to manually check who owns this component: Marija and Michal, and since it's also about base, I picked the latter.

overflow: 'auto',
maxHeight: 200,
border: '1px solid rgba(0,0,0,.25)',
[`& li.${autocompleteClasses.focused}`]: {
'& li.Mui-focused': {
Copy link
Member Author

Choose a reason for hiding this comment

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

It's hardcoded anyway:

Copy link
Member

Choose a reason for hiding this comment

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

useAutocomplete needs an overhaul to match the other hooks in Base. It uses different patterns now (like setting a class name, that doesn't happen anywhere else in other hooks).

Copy link
Member Author

Choose a reason for hiding this comment

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

(like setting a class name, that doesn't happen anywhere else in other hooks).

@michaldudak What would be the alternative in this case? For context: #26181

needs an overhaul to match the other hooks in Base.

I think that it would be great for you to review mui/mui-x#5504. I wanted to raise how the unstyled hook API of the date picker feels a bit different from our useAutocomplete (the useAutocomplete API is a lot inspired by https://www.downshift-js.com/use-combobox).

It uses different patterns now

I think that this would be a great opportunity to review the differences, so we can only keep the best changes.

Copy link
Member Author

Choose a reason for hiding this comment

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

@michaldudak Bump. I'm curious about two things:

  1. How is the pattern hook different now, e.g. developers seem to enjoy the current approach: https://twitter.com/shyam_lohar_/status/1571000213388791808 (which also makes the case for a headless first approach, anytime we create a new component, in Joy UI, Material UI, MUI X, we should likely start from the headless DX).
  2. How to align with MUI X on it, e.g. with @flaviendelangle [AutoComplete] dataSourceConfig not working #5504

@mui-bot
Copy link

mui-bot commented Aug 24, 2022

No bundle size changes

Generated by 🚫 dangerJS against 8a64cf7

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.

It looks like the CODEOWNERS logic fails on this one 😁. I had to manually check who owns this component: Marija and Michal, and since it's also about base, I picked the latter.

The CODEOWNERS file is missing the docs directory. That's why no one showed up as an owner of the changed files.

overflow: 'auto',
maxHeight: 200,
border: '1px solid rgba(0,0,0,.25)',
[`& li.${autocompleteClasses.focused}`]: {
'& li.Mui-focused': {
Copy link
Member

Choose a reason for hiding this comment

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

useAutocomplete needs an overhaul to match the other hooks in Base. It uses different patterns now (like setting a class name, that doesn't happen anywhere else in other hooks).

@oliviertassinari oliviertassinari changed the title [Autocomplete] Improve unstyled demo [Autocomplete] Update unstyled demo to not import Material UI Aug 27, 2022
@oliviertassinari oliviertassinari merged commit a1d1fda into mui:master Aug 27, 2022
@oliviertassinari oliviertassinari deleted the fix-unstyled-demo branch August 27, 2022 09:39
daniel-rabe pushed a commit to daniel-rabe/material-ui that referenced this pull request Nov 29, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
component: autocomplete This is the name of the generic UI component, not the React module! docs Improvements or additions to the documentation package: base-ui Specific to @mui/base
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants