From 17249229c8720ef48cc30a86a625748d55f36dd3 Mon Sep 17 00:00:00 2001 From: gramps Date: Fri, 30 Oct 2026 11:18:36 -0700 Subject: [PATCH] feat(top bar): EDIT moves beside the gear; the gear wears the app's orange MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - EDIT leaves the centre session cluster and sits immediately right of the gear, in the brand column — so mode lives with the controls that configure the app, not with the session buttons. - The gear is a LlamaCasty control, so its icon is `attention` orange instead of muted grey. Guard: UiShellTests asserts the gear fill and that EDIT appears before the centre (session) cluster, so a later reformat cannot quietly put it back. --- Controls/TopBar.xaml | 20 ++++++++++---------- ytLive.Tests/UiShellTests.cs | 16 ++++++++++++++++ 2 files changed, 26 insertions(+), 10 deletions(-) diff --git a/Controls/TopBar.xaml b/Controls/TopBar.xaml index 3c21218..e21f9af 100644 --- a/Controls/TopBar.xaml +++ b/Controls/TopBar.xaml @@ -47,21 +47,13 @@ + Fill="{StaticResource Brush.Attention}" Width="18" Height="18" Stretch="Uniform"/> - - - - @@ -76,6 +68,14 @@ + + + + diff --git a/ytLive.Tests/UiShellTests.cs b/ytLive.Tests/UiShellTests.cs index 15c7681..668692a 100644 --- a/ytLive.Tests/UiShellTests.cs +++ b/ytLive.Tests/UiShellTests.cs @@ -74,6 +74,22 @@ public class UiShellTests Assert.Contains("return;", preview); } + [Fact] + public void Edit_sits_beside_the_orange_gear() + { + var topBar = SourceAssert.Text("Controls", "TopBar.xaml"); + + // The gear is a LlamaCasty control, so it wears the app's orange (not a muted icon grey). + Assert.Contains("Fill=\"{StaticResource Brush.Attention}\" Width=\"18\" Height=\"18\"", topBar); + + // EDIT lives in the LEFT cluster, immediately after the gear — not in the centre session + // cluster (creator ruling 2026-10-30). + var edit = topBar.IndexOf("EditingActive", System.StringComparison.Ordinal); + var centre = topBar.IndexOf("Grid.Column=\"1\"", System.StringComparison.Ordinal); + Assert.True(edit > 0 && centre > edit, + "the EDIT toggle must appear before the centre (session) cluster"); + } + private static int Count(string haystack, string needle) { var hits = 0;