The Wayback Machine - https://web.archive.org/web/20250305094233/https://github.com/angular/components/issues/24024
Skip to content

docs(material): examples in jsdocs #24024

Closed
@wSedlacek

Description

Feature Description

Currently the jsdocs on components is very minimal, with very little detail

/**
* Material design button.
*/

Example how how this displays in VS Code
Screen Shot 2021-11-27 at 20 01 22

With material-experiential things seem greatly improved

/**
* Material Design button component. Users interact with a button to perform an action.
* See https://material.io/components/buttons
*
* The `MatButton` class applies to native button elements and captures the appearances for
* "text button", "outlined button", and "contained button" per the Material Design
* specification. `MatButton` additionally captures an additional "flat" appearance, which matches
* "contained" but without elevation.
*/

But I think there is still a few things missing.
There is a link to the material design docs which is great, but it would be awesome to have a link to the Angular Material documentation which has code examples and live demos.

Additionally it would be cool to have code examples in the JSDocs themselves.
This helps with discoverability of different ways of using components, for example showing the mat-flat-button as an example would be quite useful on the mat-button JSDoc

Use Case

Having faster access to documentation will not only help new developers who are not familiar with all the APIs that @angular/material has to offer, but also help refresh the memory of any developers who works in many context, such as backend work.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    P3An issue that is relevant to core functions, but does not impede progress. Important, but not urgentarea: manyArea label for issues related to many componentsdocsThis issue is related to documentationfeatureThis issue represents a new feature or feature request rather than a bug or bug fixgood first issueThis issue is a good place to start for first time contributors to the project

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions