From 6d01ae1377324d1b3f4e7f69648a93b173687c4a Mon Sep 17 00:00:00 2001 From: Nabeel Parkar Date: Wed, 12 Apr 2023 16:36:16 +0530 Subject: [PATCH] Bug report 2 issue template (#122385) Bug report 2 issue template --- .github/ISSUE_TEMPLATE/2_bug.md | 93 ------------- .github/ISSUE_TEMPLATE/2_bug.yml | 123 ++++++++++++++++++ .../lib/src/foundation/assertions.dart | 6 +- packages/flutter/lib/src/rendering/box.dart | 8 +- packages/flutter/lib/src/rendering/flex.dart | 2 +- .../flutter/lib/src/widgets/framework.dart | 2 +- .../test/foundation/assertions_test.dart | 8 +- .../lib/src/driver/web_driver.dart | 2 +- .../lib/src/l10n/README.md | 2 +- 9 files changed, 138 insertions(+), 108 deletions(-) delete mode 100644 .github/ISSUE_TEMPLATE/2_bug.md create mode 100644 .github/ISSUE_TEMPLATE/2_bug.yml diff --git a/.github/ISSUE_TEMPLATE/2_bug.md b/.github/ISSUE_TEMPLATE/2_bug.md deleted file mode 100644 index ac488ceeec..0000000000 --- a/.github/ISSUE_TEMPLATE/2_bug.md +++ /dev/null @@ -1,93 +0,0 @@ ---- -name: I have a problem with my Flutter application. -about: You are writing an application with Flutter but the application is crashing - or throws an exception, a widget is buggy, or something looks wrong. -title: '' -labels: '' -assignees: '' - ---- - - - -## Steps to Reproduce - - - -1. Execute `flutter run` on the code sample -2. ... -3. ... - -**Expected results:** - -**Actual results:** - -
-Code sample - - - -```dart -``` - -
- -
- Logs - - - -``` -``` - - - -``` -``` - - - -``` -``` - -
- - - \ No newline at end of file diff --git a/.github/ISSUE_TEMPLATE/2_bug.yml b/.github/ISSUE_TEMPLATE/2_bug.yml new file mode 100644 index 0000000000..f696d89dd1 --- /dev/null +++ b/.github/ISSUE_TEMPLATE/2_bug.yml @@ -0,0 +1,123 @@ +name: Report a bug +description: | + You found a bug in Flutter causing your application to crash or + throw an exception, a widget is buggy, or something looks wrong. +body: + - type: markdown + attributes: + value: | + Thank you for using Flutter! + + If you are looking for support, please check out our documentation + or consider asking a question on Stack Overflow: + + - https://flutter.dev/ + - https://api.flutter.dev/ + - https://stackoverflow.com/questions/tagged/flutter?sort=frequent + - type: checkboxes + attributes: + label: Is there an existing issue for this? + options: + - label: I have searched the [existing issues](https://github.com/flutter/flutter/issues) + required: true + - label: I have read the [guide to filing a bug](https://flutter.dev/docs/resources/bug-reports) + required: true + - type: textarea + attributes: + label: Steps to reproduce + description: Please tell us exactly how to reproduce the problem you are running into. + placeholder: | + 1. ... + 2. ... + 3. ... + validations: + required: true + - type: textarea + attributes: + label: Expected results + description: Please tell us what is expected to happen. + validations: + required: true + - type: textarea + attributes: + label: Actual results + description: Please tell us what is actually happening. + validations: + required: true + - type: textarea + attributes: + label: Code sample + description: | + Please create a minimal reproducible sample that shows the problem + and attach it below between the lines with the backticks. + + To create it, use the `flutter create bug` command and update the `main.dart` file. + + Alternatively, you can use https://dartpad.dev/ or create a public GitHub + repository to share your sample. + + Without this we will unlikely be able to progress on the issue, and because of that + we regretfully will have to close it. + + Note: Please do not upload screenshots of text. Instead, use code blocks + or the above mentioned ways to upload your code sample. + value: | +
Code sample + + ```dart + [Paste your code here] + ``` + +
+ validations: + required: true + - type: textarea + attributes: + label: Screenshots or Video + description: | + Upload any screenshots or video of the bug if applicable. + value: | +
+ Screenshots / Video demonstration + + [Upload media here] + +
+ - type: textarea + attributes: + label: Logs + description: | + Include the full logs of the commands you are running between the lines + with the backticks below. If you are running any `flutter` commands, + please include the output of running them with `--verbose`; for example, + the output of running `flutter --verbose create foo`. + + If the logs are too large to be uploaded to GitHub, you may upload + them as a `txt` file or use online tools like https://pastebin.com to + share it. + + Note: Please do not upload screenshots of text. Instead, use code blocks + or the above mentioned ways to upload logs. + value: | +
Logs + + ```console + [Paste your logs here] + ``` + +
+ - type: textarea + attributes: + label: Flutter Doctor output + description: | + Please provide the full output of running `flutter doctor -v` + value: | +
Doctor output + + ```console + [Paste your output here] + ``` + +
+ validations: + required: true diff --git a/packages/flutter/lib/src/foundation/assertions.dart b/packages/flutter/lib/src/foundation/assertions.dart index 188d981ae8..3072ee051c 100644 --- a/packages/flutter/lib/src/foundation/assertions.dart +++ b/packages/flutter/lib/src/foundation/assertions.dart @@ -724,7 +724,7 @@ class FlutterErrorDetails with Diagnosticable { 'provide substantially more information in this error message to help you determine ' 'and fix the underlying cause.\n' 'In either case, please report this assertion by filing a bug on GitHub:\n' - ' https://github.com/flutter/flutter/issues/new?template=2_bug.md', + ' https://github.com/flutter/flutter/issues/new?template=2_bug.yml', )); } } @@ -857,7 +857,7 @@ class FlutterError extends Error with DiagnosticableTreeMixin implements Asserti '\nThis error should still help you solve your problem, ' 'however please also report this malformed error in the ' 'framework by filing a bug on GitHub:\n' - ' https://github.com/flutter/flutter/issues/new?template=2_bug.md', + ' https://github.com/flutter/flutter/issues/new?template=2_bug.yml', ), ]), ); @@ -883,7 +883,7 @@ class FlutterError extends Error with DiagnosticableTreeMixin implements Asserti '\nThis error should still help you solve your problem, ' 'however please also report this malformed error in the ' 'framework by filing a bug on GitHub:\n' - ' https://github.com/flutter/flutter/issues/new?template=2_bug.md', + ' https://github.com/flutter/flutter/issues/new?template=2_bug.yml', )); throw FlutterError.fromParts(message); } diff --git a/packages/flutter/lib/src/rendering/box.dart b/packages/flutter/lib/src/rendering/box.dart index 48b1765c38..01a799d9bd 100644 --- a/packages/flutter/lib/src/rendering/box.dart +++ b/packages/flutter/lib/src/rendering/box.dart @@ -1906,7 +1906,7 @@ abstract class RenderBox extends RenderObject { ErrorSummary('The ${objectRuntimeType(this, 'RenderBox')} class does not implement "computeDryLayout".'), ErrorHint( 'If you are not writing your own RenderBox subclass, then this is not\n' - 'your fault. Contact support: https://github.com/flutter/flutter/issues/new?template=2_bug.md', + 'your fault. Contact support: https://github.com/flutter/flutter/issues/new?template=2_bug.yml', ), ]), )); @@ -2266,7 +2266,7 @@ abstract class RenderBox extends RenderObject { DiagnosticsProperty('Size', _size, style: DiagnosticsTreeStyle.errorProperty), ErrorHint( 'If you are not writing your own RenderBox subclass, then this is not ' - 'your fault. Contact support: https://github.com/flutter/flutter/issues/new?template=2_bug.md', + 'your fault. Contact support: https://github.com/flutter/flutter/issues/new?template=2_bug.yml', ), ]); } @@ -2315,7 +2315,7 @@ abstract class RenderBox extends RenderObject { ...failures, ErrorHint( 'If you are not writing your own RenderBox subclass, then this is not\n' - 'your fault. Contact support: https://github.com/flutter/flutter/issues/new?template=2_bug.md', + 'your fault. Contact support: https://github.com/flutter/flutter/issues/new?template=2_bug.yml', ), ]); } @@ -2341,7 +2341,7 @@ abstract class RenderBox extends RenderObject { ), ErrorHint( 'If you are not writing your own RenderBox subclass, then this is not\n' - 'your fault. Contact support: https://github.com/flutter/flutter/issues/new?template=2_bug.md', + 'your fault. Contact support: https://github.com/flutter/flutter/issues/new?template=2_bug.yml', ), ]); } diff --git a/packages/flutter/lib/src/rendering/flex.dart b/packages/flutter/lib/src/rendering/flex.dart index 4ce946c460..6d10cf38c1 100644 --- a/packages/flutter/lib/src/rendering/flex.dart +++ b/packages/flutter/lib/src/rendering/flex.dart @@ -758,7 +758,7 @@ class RenderFlex extends RenderBox with ContainerRenderObjectMixin.) If you have feedback about the translations please -[file an issue on the Flutter github repo](https://github.com/flutter/flutter/issues/new?template=2_bug.md). +[file an issue on the Flutter github repo](https://github.com/flutter/flutter/issues/new?template=2_bug.yml). ### See Also