fix(designer): Fix issue where characters later in a token name would carry less relevence in a search #4736
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Fixes #4731
CleanShot.2024-04-29.at.22.03.23.mp4
This pull request primarily focuses on improving the search functionality across various components of the application. The key change in this pull request is the addition of the
ignoreLocation
option in the Fuse search configuration. This option has been added in multiple places across the application, which signifies that the location of the match within the text (i.e., the position of the characters in the match relative to the whole text) will no longer affect the search results. This change could potentially improve the accuracy of search results.Key changes include:
Fuse search configuration updates:
libs/data-mapper/src/lib/components/functionList/FunctionList.tsx
: AddedignoreLocation: true
to thefuseFunctionSearchOptions
configuration.libs/data-mapper/src/lib/utils/Schema.Utils.ts
: AddedignoreLocation: true
to thesearchSchemaTreeFromRoot
function's Fuse configuration.libs/designer-ui/src/lib/azureResourcePicker/index.tsx
: AddedignoreLocation: true
to thefuseOptions
configuration.libs/designer-ui/src/lib/tokenpicker/tokenpickersection/tokenpickeroption.tsx
: AddedignoreLocation: true
to the Fuse configuration in theTokenPickerOptions
component. Also, thethreshold
value has been updated from0.2
to0.4
.libs/designer/src/lib/ui/panel/nodeSearchPanel/nodeSearchPanel.tsx
: AddedignoreLocation: true
to thefuseOptions
configuration.libs/designer/src/lib/ui/panel/recommendation/searchView.tsx
: AddedignoreLocation: true
to the Fuse configuration in theDefaultSearchOperationsService
class.