mirror of
https://github.com/Abdulazizzn/n8n-enterprise-unlocked.git
synced 2025-12-17 10:02:05 +00:00
fix(editor): Fix resizing NDV output panel when closing assistant (#15313)
This commit is contained in:
@@ -7,6 +7,7 @@
|
||||
<style lang="scss" scoped>
|
||||
.slide-leave-active,
|
||||
.slide-enter-active {
|
||||
// Keep this in sync with ASK_AI_SLIDE_OUT_DURATION_MS
|
||||
transition: 200ms ease;
|
||||
}
|
||||
.slide-leave-to,
|
||||
|
||||
@@ -842,6 +842,7 @@ export const nonExistingJsonPath = '_!^&*';
|
||||
export const ASK_AI_MAX_PROMPT_LENGTH = 600;
|
||||
export const ASK_AI_MIN_PROMPT_LENGTH = 15;
|
||||
export const ASK_AI_LOADING_DURATION_MS = 12000;
|
||||
export const ASK_AI_SLIDE_OUT_DURATION_MS = 200;
|
||||
|
||||
export const APPEND_ATTRIBUTION_DEFAULT_PATH = 'parameters.options.appendAttribution';
|
||||
|
||||
|
||||
@@ -5,6 +5,7 @@ import {
|
||||
STORES,
|
||||
PLACEHOLDER_EMPTY_WORKFLOW_ID,
|
||||
CREDENTIAL_EDIT_MODAL_KEY,
|
||||
ASK_AI_SLIDE_OUT_DURATION_MS,
|
||||
} from '@/constants';
|
||||
import type { ChatRequest } from '@/types/assistant.types';
|
||||
import type { ChatUI } from '@n8n/design-system/types/assistant';
|
||||
@@ -147,6 +148,7 @@ export const useAssistantStore = defineStore(STORES.ASSISTANT, () => {
|
||||
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,
|
||||
@@ -156,7 +158,7 @@ export const useAssistantStore = defineStore(STORES.ASSISTANT, () => {
|
||||
if (isSessionEnded.value) {
|
||||
resetAssistantChat();
|
||||
}
|
||||
}, 200);
|
||||
}, ASK_AI_SLIDE_OUT_DURATION_MS + 50);
|
||||
}
|
||||
|
||||
function addAssistantMessages(newMessages: ChatRequest.MessageResponse[], id: string) {
|
||||
|
||||
@@ -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() {
|
||||
|
||||
Reference in New Issue
Block a user