Skip to content

Commit e457b44

Browse files
authored
feat: user feedback (#136)
1 parent 37926e1 commit e457b44

22 files changed

Lines changed: 685 additions & 17 deletions

Content/UI/W_BugSplatDemo.uasset

5.51 KB
Binary file not shown.

README.md

Lines changed: 86 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -305,6 +305,92 @@ If everything is configured correctly, you should see something that resembles t
305305

306306
<img width="3456" height="1996" alt="image" src="https://github.com/user-attachments/assets/53a6acd8-8a3f-4355-bddf-02023af17660" />
307307

308+
## 💬 User Feedback
309+
310+
BugSplat includes a built-in user feedback dialog that lets players submit feedback directly from your game. Feedback reports appear alongside crash reports on the [Crashes](https://app.bugsplat.com/v2/crashes) page, tagged with a `[User Feedback]` prefix.
311+
312+
### Built-in Feedback Dialog
313+
314+
The plugin provides a ready-to-use feedback dialog with subject and description fields. To add it to your game:
315+
316+
1. Open any Widget Blueprint (e.g., your HUD or main menu).
317+
2. Add a **Button** widget and position it where you'd like the feedback trigger to appear.
318+
3. In the button's **Events** section, click the **+** next to **On Clicked**.
319+
4. In the Event Graph, search for **Show Feedback Dialog** (under the BugSplat category) and connect it to the On Clicked event.
320+
321+
When a player clicks the button, a modal dialog appears with:
322+
323+
- **Subject** (required) — a single-line text field for a brief summary
324+
- **Description** (optional) — a multi-line text area for additional details
325+
- **Include application logs** (checkbox, on by default) — attaches the Unreal Engine log file to the feedback report
326+
327+
After submitting, a confirmation message is displayed briefly before the dialog closes automatically. The feedback is posted to your BugSplat database using the Database, Application, and Version values from your plugin settings.
328+
329+
The built-in dialog also automatically includes crash context attributes (engine version, platform, CPU, GPU, memory stats, OS info, etc.) with each submission.
330+
331+
You can also open the dialog from C++:
332+
333+
```cpp
334+
#include "BugSplatFeedbackDialog.h"
335+
336+
SBugSplatFeedbackDialog::Show();
337+
```
338+
339+
### Custom Feedback Dialog
340+
341+
If you'd prefer to build your own feedback UI, you can call `UBugSplatFeedback::PostFeedback` directly from Blueprint or C++. It handles the HTTP submission, crash context attributes, and file attachments for you — just provide a title, optional description, and optional file paths:
342+
343+
```cpp
344+
#include "BugSplatFeedback.h"
345+
346+
// Submit feedback with the Unreal log attached
347+
TArray<FString> Attachments;
348+
Attachments.Add(UBugSplatFeedback::GetLogFilePath());
349+
UBugSplatFeedback::PostFeedback(TEXT("My feedback title"), TEXT("Details here"), Attachments);
350+
```
351+
352+
For C++ callers that need to handle success or failure, use `PostFeedbackWithCallback`:
353+
354+
```cpp
355+
#include "BugSplatFeedback.h"
356+
357+
UBugSplatFeedback::PostFeedbackWithCallback(
358+
TEXT("My feedback title"), TEXT("Details here"), Attachments,
359+
TEXT(""), TEXT(""), TEXT(""), TMap<FString, FString>(),
360+
FBugSplatFeedbackComplete::CreateLambda([](bool bSuccess, int32 HttpStatusCode)
361+
{
362+
if (bSuccess)
363+
{
364+
// Show success in your UI
365+
}
366+
else
367+
{
368+
// Show error in your UI
369+
}
370+
})
371+
);
372+
```
373+
374+
See [`BugSplatFeedback.h`](Source/BugSplatRuntime/Public/BugSplatFeedback.h) for the full API and [`BugSplatFeedback.cpp`](Source/BugSplatRuntime/Private/BugSplatFeedback.cpp) for the implementation. The built-in dialog in [`BugSplatFeedbackDialog.cpp`](Source/BugSplatRuntime/Private/BugSplatFeedbackDialog.cpp) serves as a reference for how to wire up your own UI.
375+
376+
#### Feedback API Reference
377+
378+
`PostFeedback` posts a `multipart/form-data` request to `https://{database}.bugsplat.com/post/feedback/` with the following fields:
379+
380+
| Field | Required | Description |
381+
|-------|----------|-------------|
382+
| `database` | Yes | Your BugSplat database name (from plugin settings) |
383+
| `appName` | Yes | Application name (from plugin settings) |
384+
| `appVersion` | Yes | Application version (from plugin settings) |
385+
| `title` | Yes | Brief summary of the feedback |
386+
| `description` | No | Additional details |
387+
| `attributes` | No | JSON string of crash context metadata (included automatically) |
388+
| `user` | No | Username of the person submitting feedback |
389+
| `email` | No | Email of the person submitting feedback |
390+
| `appKey` | No | Application key |
391+
392+
File attachments can be included as additional multipart file fields. Pass absolute file paths via the `Attachments` parameter.
393+
308394
## 🧑‍💻 Contributing
309395

310396
BugSplat ❤️s open source! If you feel that this package can be improved, please open an [Issue](https://github.com/BugSplat-Git/bugsplat-unreal/issues). If you have an awesome new feature you'd like to implement, we'd love to merge your [Pull Request](https://github.com/BugSplat-Git/bugsplat-unreal/pulls). You can also send us an [email](mailto:support@bugsplat.com), join us on [Discord](https://discord.gg/K4KjjRV5ve), or message us via the in-app chat on [bugsplat.com](https://bugsplat.com).

Source/BugSplat/BugSplat.Build.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// Copyright 2023 BugSplat. All Rights Reserved.
1+
// Copyright BugSplat. All Rights Reserved.
22

33
using UnrealBuildTool;
44

Source/BugSplat/Private/BugSplat.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// Copyright 2023 BugSplat. All Rights Reserved.
1+
// Copyright BugSplat. All Rights Reserved.
22

33
#include "BugSplat.h"
44
#include "BugSplatCrashReportClient.h"

Source/BugSplat/Private/BugSplatCrashReportClient.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// Copyright 2023 BugSplat. All Rights Reserved.
1+
// Copyright BugSplat. All Rights Reserved.
22

33
#include "BugSplatCrashReportClient.h"
44
#include <Developer/DesktopPlatform/Public/DesktopPlatformModule.h>

Source/BugSplat/Private/BugSplatEditorSettingsCustomization.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// Copyright 2023 BugSplat. All Rights Reserved.
1+
// Copyright BugSplat. All Rights Reserved.
22

33
#include "BugSplatEditorSettingsCustomization.h"
44
#include "BugSplat.h"

Source/BugSplat/Private/BugSplatSymbols.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// Copyright 2023 BugSplat. All Rights Reserved.
1+
// Copyright BugSplat. All Rights Reserved.
22

33
#include "BugSplatSymbols.h"
44
#include <Developer/DesktopPlatform/Public/DesktopPlatformModule.h>

Source/BugSplat/Public/BugSplat.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// Copyright 2023 BugSplat. All Rights Reserved.
1+
// Copyright BugSplat. All Rights Reserved.
22

33
#pragma once
44

Source/BugSplat/Public/BugSplatCrashReportClient.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// Copyright 2023 BugSplat. All Rights Reserved.
1+
// Copyright BugSplat. All Rights Reserved.
22

33
#pragma once
44

Source/BugSplat/Public/BugSplatEditorSettingsCustomization.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// Copyright 2023 BugSplat. All Rights Reserved.
1+
// Copyright BugSplat. All Rights Reserved.
22

33
#pragma once
44

0 commit comments

Comments
 (0)