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

fix(editor): Show connector label above the line when it's straight #12622

Merged
merged 5 commits into from
Jan 16, 2025

Conversation

autologie
Copy link
Contributor

@autologie autologie commented Jan 15, 2025

Summary

This PR fixes the position of connector label in the new editor canvas, so that the label does not overlap the connector's line when it's straight.

Before

Screenshot from 2025-01-15 18-09-58

After

Screenshot from 2025-01-15 18-08-32

Related Linear tickets, Github issues, and Community forum posts

https://linear.app/n8n/issue/SUG-4/connection-label-should-jump-above-line-if-the-line-is-straight

Review / Merge checklist

  • PR title and summary are descriptive. (conventions)
  • Docs updated or follow-up ticket created.
  • Tests included.
  • PR Labeled with release/backport (if the PR is an urgent fix that needs to be backported)

@CLAassistant
Copy link

CLAassistant commented Jan 15, 2025

CLA assistant check
All committers have signed the CLA.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

In this file I'm changing how the label position is calculated for the "handle", while maintaining how it looks.
With top: 50%, the origin of translation is the same as the connector's, so we can use the same -150% to bring the label above the line.

@n8n-assistant n8n-assistant bot added n8n team Authored by the n8n team ui Enhancement in /editor-ui or /design-system labels Jan 15, 2025
@autologie autologie requested a review from mutdmour January 15, 2025 17:31
Copy link

codecov bot commented Jan 15, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

📢 Thoughts on this report? Let us know!

Copy link
Contributor

@mutdmour mutdmour left a comment

Choose a reason for hiding this comment

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

LGTM. Tested it locally and works well. Can you please add tests? Thank you

@autologie
Copy link
Contributor Author

@mutdmour Tests are added, could you have another look? Thanks.

@autologie autologie requested a review from mutdmour January 16, 2025 08:46
Copy link
Contributor

✅ All Cypress E2E specs passed

Copy link

cypress bot commented Jan 16, 2025

n8n    Run #8770

Run Properties:  status check passed Passed #8770  •  git commit 70dc6ba90c: 🌳 🖥️ browsers:node18.12.0-chrome107 🤖 autologie 🗃️ e2e/*
Project n8n
Branch Review sug-4-label-on-straight-connector
Run status status check passed Passed #8770
Run duration 04m 50s
Commit git commit 70dc6ba90c: 🌳 🖥️ browsers:node18.12.0-chrome107 🤖 autologie 🗃️ e2e/*
Committer autologie
View all properties for this run ↗︎

Test results
Tests that failed  Failures 0
Tests that were flaky  Flaky 1
Tests that did not run due to a developer annotating a test with .skip  Pending 0
Tests that did not run due to a failure in a mocha hook  Skipped 0
Tests that passed  Passing 489
View all changes introduced in this branch ↗︎

@autologie autologie merged commit c97bd48 into master Jan 16, 2025
37 checks passed
@autologie autologie deleted the sug-4-label-on-straight-connector branch January 16, 2025 09:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
n8n team Authored by the n8n team ui Enhancement in /editor-ui or /design-system
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants