From 4179594453cf3aeeb1010fb31e4ac80f0324ca7a Mon Sep 17 00:00:00 2001 From: Tibor Prokai Date: Mon, 26 Oct 2026 15:43:13 +0100 Subject: [PATCH 1/3] Allow reordering history columns Persist history column order per repository, including hidden columns, and restore it when reopening the history view. Keep the graph overlay, header tools, and author resize handle aligned with reordered columns. --- src/Models/RepositoryUIStates.cs | 3 + src/ViewModels/Histories.cs | 6 ++ src/Views/Histories.axaml | 27 +++--- src/Views/Histories.axaml.cs | 143 +++++++++++++++++++++++-------- 4 files changed, 133 insertions(+), 46 deletions(-) diff --git a/src/Models/RepositoryUIStates.cs b/src/Models/RepositoryUIStates.cs index 8657b93b65..2cf2505def 100644 --- a/src/Models/RepositoryUIStates.cs +++ b/src/Models/RepositoryUIStates.cs @@ -39,6 +39,9 @@ public bool IsCommitTimeColumnVisibleInHistory set; } = true; + // Source-column indexes in display order, including hidden columns. + public List HistoryColumnOrder { get; set; } = []; + public double AuthorColumnWidth { get; diff --git a/src/ViewModels/Histories.cs b/src/ViewModels/Histories.cs index 128b53ff9d..39102da0ea 100644 --- a/src/ViewModels/Histories.cs +++ b/src/ViewModels/Histories.cs @@ -204,6 +204,12 @@ public GridLength BottomArea } } + public List ColumnOrder + { + get => _repo.UIStates.HistoryColumnOrder; + set => _repo.UIStates.HistoryColumnOrder = value; + } + public double AuthorColumnWidth { get => _repo.UIStates.AuthorColumnWidth; diff --git a/src/Views/Histories.axaml b/src/Views/Histories.axaml index a3d24529fd..1fbb01caa9 100644 --- a/src/Views/Histories.axaml +++ b/src/Views/Histories.axaml @@ -23,7 +23,7 @@ - + -