-
-
Notifications
You must be signed in to change notification settings - Fork 2.1k
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
Code Quality: Use RichCommands in home and sidebar #15329
Code Quality: Use RichCommands in home and sidebar #15329
Conversation
src/Files.App/ViewModels/UserControls/Widgets/FileTagsWidgetViewModel.cs
Show resolved
Hide resolved
src/Files.App/ViewModels/UserControls/Widgets/DrivesWidgetViewModel.cs
Outdated
Show resolved
Hide resolved
src/Files.App/Actions/Navigation/OpenInNewWindow/OpenInNewWindowAction.cs
Outdated
Show resolved
Hide resolved
src/Files.App/Actions/Navigation/OpenInNewTab/OpenInNewTabAction.cs
Outdated
Show resolved
Hide resolved
src/Files.App/Actions/Navigation/OpenInNewPane/OpenInNewPaneAction.cs
Outdated
Show resolved
Hide resolved
Are the sidebar contexts hidden from the command palette and actions page? |
Ouch, I forgot to do that, will do. |
Done |
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.
- The app always crashes when closing a tab.
2024-06-01 23:41:04.2830|Error|System.NullReferenceException: Object reference not set to an instance of an object.
at Files.App.Views.PaneHolderPage.Dispose()
at Files.App.UserControls.TabBar.TabBarItem.Dispose()
at Files.App.UserControls.TabBar.TabBarItem.Unload()
at Files.App.UserControls.TabBar.BaseTabBar.CloseTab(TabBarItem tabItem)
at Files.App.UserControls.TabBar.BaseTabBar.TabView_TabCloseRequested(TabView sender, TabViewTabCloseRequestedEventArgs args)
at WinRT._EventSource_global__Windows_Foundation_TypedEventHandler_global__Microsoft_UI_Xaml_Controls_TabView__global__Microsoft_UI_Xaml_Controls_TabViewTabCloseRequestedEventArgs_.EventState.<GetEventInvoke>b__1_0(TabView sender, TabViewTabCloseRequestedEventArgs args)
at ABI.Windows.Foundation.TypedEventHandler`2.Do_Abi_Invoke[TSenderAbi,TResultAbi](Void* thisPtr, TSenderAbi sender, TResultAbi args)
- OpenInNewPaneFromSidebarAction always causes a crash.
2024-06-01 23:39:49.4049|Error|System.NullReferenceException: Object reference not set to an instance of an object.
at Files.App.Actions.OpenInNewPaneFromSidebarAction.ExecuteAsync(Object parameter)
at Files.App.Data.Commands.ActionCommand.Execute(Object parameter)
at System.Threading.Tasks.Task.<>c.<ThrowAsync>b__128_0(Object state)
at Microsoft.UI.Dispatching.DispatcherQueueSynchronizationContext.<>c__DisplayClass2_0.<Post>b__0()
Still occasionally crashes when opening tabs or panes from the home page.
|
Did you click Open command immediately after context menu opened? |
No, I didn't. I don't know under what conditions this occurs, but I don't think the null check is a fundamental solution since it occurred during normal operation. |
This should help unblock #4262 |
What's the latest on this PR? |
This problem hasn't been resolved. @0x5bfa put a null check, but I think the action may still not work just not crash. |
I tracked down the cause of crashes. If you right-click on one item and then right-click on another item without closing the first context menu, the item set in the opening event will be overwritten to null in the first context menu's closed event. |
The same problem exists in the sidebar, although it doesn't crash. |
Ah then this is fixed in widget? |
Yes👍 |
Nice! Thank you for checking. |
I found another issue. When I right-click a sidebar section title (Pinned, Drivers, etc.), Open in commands appear and the home page will open when executing them. The commands should not appear. |
Fixed |
src/Files.App/Actions/Navigation/OpenInNewTab/OpenInNewTabFromHomeAction.cs
Show resolved
Hide resolved
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.
LGTM
@0x5bfa can you resolve the merge conflicts? |
Resolved / Related Issues
To prevent extra work, all changes to the Files codebase must link to an approved issue marked as
Ready to build
. Please insert the issue number following the hashtag with the issue number that this Pull Request resolves.Steps used to test these changes
Stability is a top priority for Files and all changes are required to go through testing before being merged into the repo. Please include a list of steps that you used to test this PR.
Confirmed it's working