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

Missing generated prop documentation for TextInput #1419

Closed
1 task
colebemis opened this issue Sep 9, 2021 · 4 comments
Closed
1 task

Missing generated prop documentation for TextInput #1419

colebemis opened this issue Sep 9, 2021 · 4 comments
Labels
bug Something isn't working react size: pebble

Comments

@colebemis
Copy link
Contributor

colebemis commented Sep 9, 2021

Problem

The Props component that we use to generate prop documentation doesn't work with the TextInput component:

CleanShot 2021-09-09 at 15 46 30

Tasks

  • Investigate and fix missing generated prop documentation for TextInput

Notes

The Props component was added in this PR and is implemented with react-docgen-typescript. I'm guessing there are other components that don't work with the Props component as well.

@colebemis colebemis added bug Something isn't working size: pebble labels Sep 9, 2021
@siddharthkp
Copy link
Member

siddharthkp commented Sep 14, 2021

🕵️ This is what I have till now:

The props don't show up because they aren't generated by react-docgen-typescript. It skips the TextInput component without a warning.

They did have trouble with React.forwardRef but those were fixed in the version we are using. So now, I'm trying to figure out what part of the TextInput does docgen not like based on the test fixtures in their repo.

Trying to make the smallest reproducible bug, it seems like docgen isn't able to parse this specific line. Still looking for the fix.

@colebemis
Copy link
Contributor Author

Excellent detective work, @siddharthkp 🕵️ ✨

Seems like the solution to this issue is either simplify the way we right types or change how we generate prop documentation (maybe we could use ts-morph). Either way, this seems like more work than we initially estimated. Let's move this back into the backlog until we can prioritize this.

I also think this calls for a more general discussion about how we want to handle prop documentation (i.e. can it be generated or is manually maintaining it okay?). Can you create a discussion about that in github/primer or primer/react when you have a chance?

@siddharthkp
Copy link
Member

Started a discussion to log exploration work: #1492

@gaknoll gaknoll added the react label Oct 19, 2021
@pksjce
Copy link
Collaborator

pksjce commented Jan 19, 2022

This doesn't seem to be relevant anymore as TextInput and doc issues have been fixed. Please re-open if required.

@pksjce pksjce closed this as completed Jan 19, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working react size: pebble
Projects
None yet
Development

No branches or pull requests

4 participants