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

[core] Update issue actions & templates #10375

Merged
merged 21 commits into from
Sep 25, 2023
Merged
16 changes: 9 additions & 7 deletions .github/ISSUE_TEMPLATE/1.bug.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,20 +8,22 @@ 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: Which keywords did you use to search for duplicates? Please [search the history](https://github.com/mui/mui-x/issues) to see if an issue already exists for the same problem.
romgrk marked this conversation as resolved.
Show resolved Hide resolved
placeholder: ex. datagrid column resizing
romgrk marked this conversation as resolved.
Show resolved Hide resolved
validations:
required: true
- type: checkboxes
attributes:
label: Latest version
description: We roll bug fixes, performance enhancements, and other improvements into new releases.
options:
- label: I have tested the latest version
required: true

- type: textarea
attributes:
label: Steps to reproduce 🕹
Expand All @@ -30,7 +32,7 @@ body:

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.
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Most of the time people come in with their bug case already known. Having to click on the docs, find an example, fork it, and modify it, is a lot of friction.

I would suggest that we provide from right here a set of starter templates for the different parts of X, this would make it easier for users.

One such example:

Not sure if we want to have direct CSB links or if we want links through mui.com, please let me know what's best.

Copy link
Member

Choose a reason for hiding this comment

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

This sounds like a great idea.

It should reduce the pickup time by a fair margin as well, when the case is already known and can be tested against. It might also reduce a ton of misunderstanding (from my experience on past projects this happens quite a lot)

💯

Copy link
Member

Choose a reason for hiding this comment

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

Good idea, +1 for direct codesandbox links. How do you see this exactly? 1 link per package? Any preference of codesandbox vs. StackBlitz?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yes one link per package would be nice. I think CSB, we've been using that everywhere.

Copy link
Member

@oliviertassinari oliviertassinari Sep 18, 2023

Choose a reason for hiding this comment

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

Most of the time people come in with their bug case already known. Having to click on the docs, find an example, fork it, and modify it, is a lot of friction.
I would suggest that we provide from right here a set of starter templates for the different parts of X, this would make it easier for users.

I struggle to subscribe to this narrative. The current description is:

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, and select the closest example to your use case. Or you can use a basic template to build your reproduction case.

The current DX feels like the proposal. As I understand it, developers either go with the basic template: https://mui.com/r/x-issue-template (say they already have a reproduction), or they go with our endless stream of templates that each docs demo. The complexity is then to find the closest template, which is the inherent problem with providing more than one template. The docs feel hard to do better on: it's 1. visual, 2. organized, and 3. kept up to date.


A side note, screenshot is outdated:

Copy link
Contributor Author

Choose a reason for hiding this comment

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

One use-case that I see quite often when I'm on support duty is the authors open their issue with their existing code pasted literally in the issue body, and we have to ask them for a live reproduction example.

One problem with the current instructions is that it's not super clear/evident that you can fork a codesandbox directly from the docs. It took me weeks to understand that when I started working here, I'm guessing it's possible a lot of people also don't realize it. I think that might be a reason why we often don't have a live example when people open issues.

In any case, I think we could provide both options? A list of direct templates, plus the instructions to the docs. I think we should also be much more explicit, something like "You are required to provide a codesandbox live example. Fork one of these templates or [docs instructions]".

Copy link
Member

Choose a reason for hiding this comment

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

That is a really great observation. We shouldn't take for granted that everyone is familiar with all the tools that we use.
Being more explicit is a great way, maybe not going overboard with required, but strongly encouraging it. 🤞

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I have reworked the message to include both of these, and shortened it a bit to make it more dynamic: result here.

value: |
Link to live example:
Link to live example: (required)

Steps:
1.
Expand Down
15 changes: 9 additions & 6 deletions .github/ISSUE_TEMPLATE/2.feature.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,20 +8,23 @@ 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: Which keywords did you use to search for duplicates? Please [search the history](https://github.com/mui/mui-x/issues) to see if an issue already exists for the same problem.
placeholder: ex. datagrid column resizing
romgrk marked this conversation as resolved.
Show resolved Hide resolved
validations:
required: true
- type: checkboxes
attributes:
label: Latest version
description: We roll bug fixes, performance enhancements, and other improvements into new releases.
options:
- label: I have tested the latest version
required: true


- type: textarea
attributes:
label: Summary 💡
Expand Down
25 changes: 14 additions & 11 deletions .github/ISSUE_TEMPLATE/3.pro-support.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,28 +9,31 @@ 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)
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'
label: Search keywords
description: Which keywords did you use to search for duplicates? Please [search the history](https://github.com/mui/mui-x/issues) to see if an issue already exists for the same problem.
placeholder: ex. datagrid column resizing
romgrk marked this conversation as resolved.
Show resolved Hide resolved
validations:
required: true
- type: checkboxes
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
- type: checkboxes
attributes:
label: Latest version
description: We roll bug fixes, performance enhancements, and other improvements into new releases.
options:
- label: I have tested the latest version
required: true

- type: input
id: contact
attributes:
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: textarea
attributes:
label: The problem in depth 🔍
Expand Down
25 changes: 14 additions & 11 deletions .github/ISSUE_TEMPLATE/4.premium-support.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,28 +9,31 @@ 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
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'
label: Search keywords
description: Which keywords did you use to search for duplicates? Please [search the history](https://github.com/mui/mui-x/issues) to see if an issue already exists for the same problem.
placeholder: ex. datagrid column resizing
romgrk marked this conversation as resolved.
Show resolved Hide resolved
validations:
required: true
- type: checkboxes
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
- type: checkboxes
attributes:
label: Latest version
description: We roll bug fixes, performance enhancements, and other improvements into new releases.
options:
- label: I have tested the latest version
required: true

romgrk marked this conversation as resolved.
Show resolved Hide resolved
- type: input
id: contact
attributes:
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: textarea
attributes:
label: The problem in depth 🔍
Expand Down
14 changes: 8 additions & 6 deletions .github/ISSUE_TEMPLATE/5.priority-support.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,20 +7,22 @@ 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: Which keywords did you use to search for duplicates? Please [search the history](https://github.com/mui/mui-x/issues) to see if an issue already exists for the same problem.
placeholder: ex. datagrid column resizing
romgrk marked this conversation as resolved.
Show resolved Hide resolved
validations:
required: true
- type: checkboxes
attributes:
label: Latest version
description: We roll bug fixes, performance enhancements, and other improvements into new releases.
options:
- label: I have tested the latest version
required: true

- type: textarea
attributes:
label: The problem in depth 🔍
Expand Down
13 changes: 7 additions & 6 deletions .github/ISSUE_TEMPLATE/6.docs-feedback.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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: Which keywords did you use to search for duplicates? Please [search the history](https://github.com/mui/mui-x/issues) to see if an issue already exists for the same problem.
placeholder: ex. datagrid column resizing
romgrk marked this conversation as resolved.
Show resolved Hide resolved
validations:
required: true

- type: input
id: page-url
Expand Down
25 changes: 21 additions & 4 deletions .github/workflows/issue-cleanup.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -20,16 +20,33 @@ jobs:
owner: context.repo.owner,
romgrk marked this conversation as resolved.
Show resolved Hide resolved
repo: context.repo.repo,
issue_number: context.issue.number,
});
})

const lines = issue.data.body.split('\n')

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 _ = extractInputSection(lines, 'Latest version')
romgrk marked this conversation as resolved.
Show resolved Hide resolved
const searchKeywords = extractInputSection(lines, 'Search keywords')
const orderID = extractInputSection(lines, 'Order ID or Support key')

const body = issue.data.body.replace(text, '');
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()
}