Skip to content

Commit

Permalink
Minor style improvements (#5678)
Browse files Browse the repository at this point in the history
* Minor style improvements

* Update

* Update

* Update
  • Loading branch information
JamesNK authored Sep 11, 2024
1 parent 6d23f88 commit 933fdf7
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 6 deletions.
8 changes: 6 additions & 2 deletions src/Aspire.Dashboard/Components/Pages/TraceDetail.razor
Original file line number Diff line number Diff line change
Expand Up @@ -166,10 +166,14 @@
<div class="tick" style="grid-column: 3;"></div>
<span class="tick-label" style="grid-column: 3;">@DurationFormatter.FormatDuration(trace.Duration / 4 * 2)</span>

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

<span class="tick-label end-tick hidden-on-mobile" style="grid-column: 4;">@DurationFormatter.FormatDuration(trace.Duration)</span>
<span class="tick-label end-tick" style="grid-column: 4;">@DurationFormatter.FormatDuration(trace.Duration)</span>
<div class="tick" style="grid-column: 5;"></div>
</div>
</HeaderCellItemTemplate>
Expand Down
2 changes: 2 additions & 0 deletions src/Aspire.Dashboard/Components/Resize/GridColumnManager.cs
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,8 @@ public class GridColumnManager : ComponentBase, IDisposable
[Parameter]
public RenderFragment? ChildContent { get; set; }

public ViewportInformation ViewportInformation => _gridViewportInformation ?? DimensionManager.ViewportInformation;

protected override void OnInitialized()
{
DimensionManager.OnViewportSizeChanged += OnViewportSizeChanged;
Expand Down
13 changes: 9 additions & 4 deletions src/Aspire.Dashboard/wwwroot/css/app.css
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,15 @@ fluent-toolbar[orientation=horizontal] {
width: 100%;
}

fluent-toolbar::part(positioning-region) {
row-gap: calc(var(--design-unit) * 1.5px);
}

fluent-toolbar::part(end) {
flex-wrap: wrap;
row-gap: calc(var(--design-unit) * 1.5px);
}

/* Hide any web components that haven't been */
:not(:defined),
.before-upgrade {
Expand Down Expand Up @@ -620,7 +629,3 @@ fluent-data-grid-cell.no-ellipsis {
.layout fluent-toolbar > .fluent-input-label {
margin-bottom: 0;
}

.page-content-container fluent-toolbar::part(end) {
flex-wrap: wrap;
}

0 comments on commit 933fdf7

Please sign in to comment.