-
-
Notifications
You must be signed in to change notification settings - Fork 455
Add specific keyword for path explore in explorer plugin #449
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
Conversation
.editorconfig
Outdated
| [*.cs] | ||
|
|
||
| # IDE0011: 添加大括号 | ||
| csharp_prefer_braces = when_multiline |
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.
is this needed?
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.
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.
Sorry I forget to response to this message. I add that because vs is consistently asking me to add brace after if. I don't notice that it will be pushed to the repo. Sorry.
I will be afk for these two days, so I will revise that after tomorrow.
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.
All good, I wasn't sure of this option. I might remove it next time I continue to review this pr, if you haven't done do.
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.
Thank you
|
can we keep the action keyword to trigger both index and path search? |
|
i am making some enhancements to allow using the original search action keyword or dedicated path and index action keywords. will push up soon. |
|
this issue should resolve 355 not 292 right? |
Ah you are right |
|
were you ever able to successfully implement allowing duplicate action keywords? |
I only allow duplicate * keyword, but it is possible to implement duplicate action keywords without #227 |
|
Do we want all actionkeyword in Explorer plugin can be the same? Or only Path and Index search, while full-text search will remain distinct? |
|
Maybe just hold off if you are going to make changes, I have made some new changes but have not pushed up yet. Will do so tomorrow |
|
@taooceros I think it's better to keep the Search Activation action keyword for the scenario where you can still use one action keyword to search index & path. We can add additional action keywords this way as well so we get the best of both scenarios. I made the changes in #457, please take a look and let me know what you think, merge if all good. |
1. Moving Property match to Settings.cs 2. Use Binding to avoid explicit Function Assign 3. Simplify ActionKeywordMatch
update to ExplorerPathActionkeyword branch
|
found an issue with current action keyword binding, to repro- change file content keyword will reveal that the current action keyword is already assigned. |
|
binding causes cancel to be ineffective too, think we can switch OK to Done and remove Cancel |
Yeah if that's OK for you. I think I forget to implement cancel. 😂😖 |
yeah something like that. When user want to enable global, it will return false and show users that this is already assigned, because the old one is equal to the new one. |
|
Hold on it shouldnt show the message to tell user there is already one assigned in my latest commit, Are you working off that? |
|
Basically it should behave as- do not update the search keyword if it (global/non global) is already assigned. |
Not sure whether I have changed something wrong. Let me take a look on the current commit. |
|
Additionally, if action keyword is disabled, and user changes action keyword, then enable it automatically. If action keyword is enabled and user disable it, automatically revert to global |
Yes, I see these logic and keep them. There's a logic issue on the last commit. If the IsActionKeywordAssigned return false, it will still close the window, but not to tell user that they are supposed to change some setting that is not allowed. I believe that why you don't discover the issue. |
Yes good pick up lol, I forgot abt that use case. |
…etting.xaml 1. It will automatically focus on the textbox 2. Enter will trigger the done button
|
I finish the editing. Now, ActionKeywordView is linked to setting.actionkeyword, and it will only be trigger when hitting the done button. We can add the Cancel Button back if you want because I use two temp field to store ActionKeyword and Enabled for binding (because I directly linked ActionKeywordView to setting, so using another instance of that won't work for this design). |
|
let me take it for a spin
I dont really mind not having the cancel button, i think this is more modern design right? the only thing i think worth thinking about is it's not consistent with the rest of the plugins, but i would prefer modern design and put in effort to move the default plugins as well as Flow's interface towards that. |
|
Getting this error when i change search action keyword to e (which works and triggers) then switch back to global (then nothing works, no results from any plugin displays): Exception thrown: 'System.Collections.Generic.KeyNotFoundException' in System.Private.CoreLib.dll |
Well, I am not sure whether not having a cancel button is a more modern design (in fact, what's a more modern design is hard to be argued). |
That seems some concurrency issue? Let me take a check on that. |
|
hmmm Let me check for the update logic |
|
I found the issue. When we have a temp query, and change the actionkeyword for a plugin, it will result the dictionary being changed, but this method will access last time actionkeyword to check for removing results. Therefore, it will result the issue. I will fix it soon. |
|
I rethink logic about that. We don't need to make it so complicate. Only if current actionkeyword and lastactionkeyword is null, we need to refresh the view. No need for only removing results for certain plugins because every query results will refresh their plugin results else where (which is not incremental). Removing all will be fine and clear. |
|
From testing, fixed two minor logic issue with file content search and revert to global when disabled, otherwise 💯 , lets get this merged. |

resolve #355
Seperated directory and index search, original main search is still intact.
Allow action keywords (except file content search) to be disabled, reduces query time when not used.
When an action keyword is not used, disable it automatically
When user changes a disabled action keyword, enable it automatically