Skip to content

Commit

Permalink
chore: update bug report template (#54824)
Browse files Browse the repository at this point in the history
### What?

Follow-up of #54724

- Removed/merged some sections
- Added placeholders to hint the user what the input should be
- Reorganized the sections in terms of importance
- Made all sections but one required (we should not ask irrelevant questions to simplify the reporting process)
- Added a small guide on how to pinpoint an exact version of Next.js introducing a bug

### Why?

Clarifying the fact that a missing/invalid reproduction will result in the issue being closed to avoid confusion

[Slack thread](https://vercel.slack.com/archives/C04DUD7EB1B/p1693321920087959)

### How?

Compare the rendered issue templates:
- Before: https://github.com/vercel/next.js/issues/new?assignees=&labels=template%3A+bug&projects=&template=1.bug_report.yml
- After: https://github.com/balazsorban44/next.js/issues/new?assignees=&labels=template%3A+bug&projects=&template=1.bug_report.yml
- Autoclosing still works: balazsorban44#52
  • Loading branch information
balazsorban44 authored Sep 1, 2023
1 parent 49a891d commit 9adc791
Show file tree
Hide file tree
Showing 4 changed files with 74 additions and 46 deletions.
110 changes: 68 additions & 42 deletions .github/ISSUE_TEMPLATE/1.bug_report.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,43 @@ body:
- type: markdown
attributes:
value: |
*Note:* If you leave out sections, the issue might be moved to the ["Help" section](https://github.com/vercel/next.js/discussions/categories/help).
[examples](https://github.com/vercel/next.js/tree/canary/examples) related issue should be reported using [this](https://github.com/vercel/next.js/issues/new?assignees=&labels=type%3A+example%2Ctemplate%3A+bug&template=2.example_bug_report.yml) issue template instead.
This template is to report Next.js bugs. [Examples](https://github.com/vercel/next.js/tree/canary/examples) related issues should be reported using [this](https://github.com/vercel/next.js/issues/new?assignees=&labels=type%3A+example%2Ctemplate%3A+bug&template=2.example_bug_report.yml) issue template instead.
Feature requests should be opened as [discussions](https://github.com/vercel/next.js/discussions/new?category=ideas). [Read more](https://github.com/vercel/next.js/blob/canary/contributing/core/adding-features.md).
Before opening a new issue, please do a [search](https://github.com/vercel/next.js/issues) of existing issues and :+1: upvote the existing issue instead. This will result in a quicker resolution.
If you need help with your own project, you can:
- Start a discussion in the ["Help" section](https://github.com/vercel/next.js/discussions/categories/help)
- Ask a question on the [Next.js Discord](https://discord.com/invite/nextjs) server
- type: input
attributes:
label: Link to the code that reproduces this issue or a replay of the bug
description: |
A link to a **public** [GitHub repository](https://github.com/vercel/next.js/tree/canary/examples/reproduction-template) or a [CodeSandbox](https://codesandbox.io/p/sandbox/github/vercel/next.js/tree/canary/examples/reproduction-template) minimal reproduction. Minimal reproductions should be created from our [bug report template with `npx create-next-app -e reproduction-template`](https://github.com/vercel/next.js/tree/canary/examples/reproduction-template) and should include only changes that contribute to the issue. To report a Pages Router related issue, you can use these templates: [`npx create-next-app -e reproduction-template-pages`](https://github.com/vercel/next.js/tree/canary/examples/reproduction-template-pages) or [CodeSandbox](https://codesandbox.io/p/sandbox/github/vercel/next.js/tree/canary/examples/reproduction-template-pages)
If a minimal reproduction can't be created, please share a [replay](https://www.replay.io/) of the bug which doesn't require sharing a private repo.
**Skipping this/providing an invalid link will result in the issue being closed**
placeholder: 'https://github.com/user/my-minimal-nextjs-issue-reproduction'
validations:
required: true
- type: textarea
attributes:
label: To Reproduce
description: A step-by-step description of how to reproduce the issue, based on the linked reproduction. Screenshots can be provided in the issue body below. If using code blocks, make sure that [syntax highlighting is correct](https://docs.github.com/en/get-started/writing-on-github/working-with-advanced-formatting/creating-and-highlighting-code-blocks#syntax-highlighting) and double check that the rendered preview is not broken.
placeholder: |
1. Start the application in development (next dev)
2. Click X
3. Y will happen
validations:
required: true
- type: textarea
attributes:
label: Current vs. Expected behavior
description: A clear and concise description of what the bug is, and what you expected to happen.
placeholder: 'Following the steps from the previous section, I expected A to happen, but I observed B instead'
validations:
required: true
- type: checkboxes
attributes:
label: Verify canary release
Expand All @@ -20,13 +54,32 @@ body:
label: Provide environment information
description: Please run `next info` in the root directory of your project and paste the results. You might need to use `npx --no-install next info` if next is not in the current PATH.
render: bash
placeholder: |
Operating System:
Platform: darwin
Arch: arm64
Version: Darwin Kernel Version 22.5.0
Binaries:
Node: 18.17.1
npm: 9.5.1
Yarn: 1.22.19
pnpm: N/A
Relevant Packages:
next: 13.4.20
eslint-config-next: 13.4.20
react: 18.2.0
react-dom: 18.2.0
typescript: 5.2.2
Next.js Config:
output: N/A
validations:
required: true
- type: dropdown
attributes:
label: Which area(s) of Next.js are affected? (leave empty if unsure)
label: Which area(s) are affected? (Select all that apply)
multiple: true
options:
- 'Not sure'
- 'App Router'
- 'CLI (create-next-app)'
- 'Data fetching (gS(S)P, getInitialProps)'
Expand All @@ -49,47 +102,20 @@ body:
- 'SWC transpilation'
- 'Turbopack (--turbo)'
- 'TypeScript (plugin, built-in types)'
- type: input
attributes:
label: Link to the code that reproduces this issue or a replay of the bug
description: |
A link to a [GitHub repository](https://github.com/vercel/next.js/tree/canary/examples/reproduction-template) or a [CodeSandbox](https://codesandbox.io/p/sandbox/github/vercel/next.js/tree/canary/examples/reproduction-template) minimal reproduction. Minimal reproductions should be created from our [bug report template with `npx create-next-app -e reproduction-template`](https://github.com/vercel/next.js/tree/canary/examples/reproduction-template) and should include only changes that contribute to the issue.
If a minimal reproduction can't be created please share a [replay](https://www.replay.io/) of the bug which doesn't require sharing a private repo.
To report a Pages Router related issue, you can use these templates: [CodeSandbox](https://codesandbox.io/p/sandbox/github/vercel/next.js/tree/canary/examples/reproduction-template-pages) or [`npx create-next-app -e reproduction-template-pages`](https://github.com/vercel/next.js/tree/canary/examples/reproduction-template-pages)
validations:
required: true
- type: textarea
attributes:
label: To Reproduce
description: Steps to reproduce the behavior, please provide a clear description of how to reproduce the issue, based on the linked minimal reproduction. Screenshots can be provided in the issue body below. If using code blocks, make sure that [syntax highlighting is correct](https://docs.github.com/en/get-started/writing-on-github/working-with-advanced-formatting/creating-and-highlighting-code-blocks#syntax-highlighting) and double check that the rendered preview is not broken.
validations:
required: true
- type: textarea
attributes:
label: Describe the Bug
description: A clear and concise description of what the bug is.
validations:
required: true
- type: textarea
attributes:
label: Expected Behavior
description: A clear and concise description of what you expected to happen.
validations:
required: true
- type: markdown
attributes:
value: Before posting the issue go through the steps you've written down to make sure the steps provided are detailed and clear.
- type: markdown
attributes:
value: Contributors should be able to follow the steps provided in order to reproduce the bug.
- type: markdown
attributes:
value: These steps are used to add integration tests to ensure the same issue does not happen again. Thanks in advance!
- type: input
attributes:
label: Which browser are you using? (if relevant)
description: 'Please specify the exact version. For example: Chrome 100.0.4878.0'
- type: input
value: |
Another way you can help the maintainers' job is to pinpoint the `canary` version of `next` that introduced the issue. Check out our [releases](https://github.com/vercel/next.js/releases), and try to find the first `canary` release that introduced the issue. This will help us narrow down the scope of the issue, and possibly point to the PR/code change that introduced it. You can install a specific version of `next` by running `npm install next@<version>`.
- type: textarea
attributes:
label: How are you deploying your application? (if relevant)
description: 'For example: next start, Vercel, Other platform'
label: Additional context
description: |
Any extra information that might help us investigate. For example, where are you deploying your application (Vercel, Docker, other platform)? Is it only reproducible on that platform, or locally too? Is the issue only happening in a specific browser? etc.
placeholder: |
I tested my reproduction against different canary releases, and the first one that introduced the bug was "13.4.20-canary.13", since reverting to "13.4.20-canary.12" works.
or
I am hosting via Docker with the recommended `output: "standalone"` option", and if I remove that option or try a different hosting option, I cannot reproduce the same issue.
2 changes: 1 addition & 1 deletion .github/actions/issue-validator/autolabel/index.mjs

Large diffs are not rendered by default.

6 changes: 3 additions & 3 deletions .github/actions/issue-validator/src/autolabel.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -34,11 +34,11 @@ async function run() {
*/
const toAdd = []

// https://github.com/vercel/next.js/blame/canary/.github/ISSUE_TEMPLATE/1.bug_report.yml
// https://github.com/vercel/next.js/blob/canary/.github/ISSUE_TEMPLATE/1.bug_report.yml?plain=1

const matchSection = issue_body
.split('Which area(s) of Next.js are affected? (leave empty if unsure)')[1]
?.split('Link to the code that reproduces this issue')[0]
.split('Which area(s) are affected? (Select all that apply)')[1]
?.split('Another way you can help the maintainers')[0]

if (!matchSection) {
console.log(
Expand Down
2 changes: 2 additions & 0 deletions .github/actions/issue-validator/src/repro-link.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,8 @@ async function run() {
const { body: issue_body } = issue
if (!issue_body) return console.log('Could not get issue body, exiting')

// https://github.com/vercel/next.js/blob/canary/.github/ISSUE_TEMPLATE/1.bug_report.yml?plain=1

const start =
'### Link to the code that reproduces this issue or a replay of the bug'
const end = '### To Reproduce'
Expand Down

0 comments on commit 9adc791

Please sign in to comment.