-
Notifications
You must be signed in to change notification settings - Fork 10.1k
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
Conversation
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.
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.
Codecov ReportAll modified and coverable lines are covered by tests ✅ 📢 Thoughts on this report? Let us know! |
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.
LGTM. Tested it locally and works well. Can you please add tests? Thank you
packages/editor-ui/src/components/canvas/elements/edges/CanvasEdge.vue
Outdated
Show resolved
Hide resolved
@mutdmour Tests are added, could you have another look? Thanks. |
✅ All Cypress E2E specs passed |
n8n Run #8770
Run Properties:
|
Project |
n8n
|
Branch Review |
sug-4-label-on-straight-connector
|
Run status |
Passed #8770
|
Run duration | 04m 50s |
Commit |
70dc6ba90c: 🌳 🖥️ browsers:node18.12.0-chrome107 🤖 autologie 🗃️ e2e/*
|
Committer | autologie |
View all properties for this run ↗︎ |
Test results | |
---|---|
Failures |
0
|
Flaky |
1
|
Pending |
0
|
Skipped |
0
|
Passing |
489
|
View all changes introduced in this branch ↗︎ |
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
After
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
release/backport
(if the PR is an urgent fix that needs to be backported)