-
-
Notifications
You must be signed in to change notification settings - Fork 2.6k
Code Quality: Removed ISidebarViewModel #17972
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -13,6 +13,7 @@ | |
| using Microsoft.UI.Xaml.Navigation; | ||
| using Windows.Foundation.Metadata; | ||
| using Windows.Graphics; | ||
| using Windows.UI.Input; | ||
| using WinUIEx; | ||
| using GridSplitter = Files.App.Controls.GridSplitter; | ||
| using VirtualKey = Windows.System.VirtualKey; | ||
|
|
@@ -465,5 +466,27 @@ private void Page_PointerReleased(object sender, PointerRoutedEventArgs e) | |
| // shortcuts from working properly, see https://github.com/microsoft/microsoft-ui-xaml/issues/6467 | ||
| DispatcherQueue.TryEnqueue(() => ContentPageContext.ShellPage?.PaneHolder.FocusActivePane()); | ||
| } | ||
|
|
||
| private void SidebarControl_ItemContextInvoked(object sender, ItemContextInvokedArgs e) | ||
| { | ||
| SidebarAdaptiveViewModel.HandleItemContextInvokedAsync(sender, e); | ||
| } | ||
|
|
||
| private async void SidebarControl_ItemDragOver(object sender, ItemDragOverEventArgs e) | ||
| { | ||
| var deferral = e.RawEvent.GetDeferral(); | ||
| await SidebarAdaptiveViewModel.HandleItemDragOverAsync(e); | ||
| deferral.Complete(); | ||
| } | ||
|
|
||
| private async void SidebarControl_ItemDropped(object sender, ItemDroppedEventArgs e) | ||
| { | ||
| await SidebarAdaptiveViewModel.HandleItemDroppedAsync(e); | ||
| } | ||
|
Comment on lines
+482
to
+485
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Bug: The async event handler 🔍 Detailed AnalysisThe 💡 Suggested FixIn the 🤖 Prompt for AI AgentDid we get this right? 👍 / 👎 to inform future reviews.
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I would argue its a bug that we didnt do that before then (though its unlikely) it might cause an issue, since we have no idea what might be done in the event handler. |
||
|
|
||
| private void SidebarControl_ItemInvoked(object sender, ItemInvokedEventArgs e) | ||
| { | ||
| SidebarAdaptiveViewModel.HandleItemInvokedAsync(((SidebarItem)sender).Item, e.PointerUpdateKind); | ||
| } | ||
| } | ||
| } | ||
This file was deleted.

Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why didnt we already remove this as part of #15594?
Why did we even need add the MenuItems property for that fix if we just bound to the same thing at the end of the day?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This was used also in the SidebarView's automation peer class (which I changed in this PR).
I don't remember but no reason to delete it in that PR.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In that PR all of those should have switched away from that property, having two truths which elements we present is really strange. Regardless, I guess we get rid of it now.