-
Notifications
You must be signed in to change notification settings - Fork 331
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
Add paper-slider component #88
Conversation
@mike1o1 Thanks a lot for your effort! This isn't forgotten. Can you elaborate on the I think it would be a huge win to bring this to ember-paper, possibly using that function, especially because we could take the styles from angular material more easily. I'm just asking so I can convert the rest of the project to this convention. |
The theming code in Angular Material is pretty complex, and I haven't converted all of the functionality either. I don't think it's possible just using sass, but I did my best, which is very close to your implementation. Your example basically means, find whatever color is defined as '500' for the background, and then add an opacity. That would be converted to sass as: background-color: rgba(color($background, '500'), 0.2); A better example might be background-color: '{{foreground-4-0.5}}'; Would be converted to: rgba(color($foreground, '4'), 0.5); This would find the variable defined as the $foreground, which would either by light or dark. Then, it would do another lookup into that light or dark table to find the entry for '4', and apply the opacity. There are still things I'm missing, such as the hues, and better support for contrasts, and I plan on adding better support for those soon. |
Cool stuff. Understood and definitely desirable. Another perhaps more complex question is how angular material (or we in the future) tackle I don't see these |
In [ember-material-design](Ember Material Design) I have For contrast, I added a For |
+1 for this, need the slider for my current project as well. |
I'm curious of what the differences between ember-material-design and ember paper are? |
@benedikt-d I myself just started investigating and testing both ember-material-design and ember-paper, ember-paper seems much more clean in its implementation. I think it's "unfortunate" that there currently are 3 separate projects:
There are also some difference in what paper components that are available from the Material design: See this comparison table made by : We should definitely gather everyone to one single repo as it would be more value to everyone including the devs working on these projects. And thus I think ember-paper is the best of the three as a base for further enhancements as its the project that has most traction and a longer commit history. But as of now, all of the 3 projects seems to be actively maintained. This pull request makes the first way of porting ember-material-design to ember-paper though, so a start would be to merge this in to ember-paper :) |
After more testing, https://github.com/mike1o1/ember-material-design seems more complete imo (and actively maintained). So I guess my pull requests will go for https://github.com/mike1o1/ember-material-design |
@mike1o1 I finally had the chance to review your PR. Very sorry for the delay. I just made some changes that can be seen in 7136c91. Hope to see more features implemented. We have seen many many projects merging through the ember community. This is the right way to open source. I hope to port some components from your repo to this one myself. |
I agree with the constants service. I'll refactor that in my addon as well. I have a fork of ember-paper with tabs working, but unit tests are failing with the latest Ember. Functionality everything is OK, so I assume it's an issue with the test itself. I'll work on getting that fixed and can submit a PR soon. |
Check my recent commits. I fixed those problems and removed deprecation warnings. |
Sorry, I meant that my tests specific to the tabs are failing. |
I combined the paper-slider component my ember-material-design project and added a demo page.
There are some .scss differences, as I have a
color($color, $type)
method, which tries to mirror the theming support from the angular project. If you'd rather those be simplemap-get
calls, I can refactor.