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

Future of this library #112

Open
aforemny opened this issue Aug 1, 2018 · 12 comments
Open

Future of this library #112

aforemny opened this issue Aug 1, 2018 · 12 comments
Labels

Comments

@aforemny
Copy link
Owner

aforemny commented Aug 1, 2018

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

@ropwareJB
Copy link
Contributor

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!

@timcase
Copy link

timcase commented Aug 29, 2018

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?

@dpinn
Copy link

dpinn commented Aug 29, 2018

I'm with you, Tim. The vacillation on Google's side is doing my head in.

@aforemny
Copy link
Owner Author

aforemny commented Sep 5, 2018

Hi @timcase, thank you for your feedback. It is correct that an implementation on web components would be an order of magnitude simpler:

  • we would not have to re-implement the JavaScript, thus it would be less effort to maintain this library, and less likely to introduce bugs in our implementation
  • we could drop 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

@berenddeboer
Copy link
Collaborator

@montycarlo Material-ui is a completely different implementation from the specs than the official Google implementation this library uses.

@berenddeboer
Copy link
Collaborator

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.

@wscherphof
Copy link
Contributor

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.

@aforemny
Copy link
Owner Author

aforemny commented Jul 25, 2019

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

@wscherphof
Copy link
Contributor

wscherphof commented Jul 25, 2019 via email

@berenddeboer
Copy link
Collaborator

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!

@cmditch
Copy link

cmditch commented Sep 17, 2019

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!

@aforemny
Copy link
Owner Author

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

7 participants