From a9cf5822fa785de14414367ae7be2d13f49d776e Mon Sep 17 00:00:00 2001
From: t8y2 <1156263951@qq.com>
Date: Tue, 15 Sep 2026 12:03:11 +0800
Subject: [PATCH] fix(layout): keep panel resizing smooth across plugin iframes
---
apps/desktop/src/App.vue | 10 ++--
.../src/components/layout/AppSidebar.vue | 4 +-
.../src/components/layout/EditorGroup.vue | 2 +-
.../components/layout/EditorGroupTabBar.vue | 4 +-
.../components/layout/SqlEditorWorkspace.vue | 2 +-
.../__tests__/usePanelResize.spec.ts | 47 ++++++++++++++-----
.../desktop/src/composables/usePanelResize.ts | 38 +++++++++++----
apps/desktop/src/styles/globals.css | 1 +
8 files changed, 77 insertions(+), 31 deletions(-)
diff --git a/apps/desktop/src/App.vue b/apps/desktop/src/App.vue
index f75523371c..8bd2b63deb 100644
--- a/apps/desktop/src/App.vue
+++ b/apps/desktop/src/App.vue
@@ -1009,7 +1009,7 @@ const appVersion = ref("");
const isClassicLayout = computed(() => settingsStore.editorSettings.appLayout === "classic");
// Every pane's vertical strip writes back to this shared width/collapse state.
-function startTabBarResize(event: MouseEvent) {
+function startTabBarResize(event: PointerEvent) {
if (settingsStore.editorSettings.tabPlacement === "right") {
startRightTabBarResize(event);
return;
@@ -3918,7 +3918,7 @@ onUnmounted(() => {
:class="[isClassicLayout ? 'h-full relative z-30 isolate bg-background' : 'h-full relative z-30 isolate rounded-md border border-border/80 bg-background', isAiPanelMaximized ? 'min-w-0 flex-1' : 'min-w-[240px] max-w-full']"
:style="isAiPanelMaximized ? {} : { width: aiPanelWidth + 'px' }"
>
-
+
{
:class="isClassicLayout ? 'h-full shrink-0 relative z-30 isolate bg-background' : 'h-full shrink-0 relative z-30 isolate rounded-md border border-border/80 bg-background'"
:style="{ width: historyWidth + 'px' }"
>
-
+
@@ -3957,7 +3957,7 @@ onUnmounted(() => {
:class="isClassicLayout ? 'h-full shrink-0 relative z-30 isolate bg-background' : 'h-full shrink-0 relative z-30 isolate rounded-md border border-border/80 bg-background'"
:style="{ width: sqlLibraryWidth + 'px' }"
>
-
+
@@ -3969,7 +3969,7 @@ onUnmounted(() => {
:class="isClassicLayout ? 'h-full shrink-0 relative z-30 isolate bg-background' : 'h-full shrink-0 relative z-30 isolate rounded-md border border-border/80 bg-background'"
:style="{ width: sqlFilePanelWidth + 'px' }"
>
-
+
diff --git a/apps/desktop/src/components/layout/AppSidebar.vue b/apps/desktop/src/components/layout/AppSidebar.vue
index 6aae3a1395..0b65aa9602 100644
--- a/apps/desktop/src/components/layout/AppSidebar.vue
+++ b/apps/desktop/src/components/layout/AppSidebar.vue
@@ -23,7 +23,7 @@ defineProps<{
const emit = defineEmits<{
import: [source: "dbx" | "navicat" | "dbeaver" | "datagrip"];
export: [];
- startResize: [event: MouseEvent];
+ startResize: [event: PointerEvent];
collapse: [];
"open-settings": [initialTab: string];
"add-to-ai": [nodes: TreeNode | TreeNode[]];
@@ -296,7 +296,7 @@ defineExpose({ focusSearch, locateTabInSidebar });
emit('open-settings', initialTab)" @add-to-ai="(nodes) => emit('add-to-ai', nodes)" />
-
+