plantuml
plantuml copied to clipboard
Teoz: Shape of note changes only when "over" is used
Describe the bug
When using !pragma teoz true - shape of the note changes only when "over" position is used.
To Reproduce Steps to reproduce the behavior:
- Create basic sequence diagram (I've used PlantUML Web Server)
- Add
!pragma teoz true - Add
hnotefor example (same thing forrnote) - Position it on the
left - See that note does not change it's shape
- Now position the note
overa participant for example - Now the shape's changed
Code for image 1, when shape stays default.
@startuml
!pragma teoz true
Bob -> Alice : hello
hnote left: text
@enduml
Code for image 2, when shape is changed.
@startuml
!pragma teoz true
Bob -> Alice : hello
hnote over Bob: text
@enduml
Expected behavior A clear and concise description of what you expected to happen.
Screenshots
Image 1.
Image 2.
Desktop:
- OS: Ubuntu 22.04.2 LTS
- Browser Firefox v113.0.2
Propose to change title of issue to the wording you used in the description, e g:
shape of the note changes only when "over" position is used.
So perhaps:
- Teoz: Shape of note changes only when "over" used
[Just for the record]
We can also add some label (here m:teoz).
Ref.: QA-17257
It looks like the problem isn't with the "over", but with the the cases where "left" or "right" on hnote or rnote does not specify a particular participant. Here is a script that tries all the combinations (i.e. left, right, over Bob; left,right,over Alice, left, right without specific participant).
@startuml
!pragma teoz true
Bob -> Alice : hello
rnote right: rnote\n just right
rnote left: rnote\n just left
Bob <- Alice: hello
hnote right: hnote\n just right
hnote left: hnote\n just left
hnote over Alice: hnote\n over \n Alice
hnote left Alice: hnote\n left \n Alice
hnote right Alice: hnote\n right \n Alice
rnote over Alice: rnote\n over \n Alice
rnote left Alice: rnote\n left \n Alice
rnote right Alice: rnote\n right \n Alice
hnote over Bob: hnote\n over \n Bob
hnote left Bob: hnote\n left \n Bob
hnote right Bob: hnote\n right \n Bob
rnote over Bob: rnote\n over \n Bob
rnote left Bob: rnote\n left \n Bob
rnote right Bob: rnote\n right \n Bob
@enduml
Notice in the following generated diagram that it's the first four instances, where no participant is specified, where rnote and hnote revert back to the normal note shape.
If Teoz is not activated, Puma has the correct shapes on all positions:
I haven't yet looked into the code. I was just looking at the example to understand the issue.
Regards, Jim Nelson
Okay, it turns out to be "message" notes that were only showing the normal note style. The ones that were left, over and right of a named participant would correctly show the Hexagon (hnote) and Box (rnote) styles. I have a test that now shows it working. I added one more message after the first two that just uses the traditional note style to demonstrate that still works:
My test script is now:
@startuml
!pragma teoz true
Bob -> Alice : hello
rnote right: rnote\n just right
rnote left: rnote\n just left
Bob <- Alice: hello
hnote right: hnote\n just right
hnote left: hnote\n just left
hnote over Alice: hnote\n over \n Alice
hnote left Alice: hnote\n left \n Alice
hnote right Alice: hnote\n right \n Alice
rnote over Alice: rnote\n over \n Alice
rnote left Alice: rnote\n left \n Alice
rnote right Alice: rnote\n right \n Alice
hnote over Bob: hnote\n over \n Bob
hnote left Bob: hnote\n left \n Bob
hnote right Bob: hnote\n right \n Bob
rnote over Bob: rnote\n over \n Bob
rnote left Bob: rnote\n left \n Bob
rnote right Bob: rnote\n right \n Bob
Bob -> Alice : hello
note right: note\n just right
note left: note\n just left
@enduml
Let me know how you if this looks good to you. :)
Regards,
Jim Nelson
Hi @jimnelson372,
That seems good. 👍
But:
- Could you just add this test?
note across: note\nacross
hnote across: hnote\nacross
rnote across: rnote\nacross
to now cover all the cases:
@startuml
!pragma teoz true
Bob -> Alice : hello
rnote right: rnote\n just right
rnote left: rnote\n just left
Bob <- Alice: hello
hnote right: hnote\n just right
hnote left: hnote\n just left
hnote over Alice: hnote\n over \n Alice
hnote left Alice: hnote\n left \n Alice
hnote right Alice: hnote\n right \n Alice
rnote over Alice: rnote\n over \n Alice
rnote left Alice: rnote\n left \n Alice
rnote right Alice: rnote\n right \n Alice
hnote over Bob: hnote\n over \n Bob
hnote left Bob: hnote\n left \n Bob
hnote right Bob: hnote\n right \n Bob
rnote over Bob: rnote\n over \n Bob
rnote left Bob: rnote\n left \n Bob
rnote right Bob: rnote\n right \n Bob
Bob -> Alice : hello
note right: note\n just right
note left: note\n just left
note across: note\nacross
hnote across: hnote\nacross
rnote across: rnote\nacross
@enduml
Regards, Th.
Yes, @The-Lum, the across still works. I can see why you wanted to see this, since I had stressed that the problem was where there was not named participants, yet the across doesn't have named participants either.
The real issue is whether the note is considered to be connected to a message, or to one or all of the participants.
rnote across : Some text message
is a note (box style) that is connected to all the participants.
rnote left Bob: Some text message
is a note (box style) related to a particular participant: Bob. While:
rnote left : Some text message
is a note (box style) related to the message it follows. It's on this last kind of note where it is currently only displaying the normal style.
Here is the result of your script, with the fixes:
Thanks for the request, to double check that I am handling all the cases correctly.
Jim N.
Hi all,
[This is an Issue Review] 👀 This is now fixed on V1.2024.6.
- Thanks @danny-mhlv for the report.
- Thanks @jimnelson372 for your work.
Regards.