GoogleForCreators / web-stories-wp

Web Stories for WordPress
https://wp.stories.google
Apache License 2.0
766 stars 178 forks source link

Discovery: Material UI library #324

Closed kmyram closed 4 years ago

kmyram commented 4 years ago

Material Design is implemented in a React framework not supported by Google (because Facebook). Official implementation is in vanilla js. Unofficial implementation in React is Material UI. Widely used. Not supported. Implements material design well but we are not using material design globally.

Criterias: Do we implement the non-supported React-versionand risk putting a stamp of approval one it? How to implement the VanillaJS version but less used? Used by Sitekit…

What to investigate (discover):

spacedmonkey commented 4 years ago

The three options to do discovery are the following.

  1. Use the material-components-web library by Google.
  2. Use the material-components-web-components library by Google. This library is extremely new and may not be ready for a production project.
  3. Use the material-ui library not by google.
swissspidy commented 4 years ago

@pbakaus What's your opinion on the officiality of those libraries? Should it be a factor?

pbakaus commented 4 years ago

I don't have an opinion, but we should absolutely ask our Material friends. I'll kick off an internal thread.

swissspidy commented 4 years ago

Sounds good. Otherwise my 2 cents in yesterday's meeting were basically that we should just start using Material UI with a small abstraction layer around it. We lose valuable time discussing this, and I think from our discussions it was quite clear that Material UI had most benefits. With a small abstraction layer we can always swap it out for one of the others after beta if needed.

spacedmonkey commented 4 years ago

After review of the different options here are my findings.

  1. Use the material-components-web library by Google. It would be possible to integrate this into react / stories editor. The site kit team have already done something similar. However, the effort to do so, would not be worth the benefit and would produce worse results. Hacking this library into react, feel wrong.
  2. Use the material-components-web-components library by Google. Similar issue as noted above, the library is not designed for react, so would take a long time to integrate in react. Also many of the components are not completed.
  3. Use the material-ui library not by google. This is a solid well documented library with a large community behind it. The documentation on the site is extremely good. It even intergrated with styled-components, which would allow us to override any styling we do not like. I have a PoC PR for integrating material UI.

I had some with components becauses of forms.css. This css resets lots of the input / form fields, which is already an issue. CC @swissspidy here, on his thoughts on removing it.

swissspidy commented 4 years ago

The list of components that @samitron7 shared:

swissspidy commented 4 years ago

Short summary so far after our discussion before:

swissspidy commented 4 years ago

@wassgha How much time do you think is needed to finish the work on the form elements in #271? Do Would you need help on that or someone to take it over? Panel refactoring can be done separately. If we have form elements, that could unblock lots of other things.

wassgha commented 4 years ago

Shouldn't be too hard, but if anyone wants to work on it we can merge what we currently have and work on the remaining components in a separate PR

barklund commented 4 years ago

@wassgha How much time do you think is needed to finish the work on the form elements in #271? Do Would you need help on that or someone to take it over? Panel refactoring can be done separately. If we have form elements, that could unblock lots of other things.

We have @ndev1991 and @obetomuniz assigned to #255 now and will take over #271 and work from there.

spacedmonkey commented 4 years ago

Moving to done as library is going to add much overhead than benefit.