fix(ui): responsive table info sidebar and SQL toolbar layout

This commit is contained in:
zipg authored and GitHub committed 2026-09-07 21:26:11 +08:00
1 parent e3b9bae67e
commit 96a3dc052a
5 files changed
+60 -10

No files matched your search

@@ -87,6 +87,7 @@ const toolbarTier = ref<EditorToolbarTier>(0);
// Available width when the current tier was condensed into; anchors the
// step-down hysteresis so a static narrow layout cannot oscillate.
const condensedAtWidth = ref(0);
const expandedTierRequiredWidths: Partial<Record<EditorToolbarTier, number>> = {};
let toolbarResizeObserver: ResizeObserver | undefined;
function measureToolbarTier() {
@@ -99,9 +100,12 @@ function measureToolbarTier() {
availableWidth: element.clientWidth,
contentWidth: element.scrollWidth,
condensedAtWidth: condensedAtWidth.value,
expandedTierRequiredWidths,
});
if (next !== toolbarTier.value) {
if (next > toolbarTier.value) {
const currentTier = toolbarTier.value;
expandedTierRequiredWidths[currentTier] = Math.max(expandedTierRequiredWidths[currentTier] ?? 0, element.scrollWidth);
condensedAtWidth.value = element.clientWidth;
}
toolbarTier.value = next;