Added an introduction and an onboarding chat to the BeyondFacts Lab (#1178)

This commit is contained in:
Thorsten Sommer authored and GitHub committed 2026-11-09 12:42:59 +01:00
1 parent 79e0c80031
commit 22d94eb8fd
35 files changed
+1377 -361

No files matched your search

@@ -50,6 +50,11 @@ public partial class BeyondFactsLabAssistant : MSGComponentBase
/// </summary>
private bool scrollToActiveStep;
/// <summary>
/// Whether the area which tells how to work with the lab is open.
/// </summary>
private bool introductionExpanded;
/// <inheritdoc />
protected override async Task OnInitializedAsync()
{
@@ -63,6 +68,9 @@ public partial class BeyondFactsLabAssistant : MSGComponentBase
this.ApplyFilters([], [Event.CONFIGURATION_CHANGED]);
this.mayOpen = true;
await this.RunStoreActionAsync(() => this.ReloadProjectsAsync(null));
// Whoever has no preparation yet needs to know how the lab works first:
this.introductionExpanded = this.projects.Count is 0;
}
/// <inheritdoc />
@@ -119,5 +127,15 @@ public partial class BeyondFactsLabAssistant : MSGComponentBase
await base.ProcessIncomingMessage(sendingComponent, triggeredEvent, data);
}
/// <summary>
/// Remembers whether the person opened or closed the area which tells how to work with the lab.
/// </summary>
/// <param name="isExpanded">Whether the area is open now.</param>
private Task IntroductionExpandedChanged(bool isExpanded)
{
this.introductionExpanded = isExpanded;
return Task.CompletedTask;
}
private async Task OpenSettingsDialogAsync() => await this.DialogService.ShowAsync<SettingsDialogBeyondFactsLab>(null, new DialogParameters(), DialogOptions.FULLSCREEN);
}