diff --git a/src/modules/cmdpal/Microsoft.CmdPal.UI.ViewModels/CommandProviderWrapper.cs b/src/modules/cmdpal/Microsoft.CmdPal.UI.ViewModels/CommandProviderWrapper.cs index 5d65180605..ae33504899 100644 --- a/src/modules/cmdpal/Microsoft.CmdPal.UI.ViewModels/CommandProviderWrapper.cs +++ b/src/modules/cmdpal/Microsoft.CmdPal.UI.ViewModels/CommandProviderWrapper.cs @@ -231,8 +231,6 @@ public sealed class CommandProviderWrapper : ICommandProviderContext var ourContext = GetProviderContext(); var makeAndAdd = (ICommandItem? i, bool fallback) => { - // n.b. Mike, you may want to revisit this after the dock stuff merges, - // because I think we'll need to pass a contextMenuFactory to dock items CommandItemViewModel commandItemViewModel = new(new(i), pageContext, contextMenuFactory: contextMenuFactory); TopLevelViewModel topLevelViewModel = new(commandItemViewModel, fallback, ExtensionHost, ourContext, settings, providerSettings, serviceProvider, i); topLevelViewModel.InitializeProperties(); diff --git a/src/modules/cmdpal/Microsoft.CmdPal.UI.ViewModels/TopLevelItemPageContext.cs b/src/modules/cmdpal/Microsoft.CmdPal.UI.ViewModels/TopLevelItemPageContext.cs index 5f21706fd3..8c84cda599 100644 --- a/src/modules/cmdpal/Microsoft.CmdPal.UI.ViewModels/TopLevelItemPageContext.cs +++ b/src/modules/cmdpal/Microsoft.CmdPal.UI.ViewModels/TopLevelItemPageContext.cs @@ -7,6 +7,12 @@ using Microsoft.CmdPal.Core.ViewModels; namespace Microsoft.CmdPal.UI.ViewModels; +/// +/// Used as the PageContext for top-level items. Top level items are displayed +/// on the MainListPage, which _we_ own. We need to have a placeholder page +/// context for each provider that still connects those top-level items to the +/// CommandProvider they came from. +/// public partial class TopLevelItemPageContext : IPageContext { public TaskScheduler Scheduler { get; private set; } diff --git a/src/modules/cmdpal/Microsoft.CmdPal.UI/CommandPaletteContextMenuFactory.xaml.cs b/src/modules/cmdpal/Microsoft.CmdPal.UI/CommandPaletteContextMenuFactory.xaml.cs index 5631d3c54e..122552f8c7 100644 --- a/src/modules/cmdpal/Microsoft.CmdPal.UI/CommandPaletteContextMenuFactory.xaml.cs +++ b/src/modules/cmdpal/Microsoft.CmdPal.UI/CommandPaletteContextMenuFactory.xaml.cs @@ -37,8 +37,8 @@ internal sealed partial class CommandPaletteContextMenuFactory : IContextMenuFac page.ProviderContext.SupportsPinning && !string.IsNullOrEmpty(itemId)) { - // TODO: #45201 Here, we'll want to add pin/unpin commands for pinning - // items to the top-level or to the dock. + // Add pin/unpin commands for pinning items to the top-level or to + // the dock. var providerId = page.ProviderContext.ProviderId; if (_topLevelCommandManager.LookupProvider(providerId) is CommandProviderWrapper provider) { diff --git a/src/modules/cmdpal/Tests/Microsoft.CmdPal.UITests/Microsoft.CmdPal.UITests.csproj b/src/modules/cmdpal/Tests/Microsoft.CmdPal.UITests/Microsoft.CmdPal.UITests.csproj index a74656d761..ef3206262b 100644 --- a/src/modules/cmdpal/Tests/Microsoft.CmdPal.UITests/Microsoft.CmdPal.UITests.csproj +++ b/src/modules/cmdpal/Tests/Microsoft.CmdPal.UITests/Microsoft.CmdPal.UITests.csproj @@ -1,4 +1,4 @@ -eii +