-
Notifications
You must be signed in to change notification settings - Fork 53k
fix(editor): Improve handling of trailing 'Trigger' in NodeCreator search #14612
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
|
|
||
| describe('sublimeSearch', () => { | ||
| const testCases = [{ filter: 'agent', expectedOrder: ['Magento 2', 'AI Agent'] }]; | ||
| describe('search finds at least one match', () => { |
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.
Was gonna introduce another set of exact test matches, but will do so in follow up. This intends (use Whitespace only for review) and drops the weight parameter
| filter: string, | ||
| data: Readonly<T[]>, | ||
| keys: Array<{ key: string; weight: number }>, | ||
| keys: Array<{ key: string; weight: number }> = DEFAULT_KEYS, |
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.
Since we only have one use case this seems preferred over duplicating it in the test. Also happy to instead provide the variable in both call sites
Codecov ReportAttention: Patch coverage is
📢 Thoughts on this report? Let us know! |
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.
mrge found 1 issue across 4 files. View it in mrge.io
packages/frontend/editor-ui/src/components/Node/NodeCreator/utils.test.ts
Show resolved
Hide resolved
autologie
left a comment
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.
My comments may not apply if the user input is already normalized elsewhere beforehand
packages/frontend/editor-ui/src/components/Node/NodeCreator/utils.test.ts
Show resolved
Hide resolved
|
✅ All Cypress E2E specs passed |
|
Got released with |
Summary
First step of getting things tidied up here. We improve the filtering of
triggerto only do so if trailing another word, and, while we're at it, update it to work for partial completion as wellRelated Linear tickets, Github issues, and Community forum posts
https://linear.app/n8n/issue/ADO-3395/search-in-node-panel-doesnt-work-for-term-trigger
Review / Merge checklist
release/backport(if the PR is an urgent fix that needs to be backported)