material-components / material-web

Material Design Web Components
https://material-web.dev
Apache License 2.0
9.19k stars 874 forks source link

Can I find a definition and schema for MWC components similar to Fast components? #1648

Open MarcSkovMadsen opened 4 years ago

MarcSkovMadsen commented 4 years ago

Hi

I'm a contributor to Panel. Panel is a python framework for creating awesome analytics web apps for data scientists and domain experts.

I would like to use the MWC web components and have been wrapping some of these. But it takes time.

I can see that the Microsoft Fast components have a definition and a schema. Having something like that for MWC components would speed up my work.

Is it possible to get something like that for MWC components?

See for example https://explore.fast.design/components/fast-accordion

image

e111077 commented 4 years ago

Hello, unfortunately we do not have any plans as of now to integrate an automatic schema tool into our documentation. Though, our readmes have all of this data in them under their API sections. e.g.

https://github.com/material-components/material-components-web-components/tree/master/packages/textfield#api

Additionally, if you are using vscode and lit-html, we recommend using the lit-plugin which should allow for type checking and autocompletion when dealing with bindings to mwc components:

https://marketplace.visualstudio.com/items?itemName=runem.lit-plugin

e111077 commented 4 years ago

I will keep this issue open as a feature request for our documentation

MarcSkovMadsen commented 4 years ago

Just a comment on auto completion. I’m working on and binding to Python so the extension will not work there.

I can browse the element in a separate HTML or js editor window I guess. So it will be of some help though.

Thanks.

e111077 commented 4 years ago

It is also possible to run we component analyzer which can output JSON, but it will not include descriptions as we unfortunately do not yet apply JSdocs to our methods

https://www.npmjs.com/package/web-component-analyzer