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] Fix demos showing TypeScript instead of JavaScript #35850

Merged
merged 2 commits into from
Feb 9, 2023

Conversation

mj12albert
Copy link
Member

@mj12albert mj12albert commented Jan 17, 2023

Originally raised in #35741 (comment), the bug: https://mui.com/base/react-input/#introduction shows TypeScript while the developer is asking for JavaScript:

Screenshot 2023-02-06 at 15 54 46

This PR fixes these bugs and throws an error if a TS demo is used directly instead of plain JS. It also fixes the export to CodeSandbox.

Sorry, something went wrong.

@mui-bot

This comment was marked as outdated.

@mj12albert mj12albert added the docs Improvements or additions to the documentation label Jan 17, 2023
@mj12albert mj12albert marked this pull request as ready for review January 17, 2023 11:36
@mj12albert mj12albert force-pushed the base-docs-code-variant branch from 5a3c24e to 36c0989 Compare January 18, 2023 06:06
@oliviertassinari oliviertassinari added the scope: docs-infra Specific to the docs-infra product label Jan 29, 2023
Copy link
Member

@oliviertassinari oliviertassinari left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

thanks for the fix 👍

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.

Partially verified

This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
We cannot verify signatures from co-authors, and some of the co-authors attributed to this commit require their commits to be signed.
@oliviertassinari oliviertassinari added the bug 🐛 Something doesn't work label Feb 6, 2023
@oliviertassinari oliviertassinari changed the title [docs] Throw an error if a TS demo is used directly [docs] Fix demos showing TypeScript instead of JavaScript Feb 6, 2023
@oliviertassinari
Copy link
Member

oliviertassinari commented Feb 6, 2023

I have updated the PR title and description to focus on the problem we fix for users.

We usually frame the changes around what's the problem, I think that throwing is very important to prevent regressions, but isn't the main purpose of this PR.

@mj12albert
Copy link
Member Author

mj12albert commented Feb 7, 2023

I see, thanks for the edits 🙏

@mj12albert mj12albert merged commit f800c83 into mui:master Feb 9, 2023
@mj12albert mj12albert deleted the base-docs-code-variant branch February 9, 2023 10:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug 🐛 Something doesn't work docs Improvements or additions to the documentation scope: docs-infra Specific to the docs-infra product
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants