fix(editor): Fix resizing NDV output panel when closing assistant (#15313)

This commit is contained in:
Jaakko Husso
2025-05-14 15:18:50 +03:00
committed by GitHub
parent 37b37304d5
commit d7d3d33d1a
4 changed files with 13 additions and 3 deletions

View File

@@ -1,6 +1,11 @@
import { chatWithBuilder } from '@/api/ai';
import type { VIEWS } from '@/constants';
import { EDITABLE_CANVAS_VIEWS, STORES, WORKFLOW_BUILDER_EXPERIMENT } from '@/constants';
import {
ASK_AI_SLIDE_OUT_DURATION_MS,
EDITABLE_CANVAS_VIEWS,
STORES,
WORKFLOW_BUILDER_EXPERIMENT,
} from '@/constants';
import type { ChatRequest } from '@/types/assistant.types';
import type { ChatUI } from '@n8n/design-system/types/assistant';
import { defineStore } from 'pinia';
@@ -88,12 +93,13 @@ export const useBuilderStore = defineStore(STORES.BUILDER, () => {
function closeChat() {
chatWindowOpen.value = false;
// Looks smoother if we wait for slide animation to finish before updating the grid width
// Has to wait for longer than SlideTransition duration
setTimeout(() => {
uiStore.appGridDimensions = {
...uiStore.appGridDimensions,
width: window.innerWidth,
};
}, 200);
}, ASK_AI_SLIDE_OUT_DURATION_MS + 50);
}
function clearMessages() {