Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
2 of 5 tasks
khushal87 opened this issue Aug 10, 2021 · 4 comments
Closed
2 of 5 tasks

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

khushal87 opened this issue Aug 10, 2021 · 4 comments

Comments

@khushal87
Copy link
Member

khushal87 commented Aug 10, 2021

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.

@khushal87 khushal87 reopened this Aug 10, 2021
@arpitBhalla
Copy link
Member

Hey @khushal87 Image and Tooltip have been migrated to Functional Components.
Thank you!

@khushal87
Copy link
Member Author

@arpitBhalla Doc-gen for Image and Tooltip works like charm. Thank you 🚀

@entrymaster
Copy link
Contributor

I want to contribute to this issue ? How should I start?

@arpitBhalla
Copy link
Member

Working fine with interfaces as well

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

No branches or pull requests

3 participants