Skip to content

Replace proptypes/docs:api with TypeScript-based generation#22003

Draft
JCQuintas wants to merge 52 commits intomui:masterfrom
JCQuintas:docs-apitest
Draft

Replace proptypes/docs:api with TypeScript-based generation#22003
JCQuintas wants to merge 52 commits intomui:masterfrom
JCQuintas:docs-apitest

Conversation

@JCQuintas
Copy link
Copy Markdown
Member

@JCQuintas JCQuintas commented Apr 7, 2026

Summary

  • Replaces pnpm proptypes and pnpm docs:api with a single TypeScript-based script (pnpm docs:api)
  • Generates API docs directly from TypeScript types using the compiler API
  • Runs in ~4s vs the old ~30s (7x faster)

How it works

  • Creates a single TS program with all package entry points
  • Discovers components per product family (data-grid, date-pickers, charts, tree-view)
  • Extracts props, slots, classes, and metadata from TypeScript types
  • Generates JSON, JS wrapper pages, translation files, and manifests
  • Handles interface docs, grid events, grid selectors, and package exports
  • Cleans up stale files from previous runs

Config structure

Each product family is defined in scripts/buildApiDocsTS/families/ with:

  • Package hierarchy (community → pro → premium)
  • Component skip rules
  • Unresolved prop lists (props kept as object type)
  • Documented interfaces

Benchmark

# Apple M3 Pro 
OLD pnpm docs:api  28.95s user 3.95s system 154% cpu 21.347 total
NEW pnpm docs:api   6.34s user 0.64s system 181% cpu  3.859 total

@mui-bot
Copy link
Copy Markdown

mui-bot commented Apr 7, 2026

Deploy preview: https://deploy-preview-22003--material-ui-x.netlify.app/

Bundle size report

Bundle Parsed size Gzip size
@mui/x-data-grid 0B(0.00%) 0B(0.00%)
@mui/x-data-grid-pro 0B(0.00%) 0B(0.00%)
@mui/x-data-grid-premium 0B(0.00%) 0B(0.00%)
@mui/x-charts 0B(0.00%) 0B(0.00%)
@mui/x-charts-pro 0B(0.00%) 0B(0.00%)
@mui/x-charts-premium 0B(0.00%) 0B(0.00%)
@mui/x-date-pickers 0B(0.00%) 0B(0.00%)
@mui/x-date-pickers-pro 0B(0.00%) 0B(0.00%)
@mui/x-tree-view 0B(0.00%) 0B(0.00%)
@mui/x-tree-view-pro 0B(0.00%) 0B(0.00%)

Details of bundle changes

Generated by 🚫 dangerJS against b099389

@github-actions github-actions bot added the PR: out-of-date The pull request has merge conflicts and can't be merged. label Apr 7, 2026
@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Apr 7, 2026

This pull request has conflicts, please resolve those before we can evaluate the pull request.

@github-actions github-actions bot removed the PR: out-of-date The pull request has merge conflicts and can't be merged. label Apr 7, 2026
@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Apr 8, 2026

This pull request has conflicts, please resolve those before we can evaluate the pull request.

@github-actions github-actions bot added the PR: out-of-date The pull request has merge conflicts and can't be merged. label Apr 8, 2026
@github-actions github-actions bot removed the PR: out-of-date The pull request has merge conflicts and can't be merged. label Apr 8, 2026
@github-actions github-actions bot added the PR: out-of-date The pull request has merge conflicts and can't be merged. label Apr 8, 2026
@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Apr 8, 2026

This pull request has conflicts, please resolve those before we can evaluate the pull request.

@github-actions github-actions bot added PR: out-of-date The pull request has merge conflicts and can't be merged. and removed PR: out-of-date The pull request has merge conflicts and can't be merged. labels Apr 9, 2026
@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Apr 9, 2026

This pull request has conflicts, please resolve those before we can evaluate the pull request.

@github-actions github-actions bot removed the PR: out-of-date The pull request has merge conflicts and can't be merged. label Apr 9, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

scope: code-infra Involves the code-infra product (https://www.notion.so/mui-org/5562c14178aa42af97bc1fa5114000cd). type: enhancement It’s an improvement, but we can’t make up our mind whether it's a bug fix or a new feature.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants