Skip to content

Commit

Permalink
Merge pull request #3 from ClementPasteau/improve-issue-template
Browse files Browse the repository at this point in the history
Better handling of fields
  • Loading branch information
ClementPasteau authored Nov 3, 2023
2 parents a6f9c02 + a3703f9 commit a4efc04
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 2 deletions.
1 change: 1 addition & 0 deletions .github/ISSUE_TEMPLATE/--bug-report.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ name: 🐛Bug report
description: Create a bug report about GDevelop or the game engine
body:
- type: checkboxes
id: searched_issues
attributes:
label: Is there an existing issue for this?
options:
Expand Down
17 changes: 15 additions & 2 deletions newIDE/app/src/UI/ErrorBoundary.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,10 @@ import {
getPlatformName,
getSystemVersion,
getUserAgent,
isMacLike,
isMobile,
isNativeMobileApp,
isWindows,
} from '../Utils/Platform';
import { ColumnStackLayout } from './Layout';
import AlertMessage from './AlertMessage';
Expand Down Expand Up @@ -108,9 +112,15 @@ export const ErrorFallbackComponent = ({
error && error.stack
? `${error.stack.slice(0, 600)}...`
: 'No error found';
const platform = getPlatformName();
const reproductionSteps = 'Fill me with the steps to reproduce';
const platform =
isWindows() || isMacLike()
? 'Desktop'
: isMobile() || isNativeMobileApp()
? 'Mobile'
: 'Web';
const gdevelopVersion = getIDEVersionWithHash();
const platformInfo = `System Version: ${getSystemVersion()}, Arch: ${getArch()}, User Agent: ${getUserAgent()}`;
const platformInfo = `System Version: ${getSystemVersion()}, Arch: ${getArch()}, User Agent: ${getUserAgent()}, Platform: ${getPlatformName()}`;
const additionalContext = componentStack
? `${componentStack.slice(0, 600)}...`
: 'No component stack found';
Expand All @@ -120,7 +130,10 @@ export const ErrorFallbackComponent = ({
);
baseUrl.searchParams.set('template', templateFile);
baseUrl.searchParams.set('title', title);
baseUrl.searchParams.set('labels', 'bug');
baseUrl.searchParams.set('searched_issues', 'true');
baseUrl.searchParams.set('description', description);
baseUrl.searchParams.set('reproduction_steps', reproductionSteps);
baseUrl.searchParams.set('platform', platform);
baseUrl.searchParams.set('gdevelop_version', gdevelopVersion);
baseUrl.searchParams.set('platform_info', platformInfo);
Expand Down

0 comments on commit a4efc04

Please sign in to comment.