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. 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: validations:
required: true 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> /// <summary>
/// Looks up a localized string similar to Miscellaneous. /// Looks up a localized string similar to Miscellaneous.
/// </summary> /// </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> /// <summary>
/// Looks up a localized string similar to Presets. /// Looks up a localized string similar to Presets.
/// </summary> /// </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> /// <summary>
/// Looks up a localized string similar to Roblox is still launching. A log file will only be available once Roblox launches.. /// Looks up a localized string similar to Roblox is still launching. A log file will only be available once Roblox launches..
/// </summary> /// </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"> <data name="Common.ImportJson" xml:space="preserve">
<value>Import JSON</value> <value>Import JSON</value>
</data> </data>
<data name="Common.LocateLogFile" xml:space="preserve"> <data name="Common.OpenLogFile" xml:space="preserve">
<value>Locate log file</value> <value>Open log file</value>
</data> </data>
<data name="Common.Miscellaneous" xml:space="preserve"> <data name="Common.Miscellaneous" xml:space="preserve">
<value>Miscellaneous</value> <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"> <data name="ContextMenu.CopyDeeplinkInvite" xml:space="preserve">
<value>Copy invite deeplink</value> <value>Copy invite deeplink</value>
</data> </data>
<data name="ContextMenu.OpenLogFile" xml:space="preserve">
<value>Open log file</value>
</data>
<data name="ContextMenu.SeeServerDetails" xml:space="preserve"> <data name="ContextMenu.SeeServerDetails" xml:space="preserve">
<value>See server details</value> <value>See server details</value>
</data> </data>

View File

@ -81,7 +81,7 @@
<ColumnDefinition Width="*" /> <ColumnDefinition Width="*" />
</Grid.ColumnDefinitions> </Grid.ColumnDefinitions>
<ui:SymbolIcon Grid.Column="0" Symbol="DocumentCatchUp20"/> <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> </Grid>
</MenuItem.Header> </MenuItem.Header>
</MenuItem> </MenuItem>

View File

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

View File

@ -28,10 +28,10 @@ namespace Bloxstrap.UI.Elements.Dialogs
string wikiUrl = $"{repoUrl}/wiki"; string wikiUrl = $"{repoUrl}/wiki";
string issueUrl = String.Format( 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, repoUrl,
HttpUtility.UrlEncode($"[BUG] {exception.GetType()}: {exception.Message}"), 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); string helpMessage = String.Format(Strings.Dialog_Exception_Info_2, wikiUrl, issueUrl);
@ -43,8 +43,8 @@ namespace Bloxstrap.UI.Elements.Dialogs
LocateLogFileButton.Click += delegate LocateLogFileButton.Click += delegate
{ {
if (App.Logger.Initialized) if (App.Logger.Initialized && !String.IsNullOrEmpty(App.Logger.FileLocation))
Process.Start("explorer.exe", $"/select,\"{App.Logger.FileLocation}\""); Utilities.ShellExecute(App.Logger.FileLocation);
else else
Clipboard.SetDataObject(String.Join("\r\n", App.Logger.History)); Clipboard.SetDataObject(String.Join("\r\n", App.Logger.History));
}; };