diff --git a/.github/ISSUE_TEMPLATE/1.bug.yml b/.github/ISSUE_TEMPLATE/1.bug.yml index 2a8b32b1dce9..04ddc524eb78 100644 --- a/.github/ISSUE_TEMPLATE/1.bug.yml +++ b/.github/ISSUE_TEMPLATE/1.bug.yml @@ -8,13 +8,14 @@ body: Please provide a searchable summary of the issue in the title above ⬆️. Thanks for contributing by creating an issue! ❀️ - - type: checkboxes + + - type: input attributes: - label: Duplicates - description: Please [search the history](https://github.com/mui/mui-x/issues) to see if an issue already exists for the same problem. - options: - - label: I have searched the existing issues - required: true + label: Search keywords + description: Your issue may have already been reported! List the keywords you've used to search the [existing issues](https://github.com/mui/mui-x/issues). This will also make your issue searchable for others. + placeholder: e.g. datagrid column resizing + validations: + required: true - type: checkboxes attributes: label: Latest version @@ -22,15 +23,17 @@ body: options: - label: I have tested the latest version required: true + - type: textarea attributes: - label: Steps to reproduce πŸ•Ή + label: Steps to reproduce description: | - **⚠️ Issues that we can't reproduce will be closed.** - - Please provide a link to a live example and an unambiguous set of steps to reproduce this bug. As a starting point, we recommend you [browse the documentation](https://mui.com/x/introduction/), and [select](https://mui.com/static/docs/forking-an-example.png) the closest example to your use case. Or you can use a [basic template](https://mui.com/r/x-issue-template) to build your reproduction case. + **⚠️ Please provide a live example for your report⚠️** + If you don't have one, you can use one of these options: + - [DataGrid codesandbox template](https://codesandbox.io/s/github/mui/mui-x/tree/master/templates/x-data-grid?file=/src/demo.tsx) + - Fork any of the examples in our [documentation](https://mui.com/x/introduction/) by [clicking on the codesandbox or stackblitz icon](https://mui.com/static/docs/forking-an-example.png) value: | - Link to live example: + Link to live example: (required) Steps: 1. @@ -38,19 +41,19 @@ body: 3. - type: textarea attributes: - label: Current behavior 😯 + label: Current behavior description: Describe what happens instead of the expected behavior. - type: textarea attributes: - label: Expected behavior πŸ€” + label: Expected behavior description: Describe what should happen. - type: textarea attributes: - label: Context πŸ”¦ + label: Context description: What are you trying to accomplish? How has this issue affected you? Providing context helps us come up with a solution that is more useful in the real world. - type: textarea attributes: - label: Your environment 🌎 + label: Your environment description: Run `npx @mui/envinfo` and post the results. If you encounter issues with TypeScript please include the used tsconfig. value: |
diff --git a/.github/ISSUE_TEMPLATE/2.feature.yml b/.github/ISSUE_TEMPLATE/2.feature.yml index 66e35f24201b..f7bde8e60c33 100644 --- a/.github/ISSUE_TEMPLATE/2.feature.yml +++ b/.github/ISSUE_TEMPLATE/2.feature.yml @@ -8,13 +8,14 @@ body: Please provide a searchable summary of the issue in the title above ⬆️. Thanks for contributing by creating an issue! ❀️ - - type: checkboxes + + - type: input attributes: - label: Duplicates - description: Please [search the history](https://github.com/mui/mui-x/issues) to see if an issue already exists for the same problem. - options: - - label: I have searched the existing issues - required: true + label: Search keywords + description: Your issue may have already been reported! List the keywords you've used to search the [existing issues](https://github.com/mui/mui-x/issues). This will also make your issue searchable for others. + placeholder: e.g. datagrid column resizing + validations: + required: true - type: checkboxes attributes: label: Latest version @@ -22,6 +23,7 @@ body: options: - label: I have tested the latest version required: true + - type: textarea attributes: label: Summary πŸ’‘ @@ -37,6 +39,6 @@ body: - type: input id: contact attributes: - label: Order ID πŸ’³ (optional) + label: Order ID or Support key πŸ’³ (optional) description: The [Pro plan](https://mui.com/pricing/) comes with priority over the Community plan. Providing your order ID might give your problem more attention. placeholder: 'e.g. 11111' diff --git a/.github/ISSUE_TEMPLATE/3.pro-support.yml b/.github/ISSUE_TEMPLATE/3.pro-support.yml index d78b1f202a16..2bb5901fe1e3 100644 --- a/.github/ISSUE_TEMPLATE/3.pro-support.yml +++ b/.github/ISSUE_TEMPLATE/3.pro-support.yml @@ -9,21 +9,23 @@ body: Please provide a searchable summary of the issue in the title above ⬆️. ⚠️ **Don't use this form if the problem is [a bug](https://github.com/mui/mui-x/issues/new?assignees=&labels=status%3A+needs+triage&template=1.bug.yml) or a [feature request](https://github.com/mui/mui-x/issues/new?assignees=&labels=status%3A+needs+triage&template=2.feature.yml), use the dedicated form instead.** + - type: input id: contact attributes: - label: Order ID or Support key πŸ’³ (optional) + label: Order ID or Support key πŸ’³ description: The order ID of the purchased Pro plan. Community users can [learn more about support](https://mui.com/getting-started/support/) in the documentation. placeholder: 'e.g. 11111' validations: required: true - - type: checkboxes + + - type: input attributes: - label: Duplicates - description: Please [search the history](https://github.com/mui/mui-x/issues) to see if an issue already exists for the same problem. - options: - - label: I have searched the existing issues - required: true + label: Search keywords + description: Your issue may have already been reported! List the keywords you've used to search the [existing issues](https://github.com/mui/mui-x/issues). This will also make your issue searchable for others. + placeholder: e.g. datagrid column resizing + validations: + required: true - type: checkboxes attributes: label: Latest version @@ -31,9 +33,15 @@ body: options: - label: I have tested the latest version required: true + - type: textarea attributes: label: The problem in depth πŸ” + description: | + **If applicable, please provide a live example to explain your problem.** + If you don't have one, you can use one of these options: + - [DataGrid codesandbox template](https://codesandbox.io/s/github/mui/mui-x/tree/master/templates/x-data-grid?file=/src/demo.tsx) + - Fork any of the examples in our [documentation](https://mui.com/x/introduction/) by [clicking on the codesandbox or stackblitz icon](https://mui.com/static/docs/forking-an-example.png) - type: textarea attributes: label: Your environment 🌎 diff --git a/.github/ISSUE_TEMPLATE/4.premium-support.yml b/.github/ISSUE_TEMPLATE/4.premium-support.yml index 14820c37b7f1..e2e57d4cf00f 100644 --- a/.github/ISSUE_TEMPLATE/4.premium-support.yml +++ b/.github/ISSUE_TEMPLATE/4.premium-support.yml @@ -9,21 +9,23 @@ body: Please provide a searchable summary of the issue in the title above ⬆️. ⚠️ **Don't use this form if the problem is [a bug](https://github.com/mui/mui-x/issues/new?assignees=&labels=status%3A+needs+triage&template=1.bug.yml) or a [feature request](https://github.com/mui/mui-x/issues/new?assignees=&labels=status%3A+needs+triage&template=2.feature.yml), use the dedicated form instead.** + - type: input id: contact attributes: - label: Order ID + label: Order ID or Support key πŸ’³ description: The order ID of the purchased Premium plan. Community users can [learn more about support](https://mui.com/getting-started/support/) in the documentation. placeholder: 'e.g. 11111' validations: required: true - - type: checkboxes + + - type: input attributes: - label: Duplicates - description: Please [search the history](https://github.com/mui/mui-x/issues) to see if an issue already exists for the same problem. - options: - - label: I have searched the existing issues - required: true + label: Search keywords + description: Your issue may have already been reported! List the keywords you've used to search the [existing issues](https://github.com/mui/mui-x/issues). This will also make your issue searchable for others. + placeholder: e.g. datagrid column resizing + validations: + required: true - type: checkboxes attributes: label: Latest version @@ -31,9 +33,15 @@ body: options: - label: I have tested the latest version required: true + - type: textarea attributes: label: The problem in depth πŸ” + description: | + **If applicable, please provide a live example to explain your problem.** + If you don't have one, you can use one of these options: + - [DataGrid codesandbox template](https://codesandbox.io/s/github/mui/mui-x/tree/master/templates/x-data-grid?file=/src/demo.tsx) + - Fork any of the examples in our [documentation](https://mui.com/x/introduction/) by [clicking on the codesandbox or stackblitz icon](https://mui.com/static/docs/forking-an-example.png) - type: textarea attributes: label: Your environment 🌎 diff --git a/.github/ISSUE_TEMPLATE/5.priority-support.yml b/.github/ISSUE_TEMPLATE/5.priority-support.yml index b015f08c4c6f..d42eea8cb5e2 100644 --- a/.github/ISSUE_TEMPLATE/5.priority-support.yml +++ b/.github/ISSUE_TEMPLATE/5.priority-support.yml @@ -7,13 +7,14 @@ body: attributes: value: | Please provide a searchable summary of the issue in the title above ⬆️. - - type: checkboxes + + - type: input attributes: - label: Duplicates - description: Please [search the history](https://github.com/mui/mui-x/issues) to see if an issue already exists for the same problem. - options: - - label: I have searched the existing issues - required: true + label: Search keywords + description: Your issue may have already been reported! List the keywords you've used to search the [existing issues](https://github.com/mui/mui-x/issues). This will also make your issue searchable for others. + placeholder: e.g. datagrid column resizing + validations: + required: true - type: checkboxes attributes: label: Latest version @@ -21,9 +22,15 @@ body: options: - label: I have tested the latest version required: true + - type: textarea attributes: label: The problem in depth πŸ” + description: | + **If you're reporting a bug, please provide a live example for your report.** + If you don't have one, you can use one of these options: + - [DataGrid codesandbox template](https://codesandbox.io/s/github/mui/mui-x/tree/master/templates/x-data-grid?file=/src/demo.tsx) + - Fork any of the examples in our [documentation](https://mui.com/x/introduction/) by [clicking on the codesandbox or stackblitz icon](https://mui.com/static/docs/forking-an-example.png) - type: textarea attributes: label: Your environment 🌎 diff --git a/.github/ISSUE_TEMPLATE/6.docs-feedback.yml b/.github/ISSUE_TEMPLATE/6.docs-feedback.yml index 88fac0f863eb..d0c7f18e1ad0 100644 --- a/.github/ISSUE_TEMPLATE/6.docs-feedback.yml +++ b/.github/ISSUE_TEMPLATE/6.docs-feedback.yml @@ -9,13 +9,14 @@ body: Please provide a searchable summary of the issue in the title above ⬆️. Thanks for contributing by creating an issue! ❀️ - - type: checkboxes + + - type: input attributes: - label: Duplicates - description: Please [search the history](https://github.com/mui/material-ui/issues) to see if an issue already exists for the same problem. - options: - - label: I have searched the existing issues - required: true + label: Search keywords + description: Your issue may have already been reported! List the keywords you've used to search the [existing issues](https://github.com/mui/mui-x/issues). This will also make your issue searchable for others. + placeholder: e.g. datagrid column resizing + validations: + required: true - type: input id: page-url diff --git a/.github/workflows/issue-cleanup.yaml b/.github/workflows/issue-cleanup.yaml deleted file mode 100644 index 14f0ed51d324..000000000000 --- a/.github/workflows/issue-cleanup.yaml +++ /dev/null @@ -1,35 +0,0 @@ -name: Cleanup issue comment - -on: - issues: - types: - - opened - -permissions: {} - -jobs: - issue_cleanup: - runs-on: ubuntu-latest - permissions: - issues: write - steps: - - uses: actions/github-script@d7906e4ad0b1822421a7e6a35d5ca353c962f410 # v6 - with: - script: | - const issue = await github.rest.issues.get({ - owner: context.repo.owner, - repo: context.repo.repo, - issue_number: context.issue.number, - }); - - const text = - '### Duplicates\r\n\r\n- [X] I have searched the existing issues\r\n\r\n### Latest version\r\n\r\n- [X] I have tested the latest version\r\n\r\n'; - - const body = issue.data.body.replace(text, ''); - - await github.rest.issues.update({ - owner: context.repo.owner, - repo: context.repo.repo, - issue_number: context.issue.number, - body, - }) diff --git a/.github/workflows/issue-cleanup.yml b/.github/workflows/issue-cleanup.yml new file mode 100644 index 000000000000..dab93c5d505e --- /dev/null +++ b/.github/workflows/issue-cleanup.yml @@ -0,0 +1,52 @@ +name: Cleanup issue comment + +on: + issues: + types: + - opened + +permissions: {} + +jobs: + issue_cleanup: + runs-on: ubuntu-latest + permissions: + issues: write + steps: + - uses: actions/github-script@d7906e4ad0b1822421a7e6a35d5ca353c962f410 # v6 + with: + script: | + const issue = await github.rest.issues.get({ + owner: context.repo.owner, + repo: context.repo.repo, + issue_number: context.issue.number, + }) + + const lines = issue.data.body.split('\n') + + const _ = extractInputSection(lines, 'Latest version') + const searchKeywords = extractInputSection(lines, 'Search keywords') + const orderID = extractInputSection(lines, 'Order ID or Support key') + + lines.push('') + lines.push('**Search keywords**: ' + searchKeywords) + if (orderID !== '' && orderID !== '_No response_') { + lines.push('**Order ID**: ' + orderID) + } + + const body = lines.join('\n') + + await github.rest.issues.update({ + owner: context.repo.owner, + repo: context.repo.repo, + issue_number: context.issue.number, + body, + }) + + function extractInputSection(lines, title) { + const index = lines.findIndex(line => line.startsWith('###') && line.includes(title)) + if (index === -1) { + return '' + } + return lines.splice(index, 4)[2].trim() + } diff --git a/templates/x-data-grid/package.json b/templates/x-data-grid/package.json new file mode 100644 index 000000000000..569a43b6fb60 --- /dev/null +++ b/templates/x-data-grid/package.json @@ -0,0 +1,24 @@ +{ + "dependencies": { + "@emotion/react": "latest", + "@emotion/styled": "latest", + "@mui/icons-material": "latest", + "@mui/material": "latest", + "@mui/x-data-grid-generator": "latest", + "@mui/x-data-grid": "latest", + "@mui/x-data-grid-pro": "latest", + "@mui/x-data-grid-premium": "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" + } +} diff --git a/templates/x-data-grid/public/index.html b/templates/x-data-grid/public/index.html new file mode 100644 index 000000000000..607c9c672d56 --- /dev/null +++ b/templates/x-data-grid/public/index.html @@ -0,0 +1,16 @@ + + + + DataGridProDemo demo β€” MUI X + + + + + + +
+ + diff --git a/templates/x-data-grid/src/demo.tsx b/templates/x-data-grid/src/demo.tsx new file mode 100644 index 000000000000..10cc6a348fe1 --- /dev/null +++ b/templates/x-data-grid/src/demo.tsx @@ -0,0 +1,24 @@ +import * as React from 'react'; +import Box from '@mui/material/Box'; +import { DataGridPro } from '@mui/x-data-grid-pro'; +import { useDemoData } from '@mui/x-data-grid-generator'; + +export default function DataGridProDemo() { + const { data } = useDemoData({ + dataSet: 'Commodity', + rowLength: 100000, + editable: true, + }); + + return ( + + + + ); +} diff --git a/templates/x-data-grid/src/index.tsx b/templates/x-data-grid/src/index.tsx new file mode 100644 index 000000000000..2aaeca271daa --- /dev/null +++ b/templates/x-data-grid/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/templates/x-data-grid/template.json b/templates/x-data-grid/template.json new file mode 100644 index 000000000000..06b9cc58191b --- /dev/null +++ b/templates/x-data-grid/template.json @@ -0,0 +1,6 @@ +{ + "title": "MUI X DataGrid template", + "description": "Base template for reporting a bug", + "tags": ["react", "typescript"], + "published": true +} diff --git a/templates/x-data-grid/tsconfig.json b/templates/x-data-grid/tsconfig.json new file mode 100644 index 000000000000..af10394b4c37 --- /dev/null +++ b/templates/x-data-grid/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"] +}