Open aforemny opened 6 years ago
First and foremost, thank-you for putting your time and effort into this library! I'm a newcomer to Elm and have been dabbling with elm-mdc just recently, but noticed behavioural and aesthetic differences between elm-mdc and the most recent material libraries in react, say Material-ui .
I'm keen to help out with elm-mwc where I can!
I'm doing research on this to understand all these different pieces and first I can't believe Google is forcing us to use "material components web" and "material web components" as the names for two similar but distinctly different ways to do material design on the web.
My initial reaction is that I thought the switch to components would result is minor changes such as maybe some subscriptions dropping away but after taking a cursory glance at the demo it looks like the component approach would result in an elm ui library that is an order of magnitude simpler than elm-mdc. Is this correct?
Seems that the material design menu would be so much easier using the component approach. Am I reading this correctly?
I'm with you, Tim. The vacillation on Google's side is doing my head in.
Hi @timcase, thank you for your feedback. It is correct that an implementation on web components would be an order of magnitude simpler:
subscriptions
, and likely init
from our framework, also you would not have to maintain the styling state Material.Model
, and we wouldn't need the elm-mdc.js
JavaScript asset@Montycarlo Material-ui is a completely different implementation from the specs than the official Google implementation this library uses.
But is mdc a web component? Not really I would say. It's CSS, with some JS where CSS won't work. I think treating this as a web component isn't as nice as elm-mdc. With elm-mdc and the new Elm 0.19 compiler it's extremely easy to get just the code you need, leading to very small, and optimised javascript.
For my part I think elm-mdc is just right where it is. With web components you would pull in a lot of javascript that you may never need. I.e. more bloated code to download.
Lots of progress this past year 👍👍
Any chance we're near a publication on https://package.elm-lang.org/ now? 😇
I have some dependent "packages" & would love to get things settled in my elm.json
's in the dependencies
section, instead of carrying source-directories
around.
Hi, I am excited to share some progress for this issue. For the past year I have been investigating a custom elements approach to Material Components Web, and it is in a state where I am happy enough to share it.
I have since then abandoned the earlier approach of elm-mwc, because it turned out that approach would not integrate as nicely as I had initially hoped.
After that I have tried out yet another approach in material-components-web-elm, and this time it seems very promising to me. You can a look at the demo to get a sense of what is working and what is not. I am currently trying to finish at least some preliminary documentation, and want to write a migration guide from elm-mdc to material-components-elm after that.
In the mean-time I would be very happy if anybody interested in that project would chime in and give it a go, ask any questions and share your thoughts. It would also be very valuable to me if anybody would be willing to take a elm-mdc project and port it to material-components-elm and share their feedback.
So if you are interested, feel free to get in touch either through Github issues or DM me on Slack. I will be happy to assist with any questions that you might have, since documentation is still a bit scarce.
@wscherphof Regarding my plans for publication, I would much rather publish material-components-elm soon than elm-mdc because that is what I would be using for future projects myself. However, this is not a deprecation notice of elm-mdc, and I think it could be feasible to also publish elm-mdc in addition. However, I would much prefer to publish elm-mdc after material-components-elm to avoid frustration for users that are only learning about this effort through packages.elm-lang.org. Feel free to contact me if you want to discuss any thoughts. :)
Repository: aforemny/material-components-elm Demo: aforemny.github.io/material-components-elm
Sounds great!
Possibly I will try porting our project to material-components-elm then. But first 3 weeks of holiday now. (Tempting to combine the two, but I won't)
Thank you
Op do 25 jul. 2019 om 14:08 schreef Alexander Foremny < notifications@github.com>:
Hi, I am excited to share some progress for this issue. For the past year I have been investigating a custom elements approach to Material Components Web, and it is in a state where I am happy enough to share it.
I have since then abandoned the earlier approach of elm-mwc https://github.com/aforemny/elm-mwc, because it turned out that approach would not integrate as nicely as I had initially hoped.
After that I have tried out yet another approach in material-components-elm https://github.com/aforemny/material-components-elm, and this time it seems very promising to me. You can a look at the demo https://aforemny.github.io/material-components-elm to get a sense of what is working and what is not. I am currently trying to finish at least some preliminary documentation, and want to write a migration guide from elm-mdc to material-components-elm after that.
In the mean-time I would be very happy if anybody interested in that project would chime in and give it a go, ask any questions and share your thoughts. It would also be very valuable to me if anybody would be willing to take a elm-mdc project and port it to material-components-elm and share their feedback.
So if you are interested, feel free to get in touch either through Github issues or DM me on Slack. I will be happy to assist with any questions that you might have, since documentation is still a bit scarce.
@wscherphof https://github.com/wscherphof Regarding my plans for publication, I would much rather publish material-components-elm soon than elm-mdc because that is what I would be using for future projects myself. However, this is not a deprecation notice of elm-mdc, and I think it could be feasible to also publish elm-mdc in addition. However, I would much prefer to publish elm-mdc AFTER material-components-elm to avoid frustration for users that are only learning about this effort through packages.elm-lang.org. Feel free to contact me if you want to discuss any thoughts. :)
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/aforemny/elm-mdc/issues/112?email_source=notifications&email_token=AAFCQPRQ35HFYN7EIKXJCUTQBGJTLA5CNFSM4FNHYW4KYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOD2ZI2NA#issuecomment-515018036, or mute the thread https://github.com/notifications/unsubscribe-auth/AAFCQPXKMQCZB7UMZAFHVWDQBGJTLANCNFSM4FNHYW4A .
I think this wrapper is indeed better. But from my perspective it still has all the drawbacks of a wrapper. Wrappers aren't good for the Elm community. And it doesn't do anything for those who want to build on the MDC foundation using pure Elm and build their own components. Doing that becomes easier in typescript, which defeats the purpose.
So for my part, I'll stick with elm-mdc!
I've played around with the new aforemny/material-components-elm and am really impressed so far! Thank you so much for all the hard work.
We have a fairly sizable elm-mdc app that I'm close to start the conversion on. I will document the process as best I can, possibly even make a screen recording of me doing a bit of the upgrade.
I'm also seeing if I can't use material-components-elm
and elm-ui
side by side, so I no longer have to use css. I've had good luck so far.
Cheers!
Hi @cmditch, that would be amazing! I would also be curios how to use material-components-web-elm with elm-ui. FYI, I have released material-components-web-elm yesterday, so when porting your elm-mdc app you could refer to package.elm-lang.org and unpkg CDN for the source assets.
PS. I have changed the name to material-components-web-elm.
Hi everyone, motivated by the recent talk on when and how to use web components by @lukewestby, I have been thinking about the future of this library. My thoughts are currently as follows:
It seems the Elm community would favor a web components approach to UI libraries, and I think that makes a lot of sense. The effort of both elm-mdl and elm-mdc stemmed from the (incorrect*) assumption that web components would not be feasible in Elm.
I have started and will continue to experiment with material-components-web-components, the official implementation of MDC Web via web components and that approach seems to be very promising. You can check out the in-progress version here.
It seems that both web components and material-components-web-components is still very much a work-in-progress. However, it seems that both technology could be accessible, within the next.. months?
I have just bumped the supported version of this library to v0.37.1, and I do plan to maintain this library until elm-mwc is a mature replacement. I am considering to update the version of MDC Web less frequently. I am questioning however, if I should release this library on package.elm-lang.org at all.
Whilst experimenting with elm-mwc, I will try to come up with a better API for components. Feel free to join the discussion when it is that time.
As always, there are no promises contained in the above statement. Any feedback would be appreciated. :-)
*=pending any unforeseen obstacles