material-design-lite icon indicating copy to clipboard operation
material-design-lite copied to clipboard

Select Input

Open Bamertos opened this issue 11 years ago • 86 comments

Hello

I just begin with Material design lite, and it's awesome. But i miss something et i didn't find it in the documentation.

I'm working on a form, and i didn't find a way to have good select input. (I find text/number input, checkbox, radio button, ...)

Someone can help me?

Thank you

Thomas

Bamertos avatar Jul 08 '15 08:07 Bamertos

@Bamertos Select, is just standard HTML select elements. Right now we have no guidance on how selects should look, other than chip systems which is a planned addition and we could build off from that.

We should get in touch with the MD team on how to proceed in the best way.

On the note of simply needing more form components, please file specific issues and use-cases. The more actionable and specific items we have to work on the better.

Garbee avatar Jul 08 '15 10:07 Garbee

@Garbee What about this? It's look like a Select input select element

Textfield dropdown

Rom4eg avatar Jul 08 '15 17:07 Rom4eg

Oh nice catch. It is placed under Menus... Ok, good enough for me. I'll bring it up when we start planning new component additions. One thing is, we could also want to support chips under selects for an advanced view for dropdowns (since they could be interchangeable specs for the task.)

EDIT: And leaving guidance task just as a reminder to verify with the MD team that this is a valid use-case. Looks like it should be, but better safe than sorry when implementing.

Garbee avatar Jul 08 '15 17:07 Garbee

@Rom4eg Where did you find that example with the address input? I've been trying to figure out how to do a dropdown as well and that would work fine for me, but I cannot find the example that shows that interface and how to create it.

adammhaile avatar Jul 09 '15 15:07 adammhaile

@adammhaile That is from the Material Design specification. MDL has yet to implement that functionality. For now it will need to be a custom implementation.

Garbee avatar Jul 09 '15 15:07 Garbee

Ahhh... OK. That's unfortunate. Thanks for clarifying. I'll just have to wait on MDL for now :)

On Thu, Jul 9, 2015 at 11:14 AM, Jonathan Garbee [email protected] wrote:

@adammhaile https://github.com/adammhaile That is from the Material Design specification. MDL has yet to implement that functionality. For now it will need to be a custom implementation.

— Reply to this email directly or view it on GitHub https://github.com/google/material-design-lite/issues/854#issuecomment-120027938 .

adammhaile avatar Jul 09 '15 15:07 adammhaile

I thought it is bad to break the default select implement from the browser. Since browsers implement it in multi ways. On mobile, they implement it as overlay.(dropdown doesn't really fit to a mobile device.) On desktop, they implement it as dropdown menu. The HTML spec doesn't actually tell us how to implement it. Just like ...etc. The tag is defined by its meaning, not look.

If we must implement it, then we need to implement all types of layout of every browsers for the best accessibility. It would be very complex.

mmis1000 avatar Jul 11 '15 14:07 mmis1000

We can style desktop systems a bit and leave mobile to act as it normally would.

Garbee avatar Jul 11 '15 14:07 Garbee

Makes sense to me. Select is used a lot and it would be a shame to have it missing.

On Sat, Jul 11, 2015 at 10:10 AM, Jonathan Garbee [email protected] wrote:

We can style desktop systems a bit and leave mobile to act as it normally would.

— Reply to this email directly or view it on GitHub https://github.com/google/material-design-lite/issues/854#issuecomment-120624940 .

adammhaile avatar Jul 11 '15 14:07 adammhaile

@Garbee http://jsbin.com/salutaroku/1/edit?html,css,output You means, just change the look but don't touch its function on mobile?

mmis1000 avatar Jul 11 '15 14:07 mmis1000

@mmis1000 Yes, it should be doable. What is the point behind the jsbin?

Garbee avatar Jul 11 '15 15:07 Garbee

just a small example for customized look select element

mmis1000 avatar Jul 11 '15 15:07 mmis1000

that is an accepted bug, please stop adding "+1" to it.

hit the subscribe button in the sidebar if you want to track progress.

hebbet avatar Jul 15 '15 07:07 hebbet

Hey guys, is anyone working on this? I could help out. Do you guys have a chat or something?

In the meantime I made my own "css only"-version (simple) http://codepen.io/pudgereyem/pen/PqBxQx/ If you want a Javascript-version that styles the whole thing, I would recommend http://materializecss.com/forms.html or http://semantic-ui.com/modules/dropdown.html

Btw, it seems like Angular Material have implemented this already; https://material.angularjs.org/latest/#/demo/material.components.select

pudgereyem avatar Jul 19 '15 15:07 pudgereyem

i just clone Textfield js and css code into a new one and it works in chrome but not perfect. waiting for the official dropdown component. http://codepen.io/etcpe9/pen/PqyOye

etcpe9 avatar Jul 25 '15 11:07 etcpe9

I've started work on adding this to MDL, should I make a pull request?

langan avatar Aug 14 '15 09:08 langan

@langan Awesome! I’d be happy to look over your pull request :)

surma avatar Aug 14 '15 10:08 surma

Ive pushed my code to a branch on my fork

https://github.com/langan/material-design-lite/commit/ddd169c77ad132590ce5d52f4cf90d8383ab349b

It's my first attempt at anything on this project so let me know if it looks ok and if its worth continuing (would be happy to work on it further and add an example component page)

langan avatar Aug 14 '15 14:08 langan

@langan Don’t be afraid to open up a proper PR. That we’ll have an isolated thread for discussion and review

surma avatar Aug 14 '15 14:08 surma

More examples can be found in Polymer and Angular-Material

ciampo avatar Aug 18 '15 11:08 ciampo