-
Notifications
You must be signed in to change notification settings - Fork 739
Improve summary details view / toolbars / navbar experience on desktop for low-vision users, as well as mobile users #4245
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Improve summary details view / toolbars / navbar experience on desktop for low-vision users, as well as mobile users #4245
Conversation
# Conflicts: # Directory.Packages.props # NuGet.config
# Conflicts: # src/Aspire.Dashboard/Components/Pages/Resources.razor
…use it is ~20ms slower)
src/Aspire.Dashboard/Components/Resize/BrowserDimensionWatcher.razor.cs
Outdated
Show resolved
Hide resolved
src/Aspire.Dashboard/Components/Layout/AspirePageContentLayout.razor.cs
Outdated
Show resolved
Hide resolved
|
Getting close 👍 |
Those are both good ideas. Modifying the metric page is out of scope of this PR, I'll include it in follow-up work on this page. |
# Conflicts: # src/Aspire.Dashboard/Components/Pages/Metrics.razor # src/Aspire.Dashboard/Components/Pages/StructuredLogs.razor.cs # src/Aspire.Dashboard/Components/Pages/Traces.razor.cs
@SteveSandersonMS Hi, Blazor question for you. We're adding two views to Aspire: desktop view and mobile view. Right now, we have page content embedded in each view, which means switching view, causes by the browser window resizing, loses the current page content state. To work around this, we have to store the state somewhere externally and pass it to the page content when it's re-initialized in the new view. Is there a way to "move" a Blazor component? We want to remove it from one place (the old view) and add it to the other place (the new view). |
|
@JamesNK As much as possible, the web-native way to do this is with CSS - a combination of media queries and flex/grid makes it possible to have a single markup representation for very different-looking layouts on different form factors. From the animated GIFs above it looks to me like CSS would comfortably handle this (and would be a lot less code to deal with) but perhaps I'm missing something. If you must have two physically separate components for the two cases, then you're already doing the right thing of keeping the state external. There isn't a way to move a Blazor component from one parent to another (many parts of the developer programming model, and the framework internals, assume a lifecycle in which components are attached to the hierarchy one time only). |
It is notable that this is a Blazor-specific problem, where there is no facility to avoid disposing/re-creating the main "Body" component of a page when the |
# Conflicts: # src/Aspire.Dashboard/Components/Controls/Chart/ChartContainer.razor # src/Aspire.Dashboard/Components/Controls/Chart/MetricTable.razor.cs # src/Aspire.Dashboard/Components/Pages/Metrics.razor # src/Aspire.Dashboard/Components/Pages/TraceDetail.razor
|
@JamesNK I fixed the issue of console logs not updating after layout. I don't think there were any other requested changes |
Can you point to a doc showing what you mean exactly? Normally "responsive" within the context of front-end web apps refers to CSS functionality that does work equally with Blazor. I don't know whether reparenting is really supported in React - an initial search suggests it's not a native feature as of a few years ago, and I didn't see any clear indication this has changed. But perhaps I'm missing something. Blazor's nonsupport for reparenting is an intentional design choice, not a bug :) |
Yeah, I have a feeling that the right CSS might have gotten a lot of the way there. But this PR is pretty far advanced, and I don't think we should restart it. And server control over HTML does give ultimate control compared to CSS. In the future we could look at whether |
Something is wrong with console line numbers. Every time I refresh the page, it increases by about 1000. And when switching to other resources, their logs also start from a number that is way too high instead of 1. |
Good catch but this is an issue on main, not just this branch. I'll file separately, but the incorrect line numbers originate outside of dashboard frontend, from outside the DashboardClient ^ doesn't start from 0 ( |
|
never mind, it's been filed already in #4893 - should be routed to AppHost |
# Conflicts: # src/Aspire.Dashboard/Components/Pages/StructuredLogs.razor.cs # src/Aspire.Dashboard/Components/Pages/Traces.razor.cs




Makes page layout / toolbars / detail views accessible to users with low viewport widths and heights (including mobile and desktop low-vision users, both of which I'll refer to as mobile), but does not yet make individual pages accessible.
This is done by
Screen.Recording.2024-05-28.at.12.15.12.PM.mov
Handle browser resizes (and block until we can initially size the viewport) with BrowserDimensionWatcher.razor.cs
Making toolbars appear as buttons at the bottom of the screen for mobile users
Microsoft Reviewers: Open in CodeFlow