Improve react-docgen usage
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 24.4k
- Forks
- 2.3k
- Avg merge
- 2d 7h
- Merged PRs (30d)
- 13
Description
Right now, component libraries need to include react-docgen specified as a devdep, and it's stuck on the 5.x series even though react-docgen itself is up to 7.x, because it's actually used by extract-meta.js in this repo, via the dash-generate-components command. Can we either:
- Use a version of
react-docgenprovided by Dash - if we did this we would either need to include a builtreact-docgenwith dash, or havedash-generate-componentsrunnpm iinside Dash, since component authors would not generally have built Dash itself. - At least update
extract-meta.js(anddash-generate-componentsif necessary) to supportreact-docgen7.x (but maintaining support for 5.x for compatibility with existing components). Not ideal, since components have no direct dependency onreact-docgen, but at least component authors could keep their dependencies up to date.
Also note: It looks like Typescript component generation pulls in Typescript from the component's node_modules, and this should not change. Typescript projects are built with a specific Typescript version so should be parsed with that same version. This means we'll need to keep extract-meta.js working with any changes that might be introduced in Typescript, but that seems unavoidable (and so far hasn't been an issue 🙏)
@T4rk1n curious your thoughts.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reading extract-meta.js and the dash-generate-components command to trace how react-docgen and the component's Typescript are resolved. Compare the proposed Dash-provided dependency approach with compatibility for react-docgen 5.x and 7.x. Done means the dependency arrangement is decided and component generation supports the required react-docgen versions without changing the component-local Typescript behavior.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript, react, typescript
- Domain
- build-system, frontend, tooling
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100