-
Notifications
You must be signed in to change notification settings - Fork 8.8k
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
feat(editor): Add new /templates/search
endpoint
#8227
Merged
Merged
Changes from all commits
Commits
Show all changes
27 commits
Select commit
Hold shift + click to select a range
cded13e
feat(editor): Update search UI to work with the new back-end
MiloradFilipovic d656a68
Merge branch 'master' into ADO-1555-use-new-search-enpoint
MiloradFilipovic e3bc01a
⚡ Showing typesense filters in UI
MiloradFilipovic b5ecfad
⚡ Make filtering work with new back-end
MiloradFilipovic ab1f3ff
Lint fix
MiloradFilipovic c4f052b
fix all categories count
RicardoE105 080212c
fix category querystring filter
RicardoE105 cd11dd8
sync master
RicardoE105 71b9c93
fix linting issues
RicardoE105 77849c2
Merge branch 'master' into ADO-1555-use-new-search-enpoint
MiloradFilipovic 2cda63c
⚡ Removing total template count from All Categories filter
MiloradFilipovic 093cca0
👌 Renaming search parameters to match typsense, not showing 0 in work…
MiloradFilipovic f679cab
⚡ Revert categories filter so it uses static lists
MiloradFilipovic 2a5df55
👕 Removing leftover interface, formatting code, adding defaults for p…
MiloradFilipovic 1d6b3d6
👌 Fixing collection filtering and URL search restore
MiloradFilipovic 3a279e9
⚡ Promoting selected categories on top, minor refactoring
MiloradFilipovic dde2a6f
🔥 Removing leftover comments
MiloradFilipovic 33102a8
Merge branch 'master' into ADO-1555-use-new-search-enpoint
MiloradFilipovic e1156f1
🔨 Using computed props instead of watchers, fixing search query resto…
MiloradFilipovic bc21b55
✅ Added templates search e2e tests
MiloradFilipovic 620c060
⚡ Add back category loading state
MiloradFilipovic bf0010a
🔨 Using mocks in template search tests
MiloradFilipovic bc54f21
⚡ Fixing parentheses in template count labels
MiloradFilipovic f66cc45
🐛 Only sort categories one time, when they are populated
MiloradFilipovic e25f983
✔️ Updating tests after components have been updated
MiloradFilipovic 4377ccd
⚡ Updating template search page size to20
MiloradFilipovic 2b90208
✔️ Updating intercepted urls
MiloradFilipovic File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
1,071 changes: 1,071 additions & 0 deletions
1,071
cypress/fixtures/templates_search/all_templates_search_response.json
Large diffs are not rendered by default.
Oops, something went wrong.
1,316 changes: 1,316 additions & 0 deletions
1,316
cypress/fixtures/templates_search/sales_templates_search_response.json
Large diffs are not rendered by default.
Oops, something went wrong.
19 changes: 19 additions & 0 deletions
19
cypress/fixtures/templates_search/test_template_import.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
{ | ||
"id": 60, | ||
"name": "test1 test1", | ||
"workflow": { | ||
"nodes": [ | ||
{ | ||
"name": "Start", | ||
"type": "n8n-nodes-base.start", | ||
"position": [ | ||
250, | ||
300 | ||
], | ||
"parameters": {}, | ||
"typeVersion": 1 | ||
} | ||
], | ||
"connections": {} | ||
} | ||
} |
150 changes: 150 additions & 0 deletions
150
cypress/fixtures/templates_search/test_template_preview.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,150 @@ | ||
{ | ||
"workflow": { | ||
"id": 60, | ||
"name": "test1 test1", | ||
"views": 120000000, | ||
"recentViews": 0, | ||
"totalViews": 120000000, | ||
"createdAt": "2019-08-30T16:39:31.362Z", | ||
"description": "here is a description. here is a description. here is a description. \n\n![Screenshot from 20190806 091433.png](fileId:88)", | ||
"workflow": { | ||
"nodes": [ | ||
{ | ||
"name": "Start", | ||
"type": "n8n-nodes-base.start", | ||
"position": [ | ||
250, | ||
300 | ||
], | ||
"parameters": {}, | ||
"typeVersion": 1 | ||
} | ||
], | ||
"connections": {} | ||
}, | ||
"lastUpdatedBy": null, | ||
"workflowInfo": { | ||
"nodeCount": 1, | ||
"nodeTypes": { | ||
"n8n-nodes-base.start": { | ||
"count": 1 | ||
} | ||
} | ||
}, | ||
"user": { | ||
"username": "admin" | ||
}, | ||
"nodes": [ | ||
{ | ||
"id": 11, | ||
"icon": "file:amqp.png", | ||
"name": "n8n-nodes-base.amqpTrigger", | ||
"defaults": { | ||
"name": "AMQP Trigger" | ||
}, | ||
"iconData": { | ||
"type": "file", | ||
"fileBuffer": "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADwAAAA8CAYAAAA6/NlyAAAB7UlEQVRoge2W4W3CMBCFj26QjkBHSEdIR4AR6Ah0BBgBRqAjhBFgBBghHaEVlV29PN0lDr+o9D7JEjhn+975bJ8JIYQQQgghhBBCCCGEEA9CY2bf0NaBW2uyu7UN2XSOzTyY60J2BzNbObbsH7eTmS2mhHJHE1wmCD7A93ngEAquHaHc2omCcysSXQW74g32BHfwfTEiuCoQm9vuDsEndPYpELxKjjBj0foCEXX6XdM3by3c7aOZPZvZzMzeaBzbIh9pzIuZXaG/RqNIMAq7Ur8XCHQ2kx3LC56DMQ39X4LI23zbAd88ruRHD09wTVF5p+/eBZI5g7O8w5FgXOvsZAI7PxRwS4HGIPbm8wRjBL/Sgp/QNyQYHWySmOxgJBgFeGnPfZHgDVyufET+YMEVCdo7gziCTBbGmRKlGQpCMXOnj+1L6B0JFsxndO3cjjZyjo6OnZeqGb5gqhTQS3qKeK1SwbesfB3IrF/awqu+g8Dgs5SLE37SciHiPUv8rLVp7k2wdl63tDDqgTs8lqpINWGXbSTKe9rlJgXME7C9I6V7oGAWsEzv2gzeN2TstkbCZyIJWBYKWUwtF4foKGU9TpRGdZDSdVDpDNXSVVBLt5TeucS9K6X/E3USX3rshBBCCCGEEEIIIYQQ4tExsx8PuuPnwhCIbgAAAABJRU5ErkJggg==" | ||
}, | ||
"categories": [ | ||
{ | ||
"id": 5, | ||
"name": "Development" | ||
}, | ||
{ | ||
"id": 6, | ||
"name": "Communication" | ||
} | ||
], | ||
"displayName": "AMQP Trigger", | ||
"typeVersion": 1 | ||
}, | ||
{ | ||
"id": 18, | ||
"icon": "file:autopilot.svg", | ||
"name": "n8n-nodes-base.autopilot", | ||
"defaults": { | ||
"name": "Autopilot" | ||
}, | ||
"iconData": { | ||
"type": "file", | ||
"fileBuffer": "data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjM4IDI2IDM1IDM1Ij48Y2lyY2xlIGN4PSI1MCIgY3k9IjUwIiByPSI0MCIgc3Ryb2tlPSIjMThkNGIyIiBzdHJva2Utd2lkdGg9IjMiIGZpbGw9IiMxOGQ0YjIiLz48cGF0aCBmaWxsPSIjZmZmIiBkPSJNNDUuNCA0Mi42aDE5LjlsMy40LTQuOEg0MmwzLjQgNC44em0zLjEgOC4zaDEzLjFsMy40LTQuOEg0NS40bDMuMSA0Ljh6bTU0LS43Ii8+PC9zdmc+" | ||
}, | ||
"categories": [ | ||
{ | ||
"id": 1, | ||
"name": "Marketing" | ||
} | ||
], | ||
"displayName": "Autopilot", | ||
"typeVersion": 1 | ||
}, | ||
{ | ||
"id": 20, | ||
"icon": "file:lambda.svg", | ||
"name": "n8n-nodes-base.awsLambda", | ||
"defaults": { | ||
"name": "AWS Lambda" | ||
}, | ||
"iconData": { | ||
"type": "file", | ||
"fileBuffer": "data:image/svg+xml;base64,PHN2ZyBoZWlnaHQ9IjI1MDAiIHZpZXdCb3g9Ii0zLjAyMyAtMC4yMiA0MjAuOTIzIDQzMy41NCIgd2lkdGg9IjI0NDMiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PHBhdGggZD0iTTIwOC40NS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LjYxLTIuNTItLjA1LTMuMTctMS42OHEtMTguNjEtNDcuMTYtMzcuMzEtOTQuMjgtMTguMjktNDYuMTQtMzYuNi05Mi4yOGMtMS44My00LjYyLTMuNjMtOS4yNi01LjQ2LTEzLjg4LS4yOS0uNzktLjY5LTEuNDgtMS4yNy0yLjd6IiBmaWxsPSIjZmE3ZTE0Ii8+PC9zdmc+" | ||
}, | ||
"categories": [ | ||
{ | ||
"id": 5, | ||
"name": "Development" | ||
} | ||
], | ||
"displayName": "AWS Lambda", | ||
"typeVersion": 1 | ||
}, | ||
{ | ||
"id": 40, | ||
"icon": "file:clearbit.svg", | ||
"name": "n8n-nodes-base.clearbit", | ||
"defaults": { | ||
"name": "Clearbit" | ||
}, | ||
"iconData": { | ||
"type": "file", | ||
"fileBuffer": "data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSI3MiIgaGVpZ2h0PSI3MiI+PGRlZnM+PGxpbmVhckdyYWRpZW50IGlkPSJhIiB4MT0iNTAlIiB4Mj0iMTAwJSIgeTE9IjAlIiB5Mj0iMTAwJSI+PHN0b3Agb2Zmc2V0PSIwJSIgc3RvcC1jb2xvcj0iI0RFRjJGRSIvPjxzdG9wIG9mZnNldD0iMTAwJSIgc3RvcC1jb2xvcj0iI0RCRjFGRSIvPjwvbGluZWFyR3JhZGllbnQ+PGxpbmVhckdyYWRpZW50IGlkPSJiIiB4MT0iMCUiIHgyPSI1MCUiIHkxPSIwJSIgeTI9IjEwMCUiPjxzdG9wIG9mZnNldD0iMCUiIHN0b3AtY29sb3I9IiM1N0JDRkQiLz48c3RvcCBvZmZzZXQ9IjEwMCUiIHN0b3AtY29sb3I9IiM1MUI1RkQiLz48L2xpbmVhckdyYWRpZW50PjxsaW5lYXJHcmFkaWVudCBpZD0iYyIgeDE9IjM3LjUlIiB4Mj0iNjIuNSUiIHkxPSIwJSIgeTI9IjEwMCUiPjxzdG9wIG9mZnNldD0iMCUiIHN0b3AtY29sb3I9IiMxQ0E3RkQiLz48c3RvcCBvZmZzZXQ9IjEwMCUiIHN0b3AtY29sb3I9IiMxNDhDRkMiLz48L2xpbmVhckdyYWRpZW50PjwvZGVmcz48ZyBmaWxsPSJub25lIiBmaWxsLXJ1bGU9ImV2ZW5vZGQiPjxwYXRoIGZpbGw9InVybCgjYSkiIGQ9Ik03MiAzNnYxNi43N2wtLjAwNC44NjhjLS4wNiA2LjAzNS0uNzUgOC4zNTMtMiAxMC42ODhhMTMuNjMgMTMuNjMgMCAwMS01LjY3IDUuNjdsLS4zMjYuMTcxQzYxLjY1OCA3MS4zNjQgNTkuMTYgNzIgNTIuNzcgNzJIMzZWMzZoMzZ6Ii8+PHBhdGggZmlsbD0idXJsKCNiKSIgZD0iTTY0LjMyNiAyLjAwM2ExMy42MyAxMy42MyAwIDAxNS42NyA1LjY3bC4xNzEuMzI3QzcxLjM2NCAxMC4zNDIgNzIgMTIuODQgNzIgMTkuMjNWMzZIMzZWMGgxNi43N2M2LjY4NyAwIDkuMTEyLjY5NiAxMS41NTYgMi4wMDN6Ii8+PHBhdGggZmlsbD0idXJsKCNjKSIgZD0iTTM2IDB2NzJIMTkuMjNsLS44NjgtLjAwNGMtNi4wMzUtLjA2LTguMzUzLS43NS0xMC42ODgtMmExMy42MyAxMy42MyAwIDAxLTUuNjctNS42N0wxLjgzMiA2NEMuNjM2IDYxLjY1OCAwIDU5LjE2IDAgNTIuNzdWMTkuMjNjMC02LjY4Ny42OTYtOS4xMTIgMi4wMDMtMTEuNTU2YTEzLjYzIDEzLjYzIDAgMDE1LjY3LTUuNjdMOCAxLjgzMkMxMC4zNDIuNjM2IDEyLjg0IDAgMTkuMjMgMEgzNnoiLz48L2c+PC9zdmc+" | ||
}, | ||
"categories": [ | ||
{ | ||
"id": 2, | ||
"name": "Sales" | ||
} | ||
], | ||
"displayName": "Clearbit", | ||
"typeVersion": 1 | ||
}, | ||
{ | ||
"id": 51, | ||
"icon": "file:convertKit.svg", | ||
"name": "n8n-nodes-base.convertKitTrigger", | ||
"defaults": { | ||
"name": "ConvertKit Trigger" | ||
}, | ||
"iconData": { | ||
"type": "file", | ||
"fileBuffer": "data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTcyIiBoZWlnaHQ9IjE2MCIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj48cGF0aCBkPSJNODIuNzIgMTI2LjMxNmMyOS43NyAwIDUyLjc4LTIyLjYyMiA1Mi43OC01MC41MjYgMC0yNi4xNDMtMjEuNjE3LTQyLjEwNi0zNS45MzUtNDIuMTA2LTE5Ljk0NSAwLTM1LjkzIDE0LjA4NC0zOC4xOTggMzQuOTg4LS40MTggMy44NTYtMy40NzYgNy4wOS03LjM1NSA3LjA2MS02LjQyMy0uMDQ2LTE1Ljc0Ni0uMS0yMS42NTgtLjA4LTIuNTU1LjAwOC00LjY2OS0yLjA2NS00LjU0My00LjYxOC44OS0xOC4xMjMgNi45MTQtMzUuMDcgMTguNDAyLTQ4LjA4N0M1OC45NzYgOC40ODggNzcuNTYxIDAgOTkuNTY1IDBjMzYuOTY5IDAgNzEuODY5IDMzLjc4NiA3MS44NjkgNzUuNzkgMCA0Ni41MDgtMzguMzEyIDg0LjIxLTg3LjkyNyA4NC4yMS0zNS4zODQgMC03MS4wMjEtMjMuMjU4LTgzLjQ2NC01NS43NzVhLjcwMi43MDIgMCAwMS0uMDMtLjM3N2MuMTY1LS45NjIuNDk0LTEuODQxLjgxOC0yLjcwNy40NzEtMS4yNTguOTMxLTIuNDg4Ljg2NC0zLjkwNmwtLjIxNS00LjUyOWE1LjUyMyA1LjUyMyAwIDAxMy4xOC01LjI2M2wxLjc5OC0uODQyYTYuOTgyIDYuOTgyIDAgMDAzLjkxMi01LjA3NSA2Ljk5MyA2Ljk5MyAwIDAxNi44ODctNS43MzZjNS4yODIgMCA5Ljg3NSAzLjUxNSAxMS41OSA4LjUxMiA4LjMwNyAyNC4yMTIgMjEuNTExIDQyLjAxNCA1My44NzMgNDIuMDE0eiIgZmlsbD0iI0ZCNjk3MCIvPjwvc3ZnPg==" | ||
}, | ||
"categories": [ | ||
{ | ||
"id": 1, | ||
"name": "Marketing" | ||
}, | ||
{ | ||
"id": 2, | ||
"name": "Sales" | ||
} | ||
], | ||
"displayName": "ConvertKit Trigger", | ||
"typeVersion": 1 | ||
} | ||
], | ||
"categories": [], | ||
"image": [] | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
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.
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.
Should we drop the endpoint to retrieve the categories since we are not using it anymore? @MiloradFilipovic
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 think we need it for backward compatibility