perf(editor): trim per-frame splitter drag overhead

This commit is contained in:
t8y2 committed 2026-09-04 20:36:16 +08:00
1 parent a3772fb442
commit 5d1061d490
5 files changed
+96 -8

No files matched your search

@@ -119,9 +119,9 @@ const storedResultPaneSize = Number(safeLocalStorageGet(SHARED_RESULT_PANE_STORA
const resultPaneSize = ref(Number.isFinite(storedResultPaneSize) && storedResultPaneSize >= SHARED_RESULT_PANE_MIN_SIZE && storedResultPaneSize <= SHARED_RESULT_PANE_MAX_SIZE ? storedResultPaneSize : SHARED_RESULT_PANE_DEFAULT_SIZE);
const showResultPane = ref(true);
// The result pane stays mounted and animates its size between the stored
// split and 0, so collapsing/expanding glides instead of jumping: the stock
// splitpanes pane transition is re-enabled for this workspace in
// sqlEditorWorkspace.css (globals.css kills it for horizontal splitpanes).
// split and 0, so collapsing/expanding glides instead of jumping: the pane
// transition for this outer split is re-enabled in sqlEditorWorkspace.css
// (globals.css kills it for horizontal splitpanes).
const resultPaneTargetSize = computed(() => (showSharedResult.value && showResultPane.value ? resultPaneSize.value : 0));
const editorPaneSize = computed(() => 100 - resultPaneTargetSize.value);
// Entrance choreography is hydration-gated: groups present at first render
@@ -17,12 +17,14 @@
--sql-workspace-ease-out: cubic-bezier(0.25, 1, 0.5, 1);
}
/* Pane size transitions: restore splitpanes' stock behavior inside the
workspace (globals.css disables it for all horizontal splitpanes). */
.sql-editor-workspace .splitpanes--ready .splitpanes__pane {
/* Pane size transitions: only the outer editor/result split animates pane
sizes (the result-pane collapse/expand glide). Group panes never animate
their sizes — splits use the entrance keyframes below — so they stay on
stock splitpanes behavior (transition, disabled while dragging). */
.sql-editor-workspace .sql-editor-workspace-split.splitpanes--ready > .splitpanes__pane {
transition: width 0.2s ease-out, height 0.2s ease-out !important;
}
.sql-editor-workspace .splitpanes--ready.splitpanes--dragging .splitpanes__pane {
.sql-editor-workspace .sql-editor-workspace-split.splitpanes--ready.splitpanes--dragging > .splitpanes__pane {
transition: none !important;
}
@@ -81,7 +83,7 @@
.sql-editor-workspace .result-surface-leave-active {
transition: none;
}
.sql-editor-workspace .splitpanes--ready .splitpanes__pane {
.sql-editor-workspace .sql-editor-workspace-split.splitpanes--ready > .splitpanes__pane {
transition: none !important;
}
}