Skip to content

feat(ux): added auto-layout for workflows#443

Merged
waleedlatif1 merged 4 commits intomainfrom
feat/auto-layout
May 31, 2025
Merged

feat(ux): added auto-layout for workflows#443
waleedlatif1 merged 4 commits intomainfrom
feat/auto-layout

Conversation

@waleedlatif1
Copy link
Copy Markdown
Collaborator

Description

Added auto-layout for workflows (shift+L)

Type of change

  • New feature (non-breaking change which adds functionality)

How Has This Been Tested?

Tested many variations manually, both with horizontal workflows and vertical workflows

Checklist:

  • My code follows the style guidelines of this project
  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have added tests that prove my fix is effective or that my feature works
  • All tests pass locally and in CI (bun run test)
  • My changes generate no new warnings
  • Any dependent changes have been merged and published in downstream modules
  • I have updated version numbers as needed (if needed)
  • I confirm that I have read and agree to the terms outlined in the Contributor License Agreement (CLA)

Security Considerations:

  • My changes do not introduce any new security vulnerabilities
  • I have considered the security implications of my changes

@vercel
Copy link
Copy Markdown

vercel Bot commented May 31, 2025

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
sim ✅ Ready (Inspect) Visit Preview 💬 Add feedback May 31, 2025 1:40am
1 Skipped Deployment
Name Status Preview Comments Updated (UTC)
docs ⬜️ Skipped (Inspect) May 31, 2025 1:40am

Copy link
Copy Markdown
Contributor

@greptile-apps greptile-apps Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

PR Summary

Added auto-layout functionality for workflows with both horizontal and vertical orientations, accessible via Shift+L shortcut or UI button.

  • Added renderAutoLayoutButton in control-bar.tsx with tooltip and keyboard shortcut display
  • Simplified edge rendering in workflow-edge.tsx by replacing dynamic offset calculations with fixed 10px offset
  • Implemented auto-layout detection for predominant handle orientation (vertical/horizontal) in workflow.tsx
  • Added utility functions in utils.ts for calculating block dimensions and managing layout spacing with smooth animations

4 file(s) reviewed, 7 comment(s)
Edit PR Review Bot Settings | Greptile

Comment thread apps/sim/app/w/[id]/components/control-bar/control-bar.tsx
Comment thread apps/sim/app/w/[id]/workflow.tsx Outdated
Comment thread apps/sim/app/w/[id]/utils.ts Outdated
Comment thread apps/sim/app/w/[id]/utils.ts
Comment thread apps/sim/app/w/[id]/utils.ts
Comment thread apps/sim/app/w/[id]/utils.ts Outdated
Comment thread apps/sim/app/w/[id]/utils.ts
@vercel vercel Bot temporarily deployed to Preview – docs May 31, 2025 01:36 Inactive
@waleedlatif1 waleedlatif1 merged commit 4239810 into main May 31, 2025
5 checks passed
@waleedlatif1 waleedlatif1 deleted the feat/auto-layout branch May 31, 2025 02:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant