ember-learn / ember-learn/ember-cli-addon-docs

New component with docs of a given component arguments

Offen
#359 4 Kommentare 1 Reaktion 0 zugewiesene Personen Auf GitHub ansehen
Vorherrschende Sprache
JavaScript
Sterne
172
Forks
142
PR-Merge-Kennzahlen
Keine gemergten PRs in 30 T.

Beschreibung

So, this is a feature request of sorts. Hopefully I'm able to describe what I would like to have from addon-docs.

So, auto generation of api documentation using JSDoc or ESDoc is great. I think we could use that to generate documentation of all the arguments that a component can take.

The problem I see today with the API docs section, is that usually I will have a documentation page for a component with several live demos. Having the documentation of the arguments of these components in a separated page is not the best experience. I would expect a "table" with all the available arguments for that component, having: `type`, `description`, `default value` and etc.

A great example of this is what @pranavliag is doing with [ember-elements](https://dunkinbase.github.io/ember-elements/docs). Here is [one example](https://dunkinbase.github.io/ember-elements/docs/core/tooltip#props).

I would like to have a component from addon-docs that I can use in one of my custom pages that would include the table with the documentation of the arguments. I would just pass the component name to it and it would take care of rendering that list of arguments.

We should also be looking forward to support glimmer components `args`. It will be interesting if folks are using TypeScript to define their arguments interface, then we can probably extract that info somehow.

Beitragsleitfaden

Beitragsleitfaden öffnen

Bewertung

Dieses Issue wurde noch nicht bewertet.

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.