From 8550b7a34db94e858f021ffcbbb07aaf3fd190b8 Mon Sep 17 00:00:00 2001 From: R2bEEaton Date: Thu, 1 Sep 2022 06:15:34 -0400 Subject: [PATCH 1/4] Automation list sort alphabetically by name #7565 This commit addresses issue #7565 (mine). Automations are currently sorted by internal ID and not by name, which makes it slightly harder to find an automation from a user's point of view. --- .../components/automation/AutomationPanel/AutomationList.svelte | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/builder/src/components/automation/AutomationPanel/AutomationList.svelte b/packages/builder/src/components/automation/AutomationPanel/AutomationList.svelte index 53b0603ebb..68361a8d25 100644 --- a/packages/builder/src/components/automation/AutomationPanel/AutomationList.svelte +++ b/packages/builder/src/components/automation/AutomationPanel/AutomationList.svelte @@ -23,7 +23,7 @@
- {#each $automationStore.automations as automation, idx} + {#each _.orderBy($automationStore.automations, ['name'], ['asc']) as automation, idx} 0} icon="ShareAndroid" From 1c83caafc05067b878038288b823be43a0bdf17a Mon Sep 17 00:00:00 2001 From: R2bEEaton Date: Thu, 1 Sep 2022 06:29:38 -0400 Subject: [PATCH 2/4] import _ from 'lodash" Missed the import for the `_` from Lodash. --- .../components/automation/AutomationPanel/AutomationList.svelte | 1 + 1 file changed, 1 insertion(+) diff --git a/packages/builder/src/components/automation/AutomationPanel/AutomationList.svelte b/packages/builder/src/components/automation/AutomationPanel/AutomationList.svelte index 68361a8d25..4f4d6e488d 100644 --- a/packages/builder/src/components/automation/AutomationPanel/AutomationList.svelte +++ b/packages/builder/src/components/automation/AutomationPanel/AutomationList.svelte @@ -5,6 +5,7 @@ import NavItem from "components/common/NavItem.svelte" import EditAutomationPopover from "./EditAutomationPopover.svelte" import { notifications } from "@budibase/bbui" + import _ from 'lodash' $: selectedAutomationId = $automationStore.selectedAutomation?.automation?._id From c0c6f34e4a27054dab5438fa9bd0d7503ecbbfdc Mon Sep 17 00:00:00 2001 From: R2bEEaton Date: Thu, 1 Sep 2022 06:36:39 -0400 Subject: [PATCH 3/4] possible fix for yarn lint --- .../automation/AutomationPanel/AutomationList.svelte | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/builder/src/components/automation/AutomationPanel/AutomationList.svelte b/packages/builder/src/components/automation/AutomationPanel/AutomationList.svelte index 4f4d6e488d..688d5be769 100644 --- a/packages/builder/src/components/automation/AutomationPanel/AutomationList.svelte +++ b/packages/builder/src/components/automation/AutomationPanel/AutomationList.svelte @@ -5,7 +5,7 @@ import NavItem from "components/common/NavItem.svelte" import EditAutomationPopover from "./EditAutomationPopover.svelte" import { notifications } from "@budibase/bbui" - import _ from 'lodash' + import _ from "lodash" $: selectedAutomationId = $automationStore.selectedAutomation?.automation?._id @@ -24,7 +24,7 @@
- {#each _.orderBy($automationStore.automations, ['name'], ['asc']) as automation, idx} + {#each _.orderBy($automationStore.automations, ["name"], ["asc"]) as automation, idx} 0} icon="ShareAndroid" From f53f23d6ae51c1a054ad20779b82c0a4d85a1f03 Mon Sep 17 00:00:00 2001 From: R2bEEaton Date: Thu, 1 Sep 2022 07:15:25 -0400 Subject: [PATCH 4/4] resolving requested change --- .../automation/AutomationPanel/AutomationList.svelte | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/packages/builder/src/components/automation/AutomationPanel/AutomationList.svelte b/packages/builder/src/components/automation/AutomationPanel/AutomationList.svelte index 688d5be769..c7bd43661b 100644 --- a/packages/builder/src/components/automation/AutomationPanel/AutomationList.svelte +++ b/packages/builder/src/components/automation/AutomationPanel/AutomationList.svelte @@ -5,7 +5,6 @@ import NavItem from "components/common/NavItem.svelte" import EditAutomationPopover from "./EditAutomationPopover.svelte" import { notifications } from "@budibase/bbui" - import _ from "lodash" $: selectedAutomationId = $automationStore.selectedAutomation?.automation?._id @@ -24,7 +23,7 @@
- {#each _.orderBy($automationStore.automations, ["name"], ["asc"]) as automation, idx} + {#each $automationStore.automations.sort(aut => aut.name) as automation, idx} 0} icon="ShareAndroid"