From c2fc074239f289beafe77b6379d6310af403fb95 Mon Sep 17 00:00:00 2001 From: ssparach <128866445+ssparach@users.noreply.github.com> Date: Fri, 27 Sep 2024 16:23:09 -0700 Subject: [PATCH 1/2] accessibility bug fixes --- .../Models/RepositoryInformation.cs | 12 ++++++++++-- .../ViewModels/FileExplorerViewModel.cs | 4 +++- .../Views/AddRepositoriesView.xaml | 11 ++++++++--- 3 files changed, 21 insertions(+), 6 deletions(-) diff --git a/tools/Customization/DevHome.Customization/Models/RepositoryInformation.cs b/tools/Customization/DevHome.Customization/Models/RepositoryInformation.cs index a274836ad5..3cd779d165 100644 --- a/tools/Customization/DevHome.Customization/Models/RepositoryInformation.cs +++ b/tools/Customization/DevHome.Customization/Models/RepositoryInformation.cs @@ -1,7 +1,6 @@ // Copyright (c) Microsoft Corporation. // Licensed under the MIT License. -using System; using System.Linq; using System.Threading.Tasks; using DevHome.Common.Extensions; @@ -21,13 +20,22 @@ public class RepositoryInformation public string SourceControlProviderPackageDisplayName { get; } - public RepositoryInformation(string rootpath, string classId) + public string RepoPathMapping { get; } + + public int Position { get; } + + public int Size { get; } + + public RepositoryInformation(string rootpath, string classId, int position, int size) { RepositoryRootPath = rootpath; SourceControlProviderCLSID = classId; var extension = GetExtension(classId); SourceControlProviderDisplayName = GetExtensionDisplayName(extension); SourceControlProviderPackageDisplayName = GetExtensionPackageDisplayName(extension); + RepoPathMapping = string.Concat(RepositoryRootPath, " ", SourceControlProviderDisplayName); + Position = position; + Size = size; } private IExtensionWrapper? GetExtension(string classId) diff --git a/tools/Customization/DevHome.Customization/ViewModels/FileExplorerViewModel.cs b/tools/Customization/DevHome.Customization/ViewModels/FileExplorerViewModel.cs index 2a4845ed55..5222ef5109 100644 --- a/tools/Customization/DevHome.Customization/ViewModels/FileExplorerViewModel.cs +++ b/tools/Customization/DevHome.Customization/ViewModels/FileExplorerViewModel.cs @@ -70,9 +70,11 @@ public void RefreshTrackedRepositories() { TrackedRepositories.Clear(); var repoCollection = RepoTracker.GetAllTrackedRepositories(); + var position = 0; foreach (KeyValuePair data in repoCollection) { - TrackedRepositories.Add(new RepositoryInformation(data.Key, data.Value)); + position++; + TrackedRepositories.Add(new RepositoryInformation(data.Key, data.Value, position, repoCollection.Count)); } } } diff --git a/tools/Customization/DevHome.Customization/Views/AddRepositoriesView.xaml b/tools/Customization/DevHome.Customization/Views/AddRepositoriesView.xaml index 77d93f3106..77751d117d 100644 --- a/tools/Customization/DevHome.Customization/Views/AddRepositoriesView.xaml +++ b/tools/Customization/DevHome.Customization/Views/AddRepositoriesView.xaml @@ -17,7 +17,7 @@ x:Uid="AddRepositoriesCard" Grid.Column="1">