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

[docs-infra] Prevent to set undefined as a default value #41139

Open
alexfauquette opened this issue Feb 16, 2024 · 0 comments
Open

[docs-infra] Prevent to set undefined as a default value #41139

alexfauquette opened this issue Feb 16, 2024 · 0 comments
Labels
enhancement This is not a bug, nor a new feature scope: docs-infra Specific to the docs-infra product

Comments

@alexfauquette
Copy link
Member

alexfauquette commented Feb 16, 2024

Why not?

  /**
   * The height of the chart in px. If not defined, it takes the height of the parent element.
   */
  height: PropTypes.number,

It looks funny on the API page:

SCR-20240215-oysy

As far as I know, we only do this if it's null. undefined is the default "prop default value". In #41114 I try to improve its display.

If this change makes sense, then I think we should throw an error in docs-infra when the default is undefined, saying to remove it as redundant, to prevent future regressions.

Originally posted by @oliviertassinari in mui/mui-x#11996 (comment)

Search keywords:

@github-actions github-actions bot added the status: waiting for maintainer These issues haven't been looked at yet by a maintainer label Feb 16, 2024
@michelengelen michelengelen added the scope: docs-infra Specific to the docs-infra product label Feb 16, 2024
@oliviertassinari oliviertassinari transferred this issue from mui/mui-x Feb 16, 2024
@oliviertassinari oliviertassinari added enhancement This is not a bug, nor a new feature and removed status: waiting for maintainer These issues haven't been looked at yet by a maintainer labels Feb 16, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement This is not a bug, nor a new feature scope: docs-infra Specific to the docs-infra product
Projects
None yet
Development

No branches or pull requests

3 participants