Open Andrew-Dunn opened 8 years ago
I'm currently working on an implementation of this using my proposed syntax. I may do a simpler enhancement to learn the codebase before attempting it though. (probably won't)
Sounds good to me. Changing the syntax should be easy as it is covered in unit tests (which you should add to).
Progress so far, the following code generates the given sequence diagram:
Bob->+Alice: Say "Hello".
+Alice->-Alice: Process salutation.
-Alice->+Bob: Say "Goodbye".
note right of Bob: Reflect on life
TODO
@bramp Do you have any preferences when it comes to code style, esp with regard to line length?
Unit/regression tests written. All that's left is to fix this rendering bug related to self signals that both end and begin an ExecutionSpecification, as well as bringing the code up to scratch for a PR.
"@bramp Do you have any preferences when it comes to code style, esp with regard to line length?" no real preference, but keep it reasonable <80-120 ish.
However, please run make lint
as that should catch most of the things I care about.
It would be great if support would be added for execution specifications, which are the thin grey rectangles which identify the beginning and end of an action being executed. Ideally we could support overlapping execution specifications too.
In websequencediagrams.com, the syntax used to denote execution specifications is by prepending the target actor with a
+
or-
, so the following sequence:Would be rendered like this:
I personally don't think this is a great syntax as when ending an execution you are using the
-
character on the other actor, which doesn't make a whole lot of sense. This also makes it impossible to do things like ending an execution on one lifeline and immediately beginning a new execution specification on the target actor, which is common with asynchronous communications.So I'm proposing we instead prepend the
+
or-
modifier to the lifeline/actor which is actually being modified, always, so the above example would actually be written as:Cheers!