31 references to ResourceListDensity
Aspire.Dashboard (12)
Components\Controls\ApplicationSummary.razor.cs (2)
164ResourceListDensity.Spacious => "resource-card-grid-spacious", 165ResourceListDensity.Compact => "resource-card-grid-compact",
Components\Dialogs\SettingsDialog.razor.cs (4)
28private IReadOnlyList<IconToggleOption<ResourceListDensity>> _densityOptions = []; 91new(ResourceListDensity.Spacious, new Icons.Regular.Size20.TextBulletListLtr(), Loc[nameof(Dashboard.Resources.Dialogs.SettingsDialogResourceListDensitySpacious)]), 92new(ResourceListDensity.Comfortable, new Icons.Regular.Size20.AppsListDetail(), Loc[nameof(Dashboard.Resources.Dialogs.SettingsDialogResourceListDensityComfortable)]), 93new(ResourceListDensity.Compact, new Icons.Regular.Size20.AppsList(), Loc[nameof(Dashboard.Resources.Dialogs.SettingsDialogResourceListDensityCompact)]),
Components\Layout\ResourcesLayout.razor.cs (2)
1303private bool IsCompact => ViewPreferences.Density == ResourceListDensity.Compact; 1304private bool IsSpacious => ViewPreferences.Density == ResourceListDensity.Spacious;
Model\DashboardViewPreferences.cs (4)
86public ResourceListDensity Density { get; private set; } 121public async Task SetDensityAsync(ResourceListDensity density) 162var density = await ReadAsync<ResourceListDensity>(BrowserStorageKeys.ResourceListDensity).ConfigureAwait(false);
Aspire.Dashboard.Components.Tests (19)
Controls\ApplicationSummaryTests.cs (2)
96await cut.InvokeAsync(() => preferences.SetDensityAsync(ResourceListDensity.Compact)); 99await cut.InvokeAsync(() => preferences.SetDensityAsync(ResourceListDensity.Spacious));
Dialogs\SettingsDialogTests.cs (1)
79Assert.Equal(ResourceListDensity.Comfortable, preferences.Density);
Layout\ResourcesLayoutTests.cs (16)
395await cut.InvokeAsync(() => Services.GetRequiredService<DashboardViewPreferences>().SetDensityAsync(ResourceListDensity.Compact)); 569[InlineData(true, ResourceListDensity.Comfortable)] 570[InlineData(true, ResourceListDensity.Compact)] 571[InlineData(true, ResourceListDensity.Spacious)] 572[InlineData(false, ResourceListDensity.Comfortable)] 573public async Task RowTerminal_SelectsOnlyItsResourceAndPreservesViewState(bool desktop, ResourceListDensity density) 1057[InlineData("Persistent", ResourceListDensity.Comfortable, "Container (persistent)")] 1058[InlineData("Persistent", ResourceListDensity.Compact, "Container (persistent)")] 1059[InlineData("Persistent", ResourceListDensity.Spacious, "Container (persistent)")] 1060[InlineData("Session", ResourceListDensity.Comfortable, "Container")] 1061[InlineData("Session", ResourceListDensity.Compact, "Container")] 1062[InlineData("Session", ResourceListDensity.Spacious, "Container")] 1063[InlineData(null, ResourceListDensity.Comfortable, "Container")] 1064[InlineData(null, ResourceListDensity.Compact, "Container")] 1065[InlineData(null, ResourceListDensity.Spacious, "Container")] 1066public async Task AppHost_ContainerLifetimeQualifiesTypeAndBadgesResourceGlyph(string? lifetime, ResourceListDensity density, string expectedType)