Added research on the web to the BeyondFacts Lab (#1186)

This commit is contained in:
Thorsten Sommer authored and GitHub committed 2026-11-10 18:17:44 +01:00
1 parent e5c0931a60
commit 9a676101f7
66 files changed
+3609 -70

No files matched your search

@@ -43,6 +43,34 @@ public partial class BflStepForm : MSGComponentBase
private bool HasKeyDetails => this.Fields.Any(definition => definition.IsKeyDetail);
/// <summary>
/// The symbol which marks a field whose value the research of the lab receives.
/// </summary>
private const string PUBLIC_DETAIL_ICON = Icons.Material.Filled.TravelExplore;
/// <summary>
/// Gets whether the step has fields whose values the research receives, so that the form explains their symbol.
/// </summary>
private bool HasPublicDetails => this.Fields.Any(definition => definition.IsSharedWithResearch);
/// <summary>
/// Gets whether the form holds the event details and says that the event is not public, so that no detail reaches
/// the research, see BflEventVisibility.
/// </summary>
private bool IsEventNotPublic => this.Step is BflStep.FRAMEWORK && BflEventVisibility.IsNotPublic(this.Form);
/// <summary>
/// Gets what a screen reader announces for the symbol of a public detail.
/// </summary>
private string PublicDetailLabel => T("Public detail: the research of the lab receives it");
/// <summary>
/// Gets where a field shows the symbol of a public detail: at its end, or nowhere when the research never receives
/// its value.
/// </summary>
/// <param name="field">The field.</param>
private static Adornment AdornmentOf(BflFieldDefinition field) => field.IsSharedWithResearch ? Adornment.End : Adornment.None;
private static string LabelOf(BflFieldDefinition field) => field.IsKeyDetail ? $"{field.Label} *" : field.Label;
private async Task SetValueAsync(BflFieldDefinition field, string? value)