-
Notifications
You must be signed in to change notification settings - Fork 661
fix: toolbox search final trigram #2648
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
fix: toolbox search final trigram #2648
Conversation
add regression test asserting long queries require their trailing trigram adjust trigram loop to cover the last trigram so partial matches stop passing
cover trigram edge cases, underscore normalization, dropdown alt text, and disambiguation of similar blocks
|
Thank you for identifying and reporting this issue and sending a fix! I really appreciate the improved tests as well. I just had two minor questions, and if you could run |
| searcher.indexBlocks([blockInfo]); | ||
|
|
||
| assert.sameMembers( | ||
| searcher.blockTypesMatching('custom block with underscore'), |
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.
If the test is verifying that underscores in the block type get treated as spaces, should this be 'searcher underscore block'? As written this would match the unmodified message, but not verify the normalization of the block type.
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.
I have update the code to verify the block type searcher_underscore_block gets normalised
| options: [ | ||
| [ | ||
| { | ||
| src: 'data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEA', |
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.
This doesn't appear to actually be a valid image; if it doesn't otherwise cause problems, can you set src to '' here and below to avoid confusion as to what this is and whether the particular value is relevant to the test case?
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.
i have deleted the contents of src strings. they are empty strings now
|
Thank you for making these changes, I really appreciate the fix! |
The basics
The details
Resolves
Fixes #2645
Proposed Changes
Reason for Changes
Test Coverage
npm test -- --runInBand(blockly-scripts test)Documentation
Additional Information