CatStation/Content.Shared/FeedbackSystem/FeedbackPopupPrototype.cs
Julian Giebel bcd3612730
Add feedback popups (#41352)
* Commit

* add the form post

* dv

* fixes

* Change wording

* Address review

* wording change

* Added some stuff

* New format

* bruh

* thanks perry!

* yes

* More fixes!

* typo

* Add a command to show the list, improve the UI slightly, split up command names

* Fix UI controller

* Add better comment

* Get rid of weird recursive thing

* Cleanup

* Work on moving feedback popups out of simulation

* Move round end screen subscription to feedback ui controller

* Finish moving feedback popups out of simulation

* Fix _ as parameter

* Clean up FeedbackPopupUIController

* Clean up commands

* Fix prototype yaml

* Fix openfeedbackpopup command description

* Update Resources/Locale/en-US/feedbackpopup/feedbackpopup.ftl

Co-authored-by: Simon <63975668+Simyon264@users.noreply.github.com>

* Apply suggestions from code review

Co-authored-by: Simon <63975668+Simyon264@users.noreply.github.com>

* Address reviews

* Address reviews

* Fix FeedbackPopupPrototype.cs using empty string instead of string.empty

* Address some more of the reviews, style nano is still trolling sadly

* Fix feedback popup styling

* Fix PopupPrototype ID field not having a setter

* Address reviews

* Add label when no feedback entries are present

Change link button to not show when no link is set

---------

Co-authored-by: beck-thompson <beck314159@hotmail.com>
Co-authored-by: SlamBamActionman <slambamactionman@gmail.com>
Co-authored-by: Simon <63975668+Simyon264@users.noreply.github.com>
2026-01-22 22:19:54 +00:00

56 lines
1.9 KiB
C#

using Robust.Shared.Prototypes;
namespace Content.Shared.FeedbackSystem;
/// <summary>
/// Prototype that describes the contents of a feedback popup.
/// </summary>
[Prototype]
public sealed partial class FeedbackPopupPrototype : IPrototype
{
/// <inheritdoc/>
[IdDataField]
public string ID { get; private set; } = null!;
/// <summary>
/// What server the popup is from, you must edit the ccvar to include this for the popup to appear!
/// </summary>
[DataField(required: true)]
public string PopupOrigin = string.Empty;
/// <summary>
/// Title of the popup. This supports rich text so you can use colors and stuff.
/// </summary>
[DataField(required: true)]
public string Title = string.Empty;
/// <summary>
/// List of "paragraphs" that are placed in the middle of the popup. Put any relevant information about what to give
/// feedback on here! [bold]Rich text is allowed[/bold]
/// </summary>
[DataField(required: true)]
public string Description = string.Empty;
/// <summary>
/// The kind of response the player should expect to give; good examples are "Survey", "Discord Channel", "Feedback Thread" etc.
/// Will be listed near the "Open Link" button; rich text is not allowed.
/// </summary>
[DataField]
public string? ResponseType;
/// <summary>
/// A link leading to where you want players to give feedback. Discord channel, form etc...
/// </summary>
[DataField]
public string? ResponseLink;
/// <summary>
/// Should this feedback be shown when the round ends.
/// </summary>
/// <remarks>
/// If this is false popups have to be shown to players by running the <pre>feedback:add</pre> command.<br />
/// This allows admins to show popups to only specific people.
/// </remarks>
[DataField]
public bool ShowRoundEnd = true;
}