Skip to content

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

Merged
merged 1 commit into from
Feb 7, 2018

Conversation

adityavohra7
Copy link

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!

@adityavohra7
Copy link
Author

adityavohra7 commented Oct 26, 2017

Looking into the test failures!

Edit: Fixed. Had to update a snapshot, and account for cases wherein props isn't defined.

@adityavohra7 adityavohra7 force-pushed the post_process_documentation branch 2 times, most recently from b8ea00c to 940ae38 Compare October 26, 2017 16:23
@adityavohra7
Copy link
Author

Friendly bump! Let me know if you think we should take some other approach here!

@rosskevin
Copy link
Contributor

@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!

@adityavohra7
Copy link
Author

@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.

@rosskevin
Copy link
Contributor

I just noticed that this is for master and we are already dependent on the 3.0-dev releases. I'm going to try and work this code into that branch and see if I can get material-ui running again.

@adityavohra7
Copy link
Author

Friendly bump! Any input by other contributors/maintainers would be appreciated!

@danez
Copy link
Collaborator

danez commented Jan 5, 2018

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?
Some tests would be necessary.

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.

@adityavohra7 adityavohra7 force-pushed the post_process_documentation branch from 940ae38 to 98f18e5 Compare January 11, 2018 21:53
@adityavohra7
Copy link
Author

adityavohra7 commented Jan 11, 2018

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!

@adityavohra7 adityavohra7 changed the title [WIP] Added post-processing step for documentation objects Added post-processing step for documentation objects Jan 11, 2018
@adityavohra7
Copy link
Author

Friendly bump! @danez, what do you think about the updated PR? 😊

@danez
Copy link
Collaborator

danez commented Feb 7, 2018

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.
Thanks for your work.

@danez danez merged commit 6a59f3f into reactjs:master Feb 7, 2018
@adityavohra7 adityavohra7 deleted the post_process_documentation branch February 7, 2018 17:16
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Jul 28, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants