Conversation
|
Hi, thanks a lot for your contribution! It's my fault that there is no documentation for contributions right now - so let me explain: Every bugfix or feature is welcome! At least there are some requirements that must be fulfilled:
If these requirements can't be guaranteed there is an extension package (https://github.com/mseemann/angular2-mdl-ext). this package is open for nearly every new feature. I like your feature and going to make some notes in the committed files, what changes would break these requirements. |
| class="mdl-tabs__tab disabled">{{tab.title}}</span> | ||
| </div> | ||
| </div> | ||
| <ng-content></ng-content> |
There was a problem hiding this comment.
the disabled state should work for tabs with a simple title and with a title component (to make it consistent). may be you should consider just add the css and prevent from changing the tabs in the tabSelected function.
src/scss-mdl/_variables.scss
Outdated
| $chip-bg-active-color: rgb(214, 214, 214) !default; | ||
| $chip-height: 32px !default; | ||
| $chip-font-size: 13px !default; | ||
| $chip-font-size: 13px !default; |
There was a problem hiding this comment.
this is the main problem. these changes would be overwritten if i need to regenerate the scss files from the mdl sources. and the disabled state would only be displayed correctly if the developer uses the scss files and not the css from CDN. we need another solution to change the style. for example there is only one fix color and the style is included in the component or there is a reusable css class from mdl that can be used to draw the tabs in disabled state. Or you have another solution for this problem...
There was a problem hiding this comment.
Understood. I'll see if I can fix this.
|
This would have to be PRed to material-design-lite first. I'm not sure it would be accepted tho. The material design spec doesn't say anything about disabled being allowed on tabs. But it doesn't say anything about it not being allowed either. |
|
form the usability point of view a stepper would be great for the usecase mentioned by @paullryan (https://material.google.com/components/steppers.html#steppers-types-of-steps). But mdl doesn't provide such a component. so i think it would be acceptable to make this change and provide the possibility to disable a tab - so every one can decide to use it or not. i agree that mdl will not accept such a pull request. the usual answer is: "we are working on version 2.0" :-) |
|
I'm with the general comment from @mseemann here, extensions should be allowed, whether we do this in an extension library or something else, with mdl core you could easily do this kind of extension in your own implementation, however because of the bundled nature of the angular2-mdl into components it becomes quite a bit more difficult to extend as an end user. I'll give it some thought and any suggestions from either of you would be great. |
|
@mseemann any reason you don't have a separate main for your scss that imports the mdl main? That way we could do overrides in a different directory something like:
|
|
@paullryan there is no special reason for this. just didn't see a requirement so far... |
|
Ok @mseemann I believe this addresses your concerns/comments. Can you please review again. Thanks for the feedback so far. The coverage decrease is because of the added scss which I would recommend ignoring (let me know if you have a better suggestion). |
|
Ignore my comment about coverage, adding a test for that now. |
|
@paullryan a lot of changes! 😀. Because there are breaking changes (the user need to configure a new path to the scss sources) I would rather do these changes in a new branch (v2.0). I also have some changes in mind that would break the distribution directory structure so we can put these in one release and bump the version to 2.0. Can you create a new pull request of your changes against this branch? thanks a lot! |
Adds a disabled tabs feature, this allows users to create wizards that activate tabs as previous states are finished.
Added code, tests and documentation, also fixes peer dependencies for npm 3 (peer dependencies are gone, so should be both a peer and a regular dependency).