From 15b353e660b8d1fc1cc6352e1003412ea7750a98 Mon Sep 17 00:00:00 2001 From: Laila Los <44241786+ElectronicBlueberry@users.noreply.github.com> Date: Fri, 2 Aug 2024 13:15:05 +0200 Subject: [PATCH] make best practice panel hide changes --- client/src/components/Workflow/Editor/Index.vue | 1 + client/src/composables/math.ts | 2 +- client/src/stores/undoRedoStore/index.ts | 2 ++ 3 files changed, 4 insertions(+), 1 deletion(-) diff --git a/client/src/components/Workflow/Editor/Index.vue b/client/src/components/Workflow/Editor/Index.vue index c0ef58b0406a..1258bbca0a0a 100644 --- a/client/src/components/Workflow/Editor/Index.vue +++ b/client/src/components/Workflow/Editor/Index.vue @@ -798,6 +798,7 @@ export default { this.ensureParametersSet(); this.stateStore.activeNodeId = null; this.showInPanel = "lint"; + this.showChanges = false; }, onUpgrade() { this.onAttemptRefactor([{ action_type: "upgrade_all_steps" }]); diff --git a/client/src/composables/math.ts b/client/src/composables/math.ts index 7703c203f1fe..421a9ca24aa5 100644 --- a/client/src/composables/math.ts +++ b/client/src/composables/math.ts @@ -31,7 +31,7 @@ export function useClamp(ref: Ref, min: MaybeRefOrGetter, max: M * Wraps a number ref, restricting it's values to align to a given step size * * @param ref ref containing a number to wrap - * @param stepSize size of steps to restrict value to + * @param [stepSize = 1] size of steps to restrict value to. defaults to 1 * @returns wrapped red */ export function useStep(ref: Ref, stepSize: MaybeRefOrGetter = 1): Ref { diff --git a/client/src/stores/undoRedoStore/index.ts b/client/src/stores/undoRedoStore/index.ts index e1f4c9bf65cb..f83dd6f6d103 100644 --- a/client/src/stores/undoRedoStore/index.ts +++ b/client/src/stores/undoRedoStore/index.ts @@ -36,6 +36,8 @@ export const useUndoRedoStore = defineScopedStore("undoRedoStore", () => { undoActionStack.value.forEach((action) => action.destroy()); undoActionStack.value = []; deletedActions.value = []; + minUndoActions.value = 10; + maxUndoActions.value = 10000; clearRedoStack(); }