From 767e185445843927df2acb25c527d51da4239206 Mon Sep 17 00:00:00 2001 From: Jose C Quintas Jr Date: Tue, 10 Dec 2024 21:09:47 +0100 Subject: [PATCH] [code-infra] Add Charts sandbox generation (#15830) --- .codesandbox/ci.json | 2 +- bug-reproductions/x-charts/package.json | 25 ++++++++++++++++++++ bug-reproductions/x-charts/public/index.html | 19 +++++++++++++++ bug-reproductions/x-charts/src/demo.tsx | 20 ++++++++++++++++ bug-reproductions/x-charts/src/index.tsx | 12 ++++++++++ bug-reproductions/x-charts/template.json | 6 +++++ bug-reproductions/x-charts/tsconfig.json | 19 +++++++++++++++ 7 files changed, 102 insertions(+), 1 deletion(-) create mode 100644 bug-reproductions/x-charts/package.json create mode 100644 bug-reproductions/x-charts/public/index.html create mode 100644 bug-reproductions/x-charts/src/demo.tsx create mode 100644 bug-reproductions/x-charts/src/index.tsx create mode 100644 bug-reproductions/x-charts/template.json create mode 100644 bug-reproductions/x-charts/tsconfig.json diff --git a/.codesandbox/ci.json b/.codesandbox/ci.json index 91008eca7dc2b..46d665df1ad28 100644 --- a/.codesandbox/ci.json +++ b/.codesandbox/ci.json @@ -32,6 +32,6 @@ "@mui/x-tree-view-pro": "packages/x-tree-view-pro/build", "@mui/x-internals": "packages/x-internals/build" }, - "sandboxes": ["/bug-reproductions/x-data-grid"], + "sandboxes": ["/bug-reproductions/x-data-grid", "/bug-reproductions/x-charts"], "silent": true } diff --git a/bug-reproductions/x-charts/package.json b/bug-reproductions/x-charts/package.json new file mode 100644 index 0000000000000..a493ca3742c53 --- /dev/null +++ b/bug-reproductions/x-charts/package.json @@ -0,0 +1,25 @@ +{ + "dependencies": { + "@emotion/react": "latest", + "@emotion/styled": "latest", + "@mui/icons-material": "latest", + "@mui/material": "latest", + "@mui/x-charts": "latest", + "@mui/x-charts-pro": "latest", + "@types/react": "latest", + "@types/react-dom": "latest", + "react": "latest", + "react-dom": "latest", + "typescript": "latest" + }, + "devDependencies": { + "react-scripts": "latest" + }, + "main": "src/index.tsx", + "scripts": { + "start": "react-scripts start", + "build": "react-scripts build", + "test": "react-scripts test", + "eject": "react-scripts eject" + } +} diff --git a/bug-reproductions/x-charts/public/index.html b/bug-reproductions/x-charts/public/index.html new file mode 100644 index 0000000000000..8e1bd85f807c0 --- /dev/null +++ b/bug-reproductions/x-charts/public/index.html @@ -0,0 +1,19 @@ + + + + Charts — MUI X + + + + + + + + + +
+ + diff --git a/bug-reproductions/x-charts/src/demo.tsx b/bug-reproductions/x-charts/src/demo.tsx new file mode 100644 index 0000000000000..fd022479b8780 --- /dev/null +++ b/bug-reproductions/x-charts/src/demo.tsx @@ -0,0 +1,20 @@ +import * as React from 'react'; +import Box from '@mui/material/Box'; +import { BarChart } from '@mui/x-charts'; + +export default function Demo() { + return ( + + + + ); +} diff --git a/bug-reproductions/x-charts/src/index.tsx b/bug-reproductions/x-charts/src/index.tsx new file mode 100644 index 0000000000000..863f9ac4a3c38 --- /dev/null +++ b/bug-reproductions/x-charts/src/index.tsx @@ -0,0 +1,12 @@ +import * as React from 'react'; +import * as ReactDOM from 'react-dom/client'; +import { StyledEngineProvider } from '@mui/material/styles'; +import Demo from './demo'; + +ReactDOM.createRoot(document.querySelector('#root')!).render( + + + + + , +); diff --git a/bug-reproductions/x-charts/template.json b/bug-reproductions/x-charts/template.json new file mode 100644 index 0000000000000..7d4b5f453224b --- /dev/null +++ b/bug-reproductions/x-charts/template.json @@ -0,0 +1,6 @@ +{ + "title": "MUI X Charts template", + "description": "Base template for reporting a bug", + "tags": ["react", "typescript"], + "published": true +} diff --git a/bug-reproductions/x-charts/tsconfig.json b/bug-reproductions/x-charts/tsconfig.json new file mode 100644 index 0000000000000..af10394b4c375 --- /dev/null +++ b/bug-reproductions/x-charts/tsconfig.json @@ -0,0 +1,19 @@ +{ + "compilerOptions": { + "target": "es5", + "lib": ["dom", "dom.iterable", "esnext"], + "allowJs": true, + "skipLibCheck": true, + "esModuleInterop": true, + "allowSyntheticDefaultImports": true, + "strict": true, + "forceConsistentCasingInFileNames": true, + "module": "esnext", + "moduleResolution": "node", + "resolveJsonModule": true, + "isolatedModules": true, + "noEmit": true, + "jsx": "react" + }, + "include": ["src"] +}