From d5c34b097b5006b7115b927711214ef4587cc366 Mon Sep 17 00:00:00 2001 From: Tomasz Solik Date: Fri, 10 Apr 2026 20:23:02 +0200 Subject: [PATCH 01/13] refactor: establish fluent ux foundation styles --- BusLane.Tests/Views/AppThemeResourceTests.cs | 66 ++++++++++++++++++++ BusLane/App.axaml | 4 ++ BusLane/Styles/AppStyles.axaml | 59 ++++++++++++++--- 3 files changed, 122 insertions(+), 7 deletions(-) create mode 100644 BusLane.Tests/Views/AppThemeResourceTests.cs diff --git a/BusLane.Tests/Views/AppThemeResourceTests.cs b/BusLane.Tests/Views/AppThemeResourceTests.cs new file mode 100644 index 0000000..3b4b77c --- /dev/null +++ b/BusLane.Tests/Views/AppThemeResourceTests.cs @@ -0,0 +1,66 @@ +namespace BusLane.Tests.Views; + +using FluentAssertions; + +public class AppThemeResourceTests +{ + [Fact] + public void AppResources_DefineSharedDashboardSurfaceTokens() + { + // Arrange + var xaml = File.ReadAllText(GetAppPath()); + + // Assert + xaml.Should().Contain("x:Key=\"LayerBackground\""); + xaml.Should().Contain("x:Key=\"AccentBrandSubtle\""); + } + + [Fact] + public void AppStyles_DefineSharedToggleAndMenuStyles() + { + // Arrange + var xaml = File.ReadAllText(GetStylesPath()); + + // Assert + xaml.Should().Contain(" + + + + + + + + + + + + + + From 1fc2b4c7b534408c139c776ecd2f0f03ee90a99f Mon Sep 17 00:00:00 2001 From: Tomasz Solik Date: Fri, 10 Apr 2026 20:27:07 +0200 Subject: [PATCH 02/13] refactor: make workspace tabs accessible --- BusLane.Tests/Views/TabBarViewTests.cs | 42 ++++++++++ BusLane/Styles/AppStyles.axaml | 96 ++++++++++++++++++++++ BusLane/Views/Controls/TabBarView.axaml | 56 +++---------- BusLane/Views/Controls/TabBarView.axaml.cs | 19 ++--- 4 files changed, 156 insertions(+), 57 deletions(-) create mode 100644 BusLane.Tests/Views/TabBarViewTests.cs diff --git a/BusLane.Tests/Views/TabBarViewTests.cs b/BusLane.Tests/Views/TabBarViewTests.cs new file mode 100644 index 0000000..3cd6c92 --- /dev/null +++ b/BusLane.Tests/Views/TabBarViewTests.cs @@ -0,0 +1,42 @@ +namespace BusLane.Tests.Views; + +using FluentAssertions; + +public class TabBarViewTests +{ + [Fact] + public void TabBarView_DoesNotUsePointerPressedBorderTabs() + { + // Arrange + var xaml = File.ReadAllText(GetTabBarPath()); + + // Assert + xaml.Should().NotContain("PointerPressed=\"TabBorder_PointerPressed\""); + xaml.Should().NotContain("Classes=\"tab-border\""); + } + + [Fact] + public void TabBarView_UsesAccessibleTabButtons() + { + // Arrange + var xaml = File.ReadAllText(GetTabBarPath()); + + // Assert + xaml.Should().Contain("RadioButton"); + xaml.Should().Contain("GroupName=\"ConnectionTabs\""); + } + + private static string GetTabBarPath() + { + return Path.GetFullPath(Path.Combine( + AppContext.BaseDirectory, + "..", + "..", + "..", + "..", + "BusLane", + "Views", + "Controls", + "TabBarView.axaml")); + } +} diff --git a/BusLane/Styles/AppStyles.axaml b/BusLane/Styles/AppStyles.axaml index 206f5f9..b0c4a17 100644 --- a/BusLane/Styles/AppStyles.axaml +++ b/BusLane/Styles/AppStyles.axaml @@ -1056,6 +1056,81 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - - - - + - + @@ -146,9 +113,8 @@ - - + + + @@ -53,31 +52,33 @@ IsExpanded="{Binding CurrentNavigation.IsQueuesSectionExpanded}" Margin="4,2,4,0"> - - - - + + + + + + + + + + - - - - - - + + @@ -193,31 +194,33 @@ IsExpanded="{Binding CurrentNavigation.IsTopicsSectionExpanded}" Margin="4,0,4,0"> - - - - + + + + + + + + + + - - - - - - + + diff --git a/BusLane/Views/Controls/EntityTreeView.axaml b/BusLane/Views/Controls/EntityTreeView.axaml index 8615ac4..27df978 100644 --- a/BusLane/Views/Controls/EntityTreeView.axaml +++ b/BusLane/Views/Controls/EntityTreeView.axaml @@ -15,36 +15,35 @@ - - - - - - + Classes="pane-search-surface"> + + + + + + + + - - + + + @@ -54,31 +53,33 @@ IsExpanded="{Binding CurrentNavigation.IsQueuesSectionExpanded}" Margin="4,2,4,0"> - - - - + + + + + + + + + + - - - - - - + + @@ -196,31 +197,33 @@ IsExpanded="{Binding CurrentNavigation.IsTopicsSectionExpanded}" Margin="4,0,4,0"> - - - - + + + + + + + + + + - - - - - - + + From 29275a8c411cfe917e76cde5dbff754c97e3a5f8 Mon Sep 17 00:00:00 2001 From: Tomasz Solik Date: Fri, 10 Apr 2026 20:39:37 +0200 Subject: [PATCH 04/13] refactor: simplify fluent shell hierarchy --- BusLane.Tests/Views/NavigationSidebarTests.cs | 19 +--- BusLane.Tests/Views/WelcomeViewTests.cs | 16 +++- BusLane/Styles/AppStyles.axaml | 30 ++++-- .../Views/Controls/NavigationSidebar.axaml | 51 +++++------ BusLane/Views/Controls/WelcomeView.axaml | 91 ++++++++++++------- BusLane/Views/MainWindow.axaml | 85 +++++++++-------- 6 files changed, 172 insertions(+), 120 deletions(-) diff --git a/BusLane.Tests/Views/NavigationSidebarTests.cs b/BusLane.Tests/Views/NavigationSidebarTests.cs index 7ce1504..29da50f 100644 --- a/BusLane.Tests/Views/NavigationSidebarTests.cs +++ b/BusLane.Tests/Views/NavigationSidebarTests.cs @@ -44,33 +44,24 @@ public void NavigationSidebar_HasSingleMyConnectionsButton() } [Fact] - public void NavigationSidebar_UsesStructuredWorkspaceCardRegions() + public void NavigationSidebar_UsesCompactWorkspaceSummary() { // Arrange var xaml = File.ReadAllText(GetSidebarPath()); - // Act - var hasWorkspaceHeader = xaml.Contains("Classes=\"sidebar-workspace-header\"", StringComparison.Ordinal); - var hasWorkspaceMeta = xaml.Contains("Classes=\"sidebar-workspace-meta\"", StringComparison.Ordinal); - var hasWorkspaceActions = xaml.Contains("Classes=\"sidebar-workspace-actions\"", StringComparison.Ordinal); - // Assert - hasWorkspaceHeader.Should().BeTrue(); - hasWorkspaceMeta.Should().BeTrue(); - hasWorkspaceActions.Should().BeTrue(); + xaml.Should().Contain("Classes=\"sidebar-workspace-summary\""); + xaml.Should().NotContain("Classes=\"sidebar-workspace-card\""); } [Fact] - public void NavigationSidebar_UsesStackedWorkspaceActions() + public void NavigationSidebar_DoesNotRenderDisconnectAsStandalonePrimaryBlock() { // Arrange var xaml = File.ReadAllText(GetSidebarPath()); - // Act - var usesStackedActions = xaml.Contains(" - - + + + + diff --git a/BusLane/Views/Controls/NavigationSidebar.axaml b/BusLane/Views/Controls/NavigationSidebar.axaml index 1b1ac07..84dea7b 100644 --- a/BusLane/Views/Controls/NavigationSidebar.axaml +++ b/BusLane/Views/Controls/NavigationSidebar.axaml @@ -16,7 +16,7 @@ - + @@ -27,8 +27,8 @@ - - + + @@ -52,13 +52,13 @@ - - + - + @@ -80,13 +80,13 @@ @@ -114,10 +114,10 @@ - - - - - + + diff --git a/BusLane/Views/Controls/WelcomeView.axaml b/BusLane/Views/Controls/WelcomeView.axaml index 190b5ec..9d857c4 100644 --- a/BusLane/Views/Controls/WelcomeView.axaml +++ b/BusLane/Views/Controls/WelcomeView.axaml @@ -5,39 +5,68 @@ x:Class="BusLane.Views.Controls.WelcomeView" x:DataType="vm:MainWindowViewModel"> - - - - - - - - - - - + + + + + + + + + + + + + - - - - + + + + + + diff --git a/BusLane/Views/MainWindow.axaml b/BusLane/Views/MainWindow.axaml index a8fe954..cfcece0 100644 --- a/BusLane/Views/MainWindow.axaml +++ b/BusLane/Views/MainWindow.axaml @@ -34,7 +34,7 @@ - + + + - - - - - - - - - - - - - + + + Date: Fri, 10 Apr 2026 20:43:02 +0200 Subject: [PATCH 05/13] refactor: simplify messages workspace layout --- BusLane.Tests/Views/MessagesPanelViewTests.cs | 42 ++++++ BusLane/Styles/AppStyles.axaml | 48 +++++++ .../MessagePaginationFooterView.axaml | 12 +- .../Views/Controls/MessagesPanelView.axaml | 126 ++++++------------ 4 files changed, 137 insertions(+), 91 deletions(-) create mode 100644 BusLane.Tests/Views/MessagesPanelViewTests.cs diff --git a/BusLane.Tests/Views/MessagesPanelViewTests.cs b/BusLane.Tests/Views/MessagesPanelViewTests.cs new file mode 100644 index 0000000..b765f9a --- /dev/null +++ b/BusLane.Tests/Views/MessagesPanelViewTests.cs @@ -0,0 +1,42 @@ +namespace BusLane.Tests.Views; + +using FluentAssertions; + +public class MessagesPanelViewTests +{ + [Fact] + public void MessagesPanel_UsesInlineCommandBarSurface() + { + // Arrange + var xaml = File.ReadAllText(GetMessagesPanelPath()); + + // Assert + xaml.Should().Contain("Classes=\"message-command-bar\""); + xaml.Should().Contain("Classes=\"message-search-surface\""); + } + + [Fact] + public void MessagesPanel_DoesNotUseCenteredLoadingCardCopy() + { + // Arrange + var xaml = File.ReadAllText(GetMessagesPanelPath()); + + // Assert + xaml.Should().NotContain("Please wait while we fetch the messages..."); + xaml.Should().Contain("Classes=\"inline-loading-surface\""); + } + + private static string GetMessagesPanelPath() + { + return Path.GetFullPath(Path.Combine( + AppContext.BaseDirectory, + "..", + "..", + "..", + "..", + "BusLane", + "Views", + "Controls", + "MessagesPanelView.axaml")); + } +} diff --git a/BusLane/Styles/AppStyles.axaml b/BusLane/Styles/AppStyles.axaml index 585870d..0a422c7 100644 --- a/BusLane/Styles/AppStyles.axaml +++ b/BusLane/Styles/AppStyles.axaml @@ -870,6 +870,54 @@ + + + + + + + + + + + + + + @@ -28,18 +28,18 @@ diff --git a/BusLane/Views/Controls/MessagesPanelView.axaml b/BusLane/Views/Controls/MessagesPanelView.axaml index d0af194..96ab031 100644 --- a/BusLane/Views/Controls/MessagesPanelView.axaml +++ b/BusLane/Views/Controls/MessagesPanelView.axaml @@ -14,7 +14,7 @@ - + @@ -94,11 +94,7 @@ + Classes="message-search-surface"> @@ -159,9 +155,7 @@ - - + + + + + + + +