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

New component with docs of a given component arguments

Ouverte
#359 4 commentaires 1 réaction 0 personnes assignées Voir sur GitHub
Langage dominant
JavaScript
Étoiles
172
Forks
142
Métriques de merge des PR
Aucune PR mergée en 30 j

Description

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.

Guide de contribution

Ouvrir le guide de contribution

Piste de recherche

Commencez par examiner la section existante de la documentation de l’API dans addon-docs ainsi que l’exemple lié des props de tooltip de ember-elements. Définissez comment le nom d’un composant correspond à ses métadonnées d’arguments, notamment le type, la description et la valeur par défaut, et prenez en compte les Glimmer args et les interfaces TypeScript proposés. La tâche est considérée comme terminée lorsqu’un composant de documentation réutilisable affiche ce tableau sur une page de documentation personnalisée.

Rédigé par le modèle d'indexation à partir du texte de l'issue.

Évaluation

Stack technique
javascript
Domaine
documentation
Type d'issue
Fonctionnalité
Difficulté
5/5
Temps estimé
Plus d'une semaine
Activité
À l'abandon
Clarté
Plutôt claire
Accessibilité débutants
30/100

Recevez les nouvelles issues par e-mail

Un résumé court des issues GitHub adaptées aux débutants.