-
-
Notifications
You must be signed in to change notification settings - Fork 303
Added post-processing step for documentation objects #227
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
Conversation
Looking into the test failures! Edit: Fixed. Had to update a snapshot, and account for cases wherein |
b8ea00c
to
940ae38
Compare
Friendly bump! Let me know if you think we should take some other approach here! |
@adityavohra7 is this still a WIP or is it good to use/merge? @danez #221 is a huge problem for material-ui docs - if you could take a look and let us know if this direction is good, we need to get our docs generating correctly again. Thanks to you both! |
@rosskevin, the PR definitely needs a couple of tests. I was waiting for any maintainer to look it over though to confirm they agreed with the approach the PR takes. Majority of the doc generation is "independent" (handlers are unaware of each other), but this approach sort of "combines" the documentation that each handler creates. |
I just noticed that this is for |
Friendly bump! Any input by other contributors/maintainers would be appreciated! |
Sorry for the late reply, this looks overall good, to me. The only thing I'm not sure is that this right now would hardcode the behaviour. I don't see a reason why anyone would not want to have this, but who knows. So maybe it would be better to make it a prober handler and add it as the last one. I guess that should work too? And targetting the master branch is totally fine, I can pick stuff to the v3 branch after it is merged as long as there are tests that verify it works. :) Nice work. |
940ae38
to
98f18e5
Compare
Hi @danez! Thanks for the review! I've rebased on master and added a simple test case for a component with defaultProps and flow type annotations for props. The only reason I didn't add the "combining of defaultProps and flow types" behavior in the form of a handler is that there'd be an implicit requirement for this handler to run last (because it depends on the results of the props and flow handlers), whereas all the current handlers are pretty much independent of each other? If we prefer that, I don't mind changing the current post-processing step to a handler! |
Friendly bump! @danez, what do you think about the updated PR? 😊 |
I merge this now as is, I think having it hardcoded is okay for now. We will see if someone complains about wanting to disable this behaviour. If so we can still convert it to a handler without having todo a major version. |
Definitely a WIP, but thought I'd get a PR going to have something to discuss on. This branch adds a post-processing step for documentation objects. Currently, this post-processing step only does what's needed to "fix" #221, but I can imagine we could use it for validation of documentation objects as well? I haven't added any tests yet. Let me know what you think!