mui / mui/material-ui

[code-infra] The parser of the describe conformance consider `skip` but not `only` config

Open
#42,832 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

scope: code-infra
Dominant language
JavaScript
Stars
99.1k
Forks
32.5k
Avg merge
2d 17h
Merged PRs (30d)
106

Description

Found while reviewing https://github.com/mui/mui-x/pull/13647/

If you use the describeConformance(..., () => ({ only: ['themeDefaultProps'})), all the attributes will be added to the API page instead of just the theme dfault props one.

THe reason is that the script filter the skipped test but do not take into consideration the only:

https://github.com/mui/material-ui/blob/master/packages/api-docs-builder/utils/parseTest.ts/#L164-L185

Solution can either be to remove only from describe conformance, or take only into consideration in the parsing

Search keywords:

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start in packages/api-docs-builder/utils/parseTest.ts around lines 164-185 and reproduce the describeConformance case using only: ['themeDefaultProps']. Trace how skip and only are handled. Done means the generated API page includes only the selected attribute rather than all attributes; verify the behavior with the parser's existing tests if available.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript
Domain
documentation, tooling
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Clearly specified
Newbie friendliness
52/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.