Skip to content

Commit 933fdf7

Browse files
authored
Minor style improvements (#5678)
* Minor style improvements * Update * Update * Update
1 parent 6d23f88 commit 933fdf7

File tree

3 files changed

+17
-6
lines changed

3 files changed

+17
-6
lines changed

src/Aspire.Dashboard/Components/Pages/TraceDetail.razor

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -166,10 +166,14 @@
166166
<div class="tick" style="grid-column: 3;"></div>
167167
<span class="tick-label" style="grid-column: 3;">@DurationFormatter.FormatDuration(trace.Duration / 4 * 2)</span>
168168

169+
@* Grid column 4 shows two labels. Hide the left aligned label on mobile to avoid them overlapping *@
169170
<div class="tick" style="grid-column: 4;"></div>
170-
<span class="tick-label" style="grid-column: 4;">@DurationFormatter.FormatDuration(trace.Duration / 4 * 3)</span>
171+
@if (_manager.ViewportInformation.IsDesktop)
172+
{
173+
<span class="tick-label" style="grid-column: 4;">@DurationFormatter.FormatDuration(trace.Duration / 4 * 3)</span>
174+
}
171175

172-
<span class="tick-label end-tick hidden-on-mobile" style="grid-column: 4;">@DurationFormatter.FormatDuration(trace.Duration)</span>
176+
<span class="tick-label end-tick" style="grid-column: 4;">@DurationFormatter.FormatDuration(trace.Duration)</span>
173177
<div class="tick" style="grid-column: 5;"></div>
174178
</div>
175179
</HeaderCellItemTemplate>

src/Aspire.Dashboard/Components/Resize/GridColumnManager.cs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,8 @@ public class GridColumnManager : ComponentBase, IDisposable
2323
[Parameter]
2424
public RenderFragment? ChildContent { get; set; }
2525

26+
public ViewportInformation ViewportInformation => _gridViewportInformation ?? DimensionManager.ViewportInformation;
27+
2628
protected override void OnInitialized()
2729
{
2830
DimensionManager.OnViewportSizeChanged += OnViewportSizeChanged;

src/Aspire.Dashboard/wwwroot/css/app.css

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,15 @@ fluent-toolbar[orientation=horizontal] {
1414
width: 100%;
1515
}
1616

17+
fluent-toolbar::part(positioning-region) {
18+
row-gap: calc(var(--design-unit) * 1.5px);
19+
}
20+
21+
fluent-toolbar::part(end) {
22+
flex-wrap: wrap;
23+
row-gap: calc(var(--design-unit) * 1.5px);
24+
}
25+
1726
/* Hide any web components that haven't been */
1827
:not(:defined),
1928
.before-upgrade {
@@ -620,7 +629,3 @@ fluent-data-grid-cell.no-ellipsis {
620629
.layout fluent-toolbar > .fluent-input-label {
621630
margin-bottom: 0;
622631
}
623-
624-
.page-content-container fluent-toolbar::part(end) {
625-
flex-wrap: wrap;
626-
}

0 commit comments

Comments
 (0)