hypothesis / frontend-shared

UI components and styles for Hypothesis front-end applications
https://patterns.hypothes.is
5 stars 2 forks source link

Make writing pattern-library documentation/markup easier #1067

Open lyzadanger opened 1 year ago

lyzadanger commented 1 year ago

Composing pattern-library documentation isn't sheer hell or anything, but I miss markdown and it can be fiddly. I get annoyed when I have to write markup like this:

<p><code>SomeComponent</code> {"doesn't"} <strong>really</strong> have a type of {`'round' | 'solid'`}</p>

cf. in markdown:

`SomeComponent` doesn't *really* have a type of `'round' | 'solid'`

Perhaps look at where MDX is at or brainstorm other ways to make writing the actual documentation a little nicer.

acelaya commented 1 year ago

+1 to MDX and using markdown in general to write docs.

robertknight commented 1 year ago

MDX seems like one reasonable option to explore. Another would be some kind of <Markdown/> component within our existing JSX component pages that renders its text children as markdown. A solution that does the markdown -> JSX conversion at build time would be preferable from a performance perspective.