Alterations to how bug reports are handled

- New field for log files in issue templates (which the exception dialog will directly fill out)
- Exception dialog lets you open the log file directly now that locating it isn't necessary anymore
This commit is contained in:
pizzaboxer 2024-08-29 11:01:00 +01:00
parent fd290f9ff7
commit 6738e09443
No known key found for this signature in database
GPG Key ID: 59D4A1DBAD0F2BA8
6 changed files with 24 additions and 29 deletions

View File

@ -32,3 +32,10 @@ body:
description: Provide a comprehensive description of the problem you're facing. Don't forget to attach any additional resources you may have, such as log files and screenshots.
validations:
required: true
- type: textarea
id: log
attributes:
label: Bloxstrap Log
description: If you're getting a Bloxstrap Exception error, upload your log file here. Otherwise, just leave it empty.
value: "N/A"
render: text

View File

@ -449,15 +449,6 @@ namespace Bloxstrap.Resources {
}
}
/// <summary>
/// Looks up a localized string similar to Locate log file.
/// </summary>
public static string Common_LocateLogFile {
get {
return ResourceManager.GetString("Common.LocateLogFile", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to Miscellaneous.
/// </summary>
@ -521,6 +512,15 @@ namespace Bloxstrap.Resources {
}
}
/// <summary>
/// Looks up a localized string similar to Open log file.
/// </summary>
public static string Common_OpenLogFile {
get {
return ResourceManager.GetString("Common.OpenLogFile", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to Presets.
/// </summary>
@ -629,15 +629,6 @@ namespace Bloxstrap.Resources {
}
}
/// <summary>
/// Looks up a localized string similar to Open log file.
/// </summary>
public static string ContextMenu_OpenLogFile {
get {
return ResourceManager.GetString("ContextMenu.OpenLogFile", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to Roblox is still launching. A log file will only be available once Roblox launches..
/// </summary>

View File

@ -226,8 +226,8 @@ Your ReShade configuration files will still be saved, and you can locate them by
<data name="Common.ImportJson" xml:space="preserve">
<value>Import JSON</value>
</data>
<data name="Common.LocateLogFile" xml:space="preserve">
<value>Locate log file</value>
<data name="Common.OpenLogFile" xml:space="preserve">
<value>Open log file</value>
</data>
<data name="Common.Miscellaneous" xml:space="preserve">
<value>Miscellaneous</value>
@ -268,9 +268,6 @@ Your ReShade configuration files will still be saved, and you can locate them by
<data name="ContextMenu.CopyDeeplinkInvite" xml:space="preserve">
<value>Copy invite deeplink</value>
</data>
<data name="ContextMenu.OpenLogFile" xml:space="preserve">
<value>Open log file</value>
</data>
<data name="ContextMenu.SeeServerDetails" xml:space="preserve">
<value>See server details</value>
</data>

View File

@ -81,7 +81,7 @@
<ColumnDefinition Width="*" />
</Grid.ColumnDefinitions>
<ui:SymbolIcon Grid.Column="0" Symbol="DocumentCatchUp20"/>
<TextBlock Grid.Column="1" VerticalAlignment="Center" Margin="4,0,0,0" Text="{x:Static resources:Strings.ContextMenu_OpenLogFile}" />
<TextBlock Grid.Column="1" VerticalAlignment="Center" Margin="4,0,0,0" Text="{x:Static resources:Strings.Common_OpenLogFile}" />
</Grid>
</MenuItem.Header>
</MenuItem>

View File

@ -41,7 +41,7 @@
<Border Grid.Row="2" Padding="15" Background="{ui:ThemeResource SolidBackgroundFillColorSecondaryBrush}">
<StackPanel Orientation="Horizontal" FlowDirection="LeftToRight" HorizontalAlignment="Right">
<Button x:Name="LocateLogFileButton" Content="{x:Static resources:Strings.Common_LocateLogFile}" />
<Button x:Name="LocateLogFileButton" Content="{x:Static resources:Strings.Common_OpenLogFile}" />
<Button x:Name="CloseButton" MinWidth="100" Content="{x:Static resources:Strings.Common_Close}" Margin="12,0,0,0" />
</StackPanel>
</Border>

View File

@ -28,10 +28,10 @@ namespace Bloxstrap.UI.Elements.Dialogs
string wikiUrl = $"{repoUrl}/wiki";
string issueUrl = String.Format(
"{0}/issues/new?template=bug_report.yaml&title={1}&what-happened={2}",
"{0}/issues/new?template=bug_report.yaml&title={1}&log={2}",
repoUrl,
HttpUtility.UrlEncode($"[BUG] {exception.GetType()}: {exception.Message}"),
HttpUtility.UrlEncode($"Log:\n```\n{String.Join('\n', App.Logger.History)}\n```")
HttpUtility.UrlEncode(String.Join('\n', App.Logger.History))
);
string helpMessage = String.Format(Strings.Dialog_Exception_Info_2, wikiUrl, issueUrl);
@ -43,8 +43,8 @@ namespace Bloxstrap.UI.Elements.Dialogs
LocateLogFileButton.Click += delegate
{
if (App.Logger.Initialized)
Process.Start("explorer.exe", $"/select,\"{App.Logger.FileLocation}\"");
if (App.Logger.Initialized && !String.IsNullOrEmpty(App.Logger.FileLocation))
Utilities.ShellExecute(App.Logger.FileLocation);
else
Clipboard.SetDataObject(String.Join("\r\n", App.Logger.History));
};