-
Notifications
You must be signed in to change notification settings - Fork 482
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
Propose: Add support for connection numbering in sequence diagram. #1784
Comments
Note: I think the best way to do this will be to extend vars and implement dynamic values for vars. vars: {
counter: enumerate(1) # starts at index 1
}
shape: sequence_diagram
a
b
a -> b: "${counter}: hello world"
a -> b: "${counter}: second message" |
i think using '$' is confusing because it gets mixed up with other static variables |
@bo-ku-ra what do you mean other static variables? can you give an example of where this is confusing? |
@alixander vars: {
counter: enumerate(1) # starts at index 1
counter2: enumerate(1) # starts at index 1
}
sequence: {
style.fill: mistyrose
shape: sequence_diagram
a
b
a -> b: "${counter}: hello world"
a -> b: "${counter}: second message"
}
sequence2: {
style.fill: mistyrose
shape: sequence_diagram
a
b
a -> b: "${counter2}: hello world"
a -> b: "${counter2}: second message"
}
vars: {
#'vers' does not have to be at the beginning of this source.
true: 0
false: 1
}
true -> false -> sequence
true -> sequence2
true: ${true}
false: ${false} |
I see what you mean. The alternative is to have it look like a function call explicitly right? e.g. something like ...
# Clear dynamic and clear static
a -> b: '${counter()}: hello ${name}' I see the benefit, but there is precedent: Ruby is a top programming language worldwide that doesn't make function calls explicit ( I personally don't agree with their design choice, but it at least proves that in 10000x larger environments, some of the biggest software has been able to be written with ambiguous variables. Using dynamic variables in D2 would also be a lot less frequent than calling functions in Ruby. So
|
sound good. |
Provide automatic numbering in sequence diagram is useful when diagram is very complex and software design documents need provide details for each flow in sequence diagram.
Please add this feature into sequence diagram. It is not complex but can reduce a lot of work to number and adjust them mannually.
The text was updated successfully, but these errors were encountered: