QNTM-5869: Search keywords split mechanism#9271
QNTM-5869: Search keywords split mechanism#9271scottmitchell merged 18 commits intoDynamoDS:masterfrom
Conversation
| <data name="PublishPackageViewPackageVersion" xml:space="preserve"> | ||
| <value>Version (major minor build)</value> | ||
| </data> | ||
| <data name="DynamoViewSettingsMenuIsolationMode" xml:space="preserve"> |
There was a problem hiding this comment.
I'm not sure where these resource changes are coming from
| // in AssemblyVersionInfo.cs so that it can be easily incremented by the | ||
| // automated build process. | ||
| [assembly: AssemblyVersion("2.1.0.4395")] | ||
| [assembly: AssemblyVersion("2.1.0.6957")] |
There was a problem hiding this comment.
you should usually not commit this file.
There was a problem hiding this comment.
Whoops, reverting this
| protected readonly Dictionary<V, Dictionary<string, double>> entryDictionary = | ||
| new Dictionary<V, Dictionary<string, double>>(); | ||
|
|
||
| public bool experimentalSearch = false; |
There was a problem hiding this comment.
I don't think I can make it private here because I need to be able to access it from the DynamoViewModel. Maybe I'm missing something?
There was a problem hiding this comment.
one option because this is an internal API is mark this internal and use [internalsVisibleAttribute] to make this property accessible from DynamoCoreWPF assembly.
| } | ||
| } | ||
|
|
||
| public bool ExperimentalSearch |
There was a problem hiding this comment.
should have a summary /// tag if this a public API - does it need to be public?
| // by using the '*' as shown below: | ||
| // [assembly: AssemblyVersion("1.0.*")] | ||
| [assembly: AssemblyFileVersion("2.1.0.4395")] | ||
| [assembly: AssemblyFileVersion("2.1.0.6957")] |
There was a problem hiding this comment.
I don't think that this file is usually included in PRs.
| get { return model.SearchModel.experimentalSearch; } | ||
| set | ||
| { | ||
| model.SearchModel.experimentalSearch = value; |
There was a problem hiding this comment.
I guess in this case it's not such a big deal, but you usually would not modify a field from another object - I think instead we usually use a property, in this case I think it makes sense to try and hide this field from external consumers - we don't want anyone to use it - in an extension for example.
|
@scottmitchell some other thoughts - You could also use an ifdef compile time flag using the debug config. |
|
@mjkkirschner @scottmitchell Either menu works. Just need it in some menu for testing.... if it looks ok, we will probably just make it the standard. |
|
If thats the case and its not really for users, but for us, my feeling is that it should go into the debug menu - I would also like to hide the API since it doesn't seem like something we want people using from extensions or packages. |
|
@mjkkirschner Sounds good to me. Let's put it in the debug menu and make the API private |
|
I think this is ready to go |
|
LGTM |
|
@scottmitchell is this waiting on something? |
|
@mjkkirschner This is waiting on @Racel 's review in R2020 |
| query = query.ToLower(); | ||
|
|
||
| var subPatterns = SplitOnWhiteSpace(query); | ||
|
|
There was a problem hiding this comment.
Just as a question; should this code be wrapped in #if DEBUG statements? Probably not necessary, but I am doing the same type of code and wanted to get the group thought about if it is needed/wanted or not.
There was a problem hiding this comment.
I think because this code is already in the debug only menu it's fine not to use a compiler flag. On the other hand, for performance impacting code - like Console.WriteLine I would use a debug flag:
https://stackoverflow.com/questions/18464833/console-writeline-effect-on-performance
| { | ||
| get { return experimentalSearch; } | ||
| set { experimentalSearch = value; } | ||
| } |
There was a problem hiding this comment.
When implementing my own debug mode VS suggested;
internal bool ExperimentalSearch { get; set; } = false;
There was a problem hiding this comment.
@ColinDayOrg Yep, that's cleaner. Fixed.
|
@scottmitchell there's now conflicts on this branch from your other PR I think - might making @Racel 's review harder. |
|
@mjkkirschner Look's like it was caused by @ColinDayOrg 's PR. I'll fix. |
| IsChecked="{Binding ShowDebugASTs}"></MenuItem> | ||
| <MenuItem Focusable="False" | ||
| Name="ExperimentalSearch" | ||
| Name="TruncateSearchResults" |
There was a problem hiding this comment.
@ColinDayOrg FYI I renamed your menu item name
There was a problem hiding this comment.
Good catch, thanks. I am assuming that the "TruncateSearchResults" menu has been checked to test if it still works as expected after this change?
There was a problem hiding this comment.
I just did a quick test to verify that the menu still works in the current master codebase after this specific change, so it seems ok to me.
|
Other than the one question, LGTM. |
Purpose
This PR addresses jira task QNTM-5869: Search keywords split mechanism.
This PR does:
Declarations
Check these if you believe they are true
*.resxfilesReviewers
@mjkkirschner @ColinDayOrg @Racel