mirror of
https://github.com/windmill-labs/windmill.git
synced 2026-10-26 16:02:36 +00:00
fix(raw_apps): address PR review nits (drop debug log, timer/reorder/pane-setter, dev script restore)
This commit is contained in:
@@ -3,7 +3,7 @@
|
||||
"version": "1.705.0",
|
||||
"scripts": {
|
||||
"dev": "vite dev",
|
||||
"dev:ui-builder": "mv static/ui_builder static/ui_builder.dev-disabled 2>/dev/null || true ; vite dev",
|
||||
"dev:ui-builder": "mv static/ui_builder static/ui_builder.dev-disabled 2>/dev/null || true ; trap 'mv static/ui_builder.dev-disabled static/ui_builder 2>/dev/null || true' EXIT ; vite dev",
|
||||
"build": "vite build",
|
||||
"build:utils": "vite build --config sharedUtils/vite.sharedUtils.config.js",
|
||||
"preview": "vite preview",
|
||||
|
||||
@@ -197,7 +197,8 @@
|
||||
let logsDiv: HTMLDivElement | undefined = $state(undefined)
|
||||
$effect(() => {
|
||||
if (logsDiv && logs && !logsCollapsed) {
|
||||
setTimeout(() => logsDiv?.scrollTo(0, logsDiv.scrollHeight), 50)
|
||||
const t = setTimeout(() => logsDiv?.scrollTo(0, logsDiv.scrollHeight), 50)
|
||||
return () => clearTimeout(t)
|
||||
}
|
||||
})
|
||||
|
||||
@@ -370,12 +371,12 @@
|
||||
}
|
||||
|
||||
function reorderTabs(next: TabItem[]) {
|
||||
// In split mode the right bar omits Preview from `next`; re-append it.
|
||||
if (splitWithPreview && !next.some((t) => t.id === PREVIEW_TAB_ID)) {
|
||||
tabs = [...next, previewTab]
|
||||
} else {
|
||||
tabs = next
|
||||
}
|
||||
// Rebuild from the reordered `next` plus any tabs that bar didn't show
|
||||
// (e.g. files when the Preview-only right bar fires in split mode), with
|
||||
// Preview kept pinned at the end — so a reorder can never drop a tab.
|
||||
const seen = new Set(next.map((t) => t.id))
|
||||
const rest = tabs.filter((t) => !seen.has(t.id))
|
||||
tabs = [...next, ...rest].filter((t) => t.id !== PREVIEW_TAB_ID).concat(previewTab)
|
||||
}
|
||||
|
||||
function toggleSplit() {
|
||||
@@ -1102,7 +1103,6 @@
|
||||
}
|
||||
|
||||
function handleSelectFile(path: string) {
|
||||
console.log('event Select file:', path)
|
||||
// Adding the tab activates it; activateTab posts the selectFile message
|
||||
// to the UI Builder iframe and clears any selected runnable.
|
||||
const id = ensureFileTab(path)
|
||||
@@ -1469,7 +1469,7 @@
|
||||
</div>
|
||||
</div>
|
||||
</Pane>
|
||||
<Pane bind:size={() => paneBRightSize, () => {}} minSize={0}>
|
||||
<Pane bind:size={() => paneBRightSize, (v) => rememberPaneDrag(100 - v)} minSize={0}>
|
||||
<div class="flex flex-col h-full w-full min-h-0 relative">
|
||||
<DraggableTabs
|
||||
tabs={rightPaneTabs}
|
||||
|
||||
Reference in New Issue
Block a user