Call the thing a model where the user picks one to get a job done

This commit is contained in:
Thorsten Sommer committed 2026-09-19 21:22:25 +02:00
1 parent 5b5f74cc0c
commit a50981754f
7 files changed
+53 -33

No files matched your search

@@ -3,7 +3,7 @@
@{
var availableProviderItems = this.GetAvailableProviderSelectionItems().ToList();
}
<MudSelect T="Provider" Value="@this.ProviderSettings" ValueChanged="@this.SelectionChanged" Validation="@this.ValidateProvider" Margin="Margin.Dense" Label="@T("Provider")" Class="mb-3 rounded-lg" OuterClass="flex-grow-0" Variant="Variant.Outlined" Disabled="@this.Disabled">
<MudSelect T="Provider" Value="@this.ProviderSettings" ValueChanged="@this.SelectionChanged" Validation="@this.ValidateProvider" Margin="Margin.Dense" Label="@(this.Label ?? T("Provider"))" Class="mb-3 rounded-lg" OuterClass="flex-grow-0" Variant="Variant.Outlined" Disabled="@this.Disabled">
@foreach (var providerItem in availableProviderItems)
{
<MudSelectItem Value="@providerItem.Provider">
@@ -19,6 +19,17 @@ public partial class ProviderSelection : MSGComponentBase
[Parameter]
public Func<AIStudio.Settings.Provider, string?> ValidateProvider { get; set; } = _ => null;
/// <summary>
/// What this place calls the thing being picked, when "Provider" is not the word it uses.
/// </summary>
/// <remarks>
/// Some places have the user pick a provider in order to set it up, and there the word is right.
/// Others have them pick one to get a job done, and speak of the model throughout. A field
/// labelled "Provider" in the middle of such a text reads like a second, different choice.
/// </remarks>
[Parameter]
public string? Label { get; set; }
/// <summary>
/// Gets or sets whether provider selection is disabled.
/// </summary>