From 4bb30978c450e976acf0a61c64e36a1c5428c11f Mon Sep 17 00:00:00 2001 From: ClaudioESSilva Date: Sun, 10 May 2026 17:52:25 +0100 Subject: [PATCH 1/4] Allow navigate between open tabs with keyboard #322 --- src/PlanViewer.App/MainWindow.axaml.cs | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/src/PlanViewer.App/MainWindow.axaml.cs b/src/PlanViewer.App/MainWindow.axaml.cs index fa4f4b4..b8637bb 100644 --- a/src/PlanViewer.App/MainWindow.axaml.cs +++ b/src/PlanViewer.App/MainWindow.axaml.cs @@ -92,6 +92,23 @@ public MainWindow() e.Handled = true; } break; + case Key.Tab: + var tabCount = MainTabControl.Items.Count; + if (tabCount > 1) + { + MainTabControl.SelectedIndex = (MainTabControl.SelectedIndex + 1) % tabCount; + e.Handled = true; + } + break; + } + } + else if (e.KeyModifiers == (KeyModifiers.Control | KeyModifiers.Shift) && e.Key == Key.Tab) + { + var tabCount = MainTabControl.Items.Count; + if (tabCount > 1) + { + MainTabControl.SelectedIndex = (MainTabControl.SelectedIndex - 1 + tabCount) % tabCount; + e.Handled = true; } } }, RoutingStrategies.Tunnel); From bfa75552ef52af5da3b4785f9a6f55170cc759d7 Mon Sep 17 00:00:00 2001 From: ClaudioESSilva Date: Sun, 10 May 2026 17:53:03 +0100 Subject: [PATCH 2/4] Allow double-click to expand grouped rows #322 --- .../Controls/QueryStoreGridControl.axaml | 1 + .../Controls/QueryStoreGridControl.axaml.cs | 13 +++++++++++++ 2 files changed, 14 insertions(+) diff --git a/src/PlanViewer.App/Controls/QueryStoreGridControl.axaml b/src/PlanViewer.App/Controls/QueryStoreGridControl.axaml index 29555d1..29e8d0f 100644 --- a/src/PlanViewer.App/Controls/QueryStoreGridControl.axaml +++ b/src/PlanViewer.App/Controls/QueryStoreGridControl.axaml @@ -133,6 +133,7 @@ Background="{DynamicResource BackgroundDarkBrush}" BorderThickness="0" Sorting="ResultsGrid_Sorting" + DoubleTapped="ResultsGrid_DoubleTapped" ScrollViewer.HorizontalScrollBarVisibility="Auto"> diff --git a/src/PlanViewer.App/Controls/QueryStoreGridControl.axaml.cs b/src/PlanViewer.App/Controls/QueryStoreGridControl.axaml.cs index edbd75b..7c6bc91 100644 --- a/src/PlanViewer.App/Controls/QueryStoreGridControl.axaml.cs +++ b/src/PlanViewer.App/Controls/QueryStoreGridControl.axaml.cs @@ -7,6 +7,7 @@ using System.Threading; using Avalonia.Controls; using Avalonia.Controls.Primitives; +using Avalonia.Input; using Avalonia.Interactivity; using Avalonia.Media; using PlanViewer.Core.Interfaces; @@ -758,6 +759,18 @@ private void ExpandRow_Click(object? sender, RoutedEventArgs e) { if (sender is not Button btn) return; if (btn.DataContext is not QueryStoreRow row) return; + ToggleRowExpansion(row); + } + + private void ResultsGrid_DoubleTapped(object? sender, TappedEventArgs e) + { + if (ResultsGrid.SelectedItem is not QueryStoreRow row) return; + if (!row.HasChildren) return; + ToggleRowExpansion(row); + } + + private void ToggleRowExpansion(QueryStoreRow row) + { if (!row.HasChildren) return; row.IsExpanded = !row.IsExpanded; From cf29d4f7756b39dced7dc6aa9f3ba280f253b989 Mon Sep 17 00:00:00 2001 From: ClaudioESSilva Date: Sun, 10 May 2026 17:55:49 +0100 Subject: [PATCH 3/4] Close tab when doing mouse wheel click #322 --- src/PlanViewer.App/MainWindow.axaml.cs | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/src/PlanViewer.App/MainWindow.axaml.cs b/src/PlanViewer.App/MainWindow.axaml.cs index b8637bb..5c7626c 100644 --- a/src/PlanViewer.App/MainWindow.axaml.cs +++ b/src/PlanViewer.App/MainWindow.axaml.cs @@ -848,6 +848,16 @@ private TabItem CreateTab(string label, Control content) closeBtn.Tag = tab; closeBtn.Click += CloseTab_Click; + header.PointerPressed += (_, e) => + { + if (e.GetCurrentPoint(null).Properties.PointerUpdateKind == PointerUpdateKind.MiddleButtonPressed) + { + MainTabControl.Items.Remove(tab); + UpdateEmptyOverlay(); + e.Handled = true; + } + }; + // Right-click context menu var copyPathItem = new MenuItem { Header = "Copy Path", Tag = tab }; // Only visible when tab content has a file path From e4ddeb5c89626bb6d41900f289d09f1cbec60c74 Mon Sep 17 00:00:00 2001 From: ClaudioESSilva Date: Sun, 10 May 2026 19:14:52 +0100 Subject: [PATCH 4/4] improve implementation --- src/PlanViewer.App/Controls/QueryStoreGridControl.axaml.cs | 5 +++++ src/PlanViewer.App/MainWindow.axaml.cs | 1 + 2 files changed, 6 insertions(+) diff --git a/src/PlanViewer.App/Controls/QueryStoreGridControl.axaml.cs b/src/PlanViewer.App/Controls/QueryStoreGridControl.axaml.cs index 7c6bc91..bb30ea2 100644 --- a/src/PlanViewer.App/Controls/QueryStoreGridControl.axaml.cs +++ b/src/PlanViewer.App/Controls/QueryStoreGridControl.axaml.cs @@ -5,10 +5,12 @@ using System.Linq; using System.Runtime.CompilerServices; using System.Threading; +using Avalonia; using Avalonia.Controls; using Avalonia.Controls.Primitives; using Avalonia.Input; using Avalonia.Interactivity; +using Avalonia.VisualTree; using Avalonia.Media; using PlanViewer.Core.Interfaces; using PlanViewer.Core.Models; @@ -764,6 +766,9 @@ private void ExpandRow_Click(object? sender, RoutedEventArgs e) private void ResultsGrid_DoubleTapped(object? sender, TappedEventArgs e) { + if (e.Source is not Visual v) return; + if (v.FindAncestorOfType