-
Notifications
You must be signed in to change notification settings - Fork 842
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
[GSOC] Automatic Documentation System for TypeScript Components #3554
Conversation
Since this is a community submitted pull request, a Jenkins build has not been kicked off automatically. Can an Elastic organization member please verify the contents of this patch and then kick off a build manually? |
Nice work making progress on all the checklist items! |
I used that checklist for ensuring props are generated for all components. There are still some components that are missing some props. and also there are some issues regarding
Rest all seems fine and I also feel that there are some types that are not much readable like |
@thompsongl There seems to be some issues with the tests of |
Just EuiFlex?
Is it found different because |
The issue with
No, even if we omit the type from HTML type we are getting different outputs and the required is always false. When I dig in it was found to be an issue with |
Remember when I asked you to remove the previous Sorry about that 🤦, I expect it to be the last piece of this PR! 🎉 |
There aren't any conflicts. But the test keeps failing since there is new lines are appended to the source file before
and after
|
I'll look at fixing the tests, @chandlerprall, if you haven't started yet |
jenkins test this |
Preview documentation changes for this PR: https://eui.elastic.co/pr_3554/ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Awesome! Confirmed the changes (including re-enabling proptype generation) locally with running the dev server, successfully building the package, and successfully using the package in another project.
One last time jenkins test this |
jenkins test this |
hmmm
again. Checking on whether something's up with Jenkins |
happening locally, also. Looking into increasing memory limit |
jenkins test this |
Preview documentation changes for this PR: https://eui.elastic.co/pr_3554/ |
Needed to increase the limit on the axe script, also. As such, I'm going to start work on #3801, but we can still move forward here and not block merging. jenkins test this |
Preview documentation changes for this PR: https://eui.elastic.co/pr_3554/ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great work, @ashikmeerankutty! 🎉
* Add react-docgen-typescript * Add react-docgen-typescript plugin * Use ts.createProgram * Hide errors for now * Omit id from HTML Attributes in accordion * Common props to beginning * Fixed issue with boolean props not generated * Changed React.Component to Component for props info * save Prop value as string * Use react for tsx and jsx in compiler option * Removed console.log * Save prop value as string * Added comment for children prop * CommonProps to the beginning * replace React. * Updated react-docgen-typescript * Fixed typo in package.json * Removed screenreader only prop used in docs * Relaced React. * Create program must use files from src-docs * increased uti.inspect maxlength * Updated export for flex_group * Removed issues with some files * Use spread operator * Replaced React * Removed logs used to test * Removed src-docs * Add comment to children node to flex grid * Add description for children node * Fixed issues with components in generating props * Omit onClick prop from html elements * Allow color title onClick * Removed color title onClick * Fixed issues with color and title * Support types from react-dnd * Fixed title prop in context_menu_panel * Fixed required issue in checkable card * Fixed issue with an if loop * Fixed issues with props not generating * Fixed issues with props not generating * tests passing; responsive prop default * Fix issue with overlay mask props * Fixed title not generated and props for overlaymask * Fixed wrong prop generated for children prop * get children prop from ast * get children prop from ast * removed filename usage * Fixed children prop issue with class components * playground input updates * Update src-docs/src/services/playground/props.js * Update src-docs/src/services/playground/props.js * use any HTML value instead of printing all html values * Replace some with every * Update src/components/toast/global_toast_list_item.tsx Co-authored-by: Chandler Prall <[email protected]> * Update src/components/title/title.tsx Co-authored-by: Chandler Prall <[email protected]> * Update src/components/tabs/tabs.tsx Co-authored-by: Chandler Prall <[email protected]> * Update src/components/steps/step.tsx Co-authored-by: Chandler Prall <[email protected]> * Update src/components/badge/notification_badge/badge_notification.tsx Co-authored-by: Chandler Prall <[email protected]> * Update src/components/resizable_container/resizable_panel.tsx Co-authored-by: Chandler Prall <[email protected]> * Removed babel plugin react docgen and props types from ts props * Apply suggestions from code review Co-authored-by: Chandler Prall <[email protected]> * Removed babel plugin react docgen * Fixed children prop * description must respect line breaks * Fixed issue with any * Fixed props types * Add more comments * Replaces ReactElement<any> * Replace ReactNode and ReactElement expanded string * Update src/components/accessibility/screen_reader.tsx Co-authored-by: Chandler Prall <[email protected]> * Fixed warnings from webpack * Fixed issue with facet button * Fixed issue with link * Fixed issue with link * Fixed issue with toggle * Fixed issue with ReactText * Fixed issue with link * Add ; back * Fixed prettier errors * Fex prettier problem * Add proptypes from ts props back * align test ouput * increase minified bundle build node memory limit * increase other prod-like build node memory limit Co-authored-by: Greg Thompson <[email protected]> Co-authored-by: Chandler Prall <[email protected]>
Preview documentation changes for this PR: https://eui.elastic.co/pr_3554/ |
Summary
Fixes #3056
react-docgen
withreact-docgen-typescript
Checklist
- [ ] Check against all themes for compatibility in both light and dark modes- [ ] Checked in mobile- [ ] Checked in IE11 and Firefox- [ ] Props have proper autodocs- [ ] Added documentation examples- [ ] Added or updated jest tests- [ ] Checked for breaking changes and labeled appropriately- [ ] Checked for accessibility including keyboard-only and screenreader modes- [ ] A changelog entry exists and is marked appropriatelyVerifying Props