Public Access
Keep the phone's nav under Connections when nothing is running
The chrome stands down for a shell, and it was standing down for the whole terminal surface. Those parted company when that surface gained a connect page: with no tabs open it draws a box, a CONNECT button and the machines connected to before, which is a page in everything but which enum it is in. A third of the display is worth giving to a shell and is not worth giving to that. Worse, it is the one screen somebody arrives at by closing their last tab — so the state the collapsed bar was most likely to be seen in was the state where it left the system back gesture as the only route to Hosts or Settings. So RefreshChrome reads one more question. IsTerminalSurface with no tabs joins the pages in both flags, which keeps the rail and the bar in step: above 600dp the rail is the bar, and fixing only the narrow layout would leave an unfolded device on the same screen with the same nothing. The vault header is deliberately not part of it. The surface draws its own bar with back and the +, and a header above that is the second row of chrome this head exists to avoid. The Connections entry lights for the first time, on IsTerminalSurface. It was left unbound on the argument that the bar was never drawn while that surface was up, so a lit state was unreachable — that argument is now false, and the flag is unambiguous on a control that is only drawn in two situations: false on every page, true on the connect page, and never read while a shell is showing. A bar sitting under a screen it does not point at is the entry looking broken instead. Nothing here is testable on this head — the phone's rectangles have no coverage, for the reasons Phase 8 of manual-checks records — so 11.7 gains the check that the bar is there with Connections lit, and 11.1 keeps the one that it is gone with a shell up, which is the half that pays for the arrangement.
This commit is contained in:
@@ -104,10 +104,19 @@ internal sealed partial class PhoneShell : UserControl
|
||||
AvaloniaProperty.Register<PhoneShell, bool>(nameof(IsWide));
|
||||
|
||||
/// <summary>Whether the rail down the left edge is drawn.</summary>
|
||||
/// <remarks>
|
||||
/// The wide surface's answer to <see cref="ShowsBottomBarProperty"/> and asks the same question about
|
||||
/// which screen is up, so the two move together — including over Connections with nothing running. See
|
||||
/// <see cref="RefreshChrome"/>.
|
||||
/// </remarks>
|
||||
public static readonly StyledProperty<bool> ShowsRailProperty =
|
||||
AvaloniaProperty.Register<PhoneShell, bool>(nameof(ShowsRail));
|
||||
|
||||
/// <summary>Whether the three-entry bar across the bottom is drawn.</summary>
|
||||
/// <remarks>
|
||||
/// Not simply the pages: it also stays up on Connections with nothing running, which is the terminal
|
||||
/// surface drawing a page. See <see cref="RefreshChrome"/>.
|
||||
/// </remarks>
|
||||
public static readonly StyledProperty<bool> ShowsBottomBarProperty =
|
||||
AvaloniaProperty.Register<PhoneShell, bool>(nameof(ShowsBottomBar));
|
||||
|
||||
@@ -154,6 +163,15 @@ internal sealed partial class PhoneShell : UserControl
|
||||
/// have to be an "or", which a wrapper cannot express at all.
|
||||
/// </para>
|
||||
/// <para>
|
||||
/// ◆ <b>The nav stands down for a shell rather than for the terminal surface, and those parted company
|
||||
/// when that surface gained a page.</b> Connections with nothing running is a box, a CONNECT button and
|
||||
/// the machines connected to before — see TerminalScreen.axaml — and none of that is worth the screen a
|
||||
/// shell is worth it for. It is also the one screen somebody can arrive at by closing their last tab,
|
||||
/// which made the collapsed bar a way to end up with no route to Hosts or Settings but the system back
|
||||
/// gesture. The header is deliberately not part of this: the surface draws its own bar with the back
|
||||
/// arrow and the +, and the vault header above that is the second row this head exists to avoid.
|
||||
/// </para>
|
||||
/// <para>
|
||||
/// <b>The header is the one worth reading twice.</b> Narrow, it stands down behind SETTINGS, because the
|
||||
/// screens under that hub draw their own header with a back arrow and two rows of chrome is what this
|
||||
/// surface exists to avoid. Wide, there is no hub to be behind and no back arrow to duplicate — the rail
|
||||
@@ -172,6 +190,14 @@ internal sealed partial class PhoneShell : UserControl
|
||||
var wide = body.Bounds.Width >= WideAt;
|
||||
var pages = shell?.IsShowingPages == true;
|
||||
|
||||
// ◆ Connections with nothing running, which is the terminal surface drawing a page: a box, a CONNECT
|
||||
// button and the machines connected to before. The nav stands down for a shell — the whole of the
|
||||
// arrangement below — and there is no shell here to stand down for, so it stays. Taking it away on
|
||||
// this one screen was worst where it was least affordable: somebody who has just closed their last
|
||||
// tab, or who pressed Connections to see what was open and found nothing, was left on a screen whose
|
||||
// only way to Hosts or Settings was the system back gesture.
|
||||
var connectPage = shell is { IsTerminalSurface: true, HasTabs: false };
|
||||
|
||||
// Before the flags, because it changes what one of them reads. Nothing else on this head navigates
|
||||
// in response to a resize, and this is not navigation for its own sake: the hub is a list of the
|
||||
// destinations the rail now carries, so an unfolded device would otherwise sit on a menu of things
|
||||
@@ -183,8 +209,8 @@ internal sealed partial class PhoneShell : UserControl
|
||||
}
|
||||
|
||||
IsWide = wide;
|
||||
ShowsRail = wide && pages;
|
||||
ShowsBottomBar = !wide && pages;
|
||||
ShowsRail = wide && (pages || connectPage);
|
||||
ShowsBottomBar = !wide && (pages || connectPage);
|
||||
ShowsVaultHeader = pages && (wide || shell?.IsMoreSurface != true);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user