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] Follow material design guidelines #18493

Closed
2 tasks done
peterchq opened this issue Nov 22, 2019 · 10 comments · Fixed by #26200
Closed
2 tasks done

[Select] Follow material design guidelines #18493

peterchq opened this issue Nov 22, 2019 · 10 comments · Fixed by #26200
Labels
component: select This is the name of the generic UI component, not the React module! design: material This is about Material Design, please involve a visual or UX designer in the process

Comments

@peterchq
Copy link

peterchq commented Nov 22, 2019

  • The issue is present in the latest release.
  • I have searched the issues of this repository and believe that this is not a duplicate.

Current Behavior 😯

When you click on a select that is not native, the options appear anchored randomly.

Expected Behavior 🤔

clicking on a select should expand the list op options attached to the bottom of the input as in material design guidelines e.g.
https://material-components.github.io/material-components-web-catalog/#/component/select

Steps to Reproduce 🕹

Click on any material-ui select
https://material-ui.com/components/selects/

Steps:

  1. click on a non-native select

Context 🔦

I am trying to comply with material design guidelines

Your Environment 🌎

Tech Version
Material-UI v4.?.?
React
Browser
TypeScript
etc.
@eps1lon
Copy link
Member

eps1lon commented Nov 22, 2019

I am trying to comply with material design guidelines

Could you link to a page on material.io showing how Selects open? The link you provided uses a reference implementation that is (as are we sometimes) not always following the latest guidelines.

@eps1lon eps1lon added status: waiting for author Issue with insufficient information design: material This is about Material Design, please involve a visual or UX designer in the process labels Nov 22, 2019
@peterchq
Copy link
Author

https://material.io/develop/web/components/input-controls/select-menus/ links to https://material-components.github.io/material-components-web-catalog/#/component/select
also https://rmwc.io/select-menus which uses the material reference

I would say the reference implementation should be used as a reference

@eps1lon
Copy link
Member

eps1lon commented Nov 22, 2019

I would say the reference implementation should be used as a reference

I think the spec should be used as a reference. Material components web sometimes don't follow the guidelines either.

@peterchq
Copy link
Author

I would say the reference implementation should be used as a reference

I think the spec should be used as a reference. Material components web sometimes don't follow the guidelines either.

can you provide a link to a spec that includes specific components? the only one i can find is above

@eps1lon
Copy link
Member

eps1lon commented Nov 22, 2019

can you provide a link to a spec that includes specific components?

https://material-ui.com/getting-started/supported-components/#supported-components

With regards to Select I don't have any which is why I asked you.

@peterchq
Copy link
Author

can you provide a link to a spec that includes specific components?

https://material-ui.com/getting-started/supported-components/#supported-components

With regards to Select I don't have any which is why I asked you.

see above

@peterchq
Copy link
Author

having the options randomly floating away from the input and sometimes obscuring it is problematic

@kybarg
Copy link
Contributor

kybarg commented Nov 23, 2019

@eps1lon I think we have good example here https://material.io/components/menus/menus.html#exposed-dropdown-menu

@oliviertassinari oliviertassinari added component: select This is the name of the generic UI component, not the React module! and removed status: waiting for author Issue with insufficient information labels Nov 23, 2019
@oliviertassinari
Copy link
Member

oliviertassinari commented Nov 23, 2019

random places

@peterchq The position of the select is not random. It's positioned so the selected value displays on top of the closed select state. This behavior can be found on native platforms, like macOS or Windows Edge.

macOS Chrome, Safari

Capture d’écran 2019-11-23 à 11 31 04
Capture d’écran 2019-11-23 à 11 30 58

Windows Edge

Capture d’écran 2019-11-23 à 11 33 50
Capture d’écran 2019-11-23 à 11 33 45

Windows FireFox, Chrome

Capture d’écran 2019-11-23 à 11 32 59
Capture d’écran 2019-11-23 à 11 33 36

I think the spec should be used as a reference. Material components web sometimes don't follow the guidelines either.

@una encourages to refer to material components web when in doubt. But I tend to agree with @eps1lon. It should be significantly simpler to author visual mockups than HTML + JS + CSS, from this perspective, I think that following the visual of material.io should be preferred.

I am trying to comply with material design guidelines

We have started a similar thread in #18136 (comment) and #17636 (comment) and #15055.

Capture d’écran 2019-11-23 à 11 45 15
link


I have run a benchmark on some design system to compare what's more popular:

  • appears over: Vuetify, Material-UI, Angular Material
  • appears under: antd (select), elatic ui (superselect), zendesk garden, palentir blueprint (select), semantic ui (dropdown), Atlaskit, rsuitejs, microsoft fabric
  • native: elastic ui (select), segment evergreen, palentir blueprint, IBM carbon, Pinterest Gastalt, , shopify polaris, priceline, kiwi orbit

@Holybasil
Copy link

For now, appears under is the default behavior in @mui/material/Select, how to set appears over?

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! design: material This is about Material Design, please involve a visual or UX designer in the process
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants