Public Access
Let the pane headers' paths actually trim
TextTrimming only acts when measure hands the block a finite width, and a horizontal StackPanel never does — it measures every child at infinity and an Auto grid column passes the full answer on. So both SFTP pane headers grew with their path, and a directory deep enough pushed the header's own icon buttons past the window's edge at the session shell's 472-pixel budget. The layout suite has said so on every CI run since v5b landed, and nowhere else: the runner's per-job HOME is a 46-character path, which is what the local pane opens on, and every developer machine's short profile path left the same test green. The path sits alone in the star column now — bounded width, working ellipsis — and the narrowest-budget test pins both panes to sixty-character paths so the question is asked on every machine alike; against the old markup that test fails on Windows too.
This commit is contained in:
@@ -177,16 +177,27 @@
|
|||||||
thing (go to the parent directory), and the pair reading differently is the design's own choice
|
thing (go to the parent directory), and the pair reading differently is the design's own choice
|
||||||
faithfully carried over rather than a functional difference invented to justify it.
|
faithfully carried over rather than a functional difference invented to justify it.
|
||||||
-->
|
-->
|
||||||
|
<!--
|
||||||
|
◆ THE PATH SITS IN THE STAR COLUMN, ALONE, AND THAT PLACEMENT IS LOAD-BEARING.
|
||||||
|
|
||||||
|
TextTrimming only acts when measure hands the block a finite width, and a horizontal StackPanel
|
||||||
|
never does — it measures every child at infinity, takes the full answer, and an Auto grid column
|
||||||
|
passes that on. With the path in a StackPanel beside the label, a directory deep enough — the
|
||||||
|
remote pane meets one on any real host, this pane on any machine whose profile path is long —
|
||||||
|
made the header wider than the pane and pushed the icon buttons past the window's own edge. The
|
||||||
|
layout suite caught it at the 472-pixel session budget, on the one machine whose home directory
|
||||||
|
was long enough to arm it. Star column: bounded width, working ellipsis, buttons that stay.
|
||||||
|
-->
|
||||||
<Border Grid.Row="0" Padding="0,0,0,10" BorderThickness="0">
|
<Border Grid.Row="0" Padding="0,0,0,10" BorderThickness="0">
|
||||||
<Grid ColumnDefinitions="Auto,*,Auto">
|
<Grid ColumnDefinitions="Auto,*,Auto">
|
||||||
<StackPanel Grid.Column="0" Orientation="Horizontal" Spacing="12" VerticalAlignment="Center">
|
<TextBlock Grid.Column="0" Classes="label" FontSize="10" Text="LOCAL"
|
||||||
<TextBlock Classes="label" FontSize="10" Text="LOCAL" VerticalAlignment="Center" />
|
VerticalAlignment="Center" Margin="0,0,12,0" />
|
||||||
<TextBlock Classes="mono" FontSize="13.5" FontWeight="Medium"
|
<TextBlock Grid.Column="1" Classes="mono" FontSize="13.5" FontWeight="Medium"
|
||||||
Foreground="{StaticResource TextDim}" VerticalAlignment="Center"
|
Foreground="{StaticResource TextDim}" VerticalAlignment="Center"
|
||||||
|
HorizontalAlignment="Left"
|
||||||
Text="{Binding LocalPath}" TextTrimming="CharacterEllipsis"
|
Text="{Binding LocalPath}" TextTrimming="CharacterEllipsis"
|
||||||
ToolTip.Tip="{Binding LocalPath}" />
|
ToolTip.Tip="{Binding LocalPath}" />
|
||||||
</StackPanel>
|
<StackPanel Grid.Column="2" Orientation="Horizontal" Spacing="4" Margin="12,0,0,0">
|
||||||
<StackPanel Grid.Column="2" Orientation="Horizontal" Spacing="4">
|
|
||||||
<!--
|
<!--
|
||||||
The drives, because the breadcrumb cannot reach them: above C:\ is a list rather than a
|
The drives, because the breadcrumb cannot reach them: above C:\ is a list rather than a
|
||||||
directory. Without this the pane is stuck on whichever drive the user profile is on. Chips
|
directory. Without this the pane is stuck on whichever drive the user profile is on. Chips
|
||||||
@@ -332,19 +343,26 @@
|
|||||||
UP is arrow_downward here, matching arrow_upward on the local pane above per the design's own two
|
UP is arrow_downward here, matching arrow_upward on the local pane above per the design's own two
|
||||||
distinct glyphs; see that pane's own remark on why the pair differs without the actions differing.
|
distinct glyphs; see that pane's own remark on why the pair differs without the actions differing.
|
||||||
-->
|
-->
|
||||||
|
<!--
|
||||||
|
The path is alone in the star column for the reason the local pane's header remark spells out:
|
||||||
|
TextTrimming needs the finite width only a star column gives it, and this is the pane where the
|
||||||
|
long path is not even unusual — it is any host with a deep directory tree.
|
||||||
|
-->
|
||||||
<Border Grid.Row="0" Padding="0,0,0,10" BorderThickness="0">
|
<Border Grid.Row="0" Padding="0,0,0,10" BorderThickness="0">
|
||||||
<Grid ColumnDefinitions="Auto,*,Auto">
|
<Grid ColumnDefinitions="Auto,*,Auto">
|
||||||
<StackPanel Grid.Column="0" Orientation="Horizontal" Spacing="12" VerticalAlignment="Center">
|
<StackPanel Grid.Column="0" Orientation="Horizontal" Spacing="12" VerticalAlignment="Center"
|
||||||
|
Margin="0,0,12,0">
|
||||||
<TextBlock Classes="label" FontSize="10" Text="HOST" VerticalAlignment="Center"
|
<TextBlock Classes="label" FontSize="10" Text="HOST" VerticalAlignment="Center"
|
||||||
IsVisible="{Binding ShowsHostPicker}" />
|
IsVisible="{Binding ShowsHostPicker}" />
|
||||||
<TextBlock Classes="label" FontSize="10" Text="BUCKET" VerticalAlignment="Center"
|
<TextBlock Classes="label" FontSize="10" Text="BUCKET" VerticalAlignment="Center"
|
||||||
IsVisible="{Binding ShowsBucketPicker}" />
|
IsVisible="{Binding ShowsBucketPicker}" />
|
||||||
<TextBlock Classes="mono" FontSize="13.5" FontWeight="Medium"
|
</StackPanel>
|
||||||
|
<TextBlock Grid.Column="1" Classes="mono" FontSize="13.5" FontWeight="Medium"
|
||||||
Foreground="{StaticResource TextDim}" VerticalAlignment="Center"
|
Foreground="{StaticResource TextDim}" VerticalAlignment="Center"
|
||||||
|
HorizontalAlignment="Left"
|
||||||
Text="{Binding RemotePath}" TextTrimming="CharacterEllipsis"
|
Text="{Binding RemotePath}" TextTrimming="CharacterEllipsis"
|
||||||
ToolTip.Tip="{Binding RemotePath}" />
|
ToolTip.Tip="{Binding RemotePath}" />
|
||||||
</StackPanel>
|
<StackPanel Grid.Column="2" Orientation="Horizontal" Spacing="4" Margin="12,0,0,0">
|
||||||
<StackPanel Grid.Column="2" Orientation="Horizontal" Spacing="4">
|
|
||||||
<Button Classes="paneicon" Command="{Binding RemoteUpCommand}"
|
<Button Classes="paneicon" Command="{Binding RemoteUpCommand}"
|
||||||
IsEnabled="{Binding IsConnected}" ToolTip.Tip="Up one directory">
|
IsEnabled="{Binding IsConnected}" ToolTip.Tip="Up one directory">
|
||||||
<TextBlock FontFamily="{StaticResource IconFont}" FontSize="16" Text="" />
|
<TextBlock FontFamily="{StaticResource IconFont}" FontSize="16" Text="" />
|
||||||
|
|||||||
@@ -1481,17 +1481,29 @@ public sealed class ScreenLayoutTests : IAsyncLifetime
|
|||||||
}
|
}
|
||||||
|
|
||||||
/// <remarks>
|
/// <remarks>
|
||||||
|
/// <para>
|
||||||
/// The narrowest real shape wave C's restyle has to survive at once: connected, so QUICK ACCESS's own
|
/// The narrowest real shape wave C's restyle has to survive at once: connected, so QUICK ACCESS's own
|
||||||
/// sidebar takes its 300 pixels — see <see cref="LayoutHarness.SessionScreenWidth"/> — a populated remote
|
/// sidebar takes its 300 pixels — see <see cref="LayoutHarness.SessionScreenWidth"/> — a populated remote
|
||||||
/// listing carrying every colour state a row can show (a directory, an executable, a world-writable
|
/// listing carrying every colour state a row can show (a directory, an executable, a world-writable
|
||||||
/// file), and a full transfer queue underneath, all inside the 204-pixel-a-side budget that leaves either
|
/// file), and a full transfer queue underneath, all inside the 204-pixel-a-side budget that leaves either
|
||||||
/// pane.
|
/// pane.
|
||||||
|
/// </para>
|
||||||
|
/// <para>
|
||||||
|
/// Both pane headers carry a deep path on purpose, and the paths are set here rather than left to the
|
||||||
|
/// fixture's real filesystem. The header's ellipsis only works because the path sits alone in a star
|
||||||
|
/// column — see the pane header remark in <c>TransfersScreen.axaml</c> — and the regression it guards
|
||||||
|
/// against armed itself only on a machine whose home directory happened to be long: CI's per-job HOME
|
||||||
|
/// found it, every developer machine's short profile path missed it. A pinned sixty-character path asks
|
||||||
|
/// the question on every machine alike.
|
||||||
|
/// </para>
|
||||||
/// </remarks>
|
/// </remarks>
|
||||||
[Fact]
|
[Fact]
|
||||||
public async Task TheRestyledPanesFitTheSessionShellsNarrowestBudget()
|
public async Task TheRestyledPanesFitTheSessionShellsNarrowestBudget()
|
||||||
{
|
{
|
||||||
transfers.IsConnected = true;
|
transfers.IsConnected = true;
|
||||||
transfers.ConnectedTo = "deployment-service@releases.eu-west.internal.example:2222";
|
transfers.ConnectedTo = "deployment-service@releases.eu-west.internal.example:2222";
|
||||||
|
transfers.LocalPath = "/home/deployment-service/.cache/build/workspaces/site/artefacts";
|
||||||
|
transfers.RemotePath = "/srv/releases/site/shared/uploads/production/2026/08/nightly";
|
||||||
|
|
||||||
transfers.RemoteEntries.Add(new RemoteEntryRowViewModel(new SftpEntry(
|
transfers.RemoteEntries.Add(new RemoteEntryRowViewModel(new SftpEntry(
|
||||||
"docker-compose.yml", "/srv/releases/site/docker-compose.yml", SftpEntryKind.File,
|
"docker-compose.yml", "/srv/releases/site/docker-compose.yml", SftpEntryKind.File,
|
||||||
|
|||||||
Reference in New Issue
Block a user