-
Notifications
You must be signed in to change notification settings - Fork 3.2k
feat(popover): add expandOnHover, added the ability to change the color of a workflow icon, new workflow naming convention #2770
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 SummaryThis PR adds three key features to enhance workflow management: 1. Workflow Color Customization
2. PopoverFolder
|
| Filename | Score | Overview |
|---|---|---|
| apps/sim/lib/workflows/colors.ts | 5/5 | New file with workflow color constants - clean implementation with 36 colors organized in 6 shades |
| apps/sim/components/emcn/components/popover/popover.tsx | 2/5 | Added expandOnHover feature for floating submenus, but portal lacks mouse handlers causing submenu to close when interacting |
| apps/sim/stores/workflows/registry/utils.ts | 3/5 | Refactored to move colors out, added cosmos naming theme - contains typo 'Sidbuck' on line 68 |
| apps/sim/app/workspace/[workspaceId]/w/components/sidebar/components/workflow-list/components/context-menu/context-menu.tsx | 4/5 | Added color picker with expandOnHover PopoverFolder - implementation looks solid with hex validation |
Sequence Diagram
sequenceDiagram
participant User
participant WorkflowItem
participant ContextMenu
participant PopoverFolder
participant ColorPicker
participant WorkflowRegistry
User->>WorkflowItem: Right-click workflow
WorkflowItem->>ContextMenu: Open context menu
ContextMenu->>ContextMenu: Show menu options
User->>ContextMenu: Hover over "Change color"
ContextMenu->>PopoverFolder: expandOnHover=true
PopoverFolder->>PopoverFolder: Calculate submenu position
PopoverFolder->>PopoverFolder: Set lastHoveredItem
PopoverFolder->>ColorPicker: Render via portal
alt User clicks preset color
User->>ColorPicker: Click color button
ColorPicker->>ContextMenu: onColorChange(color)
ContextMenu->>WorkflowItem: handleColorChange(color)
WorkflowItem->>WorkflowRegistry: updateWorkflow(id, {color})
WorkflowRegistry-->>WorkflowItem: Update complete
else User enters custom hex
User->>ColorPicker: Type hex value
ColorPicker->>ColorPicker: Validate hex
User->>ColorPicker: Press Enter or click check
ColorPicker->>ContextMenu: onColorChange(normalizedHex)
ContextMenu->>WorkflowItem: handleColorChange(color)
WorkflowItem->>WorkflowRegistry: updateWorkflow(id, {color})
WorkflowRegistry-->>WorkflowItem: Update complete
end
Note over PopoverFolder,ColorPicker: Issue: Portal lacks mouse handlers<br/>Submenu closes when trying to interact
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.
3 files reviewed, 3 comments
...ceId]/w/components/sidebar/components/workflow-list/components/context-menu/context-menu.tsx
Show resolved
Hide resolved
...ceId]/w/components/sidebar/components/workflow-list/components/context-menu/context-menu.tsx
Show resolved
Hide resolved
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, 2 comments
Summary
Type of Change
Testing
Tested manually
Checklist