Skip to content

Commit 3984d73

Browse files
authored
Feature: Auto-Populate Files and Windows Version when submitting feedback (#12639)
1 parent 6fe4c84 commit 3984d73

File tree

4 files changed

+35
-37
lines changed

4 files changed

+35
-37
lines changed

.github/ISSUE_TEMPLATE/bug_report.yml

Lines changed: 5 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -38,28 +38,18 @@ body:
3838
id: files_version
3939
attributes:
4040
label: Files Version
41-
description: Which version of Files are you using? The version number can be found by going to Files' Settings > About
42-
placeholder: "e.g. Version: 2.0.34.0"
41+
description: Which version of Files are you using? To copy your Files version, access it from Settings -> About -> Copy -> Files version
42+
placeholder: "e.g. 2.0.34.0"
4343
validations:
4444
required: true
4545

4646
# Windows Version
47-
- type: dropdown
47+
- type: input
4848
id: windows_version
4949
attributes:
5050
label: Windows Version
51-
description: Which version of Windows are you using?
52-
multiple: true
53-
options:
54-
- 'Windows 11 Insider: 25xxx series'
55-
- 'Windows 11 Insider: 23xxx series'
56-
- 'Windows 11 (22H2): 22621'
57-
- 'Windows 11 (21H2): 22000'
58-
- 'Windows 10 (22H2): 19045'
59-
- 'Windows 10 (21H2): 19044'
60-
- 'Windows 10 (21H1): 19043'
61-
- 'Windows 10 (20H2): 19042'
62-
- 'Windows 10 (2004): 19041'
51+
description: Which version of Windows are you using? To copy your Windows version, access it from Settings -> About -> Copy -> Windows version
52+
placeholder: "e.g. 10.0.22621.1848"
6353
validations:
6454
required: true
6555

.github/ISSUE_TEMPLATE/feature_request.yml

Lines changed: 6 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -33,31 +33,21 @@ body:
3333

3434
# Files Version
3535
- type: input
36-
id: files-version
36+
id: files_version
3737
attributes:
3838
label: Files Version
39-
description: Which version of Files are you currently using?
40-
placeholder: 'Version: 2.0.36.0'
39+
description: Which version of Files are you using? To copy your Files version, access it from Settings -> About -> Copy -> Files version
40+
placeholder: 'e.g. 2.0.36.0'
4141
validations:
4242
required: true
4343

4444
# Windows Version
45-
- type: dropdown
45+
- type: input
4646
id: windows_version
4747
attributes:
4848
label: Windows Version
49-
description: Which version of Windows are you using?
50-
multiple: true
51-
options:
52-
- 'Windows 11 Insider: 25xxx series'
53-
- 'Windows 11 Insider: 23xxx series'
54-
- 'Windows 11 (22H2): 22621'
55-
- 'Windows 11 (21H2): 22000'
56-
- 'Windows 10 (22H2): 19045'
57-
- 'Windows 10 (21H2): 19044'
58-
- 'Windows 10 (21H1): 19043'
59-
- 'Windows 10 (20H2): 19042'
60-
- 'Windows 10 (2004): 19041'
49+
description: Which version of Windows are you using? To copy your Windows version, access it from Settings -> About -> Copy -> Windows version
50+
placeholder: "e.g. 10.0.22621.1848"
6151
validations:
6252
required: true
6353

src/Files.App/Constants.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -203,8 +203,8 @@ public static class GitHub
203203
{
204204
public const string GitHubRepoUrl = @"https://github.com/files-community/Files";
205205
public const string DocumentationUrl = @"https://files.community/docs";
206-
public const string FeatureRequestUrl = @"https://github.com/files-community/Files/issues/new?assignees=&labels=feature+request&template=feature_request.yml";
207-
public const string BugReportUrl = @"https://github.com/files-community/Files/issues/new?assignees=&labels=bug&template=bug_report.yml";
206+
public const string FeatureRequestUrl = @"https://github.com/files-community/Files/issues/new?labels=feature+request&template=feature_request.yml";
207+
public const string BugReportUrl = @"https://github.com/files-community/Files/issues/new?labels=bug&template=bug_report.yml";
208208
public const string PrivacyPolicyUrl = @"https://github.com/files-community/Files/blob/main/Privacy.md";
209209
public const string SupportUsUrl = @"https://github.com/sponsors/yaira2";
210210
}

src/Files.App/ViewModels/Settings/AboutViewModel.cs

Lines changed: 22 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -58,12 +58,12 @@ public Task DoOpenDocumentation()
5858

5959
public Task DoSubmitFeatureRequest()
6060
{
61-
return Launcher.LaunchUriAsync(new Uri(Constants.GitHub.FeatureRequestUrl)).AsTask();
61+
return Launcher.LaunchUriAsync(new Uri($"{Constants.GitHub.FeatureRequestUrl}&{GetVersionsQueryString()}")).AsTask();
6262
}
6363

6464
public Task DoSubmitBugReport()
6565
{
66-
return Launcher.LaunchUriAsync(new Uri(Constants.GitHub.BugReportUrl)).AsTask();
66+
return Launcher.LaunchUriAsync(new Uri($"{Constants.GitHub.BugReportUrl}&{GetVersionsQueryString()}")).AsTask();
6767
}
6868

6969
public Task DoOpenGitHubRepo()
@@ -88,7 +88,7 @@ public void CopyAppVersion()
8888
{
8989
DataPackage dataPackage = new DataPackage();
9090
dataPackage.RequestedOperation = DataPackageOperation.Copy;
91-
dataPackage.SetText(string.Format($"{AppVersion.Major}.{AppVersion.Minor}.{AppVersion.Build}.{AppVersion.Revision}"));
91+
dataPackage.SetText(GetAppVersion());
9292
Clipboard.SetContent(dataPackage);
9393
});
9494
}
@@ -99,7 +99,7 @@ public void CopyWindowsVersion()
9999
{
100100
DataPackage dataPackage = new DataPackage();
101101
dataPackage.RequestedOperation = DataPackageOperation.Copy;
102-
dataPackage.SetText(SystemInformation.Instance.OperatingSystemVersion.ToString());
102+
dataPackage.SetText(GetWindowsVersion());
103103
Clipboard.SetContent(dataPackage);
104104
});
105105
}
@@ -115,6 +115,24 @@ public async Task LoadThirdPartyNotices()
115115
ThirdPartyNotices = await FileIO.ReadTextAsync(file);
116116
}
117117

118+
public string GetAppVersion()
119+
{
120+
return string.Format($"{AppVersion.Major}.{AppVersion.Minor}.{AppVersion.Build}.{AppVersion.Revision}");
121+
}
122+
123+
public string GetWindowsVersion()
124+
{
125+
return SystemInformation.Instance.OperatingSystemVersion.ToString();
126+
}
127+
128+
public string GetVersionsQueryString()
129+
{
130+
var query = System.Web.HttpUtility.ParseQueryString(string.Empty);
131+
query["files_version"] = GetAppVersion();
132+
query["windows_version"] = GetWindowsVersion();
133+
return query.ToString() ?? string.Empty;
134+
}
135+
118136
public string Version
119137
{
120138
get

0 commit comments

Comments
 (0)