-
Notifications
You must be signed in to change notification settings - Fork 10
Hook up the buttons, and othe UX nits #229
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
Changes from 31 commits
5de29f9
0012c16
642d98d
09b63d6
275b0af
9bf4d2e
ad9635c
2016bcb
113a6c6
2cc5399
2d032b1
038ac0a
bd6140d
c96c93b
a3f4d55
1a3c740
3f9c9b8
cd9dbc5
a407eb5
c91adc2
956c798
abbaefb
34282b3
b217728
b9d8b7e
70773b0
cd57e30
a8bbc70
8ff54d4
0b00cdc
7d98ac7
8f21516
08f7977
f56693c
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -2,39 +2,27 @@ | |
| // The Microsoft Corporation licenses this file to you under the MIT license. | ||
| // See the LICENSE file in the project root for more information. | ||
|
|
||
| using System; | ||
| using System.Collections.Generic; | ||
| using System.IO; | ||
| using System.Linq; | ||
| using System.Net.Http; | ||
| using System.Runtime.InteropServices; | ||
| using System.Runtime.InteropServices.WindowsRuntime; | ||
| using System.Text.RegularExpressions; | ||
| using System.Threading.Tasks; | ||
| using System.Xml.Linq; | ||
| using Microsoft.CmdPal.Ext.WindowsServices.Helpers; | ||
| using Microsoft.CmdPal.Extensions; | ||
| using Microsoft.CmdPal.Extensions.Helpers; | ||
| using Microsoft.UI.Windowing; | ||
|
|
||
| namespace Microsoft.CmdPal.Ext.WindowsServices; | ||
|
|
||
| internal sealed partial class ServicesListPage : DynamicListPage | ||
| { | ||
| public ServicesListPage() | ||
| { | ||
| Icon = new(string.Empty); | ||
| Icon = new("%windir%\\system32\\filemgmt.dll"); | ||
|
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 don't know why this line gives me a lot of joy. |
||
| Name = "Windows Services"; | ||
| } | ||
|
|
||
| public override void UpdateSearchText(string oldSearch, string newSearch) | ||
| { | ||
| RaiseItemsChanged(0); | ||
| } | ||
| public override void UpdateSearchText(string oldSearch, string newSearch) => RaiseItemsChanged(0); | ||
|
|
||
| public override IListItem[] GetItems() | ||
| { | ||
| ListItem[] items = ServiceHelper.Search(SearchText).ToArray(); | ||
| var items = ServiceHelper.Search(SearchText).ToArray(); | ||
|
|
||
| return items; | ||
| } | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -4,8 +4,9 @@ | |
|
|
||
| namespace Microsoft.CmdPal.UI.ViewModels.Messages; | ||
|
|
||
| // Want to know what a record is? here is a TLDR | ||
| // https://learn.microsoft.com/en-us/dotnet/csharp/language-reference/builtin-types/record | ||
| public record NavigateToDetailsMessage(ListItemViewModel ListItem) | ||
| /// <summary> | ||
| /// Used to perform a list item's secondary command when the user presses ctrl+enter in the search box | ||
| /// </summary> | ||
| public record ActivateSecondaryCommandMessage | ||
|
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. Is this just a to do? |
||
| { | ||
| } | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,12 @@ | ||
| // Copyright (c) Microsoft Corporation | ||
| // The Microsoft Corporation licenses this file to you under the MIT license. | ||
| // See the LICENSE file in the project root for more information. | ||
|
|
||
| using Microsoft.CmdPal.Extensions; | ||
| using Microsoft.CmdPal.UI.ViewModels.Models; | ||
|
|
||
| namespace Microsoft.CmdPal.UI.ViewModels.Messages; | ||
|
|
||
| public record HandleCommandResultMessage(ExtensionObject<ICommandResult> Result) | ||
| { | ||
| } |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,12 @@ | ||
| // Copyright (c) Microsoft Corporation | ||
| // The Microsoft Corporation licenses this file to you under the MIT license. | ||
| // See the LICENSE file in the project root for more information. | ||
|
|
||
| namespace Microsoft.CmdPal.UI.ViewModels.Messages; | ||
|
|
||
| /// <summary> | ||
| /// Used to perform a list item's secondary command when the user presses ctrl+enter in the search box | ||
| /// </summary> | ||
| public record OpenContextMenuMessage | ||
| { | ||
|
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. What are the purposes of all the messages? Looks like all the bodies are empty -- what do we use these for? 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. oh I guess this is referred to elsewhere -- not sure exactly what for 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. @joadoumie these represent the objects of the messages themselves that get passed to the MVVM Toolkit Messenger we use to do communication across components/layers of the application. Many of them don't have extra parameters, like this one, and are just a signal that some event has happened. In this case, it's a request to open the context menu. It's coming from the keyboard handlers in the searchbox (iirc) in order to trigger opening the menu in the ActionBar as they're two independent UI controls now. |
||
| } | ||
|
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. 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. woah what 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. Yeah, we might have a few hardcoded heights. Will tackle that in a separate PR once this gets in. |


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.
nit: should we clean up the file name -- 'AppAction' made sense in Wox land as Wox has actions, but since we are aiming for command palette vibes, probably should be
AppCommand.csThere 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.
We need to make a pass over a lot more than just this file - definitely better to do in a separate PR