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

fix(select): Always wrap select with .input-field #417

Merged
merged 4 commits into from
Jun 1, 2017
Merged

fix(select): Always wrap select with .input-field #417

merged 4 commits into from
Jun 1, 2017

Conversation

MaximBalaganskiy
Copy link
Collaborator

This will make labelling and validation consistent.
Validator is also modified to reflect the changes to select.

This will make labelling and validation consistent
This is inline with the changes to `select`
It will have to go to another unrelated patch
@MaximBalaganskiy
Copy link
Collaborator Author

Please consider #416 as an alternative

@Thanood
Copy link
Collaborator

Thanood commented May 8, 2017

Sorry it took so long this time.
I think #416 is easier to read while this one here seems more straightforward because it always adds a wrapper. So you can expect there is a wrapper and propertly remove it.

I'm leaning to this one.
Do you have any preference?

@MaximBalaganskiy
Copy link
Collaborator Author

MaximBalaganskiy commented May 8, 2017 via email

@Thanood
Copy link
Collaborator

Thanood commented May 9, 2017

Sure, we should think about that. I'm not sure how to do it, though..
Would be easier if we'd just create an own select for that. 😏

I'm not sure about it because of timing. It would break a few things, I guess.
On the other hand we can provide both and set some "obsolete warning" on the attribute.

@MaximBalaganskiy
Copy link
Collaborator Author

Seems like the element would be almost the same as an attribute. Even simpler if anything, because you would move html to a template. "Obsolete" would work just fine I recon

@MaximBalaganskiy
Copy link
Collaborator Author

MaximBalaganskiy commented May 9, 2017

ah, one issue though... the following would not be a valid html, would it?

<md-select>
  <option>option</option>
</md-select>

@Thanood
Copy link
Collaborator

Thanood commented May 9, 2017

No, it wouldn't be valid html.
Maybe if you use something like this as the element's template:

<template>
  <select ...>
    <slot></slot>
  </select>
</template>

That would lead to valid HTML. I don't know how this will restrict things if we wanted to add other elements (like custom validation). Then this would have to be a named slot. But until then, I guess it should work. 😃

What we'll have to keep in mind is that all of this will eventually be removed and overwritten by Materialize when it initializes the select proxy.

@MaximBalaganskiy
Copy link
Collaborator Author

MaximBalaganskiy commented May 9, 2017 via email

@Thanood
Copy link
Collaborator

Thanood commented May 9, 2017

Really, it complains about option in an unknown tag?
Hmm, what about md-option then? We'd have even omre control in that case.

@MaximBalaganskiy
Copy link
Collaborator Author

MaximBalaganskiy commented May 9, 2017 via email

@Thanood Thanood merged commit 852d35a into aurelia-ui-toolkits:master Jun 1, 2017
@MaximBalaganskiy MaximBalaganskiy deleted the patch-1 branch June 7, 2017 00:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants