Skip to content

Commit 70aeb0c

Browse files
authored
fix(sidebar-ui): fix small ui bug to close gap when creating new workflow (#932)
1 parent 83f1139 commit 70aeb0c

File tree

1 file changed

+9
-1
lines changed
  • apps/sim/app/workspace/[workspaceId]/w/components/sidebar

1 file changed

+9
-1
lines changed

apps/sim/app/workspace/[workspaceId]/w/components/sidebar/sidebar.tsx

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -681,8 +681,16 @@ export function Sidebar() {
681681
) as HTMLElement
682682
if (activeWorkflow) {
683683
activeWorkflow.scrollIntoView({
684-
block: 'nearest',
684+
block: 'start',
685685
})
686+
687+
// Adjust scroll position to eliminate the small gap at the top
688+
const scrollViewport = scrollContainer.querySelector(
689+
'[data-radix-scroll-area-viewport]'
690+
) as HTMLElement
691+
if (scrollViewport && scrollViewport.scrollTop > 0) {
692+
scrollViewport.scrollTop = Math.max(0, scrollViewport.scrollTop - 8)
693+
}
686694
}
687695
}
688696
}

0 commit comments

Comments
 (0)