Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
58 commits
Select commit Hold shift + click to select a range
ceadb62
Temporarily add nuget.org feed
May 6, 2024
1aafbe6
Refactor current layout into DesktopLayout component
May 6, 2024
872e748
wip prototype
May 9, 2024
8ff306b
Merge branch 'refs/heads/main' into feature/mobile-navigation-layout
May 20, 2024
f03d884
add mobile nav menu
May 21, 2024
427a3b8
add rest of nav menu to mobile, increase reconnection modal size on m…
May 21, 2024
fe7b327
Add common page layout, use it for Resources
May 21, 2024
b99bfa3
Convert Console Logs toolbar
May 21, 2024
caf0203
Use new layout for structured logs
May 22, 2024
82f73a3
fix scroll bars, place toolbar on mobile within footer
May 22, 2024
cfaed4b
Rename page sections, make title section more generic, do trace detai…
May 22, 2024
7f33bd1
use new layout for metrics page
May 22, 2024
c7363b0
Merge branch 'refs/heads/main' into feature/mobile-navigation-layout
May 22, 2024
7d24ec5
Add context parameter to details views, make them full page height on…
May 22, 2024
1ec9602
wip custom browser resize logic
May 23, 2024
047fd78
Get initial viewport parameters for render (do not use scoped js beca…
May 23, 2024
21bf76a
fix nested h1, increase mobile toolbar button size, add resize listener
May 23, 2024
4d71eb6
clean up views
May 23, 2024
699a9b9
remove extra class
May 23, 2024
2ce07f0
remove redundant code, clean up
May 23, 2024
a555a12
remove redundant code, add a few comments
May 23, 2024
7d3bbdf
fix accidental logic bug
May 23, 2024
5707fff
Increase mobile toolbar height, make entire page scrollable at very l…
May 28, 2024
29c5bb4
Add translation, comment
May 28, 2024
6d54c04
move comment
May 28, 2024
4be7ed8
remove redundant if
May 28, 2024
8174a54
Move toolbar mobile button to top
May 29, 2024
c59c0ac
remove padding bottom for page header on mobile
May 29, 2024
4a87ab3
some requested changes
Jun 11, 2024
f7e35c8
try to avoid closing dialog on mobile if a toolbar setting has been c…
Jun 12, 2024
173df8d
Persist filter into URL, as well as visible types for resources.
adamint Jun 12, 2024
67430f0
Remove unnecessary button on detail view, invoke listeners after filt…
adamint Jun 13, 2024
a5845f0
Move MobileLayout and DesktopLayout logic into MainLayout so that pag…
adamint Jun 13, 2024
84802f6
Open aspire repo link in new tab on mobile navigation
adamint Jun 13, 2024
c1122f9
Add divs around page content layout to fix scoped css not being applied
adamint Jun 13, 2024
bb2b06c
fix extra div not taking up total height
adamint Jun 14, 2024
60e420e
fix metric scrollbar, change debounced resize event to throttled
adamint Jun 14, 2024
c8d06e2
Fix scrollbar erroneously appearing on console logs
Jun 14, 2024
6dfd531
Consolidate two selects into one
Jun 18, 2024
ce7f7eb
Refactor mobile nav menu to its own component, rename desktop nav men…
Jun 18, 2024
cade93f
Show icon as active in mobile navigation menu for the current page
Jun 18, 2024
1d8fc56
Close mobile filter/nav menus when changing to desktop layout
Jun 25, 2024
44fadbd
Use --accent-foreground-active for active page in mobile nav
Jun 25, 2024
387824b
Make detail view close button background transparent in mobile
Jun 25, 2024
3930ab2
hide duration progress circle on traces mobile
Jun 26, 2024
b6437b5
fix continuous scroll on traces/console logs/structured logs
Jun 26, 2024
677991a
add console log application to mobile toolbar
Jun 26, 2024
f14ae9c
re-add mobile filter footer button
Jun 26, 2024
7b6d725
Merge branch 'refs/heads/main' into feature/mobile-navigation-layout
Jun 28, 2024
f4ca506
fix incorrect merge conflicts
Jun 28, 2024
a6f3e9a
Merge branch 'refs/heads/main' into feature/mobile-navigation-layout
Jul 10, 2024
fe400f1
Avoid invoking redundant SetStateAndNavigateAsync calls, cleanup
Jul 10, 2024
1829ec0
fix chart/table state being lost on layout change
Jul 10, 2024
309500c
fix toolbar with newline appearance on mobile
Jul 10, 2024
e0498a7
Merge branch 'refs/heads/main' into feature/mobile-navigation-layout
Jul 15, 2024
aa2bc84
add file headers, fix merge
Jul 15, 2024
5ba86a9
fix console logs not updating after layout change
Jul 15, 2024
60f7ec2
Merge branch 'refs/heads/main' into feature/mobile-navigation-layout
Jul 16, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
wip custom browser resize logic
  • Loading branch information
Adam Ratzman committed May 23, 2024
commit 1ec9602bdd0fa3704ca049752dd89f756cb899f0
1 change: 0 additions & 1 deletion Directory.Packages.props
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,6 @@
<PackageVersion Include="Microsoft.Extensions.Http.Resilience" Version="$(MicrosoftExtensionsHttpResiliencePackageVersion)" />
<PackageVersion Include="Microsoft.Extensions.TimeProvider.Testing" Version="$(MicrosoftExtensionsTimeProviderTestingVersion)" />
<!-- external dependencies -->
<PackageVersion Include="BlazorPro.BlazorSize" Version="8.0.0" />
<PackageVersion Include="Confluent.Kafka" Version="2.4.0" />
<PackageVersion Include="Dapper" Version="2.1.37" />
<PackageVersion Include="DnsClient" Version="1.7.0" />
Expand Down
1 change: 0 additions & 1 deletion src/Aspire.Dashboard/Aspire.Dashboard.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,6 @@
<PackageReference Include="Microsoft.AspNetCore.Authentication.OpenIdConnect" />
<PackageReference Include="Microsoft.FluentUI.AspNetCore.Components" />
<PackageReference Include="Microsoft.FluentUI.AspNetCore.Components.Icons" />
<PackageReference Include="BlazorPro.BlazorSize" />
</ItemGroup>

<ItemGroup>
Expand Down
1 change: 0 additions & 1 deletion src/Aspire.Dashboard/Components/Layout/MainLayout.razor.cs
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
using Aspire.Dashboard.Configuration;
using Aspire.Dashboard.Model;
using Aspire.Dashboard.Utils;
using BlazorPro.BlazorSize;
using Microsoft.AspNetCore.Components;
using Microsoft.Extensions.Localization;
using Microsoft.Extensions.Options;
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
<h3>BrowserDimensionWatcher</h3>

@code {

}
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
using Aspire.Dashboard.Model;
using Aspire.Dashboard.Utils;
using Microsoft.AspNetCore.Components;
using Microsoft.JSInterop;

namespace Aspire.Dashboard.Components.Resize;

public partial class BrowserDimensionWatcher : ComponentBase, IAsyncDisposable
{
private IJSObjectReference? _jsModule;
public event BrowserResizedEventHandler? OnBrowserResize;

[Inject]
public required IJSRuntime JS { get; init; }

protected override async Task OnAfterRenderAsync(bool firstRender)
{
if (firstRender)
{
_jsModule = await JS.InvokeAsync<IJSObjectReference>("import", "/Components/Resize/BrowserDimensionWatcher.razor.js");
var viewport = await _jsModule.InvokeAsync<ViewportSize>("getWindowDimensions");
OnBrowserResize?.Invoke(this, new BrowserResizeEventArgs(GetViewportInformation(viewport)));
}

await base.OnAfterRenderAsync(firstRender);
}

public async ValueTask DisposeAsync()
{
if (_jsModule != null)
{
await JSInteropHelpers.SafeDisposeAsync(_jsModule);
}
}

private static ViewportInformation GetViewportInformation(ViewportSize viewportSize)
{
var isSmall = viewportSize.Width < 768;
return new ViewportInformation(!isSmall, viewportSize.Height, viewportSize.Width);
}

public delegate void BrowserResizedEventHandler(object sender, BrowserResizeEventArgs e);

private record ViewportSize(int Width, int Height);
}

Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
export function getWindowDimensions() {
return {
width: window.innerWidth,
height: window.innerHeight
}
}
11 changes: 11 additions & 0 deletions src/Aspire.Dashboard/Components/Resize/BrowserResizeEventArgs.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
// Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.

using Aspire.Dashboard.Model;

namespace Aspire.Dashboard.Components.Resize;

public class BrowserResizeEventArgs(ViewportInformation viewportInformation) : EventArgs
{
public ViewportInformation ViewportInformation { get; } = viewportInformation;
}
1 change: 0 additions & 1 deletion src/Aspire.Dashboard/Components/_Imports.razor
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@
@using Aspire.Dashboard.Components.Controls
@using Aspire.Dashboard.Components.Layout
@using Microsoft.Extensions.Localization
@using BlazorPro.BlazorSize

@* Require authorization for all pages of the web app *@
@attribute [Authorize(Policy = FrontendAuthorizationDefaults.PolicyName)]
4 changes: 0 additions & 4 deletions src/Aspire.Dashboard/DashboardWebApplication.cs
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@
using Aspire.Dashboard.Otlp.Grpc;
using Aspire.Dashboard.Otlp.Storage;
using Aspire.Hosting;
using BlazorPro.BlazorSize;
using Microsoft.AspNetCore.Authentication.Certificate;
using Microsoft.AspNetCore.Authentication.Cookies;
using Microsoft.AspNetCore.Authentication.OpenIdConnect;
Expand Down Expand Up @@ -153,9 +152,6 @@ public DashboardWebApplication(Action<WebApplicationBuilder>? configureBuilder =

builder.Services.AddLocalization();

builder.Services.AddMediaQueryService();
builder.Services.AddResizeListener();

_app = builder.Build();

_dashboardOptionsMonitor = _app.Services.GetRequiredService<IOptionsMonitor<DashboardOptions>>();
Expand Down