Skip to content
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

feat(frontend): Center initial canvas #8644

Merged
merged 7 commits into from
Nov 14, 2024

Conversation

majdyz
Copy link
Contributor

@majdyz majdyz commented Nov 13, 2024

Opening an existing graph always results in opening the graph in an awkward position, e.g.: the graph located in the bottom right of the screen.

Changes 🏗️

Points the viewport to the centroid of the nodes, on the initial loading of the nodes.

image

vs

image

Checklist 📋

For code changes:

  • I have clearly listed my changes in the PR description
  • I have made a test plan
  • I have tested my changes according to the test plan:
    • ...
Example test plan
  • Create from scratch and execute an agent with at least 3 blocks
  • Import an agent from file upload, and confirm it executes correctly
  • Upload agent to marketplace
  • Import an agent from marketplace and confirm it executes correctly
  • Edit an agent from monitor, and confirm it executes correctly

For configuration changes:

  • .env.example is updated or already compatible with my changes
  • docker-compose.yml is updated or already compatible with my changes
  • I have included a list of my configuration changes in the PR description (under Changes)
Examples of configuration changes
  • Changing ports
  • Adding new services that need to communicate with each other
  • Secrets or environment variable changes
  • New or infrastructure changes such as databases

Copy link

PR Reviewer Guide 🔍

Here are some key observations to aid the review process:

⏱️ Estimated effort to review: 2 🔵🔵⚪⚪⚪
🧪 No relevant tests
🔒 No security concerns identified
⚡ Recommended focus areas for review

Edge Cases
The centering logic assumes all nodes have same width/height of 100px. This may cause incorrect centering if nodes have different sizes.

Performance
The useEffect hook runs on every nodes change. Consider adding a debounce to prevent too frequent viewport updates.

@github-actions github-actions bot added platform/frontend AutoGPT Platform - Front end platform/backend AutoGPT Platform - Back end size/m labels Nov 13, 2024
Copy link

netlify bot commented Nov 13, 2024

Deploy Preview for auto-gpt-docs ready!

Name Link
🔨 Latest commit aa3c5db
🔍 Latest deploy log https://app.netlify.com/sites/auto-gpt-docs/deploys/6734e9d91b95c100082675e8
😎 Deploy Preview https://deploy-preview-8644--auto-gpt-docs.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

Copy link

netlify bot commented Nov 13, 2024

Deploy Preview for auto-gpt-docs canceled.

Name Link
🔨 Latest commit b57e2f5
🔍 Latest deploy log https://app.netlify.com/sites/auto-gpt-docs/deploys/6735bcf7d850450007be1209

@Torantulino
Copy link
Member

Thank you!

@majdyz majdyz requested a review from aarushik93 November 14, 2024 03:10
@Torantulino Torantulino enabled auto-merge (squash) November 14, 2024 09:03
@Torantulino Torantulino merged commit ce667f6 into dev Nov 14, 2024
15 checks passed
@Torantulino Torantulino deleted the zamilmajdy/fix-validation-error-agent-executor branch November 14, 2024 09:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
platform/backend AutoGPT Platform - Back end platform/frontend AutoGPT Platform - Front end Review effort [1-5]: 2 size/m
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants