-
Notifications
You must be signed in to change notification settings - Fork 11.9k
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
Canvas: Add direction options for connections #84620
Conversation
public/app/plugins/panel/canvas/components/connections/ConnectionSVG.tsx
Outdated
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.
Tested locally and it works good! It should be good to merge after minor cleanup! 🚀
public/app/plugins/panel/canvas/components/connections/ConnectionSVG.tsx
Outdated
Show resolved
Hide resolved
LGTM, we can work on the labels for selector (or using icons), but this is not something blocking this PR. |
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.
Works as expected! Just had a few nits 😄
@@ -120,4 +121,22 @@ export const optionBuilder: OptionSuppliers = { | |||
}, | |||
}); | |||
}, | |||
|
|||
addDirection: (builder, context) => { | |||
const category = ['Direction']; |
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.
May make sense to call this "Connection Direction" or something like that. It's a bit ambiguous at the moment.
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.
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.
Or perhaps "Arrow Direction" would suffice?
Adding direction option for canvas connections.
For single segment connection:
![Mar-15-2024 16-08-17](https://private-user-images.githubusercontent.com/60050885/313353476-e9431c89-d0bd-40b2-8cad-8dc32a071922.gif?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MjUzMDM4MTksIm5iZiI6MTcyNTMwMzUxOSwicGF0aCI6Ii82MDA1MDg4NS8zMTMzNTM0NzYtZTk0MzFjODktZDBiZC00MGIyLThjYWQtOGRjMzJhMDcxOTIyLmdpZj9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNDA5MDIlMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjQwOTAyVDE4NTgzOVomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPWRhZWExZDNkZjgxM2M3ZmY4NGY2ZjY1YjIwM2Q2MjY5NWVkY2M3ZWFiOThiYzFiZmVkZWRjNDNhN2FjMGExZWImWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0JmFjdG9yX2lkPTAma2V5X2lkPTAmcmVwb19pZD0wIn0.Tz30NEC6a8oFiQEOxJULfiypasgzepwXChrjdvUNrRY)
For multi-segment connection:
![Mar-15-2024 16-04-28](https://private-user-images.githubusercontent.com/60050885/313353123-402c00b1-daaa-40df-acdb-4d562c0dbb9f.gif?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MjUzMDM4MTksIm5iZiI6MTcyNTMwMzUxOSwicGF0aCI6Ii82MDA1MDg4NS8zMTMzNTMxMjMtNDAyYzAwYjEtZGFhYS00MGRmLWFjZGItNGQ1NjJjMGRiYjlmLmdpZj9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNDA5MDIlMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjQwOTAyVDE4NTgzOVomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPThkZjAyYTRlMTg5ZTQxNWJkN2YzOTkxNjRjYzU1ODg0MjIyODUwMTAxYzhjMDc2MWYzYTU5ODUwNmQ5MTA5YTUmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0JmFjdG9yX2lkPTAma2V5X2lkPTAmcmVwb19pZD0wIn0.bAOF2HEkvj52xwudGLCcU1cqsSFXZ654ReNR3bkTz1k)
Closes #83268