Skip to content

Commit 16a0e5a

Browse files
chore: improve repo templates (#46629)
## What? - Rendering `next info` output as code in the bug template - Removed the "Feature Request" issue template, in favor of a more granular discussion template - Added a minimal template for Help discussions ## Why? The main part of this PR is the new Feature Request template. Anyone can propose a change to Next.js. However adding new features often requires community discussions - whether to align expectations, understand the consequences (eg.: backward compatibility/lifetime of a feature), to look at and understand historical reasons for the current behavior or lack of the feature -, which [GitHub discussions](https://github.com/vercel/next.js/discussions) is more suited for than issues. ## How? - Utilizing the new discussion templates https://docs.github.com/en/discussions/managing-discussions-for-your-community/creating-discussion-category-forms - Adding a link to the [new issue](https://github.com/vercel/next.js/issues/new/choose) view to make it easier to discover [Slack thread](https://vercel.slack.com/archives/C04DUD7EB1B/p1670874727319809) Closes NEXT-742 ---------
1 parent 1717fd2 commit 16a0e5a

File tree

9 files changed

+85
-37
lines changed

9 files changed

+85
-37
lines changed

Diff for: .github/DISCUSSION_TEMPLATE/help.yml

+20
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
body:
2+
- type: textarea
3+
attributes:
4+
label: Summary
5+
description: What do you need help with?
6+
validations:
7+
required: true
8+
- type: textarea
9+
attributes:
10+
label: Additional information
11+
description: Any code snippets, error messages, or dependency details that may be related? (`next info`)
12+
render: js
13+
validations:
14+
required: false
15+
- type: input
16+
attributes:
17+
label: Example
18+
description: A link to a minimal reproduction is helpful for collaborative debugging!
19+
validations:
20+
required: false

Diff for: .github/DISCUSSION_TEMPLATE/ideas.yml

+33
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
body:
2+
- type: textarea
3+
attributes:
4+
label: Goals
5+
description: Short list of what the feature request aims to address?
6+
value: |
7+
1.
8+
2.
9+
3.
10+
validations:
11+
required: true
12+
- type: textarea
13+
attributes:
14+
label: Non-Goals
15+
description: Short list of what the feature request _does not_ aim to address?
16+
value: |
17+
1.
18+
2.
19+
3.
20+
validations:
21+
required: false
22+
- type: textarea
23+
attributes:
24+
label: Background
25+
description: Discuss prior art, why do you think this feature is needed? Are there current alternatives?
26+
validations:
27+
required: true
28+
- type: textarea
29+
attributes:
30+
label: Proposal
31+
description: How should this feature be implemented? Are you interested in contributing?
32+
validations:
33+
required: true

Diff for: .github/ISSUE_TEMPLATE/1.bug_report.yml

+5-4
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,10 @@ labels: ['template: bug']
44
body:
55
- type: markdown
66
attributes:
7-
value: 'NOTE: [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.'
8-
- type: markdown
9-
attributes:
10-
value: If you leave out sections there is a high likelihood it will be moved to the GitHub Discussions ["Help" section](https://github.com/vercel/next.js/discussions/categories/help).
7+
value: |
8+
*Note:* If you leave out sections, the issue might be moved to the ["Help" section](https://github.com/vercel/next.js/discussions/categories/help).
9+
[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.
10+
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).
1111
- type: checkboxes
1212
attributes:
1313
label: Verify canary release
@@ -19,6 +19,7 @@ body:
1919
attributes:
2020
label: Provide environment information
2121
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.
22+
render: bash
2223
validations:
2324
required: true
2425
- type: dropdown

Diff for: .github/ISSUE_TEMPLATE/2.example_bug_report.yml

+4-4
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,9 @@ labels: ['area: examples']
44
body:
55
- type: markdown
66
attributes:
7-
value: Thanks for taking the time to file a bug report for [one of the examples](https://github.com/vercel/next.js/tree/canary/examples)! Please fill out this form as completely as possible.
8-
- type: markdown
9-
attributes:
10-
value: If you leave out sections there is a high likelihood it will be moved to the GitHub Discussions ["Help" section](https://github.com/vercel/next.js/discussions/categories/help).
7+
value: |
8+
*Note:* If you leave out sections, the issue might be moved to the ["Help" section](https://github.com/vercel/next.js/discussions/categories/help).
9+
Thanks for taking the time to file a bug report for [one of the examples](https://github.com/vercel/next.js/tree/canary/examples)! Please fill out this form as completely as possible.
1110
- type: checkboxes
1211
attributes:
1312
label: Verify canary release
@@ -19,6 +18,7 @@ body:
1918
attributes:
2019
label: Provide environment information
2120
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.
21+
render: bash
2222
validations:
2323
required: true
2424
- type: input

Diff for: .github/ISSUE_TEMPLATE/3.feature_request.yml

-28
This file was deleted.

Diff for: .github/ISSUE_TEMPLATE/config.yml

+3
Original file line numberDiff line numberDiff line change
@@ -3,3 +3,6 @@ contact_links:
33
- name: Ask a question
44
url: https://github.com/vercel/next.js/discussions
55
about: Ask questions and discuss with other community members
6+
- name: Feature request
7+
url: https://github.com/vercel/next.js/discussions/new?category=ideas
8+
about: Feature requests should be opened as discussions

Diff for: contributing.md

+1
Original file line numberDiff line numberDiff line change
@@ -29,5 +29,6 @@ To contribute to [our examples](./examples), please see
2929
- [Building](./contributing/core/building.md)
3030
- [Testing](./contributing/core/testing.md)
3131
- [Adding Error Links](./contributing/core/adding-error-links.md)
32+
- [Adding a new feature](./contributing/core/adding-features.md)
3233
- [Developing Using Local App](./contributing/core/developing-using-local-app.md)
3334
<!-- - [Using the VS Code Debugger](./contributing/core/vscode-debugger.md) -->

Diff for: contributing/core/adding-features.md

+17
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
# Adding a new feature
2+
3+
Anyone can propose a change to Next.js. However, adding new features often requires community discussions before proceeding with the implementation.
4+
5+
Therefore, before opening a PR, you should use the [Feature Request discussion template](https://github.com/vercel/next.js/discussions/new?category=ideas) and collect feedback.
6+
7+
## Why use a discussion?
8+
9+
The discussion's goal is to achieve the following:
10+
11+
1. **Verify the validity of the feature request**: The community can upvote discussions. Highly upvoted feature requests are more likely to be considered.
12+
2. **Understanding the consequences**: Any feature added to Next.js is likely to be around for a while and _has to be maintained_. This means that a new feature has to cover many use cases, needs to consider how it affects the ecosystem, and so on.
13+
3. **Looking at and understanding historical reasons for the current behavior or lack of the feature**: There might be a reason why a feature does not exist, or why the current implementation is in a certain way. There must be solid reasoning to change this, as the feature needs to be maintained even after it is added. (See 2.). Next.js has a strong policy on not breaking features, so any new feature has to be added in a way that makes it possible to incrementally adopt it.
14+
15+
## Examples
16+
17+
The Next.js team uses RFCs (Request For Comment), which you can find in [this discussion category](https://github.com/vercel/next.js/discussions/categories/rfc). Reading through these, you can get a better understanding of what is expected to be included in a good feature request.

Diff for: contributing/repository/triaging.md

+2-1
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,10 @@
22

33
Repository maintainers triage every issue and PR opened in the repository.
44

5+
> Note: Feature requests should be opened as discussions, filling out [this template](https://github.com/vercel/next.js/discussions/new?category=ideas).
6+
57
Issues are opened with one of these labels:
68

7-
- `template: story` - a feature request, converted to an [💡 Ideas discussion](https://github.com/vercel/next.js/discussions/categories/ideas)
89
- `template: bug` - unverified issue with Next.js itself, or one of the examples in the [`examples`](https://github.com/vercel/next.js/tree/canary/examples) folder
910
- `template: documentation` - feedback for improvement or an unverified issue with the Next.js documentation
1011

0 commit comments

Comments
 (0)