Skip to content

[Docs] Auto-generation of documentation for class based components #3171

@khushal87

Description

@khushal87

The Auto-generation of documentation for functional components of the package is almost complete. There are some components that are still Class-based and therefore they are not handled currently by the workflow and the code of Docs autogen scripts which was the task of #gsoc'21 but as some components remain class-based, a separate issue is created for the same to track it in future.

The components include:

  • Image
  • Input
  • SearchBar
  • Tooltip
  • Rating(SwipeRating from react-native-ratings)

The react-docgen-typescript which is used in the project to generate documentation does not come up well for these components leading to broken JSON/Markdown for the same.

Solution
The solution to the problem is converting the following components to Functional components and then the parsing will work automatically without any effort. The components need to be added in the componentMap.ts once they are functional-based. inside the docgen scripts under the website directory. Also, proper comments in the component are a prime requirement to generate JSON/Markdown data.

Note: Props filters are to be added if required, to increase docs readability.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions