Demo metadata #2306
bennypowers
started this conversation in
Ideas
Demo metadata
#2306
Replies: 2 comments
-
|
@bennypowers I think the |
Beta Was this translation helpful? Give feedback.
0 replies
-
|
I'm good for the markdown file. Gives the separation we need right now without being over complex. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Check out an element demos page, for example alert. Notice anything? The demos are listed one by one, in order, and each demo has three-and-only-three features:
This is great for anyone already in-the-know, but it would be better to provide some optional html content for each demo, explaining what's going on and why this demo exists.
We could do this by adding content to the demo html files themselves, but that approach has drawbacks which are IMO prohibitive:
An ideal solution, therefore, would be to declare demo metadata (i.e. html content, or a structure including html content) somewhere reasonable, and then pull that in to the page which renders each demo in the listing e.g. https://ux.redhat.com/elements/alert/demos/.
My heart tells me that the custom elements manifest is the correct place for this content, but at the moment, the schema for cem does not yet allow extensions (unlike the design tokens schema, which we use for exactly this purpose)
Assuming we can overcome the cem schema problem: I propose we add optional markdown files for each demo html file with the same name. i.e
rh-alert.mdforrh-alert.htmlandnested.mdfornested.html. our tooling would then be written to append that content to each demo record in the CEM, and that would be used to generate the demo listing on https://ux.redhat.comWhat say you all?
Beta Was this translation helpful? Give feedback.
All reactions