From c56fff0b8b152d012564e595b767f299b5212b3c Mon Sep 17 00:00:00 2001 From: Johnpaul Chiwetelu <49923152+Myestery@users.noreply.github.com> Date: Wed, 8 Oct 2025 22:06:03 +0100 Subject: [PATCH] Workflow templates review (#5975) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This pull request introduces improvements to the workflow template selector and search box components, focusing on better user experience and more accurate terminology. The most significant changes include adding debounced search input handling, updating sorting option labels, and refining UI styling for consistency. **Search functionality improvements:** * Refactored `SearchBox.vue` to use an internal search query state and a debounced update mechanism, reducing unnecessary parent updates and improving responsiveness. The parent model is updated only after the user stops typing for 300ms. (`src/components/input/SearchBox.vue`) [[1]](diffhunk://#diff-08f3b0c51fbfe63171509b9944bf7558228f6c2596a1ef5338e88ab64585791bL6-R6) [[2]](diffhunk://#diff-08f3b0c51fbfe63171509b9944bf7558228f6c2596a1ef5338e88ab64585791bR39-R62) * Updated the search box in `WorkflowTemplateSelectorDialog.vue` to use the new debounced search model and increased its size for better visibility. (`src/components/custom/widget/WorkflowTemplateSelectorDialog.vue`) **Sorting and terminology updates:** * Changed sorting option labels to use more precise terminology, such as "VRAM Usage (Low to High)" and added new locale strings for sorting options. (`src/components/custom/widget/WorkflowTemplateSelectorDialog.vue`, `src/locales/en/main.json`) [[1]](diffhunk://#diff-2c860bdc48e907b1b85dbef846599d8376dd02cff90f49e490eebe61371fecedL623-R623) [[2]](diffhunk://#diff-bbf3da78aeff5b4d868a17a6960d109cb0627316cda2f9b5fa7c08e9abd93be6L1032-R1035) **UI and styling adjustments:** * Adjusted the width of the sorting dropdown for better alignment and consistency. (`src/components/custom/widget/WorkflowTemplateSelectorDialog.vue`) * Updated active navigation item background color for improved visual clarity. (`src/components/widget/nav/NavItem.vue`) ┆Issue is synchronized with this [Notion page](https://www.notion.so/PR-5975-Workflow-templates-review-2866d73d365081419257f9df2bab9c5b) by [Unito](https://www.unito.io) https://github.com/user-attachments/assets/4f72d515-f114-4cd4-8a76-6abbe906e5bb --- .../widget/WorkflowTemplateSelectorDialog.vue | 9 +- src/components/input/SearchBox.test.ts | 192 ++++++++++++++++++ src/components/input/SearchBox.vue | 28 ++- src/components/widget/nav/NavItem.vue | 2 +- src/locales/en/main.json | 5 +- 5 files changed, 226 insertions(+), 10 deletions(-) create mode 100644 src/components/input/SearchBox.test.ts diff --git a/src/components/custom/widget/WorkflowTemplateSelectorDialog.vue b/src/components/custom/widget/WorkflowTemplateSelectorDialog.vue index 9cc35d65a..908366cb2 100644 --- a/src/components/custom/widget/WorkflowTemplateSelectorDialog.vue +++ b/src/components/custom/widget/WorkflowTemplateSelectorDialog.vue @@ -17,7 +17,7 @@