-
Notifications
You must be signed in to change notification settings - Fork 11
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
Migrate system commands extension #452
base: main
Are you sure you want to change the base?
Conversation
src/modules/cmdpal/Microsoft.CmdPal.UI.ViewModels/Commands/MainListPage.cs
Outdated
Show resolved
Hide resolved
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
I think the "idomatic" way to do this might be with the
If you need the dialog to prompt the user before doing something - that we haven't implemented yet (#399). If not - I think you've got two options:
|
@zadjii-msft So, there's another question, for the second usage you suggest, can we use it after the Invoke call finished? I mean, can we use it inside a async task and just fire and forget it in the Invoke function (such as, we start a async function to empty the bin but it throw exception. Then we need to show a toast to display the error message to user)? I‘m not sure if it will cause any problem. private readonly ToastStatusMessage _toast = new(new StatusMessage() { Message = "The recycle bin is empty", State = MessageState.Info }); And Details looks good for me. I will use it to replace the tag usage. |
YOu may need to merge But ideally, |
Thanks. CommandResult.ShowToast work for me but _toast.show not work. I agree, but for this empty task. It may take a long time. just consider if you have a very big (such as 20G) recycle bin, it may take more than 1 minute to finish the empty task. And we need (at least the v1 plugin author think) to show some message to user after the task complete. So, I think we need to keep the win32 messagebox in here at least for those purpose:
If in the future we successfully implement it in cmdpal (I'm happy to investigate), we can remove the win32 messagebox. |
hrumf. Seems like there's not a great way to
I can think of ways to do one of B or C, but not all three cleanly. |
Summary of the Pull Request
Seems most of them are work well now...
Need to fix if possible:
1. Tooltips:Seems we don't have a way to show tooltips for item itself? So, I need to create a tag to do it.
Use detail page to show the connection details.
2. ContentDialogI don't find a easy way to create a content dialog inside the extension...
So, I use win32 MessageBox instead.
Successfully implemented it!
Video.Project.8.mp4
PR Checklist
Detailed Description of the Pull Request / Additional comments
Validation Steps Performed