Text arrow rendering in component diagrams seems partly broken

0 votes
asked Apr 3 in Bug by Max

Hello :)

I observed an unexpected behavior using PlantUML Version 1-2024.3.

I like the small arrows renderings in the text when drawing component diagrams.
However, it seems to be either partly broken or it was never intended to work like this.

I created an showcase diagram for what I mean (illustrates it far easier than describing it):

@startuml missing_up_arrows

title Missing up arrows

component A

component B

component C

component D

A -up-> B : > up arrow **missing**

B <-down- A : < up arrow works

B -right-> C : > right arrow works

C -down-> D : > down arrow works

D -left-> A : > left arrow **missing**

A <-right- D : < left arrow works

@enduml

I expected the two arrows to also display the little text arrow correctly.

Best regards
Max

3 Answers

0 votes
answered May 11 by JimN (900 points)
 
Best answer

Hi Max.  After reviewing the code further and ensuring that the changes I had in mind were isolated and consistent with the rest of the code, I submitted a pull request to fix the problem.  It can be seen here:

https://github.com/plantuml/plantuml/pull/1773

It was specifically the condition I mentioned in my earlier answer.  And I should point out it only impacted the component diagaram.  If you change the components in your scripts to classes, you'll see the extra arrows all work in the class diagram.

Here is how your diagram would look after this fix is included in a release:

After fix, now showing previously missing arrows.

I don't know the schedule for the when this will be included in a release.

Regards,

JimN

0 votes
answered May 8 by JimN (900 points)
reshown May 11 by JimN

Hi Max.   You mention this problem in 1-2024.3, so I'm curious if you had ever tried it on earlier versions.   I'm studying the source code to learn more about it and I believe i see the exact problem.  It's the two cases where the arrows are moving opposite their internal default directions, i.e. -up-> or -left->.  I believe it's a very simple fix, but I just wanted to double check with you on the question I just asked.

JimN

0 votes
answered May 26 by The-Lu (65,440 points)

Hi all,

[This is an Issue Review]  


This is now fixed on V1.2024.5 (https://github.com/plantuml/plantuml/releases/tag/v1.2024.5).

  • Thanks Max for the report.
  • Thanks PlantUML team and @ JimN for your work.

Regards. 

...