-
Hi, I've noticed there are They look like they might be integrated with the docs, but despite having run various build scripts under Rather than keep digging into a potential rabbit hole, I thought I'd drop a line here to see if anyone can help out with some pointers on how to get these demo stories up and running, would be most useful if so. Aside from this, I would like to say thanks for all the great work here, we are in the early stages of using these components in the Google Site Kit plugin and look forward to getting it into production. Cheers, Tom |
Beta Was this translation helpful? Give feedback.
Replies: 4 comments 5 replies
-
@e111077 might know, he's actively working on the catalog with stories. I think there should just be an npm script to start the catalog |
Beta Was this translation helpful? Give feedback.
-
Hey @asyncLiz, thanks for getting back to me! Apologies for not being clearer in my first post, but I have also run the As you mentioned @e111077 is working on this maybe he can shed some light? |
Beta Was this translation helpful? Give feedback.
-
Heya glad to hear your interest in our stories. The TL;DRIf it's not on the in-progress docs site or you want to mess around with the live build of the components:
The BackgroundSo internally at Google we have a stories system built by a few of us on the Lit team and we use these stories as a means of development and documentation for some of our internal clients. We wanted to provide, editable, live demos for 3rd party users externally but did not want to open source the stories system in its current form because it has a lot of google-specific or IE11 cruft in it. Additionally, we wanted to keep the same workflow internally as externally. Material Stories ImplementationThis implementation of the stories system is a slimmed down version of what we have internally, so the APIs match, but it's missing a lot of IE 11 stuff and Google testing hooks. Additionally, it's all written in such a way that they are ingested by https://github.com/google/playground-elements. This means that it does not touch our component build system and pulls from https://unpkg.com (latest npm). To get all this to work, the catalog build system does the following:
Potential featuresCurrently we do not have the stories hooked up to a build system externally, which is fine for us since internally it's hooked into a more robust build system and we develop from a google-source-of-truth (even for incoming PRs). Though incoming PRs seem to run into issues here since users can't seem to get build errors when making changes to the stories. An evolution of hooking it up to a build step would be a dev server to simply just serve the individual playground. Additionally there are issues with skew. The source code in the stories is a tip of github head, but the live environment inside of the playground pulls from I hope this answers your question, and I'd be interested to hear what you think and how helpful you find them. |
Beta Was this translation helpful? Give feedback.
-
Hey @e111077, many thanks for the detailed overview of the stories system and implementation. Following your instructions I've been able to view the stories for components which aren't yet in the catalog. I ran into one small issue getting it working - when running
The stories (and the docs in general) are extremely helpful, and will save a lot of time in terms of discovery, particularly being able to view the stories for those components which are not yet documented, but also in general, it's a really useful aspect of the documentation. Of course I note the issues with them you've highlighted, and it's again most useful to be aware of these things, notably the skew aspect with regard to my own usage to date, but it's all very good exposition. I will be following your progress with interest :) Thanks again for all the help! |
Beta Was this translation helpful? Give feedback.
Heya glad to hear your interest in our stories.
The TL;DR
If it's not on the in-progress docs site or you want to mess around with the live build of the components:
npm ci
catalog
directory/docs/components/<componentname>.md