-
Notifications
You must be signed in to change notification settings - Fork 3.2k
feat(sidebar): scroll to workflow/folder #2302
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub. |
Greptile OverviewGreptile SummaryImplements auto-scroll functionality to bring workflows and folders into view when navigating in the sidebar. Key Changes:
Issues Found:
Confidence Score: 4/5
Important Files ChangedFile Analysis
Sequence DiagramsequenceDiagram
participant User
participant Sidebar
participant WorkflowList
participant Browser
User->>Sidebar: Navigate to workflow
Sidebar->>WorkflowList: workflowId updated
WorkflowList->>WorkflowList: Check if loading
alt Has folderId
WorkflowList->>WorkflowList: Get folder path
WorkflowList->>WorkflowList: Expand folders
end
WorkflowList->>WorkflowList: Select workflow
WorkflowList->>WorkflowList: Check lastScrolledWorkflowRef
alt Not already scrolled
WorkflowList->>WorkflowList: Update lastScrolledWorkflowRef
WorkflowList->>Browser: requestAnimationFrame
Browser->>WorkflowList: Next frame
WorkflowList->>Browser: querySelector for element
Browser-->>WorkflowList: Element & Container
WorkflowList->>WorkflowList: Calculate visibility
alt Element off-screen
WorkflowList->>Browser: scrollIntoView
Browser->>User: Scroll to workflow
end
end
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
2 files reviewed, 1 comment
| element.scrollIntoView({ behavior: 'smooth', block: 'center' }) | ||
| } | ||
| }) | ||
| }, [workflowId, activeWorkflowFolderId, isLoading, foldersLoading, getFolderPath, setExpanded]) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
syntax: Missing scrollContainerRef in dependency array
| }, [workflowId, activeWorkflowFolderId, isLoading, foldersLoading, getFolderPath, setExpanded]) | |
| }, [workflowId, activeWorkflowFolderId, isLoading, foldersLoading, getFolderPath, setExpanded, scrollContainerRef]) |
Prompt To Fix With AI
This is a comment left during a code review.
Path: apps/sim/app/workspace/[workspaceId]/w/components/sidebar/components/workflow-list/workflow-list.tsx
Line: 185:185
Comment:
**syntax:** Missing `scrollContainerRef` in dependency array
```suggestion
}, [workflowId, activeWorkflowFolderId, isLoading, foldersLoading, getFolderPath, setExpanded, scrollContainerRef])
```
How can I resolve this? If you propose a fix, please make it concise.
Summary
Auto-scroll to workflow or folder in sidebar.
Type of Change
Testing
Solo.
Checklist