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

feat: Automatic docs from UI #1070

Merged
merged 7 commits into from
Dec 10, 2021

Conversation

tlgimenes
Copy link
Contributor

@tlgimenes tlgimenes commented Dec 9, 2021

What's the purpose of this pull request?

This PR uses docusaurus-plugin-react-docgen-typescript to automatically generate documentation after the component's props definitions at faststore UI

How it works?

This is analogous to how storybook works. Just comment and add props to your React component at @faststore/ui and use the PropsSection component to render these props in your markdown. Simple as that.

Since PropsSection component is defined in our own code, we can define the style we want, i.e. a table or list.

How to test it?

Open any component at UI's reference and check the props

@tlgimenes tlgimenes added documentation Improvements or additions to documentation enhancement New feature or request labels Dec 9, 2021
@tlgimenes tlgimenes requested a review from a team as a code owner December 9, 2021 17:43
@netlify
Copy link

netlify bot commented Dec 9, 2021

✔️ Deploy Preview for faststoreui ready!

🔨 Explore the source changes: f44a2d4

🔍 Inspect the deploy log: https://app.netlify.com/sites/faststoreui/deploys/61b381bc2d16bd00083467a3

😎 Browse the preview: https://deploy-preview-1070--faststoreui.netlify.app

@netlify
Copy link

netlify bot commented Dec 9, 2021

✔️ Deploy Preview for faststore ready!

🔨 Explore the source changes: f44a2d4

🔍 Inspect the deploy log: https://app.netlify.com/sites/faststore/deploys/61b381bca5a0cf00073a09ae

😎 Browse the preview: https://deploy-preview-1070--faststore.netlify.app

@codesandbox-ci
Copy link

codesandbox-ci bot commented Dec 9, 2021

This pull request is automatically built and testable in CodeSandbox.

To see build info of the built libraries, click here or the icon next to each commit SHA.

Latest deployment of this branch, based on commit f44a2d4:

Sandbox Source
Store UI Typescript Configuration

Copy link
Contributor

@carolinamenezes carolinamenezes left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🎉🎉🎉
Não pegou as props do componente List. Outra coisa é que o campo "Possible values" tbm não foi, tipo aqui: https://faststore.dev/reference/ui/atoms/Input#:~:text=Possible%20values,success%20%7C%20error

@tlgimenes tlgimenes merged commit a84ec0a into master Dec 10, 2021
@tlgimenes tlgimenes deleted the feat/docusaurus-plugin-react-docgen-typescript branch December 10, 2021 16:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants