Open rchrd2 opened 9 years ago
I completely agree. cc @tjsavage @frankiefu
+1. It's time we did this. @blasten @notwaldorf have an awesome new thing we should incorporate into catalog :)
In the meantime, here's a kitchen sink: https://ebidel.github.io/material-playground/
This is a good suggestion. I think the best investment here is making sure the catalog is demo-forward as we're working on re-vamping the Polymer docs site.
@tjsavage @ebidel <code-preview>
will help a lot here. http://blasten.github.io/elements/code-preview/demo/index.html
Thanks for the positive response. The <code-preview>
element looks great. I could imagine a long page, similar to Bootstrap's documentation, where components are demoed, and it's easy to copy and paste the code examples. To extend this even further, it would be amazing if the code was editable, similar to the Golang documentation.
I've added something similar and lightweight for the iron-flex-layout
demo
which desperately needed it. (It hasn't made it to the catalog yet).
It basically uses marked-element
and prism-highlighter
and literally 3 lines of javascript, and looks like this:
If you're interested, this is the PR where it landed: PolymerElements/iron-flex-layout#42 (or just run the iron-flex-layout
demo locally)
This "issue" would require drastic change, but I think this catalog is doing Polymer Elements a disservice. Developers need to see demos first and foremost when reviewing a library.
Angular Material prioritizes demos: https://material.angularjs.org/latest/demo/autocomplete
And so does Bootstrap: http://getbootstrap.com/2.3.2/base-css.html
As a developer who is learning which components do what and how to compose them, it cumbersome clicking through the docs to see each demo page one at a time. It takes a long time and it is really tedious to click every component one by one and see it isolated context.
A first step towards making this catalog more user friendly would be to show the demos on the same page as the component documentation. But a better solution would be to have a page with many demos on the same page. It would be much more intuitive to see a gallery of modules with example source code and examples of composed elements.
Does demo gallery like this exist? Is anyone interested in making it?