Merge branch 'waveform-w1-t3-layout' into dev

This commit is contained in:
daniel-c-harvey
2026-06-05 16:50:09 -04:00
9 changed files with 37 additions and 25 deletions
@@ -22,7 +22,7 @@ else
Stop="@Stop"
Class="transport-zone"/>
<VolumeControls Volume="@Volume" VolumeChanged="@OnVolumeChange"/>
<VolumeZone Volume="@Volume" VolumeChanged="@OnVolumeChange"/>
<PlayerSeekZone DisplayTime="DisplayTime"
Duration="Duration"
@@ -74,7 +74,7 @@
/* Unified responsive player layout.
Wide and narrow shapes are pure CSS — no runtime breakpoint subscription.
Children are targeted by their stable classes (transport-zone, volume-controls,
Children are targeted by their stable classes (transport-zone, volume-zone,
seek-zone) rather than positional nth-child, since all three render a .mud-stack
root and positional selectors would be fragile. */
.player-layout {
@@ -89,12 +89,12 @@
@media (min-width: 600px) {
::deep .transport-zone { order: 1; }
::deep .seek-zone { order: 2; flex-grow: 1; flex-basis: 0; }
::deep .volume-controls { order: 3; }
::deep .volume-zone { order: 3; flex-shrink: 0; }
}
/* Narrow (< 600px): transport + volume on top row, seek full-width below */
@media (max-width: 599.98px) {
::deep .transport-zone { order: 1; }
::deep .volume-controls { order: 2; }
::deep .volume-zone { order: 2; }
::deep .seek-zone { flex-basis: 100%; order: 3; }
}
@@ -1,7 +1,6 @@
@namespace DeepDrftPublic.Client.Controls.AudioPlayerBar
<MudStack Row="false" Spacing="0" Class="@Class">
<SpectrumVisualizer/>
<div class="mx-3"
@onpointerdown="HandlePointerDown"
@onpointerup="HandlePointerUp"
@@ -9,7 +9,7 @@ public partial class SpectrumVisualizer : ComponentBase, IAsyncDisposable
[CascadingParameter] public IStreamingPlayerService? PlayerService { get; set; }
[Parameter] public int BucketCount { get; set; } = 32;
[Parameter] public int BucketCount { get; set; } = 24;
private readonly string _instanceId = Guid.NewGuid().ToString();
private double[] _spectrumData = Array.Empty<double>();
@@ -1,10 +0,0 @@
<MudStack Row="true" AlignItems="AlignItems.Center" Spacing="1" Class="volume-controls">
<MudIcon Icon="@GetVolumeIcon()"/>
<MudSlider T="double"
Min="0"
Max="1"
Step="0.01"
Value="@Volume"
ValueChanged="@VolumeChanged"
Class="volume-slider"/>
</MudStack>
@@ -1,8 +0,0 @@
/* Width caps only — layout/colour come from MudStack + theme */
.volume-controls {
width: 70px;
}
.volume-slider {
width: 50px;
}
@@ -0,0 +1,15 @@
@namespace DeepDrftPublic.Client.Controls.AudioPlayerBar
<MudStack Row="false" AlignItems="AlignItems.Center" Spacing="1" Class="@($"volume-zone {Class}".TrimEnd())">
<SpectrumVisualizer BucketCount="24"/>
<MudStack Row="true" AlignItems="AlignItems.Center" Spacing="1" Class="volume-row">
<MudIcon Icon="@GetVolumeIcon()"/>
<MudSlider T="double"
Min="0"
Max="1"
Step="0.01"
Value="@Volume"
ValueChanged="@VolumeChanged"
Class="volume-slider"/>
</MudStack>
</MudStack>
@@ -3,8 +3,9 @@ using MudBlazor;
namespace DeepDrftPublic.Client.Controls.AudioPlayerBar;
public partial class VolumeControls : ComponentBase
public partial class VolumeZone : ComponentBase
{
[Parameter] public string? Class { get; set; }
[Parameter] public required double Volume { get; set; }
[Parameter] public required EventCallback<double> VolumeChanged { get; set; }
private string GetVolumeIcon()
@@ -0,0 +1,15 @@
/* Width caps only — layout/colour come from MudStack + theme.
The zone stacks the spectrum visualizer above the volume row. Width is sized
so 24 spectrum bars (4px min + 2px gap ≈ 140px) render without clipping under
the container's overflow:hidden, while staying compact. */
.volume-zone {
width: 150px;
}
.volume-row {
width: 100%;
}
.volume-slider {
flex: 1;
}